aws_sdk_ec2/operation/register_transit_gateway_multicast_group_members/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::register_transit_gateway_multicast_group_members::_register_transit_gateway_multicast_group_members_output::RegisterTransitGatewayMulticastGroupMembersOutputBuilder;
3
4pub use crate::operation::register_transit_gateway_multicast_group_members::_register_transit_gateway_multicast_group_members_input::RegisterTransitGatewayMulticastGroupMembersInputBuilder;
5
6impl crate::operation::register_transit_gateway_multicast_group_members::builders::RegisterTransitGatewayMulticastGroupMembersInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::register_transit_gateway_multicast_group_members::RegisterTransitGatewayMulticastGroupMembersOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::register_transit_gateway_multicast_group_members::RegisterTransitGatewayMulticastGroupMembersError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.register_transit_gateway_multicast_group_members();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `RegisterTransitGatewayMulticastGroupMembers`.
24///
25/// <p>Registers members (network interfaces) with the transit gateway multicast group. A member is a network interface associated with a supported EC2 instance that receives multicast traffic. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/tgw/tgw-multicast-overview.html">Multicast on transit gateways</a> in the <i>Amazon Web Services Transit Gateways Guide</i>.</p>
26/// <p>After you add the members, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SearchTransitGatewayMulticastGroups.html">SearchTransitGatewayMulticastGroups</a> to verify that the members were added to the transit gateway multicast group.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct RegisterTransitGatewayMulticastGroupMembersFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::register_transit_gateway_multicast_group_members::builders::RegisterTransitGatewayMulticastGroupMembersInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::register_transit_gateway_multicast_group_members::RegisterTransitGatewayMulticastGroupMembersOutput,
36        crate::operation::register_transit_gateway_multicast_group_members::RegisterTransitGatewayMulticastGroupMembersError,
37    > for RegisterTransitGatewayMulticastGroupMembersFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::register_transit_gateway_multicast_group_members::RegisterTransitGatewayMulticastGroupMembersOutput,
45            crate::operation::register_transit_gateway_multicast_group_members::RegisterTransitGatewayMulticastGroupMembersError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl RegisterTransitGatewayMulticastGroupMembersFluentBuilder {
52    /// Creates a new `RegisterTransitGatewayMulticastGroupMembersFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the RegisterTransitGatewayMulticastGroupMembers as a reference.
61    pub fn as_input(
62        &self,
63    ) -> &crate::operation::register_transit_gateway_multicast_group_members::builders::RegisterTransitGatewayMulticastGroupMembersInputBuilder {
64        &self.inner
65    }
66    /// Sends the request and returns the response.
67    ///
68    /// If an error occurs, an `SdkError` will be returned with additional details that
69    /// can be matched against.
70    ///
71    /// By default, any retryable failures will be retried twice. Retry behavior
72    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73    /// set when configuring the client.
74    pub async fn send(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::register_transit_gateway_multicast_group_members::RegisterTransitGatewayMulticastGroupMembersOutput,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::register_transit_gateway_multicast_group_members::RegisterTransitGatewayMulticastGroupMembersError,
80            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81        >,
82    > {
83        let input = self
84            .inner
85            .build()
86            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87        let runtime_plugins = crate::operation::register_transit_gateway_multicast_group_members::RegisterTransitGatewayMulticastGroupMembers::operation_runtime_plugins(
88                            self.handle.runtime_plugins.clone(),
89                            &self.handle.conf,
90                            self.config_override,
91                        );
92        crate::operation::register_transit_gateway_multicast_group_members::RegisterTransitGatewayMulticastGroupMembers::orchestrate(
93            &runtime_plugins,
94            input,
95        )
96        .await
97    }
98
99    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
100    pub fn customize(
101        self,
102    ) -> crate::client::customize::CustomizableOperation<
103        crate::operation::register_transit_gateway_multicast_group_members::RegisterTransitGatewayMulticastGroupMembersOutput,
104        crate::operation::register_transit_gateway_multicast_group_members::RegisterTransitGatewayMulticastGroupMembersError,
105        Self,
106    > {
107        crate::client::customize::CustomizableOperation::new(self)
108    }
109    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110        self.set_config_override(::std::option::Option::Some(config_override.into()));
111        self
112    }
113
114    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115        self.config_override = config_override;
116        self
117    }
118    /// <p>The ID of the transit gateway multicast domain.</p>
119    pub fn transit_gateway_multicast_domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120        self.inner = self.inner.transit_gateway_multicast_domain_id(input.into());
121        self
122    }
123    /// <p>The ID of the transit gateway multicast domain.</p>
124    pub fn set_transit_gateway_multicast_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125        self.inner = self.inner.set_transit_gateway_multicast_domain_id(input);
126        self
127    }
128    /// <p>The ID of the transit gateway multicast domain.</p>
129    pub fn get_transit_gateway_multicast_domain_id(&self) -> &::std::option::Option<::std::string::String> {
130        self.inner.get_transit_gateway_multicast_domain_id()
131    }
132    /// <p>The IP address assigned to the transit gateway multicast group.</p>
133    pub fn group_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.inner = self.inner.group_ip_address(input.into());
135        self
136    }
137    /// <p>The IP address assigned to the transit gateway multicast group.</p>
138    pub fn set_group_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.inner = self.inner.set_group_ip_address(input);
140        self
141    }
142    /// <p>The IP address assigned to the transit gateway multicast group.</p>
143    pub fn get_group_ip_address(&self) -> &::std::option::Option<::std::string::String> {
144        self.inner.get_group_ip_address()
145    }
146    ///
147    /// Appends an item to `NetworkInterfaceIds`.
148    ///
149    /// To override the contents of this collection use [`set_network_interface_ids`](Self::set_network_interface_ids).
150    ///
151    /// <p>The group members' network interface IDs to register with the transit gateway multicast group.</p>
152    pub fn network_interface_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.inner = self.inner.network_interface_ids(input.into());
154        self
155    }
156    /// <p>The group members' network interface IDs to register with the transit gateway multicast group.</p>
157    pub fn set_network_interface_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
158        self.inner = self.inner.set_network_interface_ids(input);
159        self
160    }
161    /// <p>The group members' network interface IDs to register with the transit gateway multicast group.</p>
162    pub fn get_network_interface_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
163        self.inner.get_network_interface_ids()
164    }
165    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
166    pub fn dry_run(mut self, input: bool) -> Self {
167        self.inner = self.inner.dry_run(input);
168        self
169    }
170    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
171    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
172        self.inner = self.inner.set_dry_run(input);
173        self
174    }
175    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
176    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
177        self.inner.get_dry_run()
178    }
179}