// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[derive(Debug)]
pub(crate) struct Handle<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
client: aws_smithy_client::Client<C, M, R>,
conf: crate::Config,
}
/// An ergonomic service client for `AmazonEC2`.
///
/// This client allows ergonomic access to a `AmazonEC2`-shaped service.
/// Each method corresponds to an endpoint defined in the service's Smithy model,
/// and the request and response shapes are auto-generated from that same model.
///
/// # Using a Client
///
/// Once you have a client set up, you can access the service's endpoints
/// by calling the appropriate method on [`Client`]. Each such method
/// returns a request builder for that endpoint, with methods for setting
/// the various fields of the request. Once your request is complete, use
/// the `send` method to send the request. `send` returns a future, which
/// you then have to `.await` to get the service's response.
///
/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#c-builder
/// [SigV4-signed requests]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
#[derive(std::fmt::Debug)]
pub struct Client<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<Handle<C, M, R>>,
}
impl<C, M, R> std::clone::Clone for Client<C, M, R> {
fn clone(&self) -> Self {
Self {
handle: self.handle.clone(),
}
}
}
#[doc(inline)]
pub use aws_smithy_client::Builder;
impl<C, M, R> From<aws_smithy_client::Client<C, M, R>> for Client<C, M, R> {
fn from(client: aws_smithy_client::Client<C, M, R>) -> Self {
Self::with_config(client, crate::Config::builder().build())
}
}
impl<C, M, R> Client<C, M, R> {
/// Creates a client with the given service configuration.
pub fn with_config(client: aws_smithy_client::Client<C, M, R>, conf: crate::Config) -> Self {
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
/// Returns the client's configuration.
pub fn conf(&self) -> &crate::Config {
&self.handle.conf
}
}
impl<C, M, R> Client<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Constructs a fluent builder for the `AcceptReservedInstancesExchangeQuote` operation.
///
/// See [`AcceptReservedInstancesExchangeQuote`](crate::client::fluent_builders::AcceptReservedInstancesExchangeQuote) for more information about the
/// operation and its arguments.
pub fn accept_reserved_instances_exchange_quote(
&self,
) -> fluent_builders::AcceptReservedInstancesExchangeQuote<C, M, R> {
fluent_builders::AcceptReservedInstancesExchangeQuote::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AcceptTransitGatewayMulticastDomainAssociations` operation.
///
/// See [`AcceptTransitGatewayMulticastDomainAssociations`](crate::client::fluent_builders::AcceptTransitGatewayMulticastDomainAssociations) for more information about the
/// operation and its arguments.
pub fn accept_transit_gateway_multicast_domain_associations(
&self,
) -> fluent_builders::AcceptTransitGatewayMulticastDomainAssociations<C, M, R> {
fluent_builders::AcceptTransitGatewayMulticastDomainAssociations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AcceptTransitGatewayPeeringAttachment` operation.
///
/// See [`AcceptTransitGatewayPeeringAttachment`](crate::client::fluent_builders::AcceptTransitGatewayPeeringAttachment) for more information about the
/// operation and its arguments.
pub fn accept_transit_gateway_peering_attachment(
&self,
) -> fluent_builders::AcceptTransitGatewayPeeringAttachment<C, M, R> {
fluent_builders::AcceptTransitGatewayPeeringAttachment::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AcceptTransitGatewayVpcAttachment` operation.
///
/// See [`AcceptTransitGatewayVpcAttachment`](crate::client::fluent_builders::AcceptTransitGatewayVpcAttachment) for more information about the
/// operation and its arguments.
pub fn accept_transit_gateway_vpc_attachment(
&self,
) -> fluent_builders::AcceptTransitGatewayVpcAttachment<C, M, R> {
fluent_builders::AcceptTransitGatewayVpcAttachment::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AcceptVpcEndpointConnections` operation.
///
/// See [`AcceptVpcEndpointConnections`](crate::client::fluent_builders::AcceptVpcEndpointConnections) for more information about the
/// operation and its arguments.
pub fn accept_vpc_endpoint_connections(
&self,
) -> fluent_builders::AcceptVpcEndpointConnections<C, M, R> {
fluent_builders::AcceptVpcEndpointConnections::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AcceptVpcPeeringConnection` operation.
///
/// See [`AcceptVpcPeeringConnection`](crate::client::fluent_builders::AcceptVpcPeeringConnection) for more information about the
/// operation and its arguments.
pub fn accept_vpc_peering_connection(
&self,
) -> fluent_builders::AcceptVpcPeeringConnection<C, M, R> {
fluent_builders::AcceptVpcPeeringConnection::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AdvertiseByoipCidr` operation.
///
/// See [`AdvertiseByoipCidr`](crate::client::fluent_builders::AdvertiseByoipCidr) for more information about the
/// operation and its arguments.
pub fn advertise_byoip_cidr(&self) -> fluent_builders::AdvertiseByoipCidr<C, M, R> {
fluent_builders::AdvertiseByoipCidr::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AllocateAddress` operation.
///
/// See [`AllocateAddress`](crate::client::fluent_builders::AllocateAddress) for more information about the
/// operation and its arguments.
pub fn allocate_address(&self) -> fluent_builders::AllocateAddress<C, M, R> {
fluent_builders::AllocateAddress::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AllocateHosts` operation.
///
/// See [`AllocateHosts`](crate::client::fluent_builders::AllocateHosts) for more information about the
/// operation and its arguments.
pub fn allocate_hosts(&self) -> fluent_builders::AllocateHosts<C, M, R> {
fluent_builders::AllocateHosts::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ApplySecurityGroupsToClientVpnTargetNetwork` operation.
///
/// See [`ApplySecurityGroupsToClientVpnTargetNetwork`](crate::client::fluent_builders::ApplySecurityGroupsToClientVpnTargetNetwork) for more information about the
/// operation and its arguments.
pub fn apply_security_groups_to_client_vpn_target_network(
&self,
) -> fluent_builders::ApplySecurityGroupsToClientVpnTargetNetwork<C, M, R> {
fluent_builders::ApplySecurityGroupsToClientVpnTargetNetwork::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssignIpv6Addresses` operation.
///
/// See [`AssignIpv6Addresses`](crate::client::fluent_builders::AssignIpv6Addresses) for more information about the
/// operation and its arguments.
pub fn assign_ipv6_addresses(&self) -> fluent_builders::AssignIpv6Addresses<C, M, R> {
fluent_builders::AssignIpv6Addresses::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssignPrivateIpAddresses` operation.
///
/// See [`AssignPrivateIpAddresses`](crate::client::fluent_builders::AssignPrivateIpAddresses) for more information about the
/// operation and its arguments.
pub fn assign_private_ip_addresses(
&self,
) -> fluent_builders::AssignPrivateIpAddresses<C, M, R> {
fluent_builders::AssignPrivateIpAddresses::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssociateAddress` operation.
///
/// See [`AssociateAddress`](crate::client::fluent_builders::AssociateAddress) for more information about the
/// operation and its arguments.
pub fn associate_address(&self) -> fluent_builders::AssociateAddress<C, M, R> {
fluent_builders::AssociateAddress::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssociateClientVpnTargetNetwork` operation.
///
/// See [`AssociateClientVpnTargetNetwork`](crate::client::fluent_builders::AssociateClientVpnTargetNetwork) for more information about the
/// operation and its arguments.
pub fn associate_client_vpn_target_network(
&self,
) -> fluent_builders::AssociateClientVpnTargetNetwork<C, M, R> {
fluent_builders::AssociateClientVpnTargetNetwork::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssociateDhcpOptions` operation.
///
/// See [`AssociateDhcpOptions`](crate::client::fluent_builders::AssociateDhcpOptions) for more information about the
/// operation and its arguments.
pub fn associate_dhcp_options(&self) -> fluent_builders::AssociateDhcpOptions<C, M, R> {
fluent_builders::AssociateDhcpOptions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssociateEnclaveCertificateIamRole` operation.
///
/// See [`AssociateEnclaveCertificateIamRole`](crate::client::fluent_builders::AssociateEnclaveCertificateIamRole) for more information about the
/// operation and its arguments.
pub fn associate_enclave_certificate_iam_role(
&self,
) -> fluent_builders::AssociateEnclaveCertificateIamRole<C, M, R> {
fluent_builders::AssociateEnclaveCertificateIamRole::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssociateIamInstanceProfile` operation.
///
/// See [`AssociateIamInstanceProfile`](crate::client::fluent_builders::AssociateIamInstanceProfile) for more information about the
/// operation and its arguments.
pub fn associate_iam_instance_profile(
&self,
) -> fluent_builders::AssociateIamInstanceProfile<C, M, R> {
fluent_builders::AssociateIamInstanceProfile::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssociateInstanceEventWindow` operation.
///
/// See [`AssociateInstanceEventWindow`](crate::client::fluent_builders::AssociateInstanceEventWindow) for more information about the
/// operation and its arguments.
pub fn associate_instance_event_window(
&self,
) -> fluent_builders::AssociateInstanceEventWindow<C, M, R> {
fluent_builders::AssociateInstanceEventWindow::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssociateRouteTable` operation.
///
/// See [`AssociateRouteTable`](crate::client::fluent_builders::AssociateRouteTable) for more information about the
/// operation and its arguments.
pub fn associate_route_table(&self) -> fluent_builders::AssociateRouteTable<C, M, R> {
fluent_builders::AssociateRouteTable::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssociateSubnetCidrBlock` operation.
///
/// See [`AssociateSubnetCidrBlock`](crate::client::fluent_builders::AssociateSubnetCidrBlock) for more information about the
/// operation and its arguments.
pub fn associate_subnet_cidr_block(
&self,
) -> fluent_builders::AssociateSubnetCidrBlock<C, M, R> {
fluent_builders::AssociateSubnetCidrBlock::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssociateTransitGatewayMulticastDomain` operation.
///
/// See [`AssociateTransitGatewayMulticastDomain`](crate::client::fluent_builders::AssociateTransitGatewayMulticastDomain) for more information about the
/// operation and its arguments.
pub fn associate_transit_gateway_multicast_domain(
&self,
) -> fluent_builders::AssociateTransitGatewayMulticastDomain<C, M, R> {
fluent_builders::AssociateTransitGatewayMulticastDomain::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssociateTransitGatewayRouteTable` operation.
///
/// See [`AssociateTransitGatewayRouteTable`](crate::client::fluent_builders::AssociateTransitGatewayRouteTable) for more information about the
/// operation and its arguments.
pub fn associate_transit_gateway_route_table(
&self,
) -> fluent_builders::AssociateTransitGatewayRouteTable<C, M, R> {
fluent_builders::AssociateTransitGatewayRouteTable::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssociateTrunkInterface` operation.
///
/// See [`AssociateTrunkInterface`](crate::client::fluent_builders::AssociateTrunkInterface) for more information about the
/// operation and its arguments.
pub fn associate_trunk_interface(&self) -> fluent_builders::AssociateTrunkInterface<C, M, R> {
fluent_builders::AssociateTrunkInterface::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AssociateVpcCidrBlock` operation.
///
/// See [`AssociateVpcCidrBlock`](crate::client::fluent_builders::AssociateVpcCidrBlock) for more information about the
/// operation and its arguments.
pub fn associate_vpc_cidr_block(&self) -> fluent_builders::AssociateVpcCidrBlock<C, M, R> {
fluent_builders::AssociateVpcCidrBlock::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AttachClassicLinkVpc` operation.
///
/// See [`AttachClassicLinkVpc`](crate::client::fluent_builders::AttachClassicLinkVpc) for more information about the
/// operation and its arguments.
pub fn attach_classic_link_vpc(&self) -> fluent_builders::AttachClassicLinkVpc<C, M, R> {
fluent_builders::AttachClassicLinkVpc::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AttachInternetGateway` operation.
///
/// See [`AttachInternetGateway`](crate::client::fluent_builders::AttachInternetGateway) for more information about the
/// operation and its arguments.
pub fn attach_internet_gateway(&self) -> fluent_builders::AttachInternetGateway<C, M, R> {
fluent_builders::AttachInternetGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AttachNetworkInterface` operation.
///
/// See [`AttachNetworkInterface`](crate::client::fluent_builders::AttachNetworkInterface) for more information about the
/// operation and its arguments.
pub fn attach_network_interface(&self) -> fluent_builders::AttachNetworkInterface<C, M, R> {
fluent_builders::AttachNetworkInterface::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AttachVolume` operation.
///
/// See [`AttachVolume`](crate::client::fluent_builders::AttachVolume) for more information about the
/// operation and its arguments.
pub fn attach_volume(&self) -> fluent_builders::AttachVolume<C, M, R> {
fluent_builders::AttachVolume::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AttachVpnGateway` operation.
///
/// See [`AttachVpnGateway`](crate::client::fluent_builders::AttachVpnGateway) for more information about the
/// operation and its arguments.
pub fn attach_vpn_gateway(&self) -> fluent_builders::AttachVpnGateway<C, M, R> {
fluent_builders::AttachVpnGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AuthorizeClientVpnIngress` operation.
///
/// See [`AuthorizeClientVpnIngress`](crate::client::fluent_builders::AuthorizeClientVpnIngress) for more information about the
/// operation and its arguments.
pub fn authorize_client_vpn_ingress(
&self,
) -> fluent_builders::AuthorizeClientVpnIngress<C, M, R> {
fluent_builders::AuthorizeClientVpnIngress::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AuthorizeSecurityGroupEgress` operation.
///
/// See [`AuthorizeSecurityGroupEgress`](crate::client::fluent_builders::AuthorizeSecurityGroupEgress) for more information about the
/// operation and its arguments.
pub fn authorize_security_group_egress(
&self,
) -> fluent_builders::AuthorizeSecurityGroupEgress<C, M, R> {
fluent_builders::AuthorizeSecurityGroupEgress::new(self.handle.clone())
}
/// Constructs a fluent builder for the `AuthorizeSecurityGroupIngress` operation.
///
/// See [`AuthorizeSecurityGroupIngress`](crate::client::fluent_builders::AuthorizeSecurityGroupIngress) for more information about the
/// operation and its arguments.
pub fn authorize_security_group_ingress(
&self,
) -> fluent_builders::AuthorizeSecurityGroupIngress<C, M, R> {
fluent_builders::AuthorizeSecurityGroupIngress::new(self.handle.clone())
}
/// Constructs a fluent builder for the `BundleInstance` operation.
///
/// See [`BundleInstance`](crate::client::fluent_builders::BundleInstance) for more information about the
/// operation and its arguments.
pub fn bundle_instance(&self) -> fluent_builders::BundleInstance<C, M, R> {
fluent_builders::BundleInstance::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CancelBundleTask` operation.
///
/// See [`CancelBundleTask`](crate::client::fluent_builders::CancelBundleTask) for more information about the
/// operation and its arguments.
pub fn cancel_bundle_task(&self) -> fluent_builders::CancelBundleTask<C, M, R> {
fluent_builders::CancelBundleTask::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CancelCapacityReservation` operation.
///
/// See [`CancelCapacityReservation`](crate::client::fluent_builders::CancelCapacityReservation) for more information about the
/// operation and its arguments.
pub fn cancel_capacity_reservation(
&self,
) -> fluent_builders::CancelCapacityReservation<C, M, R> {
fluent_builders::CancelCapacityReservation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CancelCapacityReservationFleets` operation.
///
/// See [`CancelCapacityReservationFleets`](crate::client::fluent_builders::CancelCapacityReservationFleets) for more information about the
/// operation and its arguments.
pub fn cancel_capacity_reservation_fleets(
&self,
) -> fluent_builders::CancelCapacityReservationFleets<C, M, R> {
fluent_builders::CancelCapacityReservationFleets::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CancelConversionTask` operation.
///
/// See [`CancelConversionTask`](crate::client::fluent_builders::CancelConversionTask) for more information about the
/// operation and its arguments.
pub fn cancel_conversion_task(&self) -> fluent_builders::CancelConversionTask<C, M, R> {
fluent_builders::CancelConversionTask::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CancelExportTask` operation.
///
/// See [`CancelExportTask`](crate::client::fluent_builders::CancelExportTask) for more information about the
/// operation and its arguments.
pub fn cancel_export_task(&self) -> fluent_builders::CancelExportTask<C, M, R> {
fluent_builders::CancelExportTask::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CancelImportTask` operation.
///
/// See [`CancelImportTask`](crate::client::fluent_builders::CancelImportTask) for more information about the
/// operation and its arguments.
pub fn cancel_import_task(&self) -> fluent_builders::CancelImportTask<C, M, R> {
fluent_builders::CancelImportTask::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CancelReservedInstancesListing` operation.
///
/// See [`CancelReservedInstancesListing`](crate::client::fluent_builders::CancelReservedInstancesListing) for more information about the
/// operation and its arguments.
pub fn cancel_reserved_instances_listing(
&self,
) -> fluent_builders::CancelReservedInstancesListing<C, M, R> {
fluent_builders::CancelReservedInstancesListing::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CancelSpotFleetRequests` operation.
///
/// See [`CancelSpotFleetRequests`](crate::client::fluent_builders::CancelSpotFleetRequests) for more information about the
/// operation and its arguments.
pub fn cancel_spot_fleet_requests(&self) -> fluent_builders::CancelSpotFleetRequests<C, M, R> {
fluent_builders::CancelSpotFleetRequests::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CancelSpotInstanceRequests` operation.
///
/// See [`CancelSpotInstanceRequests`](crate::client::fluent_builders::CancelSpotInstanceRequests) for more information about the
/// operation and its arguments.
pub fn cancel_spot_instance_requests(
&self,
) -> fluent_builders::CancelSpotInstanceRequests<C, M, R> {
fluent_builders::CancelSpotInstanceRequests::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ConfirmProductInstance` operation.
///
/// See [`ConfirmProductInstance`](crate::client::fluent_builders::ConfirmProductInstance) for more information about the
/// operation and its arguments.
pub fn confirm_product_instance(&self) -> fluent_builders::ConfirmProductInstance<C, M, R> {
fluent_builders::ConfirmProductInstance::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CopyFpgaImage` operation.
///
/// See [`CopyFpgaImage`](crate::client::fluent_builders::CopyFpgaImage) for more information about the
/// operation and its arguments.
pub fn copy_fpga_image(&self) -> fluent_builders::CopyFpgaImage<C, M, R> {
fluent_builders::CopyFpgaImage::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CopyImage` operation.
///
/// See [`CopyImage`](crate::client::fluent_builders::CopyImage) for more information about the
/// operation and its arguments.
pub fn copy_image(&self) -> fluent_builders::CopyImage<C, M, R> {
fluent_builders::CopyImage::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CopySnapshot` operation.
///
/// See [`CopySnapshot`](crate::client::fluent_builders::CopySnapshot) for more information about the
/// operation and its arguments.
pub fn copy_snapshot(&self) -> fluent_builders::CopySnapshot<C, M, R> {
fluent_builders::CopySnapshot::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateCapacityReservation` operation.
///
/// See [`CreateCapacityReservation`](crate::client::fluent_builders::CreateCapacityReservation) for more information about the
/// operation and its arguments.
pub fn create_capacity_reservation(
&self,
) -> fluent_builders::CreateCapacityReservation<C, M, R> {
fluent_builders::CreateCapacityReservation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateCapacityReservationFleet` operation.
///
/// See [`CreateCapacityReservationFleet`](crate::client::fluent_builders::CreateCapacityReservationFleet) for more information about the
/// operation and its arguments.
pub fn create_capacity_reservation_fleet(
&self,
) -> fluent_builders::CreateCapacityReservationFleet<C, M, R> {
fluent_builders::CreateCapacityReservationFleet::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateCarrierGateway` operation.
///
/// See [`CreateCarrierGateway`](crate::client::fluent_builders::CreateCarrierGateway) for more information about the
/// operation and its arguments.
pub fn create_carrier_gateway(&self) -> fluent_builders::CreateCarrierGateway<C, M, R> {
fluent_builders::CreateCarrierGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateClientVpnEndpoint` operation.
///
/// See [`CreateClientVpnEndpoint`](crate::client::fluent_builders::CreateClientVpnEndpoint) for more information about the
/// operation and its arguments.
pub fn create_client_vpn_endpoint(&self) -> fluent_builders::CreateClientVpnEndpoint<C, M, R> {
fluent_builders::CreateClientVpnEndpoint::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateClientVpnRoute` operation.
///
/// See [`CreateClientVpnRoute`](crate::client::fluent_builders::CreateClientVpnRoute) for more information about the
/// operation and its arguments.
pub fn create_client_vpn_route(&self) -> fluent_builders::CreateClientVpnRoute<C, M, R> {
fluent_builders::CreateClientVpnRoute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateCustomerGateway` operation.
///
/// See [`CreateCustomerGateway`](crate::client::fluent_builders::CreateCustomerGateway) for more information about the
/// operation and its arguments.
pub fn create_customer_gateway(&self) -> fluent_builders::CreateCustomerGateway<C, M, R> {
fluent_builders::CreateCustomerGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateDefaultSubnet` operation.
///
/// See [`CreateDefaultSubnet`](crate::client::fluent_builders::CreateDefaultSubnet) for more information about the
/// operation and its arguments.
pub fn create_default_subnet(&self) -> fluent_builders::CreateDefaultSubnet<C, M, R> {
fluent_builders::CreateDefaultSubnet::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateDefaultVpc` operation.
///
/// See [`CreateDefaultVpc`](crate::client::fluent_builders::CreateDefaultVpc) for more information about the
/// operation and its arguments.
pub fn create_default_vpc(&self) -> fluent_builders::CreateDefaultVpc<C, M, R> {
fluent_builders::CreateDefaultVpc::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateDhcpOptions` operation.
///
/// See [`CreateDhcpOptions`](crate::client::fluent_builders::CreateDhcpOptions) for more information about the
/// operation and its arguments.
pub fn create_dhcp_options(&self) -> fluent_builders::CreateDhcpOptions<C, M, R> {
fluent_builders::CreateDhcpOptions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateEgressOnlyInternetGateway` operation.
///
/// See [`CreateEgressOnlyInternetGateway`](crate::client::fluent_builders::CreateEgressOnlyInternetGateway) for more information about the
/// operation and its arguments.
pub fn create_egress_only_internet_gateway(
&self,
) -> fluent_builders::CreateEgressOnlyInternetGateway<C, M, R> {
fluent_builders::CreateEgressOnlyInternetGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateFleet` operation.
///
/// See [`CreateFleet`](crate::client::fluent_builders::CreateFleet) for more information about the
/// operation and its arguments.
pub fn create_fleet(&self) -> fluent_builders::CreateFleet<C, M, R> {
fluent_builders::CreateFleet::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateFlowLogs` operation.
///
/// See [`CreateFlowLogs`](crate::client::fluent_builders::CreateFlowLogs) for more information about the
/// operation and its arguments.
pub fn create_flow_logs(&self) -> fluent_builders::CreateFlowLogs<C, M, R> {
fluent_builders::CreateFlowLogs::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateFpgaImage` operation.
///
/// See [`CreateFpgaImage`](crate::client::fluent_builders::CreateFpgaImage) for more information about the
/// operation and its arguments.
pub fn create_fpga_image(&self) -> fluent_builders::CreateFpgaImage<C, M, R> {
fluent_builders::CreateFpgaImage::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateImage` operation.
///
/// See [`CreateImage`](crate::client::fluent_builders::CreateImage) for more information about the
/// operation and its arguments.
pub fn create_image(&self) -> fluent_builders::CreateImage<C, M, R> {
fluent_builders::CreateImage::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateInstanceEventWindow` operation.
///
/// See [`CreateInstanceEventWindow`](crate::client::fluent_builders::CreateInstanceEventWindow) for more information about the
/// operation and its arguments.
pub fn create_instance_event_window(
&self,
) -> fluent_builders::CreateInstanceEventWindow<C, M, R> {
fluent_builders::CreateInstanceEventWindow::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateInstanceExportTask` operation.
///
/// See [`CreateInstanceExportTask`](crate::client::fluent_builders::CreateInstanceExportTask) for more information about the
/// operation and its arguments.
pub fn create_instance_export_task(
&self,
) -> fluent_builders::CreateInstanceExportTask<C, M, R> {
fluent_builders::CreateInstanceExportTask::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateInternetGateway` operation.
///
/// See [`CreateInternetGateway`](crate::client::fluent_builders::CreateInternetGateway) for more information about the
/// operation and its arguments.
pub fn create_internet_gateway(&self) -> fluent_builders::CreateInternetGateway<C, M, R> {
fluent_builders::CreateInternetGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateKeyPair` operation.
///
/// See [`CreateKeyPair`](crate::client::fluent_builders::CreateKeyPair) for more information about the
/// operation and its arguments.
pub fn create_key_pair(&self) -> fluent_builders::CreateKeyPair<C, M, R> {
fluent_builders::CreateKeyPair::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateLaunchTemplate` operation.
///
/// See [`CreateLaunchTemplate`](crate::client::fluent_builders::CreateLaunchTemplate) for more information about the
/// operation and its arguments.
pub fn create_launch_template(&self) -> fluent_builders::CreateLaunchTemplate<C, M, R> {
fluent_builders::CreateLaunchTemplate::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateLaunchTemplateVersion` operation.
///
/// See [`CreateLaunchTemplateVersion`](crate::client::fluent_builders::CreateLaunchTemplateVersion) for more information about the
/// operation and its arguments.
pub fn create_launch_template_version(
&self,
) -> fluent_builders::CreateLaunchTemplateVersion<C, M, R> {
fluent_builders::CreateLaunchTemplateVersion::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateLocalGatewayRoute` operation.
///
/// See [`CreateLocalGatewayRoute`](crate::client::fluent_builders::CreateLocalGatewayRoute) for more information about the
/// operation and its arguments.
pub fn create_local_gateway_route(&self) -> fluent_builders::CreateLocalGatewayRoute<C, M, R> {
fluent_builders::CreateLocalGatewayRoute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateLocalGatewayRouteTableVpcAssociation` operation.
///
/// See [`CreateLocalGatewayRouteTableVpcAssociation`](crate::client::fluent_builders::CreateLocalGatewayRouteTableVpcAssociation) for more information about the
/// operation and its arguments.
pub fn create_local_gateway_route_table_vpc_association(
&self,
) -> fluent_builders::CreateLocalGatewayRouteTableVpcAssociation<C, M, R> {
fluent_builders::CreateLocalGatewayRouteTableVpcAssociation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateManagedPrefixList` operation.
///
/// See [`CreateManagedPrefixList`](crate::client::fluent_builders::CreateManagedPrefixList) for more information about the
/// operation and its arguments.
pub fn create_managed_prefix_list(&self) -> fluent_builders::CreateManagedPrefixList<C, M, R> {
fluent_builders::CreateManagedPrefixList::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateNatGateway` operation.
///
/// See [`CreateNatGateway`](crate::client::fluent_builders::CreateNatGateway) for more information about the
/// operation and its arguments.
pub fn create_nat_gateway(&self) -> fluent_builders::CreateNatGateway<C, M, R> {
fluent_builders::CreateNatGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateNetworkAcl` operation.
///
/// See [`CreateNetworkAcl`](crate::client::fluent_builders::CreateNetworkAcl) for more information about the
/// operation and its arguments.
pub fn create_network_acl(&self) -> fluent_builders::CreateNetworkAcl<C, M, R> {
fluent_builders::CreateNetworkAcl::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateNetworkAclEntry` operation.
///
/// See [`CreateNetworkAclEntry`](crate::client::fluent_builders::CreateNetworkAclEntry) for more information about the
/// operation and its arguments.
pub fn create_network_acl_entry(&self) -> fluent_builders::CreateNetworkAclEntry<C, M, R> {
fluent_builders::CreateNetworkAclEntry::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateNetworkInsightsPath` operation.
///
/// See [`CreateNetworkInsightsPath`](crate::client::fluent_builders::CreateNetworkInsightsPath) for more information about the
/// operation and its arguments.
pub fn create_network_insights_path(
&self,
) -> fluent_builders::CreateNetworkInsightsPath<C, M, R> {
fluent_builders::CreateNetworkInsightsPath::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateNetworkInterface` operation.
///
/// See [`CreateNetworkInterface`](crate::client::fluent_builders::CreateNetworkInterface) for more information about the
/// operation and its arguments.
pub fn create_network_interface(&self) -> fluent_builders::CreateNetworkInterface<C, M, R> {
fluent_builders::CreateNetworkInterface::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateNetworkInterfacePermission` operation.
///
/// See [`CreateNetworkInterfacePermission`](crate::client::fluent_builders::CreateNetworkInterfacePermission) for more information about the
/// operation and its arguments.
pub fn create_network_interface_permission(
&self,
) -> fluent_builders::CreateNetworkInterfacePermission<C, M, R> {
fluent_builders::CreateNetworkInterfacePermission::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreatePlacementGroup` operation.
///
/// See [`CreatePlacementGroup`](crate::client::fluent_builders::CreatePlacementGroup) for more information about the
/// operation and its arguments.
pub fn create_placement_group(&self) -> fluent_builders::CreatePlacementGroup<C, M, R> {
fluent_builders::CreatePlacementGroup::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateReplaceRootVolumeTask` operation.
///
/// See [`CreateReplaceRootVolumeTask`](crate::client::fluent_builders::CreateReplaceRootVolumeTask) for more information about the
/// operation and its arguments.
pub fn create_replace_root_volume_task(
&self,
) -> fluent_builders::CreateReplaceRootVolumeTask<C, M, R> {
fluent_builders::CreateReplaceRootVolumeTask::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateReservedInstancesListing` operation.
///
/// See [`CreateReservedInstancesListing`](crate::client::fluent_builders::CreateReservedInstancesListing) for more information about the
/// operation and its arguments.
pub fn create_reserved_instances_listing(
&self,
) -> fluent_builders::CreateReservedInstancesListing<C, M, R> {
fluent_builders::CreateReservedInstancesListing::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateRestoreImageTask` operation.
///
/// See [`CreateRestoreImageTask`](crate::client::fluent_builders::CreateRestoreImageTask) for more information about the
/// operation and its arguments.
pub fn create_restore_image_task(&self) -> fluent_builders::CreateRestoreImageTask<C, M, R> {
fluent_builders::CreateRestoreImageTask::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateRoute` operation.
///
/// See [`CreateRoute`](crate::client::fluent_builders::CreateRoute) for more information about the
/// operation and its arguments.
pub fn create_route(&self) -> fluent_builders::CreateRoute<C, M, R> {
fluent_builders::CreateRoute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateRouteTable` operation.
///
/// See [`CreateRouteTable`](crate::client::fluent_builders::CreateRouteTable) for more information about the
/// operation and its arguments.
pub fn create_route_table(&self) -> fluent_builders::CreateRouteTable<C, M, R> {
fluent_builders::CreateRouteTable::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateSecurityGroup` operation.
///
/// See [`CreateSecurityGroup`](crate::client::fluent_builders::CreateSecurityGroup) for more information about the
/// operation and its arguments.
pub fn create_security_group(&self) -> fluent_builders::CreateSecurityGroup<C, M, R> {
fluent_builders::CreateSecurityGroup::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateSnapshot` operation.
///
/// See [`CreateSnapshot`](crate::client::fluent_builders::CreateSnapshot) for more information about the
/// operation and its arguments.
pub fn create_snapshot(&self) -> fluent_builders::CreateSnapshot<C, M, R> {
fluent_builders::CreateSnapshot::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateSnapshots` operation.
///
/// See [`CreateSnapshots`](crate::client::fluent_builders::CreateSnapshots) for more information about the
/// operation and its arguments.
pub fn create_snapshots(&self) -> fluent_builders::CreateSnapshots<C, M, R> {
fluent_builders::CreateSnapshots::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateSpotDatafeedSubscription` operation.
///
/// See [`CreateSpotDatafeedSubscription`](crate::client::fluent_builders::CreateSpotDatafeedSubscription) for more information about the
/// operation and its arguments.
pub fn create_spot_datafeed_subscription(
&self,
) -> fluent_builders::CreateSpotDatafeedSubscription<C, M, R> {
fluent_builders::CreateSpotDatafeedSubscription::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateStoreImageTask` operation.
///
/// See [`CreateStoreImageTask`](crate::client::fluent_builders::CreateStoreImageTask) for more information about the
/// operation and its arguments.
pub fn create_store_image_task(&self) -> fluent_builders::CreateStoreImageTask<C, M, R> {
fluent_builders::CreateStoreImageTask::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateSubnet` operation.
///
/// See [`CreateSubnet`](crate::client::fluent_builders::CreateSubnet) for more information about the
/// operation and its arguments.
pub fn create_subnet(&self) -> fluent_builders::CreateSubnet<C, M, R> {
fluent_builders::CreateSubnet::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateSubnetCidrReservation` operation.
///
/// See [`CreateSubnetCidrReservation`](crate::client::fluent_builders::CreateSubnetCidrReservation) for more information about the
/// operation and its arguments.
pub fn create_subnet_cidr_reservation(
&self,
) -> fluent_builders::CreateSubnetCidrReservation<C, M, R> {
fluent_builders::CreateSubnetCidrReservation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTags` operation.
///
/// See [`CreateTags`](crate::client::fluent_builders::CreateTags) for more information about the
/// operation and its arguments.
pub fn create_tags(&self) -> fluent_builders::CreateTags<C, M, R> {
fluent_builders::CreateTags::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTrafficMirrorFilter` operation.
///
/// See [`CreateTrafficMirrorFilter`](crate::client::fluent_builders::CreateTrafficMirrorFilter) for more information about the
/// operation and its arguments.
pub fn create_traffic_mirror_filter(
&self,
) -> fluent_builders::CreateTrafficMirrorFilter<C, M, R> {
fluent_builders::CreateTrafficMirrorFilter::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTrafficMirrorFilterRule` operation.
///
/// See [`CreateTrafficMirrorFilterRule`](crate::client::fluent_builders::CreateTrafficMirrorFilterRule) for more information about the
/// operation and its arguments.
pub fn create_traffic_mirror_filter_rule(
&self,
) -> fluent_builders::CreateTrafficMirrorFilterRule<C, M, R> {
fluent_builders::CreateTrafficMirrorFilterRule::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTrafficMirrorSession` operation.
///
/// See [`CreateTrafficMirrorSession`](crate::client::fluent_builders::CreateTrafficMirrorSession) for more information about the
/// operation and its arguments.
pub fn create_traffic_mirror_session(
&self,
) -> fluent_builders::CreateTrafficMirrorSession<C, M, R> {
fluent_builders::CreateTrafficMirrorSession::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTrafficMirrorTarget` operation.
///
/// See [`CreateTrafficMirrorTarget`](crate::client::fluent_builders::CreateTrafficMirrorTarget) for more information about the
/// operation and its arguments.
pub fn create_traffic_mirror_target(
&self,
) -> fluent_builders::CreateTrafficMirrorTarget<C, M, R> {
fluent_builders::CreateTrafficMirrorTarget::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTransitGateway` operation.
///
/// See [`CreateTransitGateway`](crate::client::fluent_builders::CreateTransitGateway) for more information about the
/// operation and its arguments.
pub fn create_transit_gateway(&self) -> fluent_builders::CreateTransitGateway<C, M, R> {
fluent_builders::CreateTransitGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTransitGatewayConnect` operation.
///
/// See [`CreateTransitGatewayConnect`](crate::client::fluent_builders::CreateTransitGatewayConnect) for more information about the
/// operation and its arguments.
pub fn create_transit_gateway_connect(
&self,
) -> fluent_builders::CreateTransitGatewayConnect<C, M, R> {
fluent_builders::CreateTransitGatewayConnect::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTransitGatewayConnectPeer` operation.
///
/// See [`CreateTransitGatewayConnectPeer`](crate::client::fluent_builders::CreateTransitGatewayConnectPeer) for more information about the
/// operation and its arguments.
pub fn create_transit_gateway_connect_peer(
&self,
) -> fluent_builders::CreateTransitGatewayConnectPeer<C, M, R> {
fluent_builders::CreateTransitGatewayConnectPeer::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTransitGatewayMulticastDomain` operation.
///
/// See [`CreateTransitGatewayMulticastDomain`](crate::client::fluent_builders::CreateTransitGatewayMulticastDomain) for more information about the
/// operation and its arguments.
pub fn create_transit_gateway_multicast_domain(
&self,
) -> fluent_builders::CreateTransitGatewayMulticastDomain<C, M, R> {
fluent_builders::CreateTransitGatewayMulticastDomain::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTransitGatewayPeeringAttachment` operation.
///
/// See [`CreateTransitGatewayPeeringAttachment`](crate::client::fluent_builders::CreateTransitGatewayPeeringAttachment) for more information about the
/// operation and its arguments.
pub fn create_transit_gateway_peering_attachment(
&self,
) -> fluent_builders::CreateTransitGatewayPeeringAttachment<C, M, R> {
fluent_builders::CreateTransitGatewayPeeringAttachment::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTransitGatewayPrefixListReference` operation.
///
/// See [`CreateTransitGatewayPrefixListReference`](crate::client::fluent_builders::CreateTransitGatewayPrefixListReference) for more information about the
/// operation and its arguments.
pub fn create_transit_gateway_prefix_list_reference(
&self,
) -> fluent_builders::CreateTransitGatewayPrefixListReference<C, M, R> {
fluent_builders::CreateTransitGatewayPrefixListReference::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTransitGatewayRoute` operation.
///
/// See [`CreateTransitGatewayRoute`](crate::client::fluent_builders::CreateTransitGatewayRoute) for more information about the
/// operation and its arguments.
pub fn create_transit_gateway_route(
&self,
) -> fluent_builders::CreateTransitGatewayRoute<C, M, R> {
fluent_builders::CreateTransitGatewayRoute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTransitGatewayRouteTable` operation.
///
/// See [`CreateTransitGatewayRouteTable`](crate::client::fluent_builders::CreateTransitGatewayRouteTable) for more information about the
/// operation and its arguments.
pub fn create_transit_gateway_route_table(
&self,
) -> fluent_builders::CreateTransitGatewayRouteTable<C, M, R> {
fluent_builders::CreateTransitGatewayRouteTable::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateTransitGatewayVpcAttachment` operation.
///
/// See [`CreateTransitGatewayVpcAttachment`](crate::client::fluent_builders::CreateTransitGatewayVpcAttachment) for more information about the
/// operation and its arguments.
pub fn create_transit_gateway_vpc_attachment(
&self,
) -> fluent_builders::CreateTransitGatewayVpcAttachment<C, M, R> {
fluent_builders::CreateTransitGatewayVpcAttachment::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateVolume` operation.
///
/// See [`CreateVolume`](crate::client::fluent_builders::CreateVolume) for more information about the
/// operation and its arguments.
pub fn create_volume(&self) -> fluent_builders::CreateVolume<C, M, R> {
fluent_builders::CreateVolume::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateVpc` operation.
///
/// See [`CreateVpc`](crate::client::fluent_builders::CreateVpc) for more information about the
/// operation and its arguments.
pub fn create_vpc(&self) -> fluent_builders::CreateVpc<C, M, R> {
fluent_builders::CreateVpc::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateVpcEndpoint` operation.
///
/// See [`CreateVpcEndpoint`](crate::client::fluent_builders::CreateVpcEndpoint) for more information about the
/// operation and its arguments.
pub fn create_vpc_endpoint(&self) -> fluent_builders::CreateVpcEndpoint<C, M, R> {
fluent_builders::CreateVpcEndpoint::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateVpcEndpointConnectionNotification` operation.
///
/// See [`CreateVpcEndpointConnectionNotification`](crate::client::fluent_builders::CreateVpcEndpointConnectionNotification) for more information about the
/// operation and its arguments.
pub fn create_vpc_endpoint_connection_notification(
&self,
) -> fluent_builders::CreateVpcEndpointConnectionNotification<C, M, R> {
fluent_builders::CreateVpcEndpointConnectionNotification::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateVpcEndpointServiceConfiguration` operation.
///
/// See [`CreateVpcEndpointServiceConfiguration`](crate::client::fluent_builders::CreateVpcEndpointServiceConfiguration) for more information about the
/// operation and its arguments.
pub fn create_vpc_endpoint_service_configuration(
&self,
) -> fluent_builders::CreateVpcEndpointServiceConfiguration<C, M, R> {
fluent_builders::CreateVpcEndpointServiceConfiguration::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateVpcPeeringConnection` operation.
///
/// See [`CreateVpcPeeringConnection`](crate::client::fluent_builders::CreateVpcPeeringConnection) for more information about the
/// operation and its arguments.
pub fn create_vpc_peering_connection(
&self,
) -> fluent_builders::CreateVpcPeeringConnection<C, M, R> {
fluent_builders::CreateVpcPeeringConnection::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateVpnConnection` operation.
///
/// See [`CreateVpnConnection`](crate::client::fluent_builders::CreateVpnConnection) for more information about the
/// operation and its arguments.
pub fn create_vpn_connection(&self) -> fluent_builders::CreateVpnConnection<C, M, R> {
fluent_builders::CreateVpnConnection::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateVpnConnectionRoute` operation.
///
/// See [`CreateVpnConnectionRoute`](crate::client::fluent_builders::CreateVpnConnectionRoute) for more information about the
/// operation and its arguments.
pub fn create_vpn_connection_route(
&self,
) -> fluent_builders::CreateVpnConnectionRoute<C, M, R> {
fluent_builders::CreateVpnConnectionRoute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `CreateVpnGateway` operation.
///
/// See [`CreateVpnGateway`](crate::client::fluent_builders::CreateVpnGateway) for more information about the
/// operation and its arguments.
pub fn create_vpn_gateway(&self) -> fluent_builders::CreateVpnGateway<C, M, R> {
fluent_builders::CreateVpnGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteCarrierGateway` operation.
///
/// See [`DeleteCarrierGateway`](crate::client::fluent_builders::DeleteCarrierGateway) for more information about the
/// operation and its arguments.
pub fn delete_carrier_gateway(&self) -> fluent_builders::DeleteCarrierGateway<C, M, R> {
fluent_builders::DeleteCarrierGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteClientVpnEndpoint` operation.
///
/// See [`DeleteClientVpnEndpoint`](crate::client::fluent_builders::DeleteClientVpnEndpoint) for more information about the
/// operation and its arguments.
pub fn delete_client_vpn_endpoint(&self) -> fluent_builders::DeleteClientVpnEndpoint<C, M, R> {
fluent_builders::DeleteClientVpnEndpoint::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteClientVpnRoute` operation.
///
/// See [`DeleteClientVpnRoute`](crate::client::fluent_builders::DeleteClientVpnRoute) for more information about the
/// operation and its arguments.
pub fn delete_client_vpn_route(&self) -> fluent_builders::DeleteClientVpnRoute<C, M, R> {
fluent_builders::DeleteClientVpnRoute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteCustomerGateway` operation.
///
/// See [`DeleteCustomerGateway`](crate::client::fluent_builders::DeleteCustomerGateway) for more information about the
/// operation and its arguments.
pub fn delete_customer_gateway(&self) -> fluent_builders::DeleteCustomerGateway<C, M, R> {
fluent_builders::DeleteCustomerGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteDhcpOptions` operation.
///
/// See [`DeleteDhcpOptions`](crate::client::fluent_builders::DeleteDhcpOptions) for more information about the
/// operation and its arguments.
pub fn delete_dhcp_options(&self) -> fluent_builders::DeleteDhcpOptions<C, M, R> {
fluent_builders::DeleteDhcpOptions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteEgressOnlyInternetGateway` operation.
///
/// See [`DeleteEgressOnlyInternetGateway`](crate::client::fluent_builders::DeleteEgressOnlyInternetGateway) for more information about the
/// operation and its arguments.
pub fn delete_egress_only_internet_gateway(
&self,
) -> fluent_builders::DeleteEgressOnlyInternetGateway<C, M, R> {
fluent_builders::DeleteEgressOnlyInternetGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteFleets` operation.
///
/// See [`DeleteFleets`](crate::client::fluent_builders::DeleteFleets) for more information about the
/// operation and its arguments.
pub fn delete_fleets(&self) -> fluent_builders::DeleteFleets<C, M, R> {
fluent_builders::DeleteFleets::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteFlowLogs` operation.
///
/// See [`DeleteFlowLogs`](crate::client::fluent_builders::DeleteFlowLogs) for more information about the
/// operation and its arguments.
pub fn delete_flow_logs(&self) -> fluent_builders::DeleteFlowLogs<C, M, R> {
fluent_builders::DeleteFlowLogs::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteFpgaImage` operation.
///
/// See [`DeleteFpgaImage`](crate::client::fluent_builders::DeleteFpgaImage) for more information about the
/// operation and its arguments.
pub fn delete_fpga_image(&self) -> fluent_builders::DeleteFpgaImage<C, M, R> {
fluent_builders::DeleteFpgaImage::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteInstanceEventWindow` operation.
///
/// See [`DeleteInstanceEventWindow`](crate::client::fluent_builders::DeleteInstanceEventWindow) for more information about the
/// operation and its arguments.
pub fn delete_instance_event_window(
&self,
) -> fluent_builders::DeleteInstanceEventWindow<C, M, R> {
fluent_builders::DeleteInstanceEventWindow::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteInternetGateway` operation.
///
/// See [`DeleteInternetGateway`](crate::client::fluent_builders::DeleteInternetGateway) for more information about the
/// operation and its arguments.
pub fn delete_internet_gateway(&self) -> fluent_builders::DeleteInternetGateway<C, M, R> {
fluent_builders::DeleteInternetGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteKeyPair` operation.
///
/// See [`DeleteKeyPair`](crate::client::fluent_builders::DeleteKeyPair) for more information about the
/// operation and its arguments.
pub fn delete_key_pair(&self) -> fluent_builders::DeleteKeyPair<C, M, R> {
fluent_builders::DeleteKeyPair::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteLaunchTemplate` operation.
///
/// See [`DeleteLaunchTemplate`](crate::client::fluent_builders::DeleteLaunchTemplate) for more information about the
/// operation and its arguments.
pub fn delete_launch_template(&self) -> fluent_builders::DeleteLaunchTemplate<C, M, R> {
fluent_builders::DeleteLaunchTemplate::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteLaunchTemplateVersions` operation.
///
/// See [`DeleteLaunchTemplateVersions`](crate::client::fluent_builders::DeleteLaunchTemplateVersions) for more information about the
/// operation and its arguments.
pub fn delete_launch_template_versions(
&self,
) -> fluent_builders::DeleteLaunchTemplateVersions<C, M, R> {
fluent_builders::DeleteLaunchTemplateVersions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteLocalGatewayRoute` operation.
///
/// See [`DeleteLocalGatewayRoute`](crate::client::fluent_builders::DeleteLocalGatewayRoute) for more information about the
/// operation and its arguments.
pub fn delete_local_gateway_route(&self) -> fluent_builders::DeleteLocalGatewayRoute<C, M, R> {
fluent_builders::DeleteLocalGatewayRoute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteLocalGatewayRouteTableVpcAssociation` operation.
///
/// See [`DeleteLocalGatewayRouteTableVpcAssociation`](crate::client::fluent_builders::DeleteLocalGatewayRouteTableVpcAssociation) for more information about the
/// operation and its arguments.
pub fn delete_local_gateway_route_table_vpc_association(
&self,
) -> fluent_builders::DeleteLocalGatewayRouteTableVpcAssociation<C, M, R> {
fluent_builders::DeleteLocalGatewayRouteTableVpcAssociation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteManagedPrefixList` operation.
///
/// See [`DeleteManagedPrefixList`](crate::client::fluent_builders::DeleteManagedPrefixList) for more information about the
/// operation and its arguments.
pub fn delete_managed_prefix_list(&self) -> fluent_builders::DeleteManagedPrefixList<C, M, R> {
fluent_builders::DeleteManagedPrefixList::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteNatGateway` operation.
///
/// See [`DeleteNatGateway`](crate::client::fluent_builders::DeleteNatGateway) for more information about the
/// operation and its arguments.
pub fn delete_nat_gateway(&self) -> fluent_builders::DeleteNatGateway<C, M, R> {
fluent_builders::DeleteNatGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteNetworkAcl` operation.
///
/// See [`DeleteNetworkAcl`](crate::client::fluent_builders::DeleteNetworkAcl) for more information about the
/// operation and its arguments.
pub fn delete_network_acl(&self) -> fluent_builders::DeleteNetworkAcl<C, M, R> {
fluent_builders::DeleteNetworkAcl::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteNetworkAclEntry` operation.
///
/// See [`DeleteNetworkAclEntry`](crate::client::fluent_builders::DeleteNetworkAclEntry) for more information about the
/// operation and its arguments.
pub fn delete_network_acl_entry(&self) -> fluent_builders::DeleteNetworkAclEntry<C, M, R> {
fluent_builders::DeleteNetworkAclEntry::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteNetworkInsightsAnalysis` operation.
///
/// See [`DeleteNetworkInsightsAnalysis`](crate::client::fluent_builders::DeleteNetworkInsightsAnalysis) for more information about the
/// operation and its arguments.
pub fn delete_network_insights_analysis(
&self,
) -> fluent_builders::DeleteNetworkInsightsAnalysis<C, M, R> {
fluent_builders::DeleteNetworkInsightsAnalysis::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteNetworkInsightsPath` operation.
///
/// See [`DeleteNetworkInsightsPath`](crate::client::fluent_builders::DeleteNetworkInsightsPath) for more information about the
/// operation and its arguments.
pub fn delete_network_insights_path(
&self,
) -> fluent_builders::DeleteNetworkInsightsPath<C, M, R> {
fluent_builders::DeleteNetworkInsightsPath::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteNetworkInterface` operation.
///
/// See [`DeleteNetworkInterface`](crate::client::fluent_builders::DeleteNetworkInterface) for more information about the
/// operation and its arguments.
pub fn delete_network_interface(&self) -> fluent_builders::DeleteNetworkInterface<C, M, R> {
fluent_builders::DeleteNetworkInterface::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteNetworkInterfacePermission` operation.
///
/// See [`DeleteNetworkInterfacePermission`](crate::client::fluent_builders::DeleteNetworkInterfacePermission) for more information about the
/// operation and its arguments.
pub fn delete_network_interface_permission(
&self,
) -> fluent_builders::DeleteNetworkInterfacePermission<C, M, R> {
fluent_builders::DeleteNetworkInterfacePermission::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeletePlacementGroup` operation.
///
/// See [`DeletePlacementGroup`](crate::client::fluent_builders::DeletePlacementGroup) for more information about the
/// operation and its arguments.
pub fn delete_placement_group(&self) -> fluent_builders::DeletePlacementGroup<C, M, R> {
fluent_builders::DeletePlacementGroup::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteQueuedReservedInstances` operation.
///
/// See [`DeleteQueuedReservedInstances`](crate::client::fluent_builders::DeleteQueuedReservedInstances) for more information about the
/// operation and its arguments.
pub fn delete_queued_reserved_instances(
&self,
) -> fluent_builders::DeleteQueuedReservedInstances<C, M, R> {
fluent_builders::DeleteQueuedReservedInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteRoute` operation.
///
/// See [`DeleteRoute`](crate::client::fluent_builders::DeleteRoute) for more information about the
/// operation and its arguments.
pub fn delete_route(&self) -> fluent_builders::DeleteRoute<C, M, R> {
fluent_builders::DeleteRoute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteRouteTable` operation.
///
/// See [`DeleteRouteTable`](crate::client::fluent_builders::DeleteRouteTable) for more information about the
/// operation and its arguments.
pub fn delete_route_table(&self) -> fluent_builders::DeleteRouteTable<C, M, R> {
fluent_builders::DeleteRouteTable::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteSecurityGroup` operation.
///
/// See [`DeleteSecurityGroup`](crate::client::fluent_builders::DeleteSecurityGroup) for more information about the
/// operation and its arguments.
pub fn delete_security_group(&self) -> fluent_builders::DeleteSecurityGroup<C, M, R> {
fluent_builders::DeleteSecurityGroup::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteSnapshot` operation.
///
/// See [`DeleteSnapshot`](crate::client::fluent_builders::DeleteSnapshot) for more information about the
/// operation and its arguments.
pub fn delete_snapshot(&self) -> fluent_builders::DeleteSnapshot<C, M, R> {
fluent_builders::DeleteSnapshot::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteSpotDatafeedSubscription` operation.
///
/// See [`DeleteSpotDatafeedSubscription`](crate::client::fluent_builders::DeleteSpotDatafeedSubscription) for more information about the
/// operation and its arguments.
pub fn delete_spot_datafeed_subscription(
&self,
) -> fluent_builders::DeleteSpotDatafeedSubscription<C, M, R> {
fluent_builders::DeleteSpotDatafeedSubscription::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteSubnet` operation.
///
/// See [`DeleteSubnet`](crate::client::fluent_builders::DeleteSubnet) for more information about the
/// operation and its arguments.
pub fn delete_subnet(&self) -> fluent_builders::DeleteSubnet<C, M, R> {
fluent_builders::DeleteSubnet::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteSubnetCidrReservation` operation.
///
/// See [`DeleteSubnetCidrReservation`](crate::client::fluent_builders::DeleteSubnetCidrReservation) for more information about the
/// operation and its arguments.
pub fn delete_subnet_cidr_reservation(
&self,
) -> fluent_builders::DeleteSubnetCidrReservation<C, M, R> {
fluent_builders::DeleteSubnetCidrReservation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTags` operation.
///
/// See [`DeleteTags`](crate::client::fluent_builders::DeleteTags) for more information about the
/// operation and its arguments.
pub fn delete_tags(&self) -> fluent_builders::DeleteTags<C, M, R> {
fluent_builders::DeleteTags::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTrafficMirrorFilter` operation.
///
/// See [`DeleteTrafficMirrorFilter`](crate::client::fluent_builders::DeleteTrafficMirrorFilter) for more information about the
/// operation and its arguments.
pub fn delete_traffic_mirror_filter(
&self,
) -> fluent_builders::DeleteTrafficMirrorFilter<C, M, R> {
fluent_builders::DeleteTrafficMirrorFilter::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTrafficMirrorFilterRule` operation.
///
/// See [`DeleteTrafficMirrorFilterRule`](crate::client::fluent_builders::DeleteTrafficMirrorFilterRule) for more information about the
/// operation and its arguments.
pub fn delete_traffic_mirror_filter_rule(
&self,
) -> fluent_builders::DeleteTrafficMirrorFilterRule<C, M, R> {
fluent_builders::DeleteTrafficMirrorFilterRule::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTrafficMirrorSession` operation.
///
/// See [`DeleteTrafficMirrorSession`](crate::client::fluent_builders::DeleteTrafficMirrorSession) for more information about the
/// operation and its arguments.
pub fn delete_traffic_mirror_session(
&self,
) -> fluent_builders::DeleteTrafficMirrorSession<C, M, R> {
fluent_builders::DeleteTrafficMirrorSession::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTrafficMirrorTarget` operation.
///
/// See [`DeleteTrafficMirrorTarget`](crate::client::fluent_builders::DeleteTrafficMirrorTarget) for more information about the
/// operation and its arguments.
pub fn delete_traffic_mirror_target(
&self,
) -> fluent_builders::DeleteTrafficMirrorTarget<C, M, R> {
fluent_builders::DeleteTrafficMirrorTarget::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTransitGateway` operation.
///
/// See [`DeleteTransitGateway`](crate::client::fluent_builders::DeleteTransitGateway) for more information about the
/// operation and its arguments.
pub fn delete_transit_gateway(&self) -> fluent_builders::DeleteTransitGateway<C, M, R> {
fluent_builders::DeleteTransitGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTransitGatewayConnect` operation.
///
/// See [`DeleteTransitGatewayConnect`](crate::client::fluent_builders::DeleteTransitGatewayConnect) for more information about the
/// operation and its arguments.
pub fn delete_transit_gateway_connect(
&self,
) -> fluent_builders::DeleteTransitGatewayConnect<C, M, R> {
fluent_builders::DeleteTransitGatewayConnect::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTransitGatewayConnectPeer` operation.
///
/// See [`DeleteTransitGatewayConnectPeer`](crate::client::fluent_builders::DeleteTransitGatewayConnectPeer) for more information about the
/// operation and its arguments.
pub fn delete_transit_gateway_connect_peer(
&self,
) -> fluent_builders::DeleteTransitGatewayConnectPeer<C, M, R> {
fluent_builders::DeleteTransitGatewayConnectPeer::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTransitGatewayMulticastDomain` operation.
///
/// See [`DeleteTransitGatewayMulticastDomain`](crate::client::fluent_builders::DeleteTransitGatewayMulticastDomain) for more information about the
/// operation and its arguments.
pub fn delete_transit_gateway_multicast_domain(
&self,
) -> fluent_builders::DeleteTransitGatewayMulticastDomain<C, M, R> {
fluent_builders::DeleteTransitGatewayMulticastDomain::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTransitGatewayPeeringAttachment` operation.
///
/// See [`DeleteTransitGatewayPeeringAttachment`](crate::client::fluent_builders::DeleteTransitGatewayPeeringAttachment) for more information about the
/// operation and its arguments.
pub fn delete_transit_gateway_peering_attachment(
&self,
) -> fluent_builders::DeleteTransitGatewayPeeringAttachment<C, M, R> {
fluent_builders::DeleteTransitGatewayPeeringAttachment::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTransitGatewayPrefixListReference` operation.
///
/// See [`DeleteTransitGatewayPrefixListReference`](crate::client::fluent_builders::DeleteTransitGatewayPrefixListReference) for more information about the
/// operation and its arguments.
pub fn delete_transit_gateway_prefix_list_reference(
&self,
) -> fluent_builders::DeleteTransitGatewayPrefixListReference<C, M, R> {
fluent_builders::DeleteTransitGatewayPrefixListReference::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTransitGatewayRoute` operation.
///
/// See [`DeleteTransitGatewayRoute`](crate::client::fluent_builders::DeleteTransitGatewayRoute) for more information about the
/// operation and its arguments.
pub fn delete_transit_gateway_route(
&self,
) -> fluent_builders::DeleteTransitGatewayRoute<C, M, R> {
fluent_builders::DeleteTransitGatewayRoute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTransitGatewayRouteTable` operation.
///
/// See [`DeleteTransitGatewayRouteTable`](crate::client::fluent_builders::DeleteTransitGatewayRouteTable) for more information about the
/// operation and its arguments.
pub fn delete_transit_gateway_route_table(
&self,
) -> fluent_builders::DeleteTransitGatewayRouteTable<C, M, R> {
fluent_builders::DeleteTransitGatewayRouteTable::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteTransitGatewayVpcAttachment` operation.
///
/// See [`DeleteTransitGatewayVpcAttachment`](crate::client::fluent_builders::DeleteTransitGatewayVpcAttachment) for more information about the
/// operation and its arguments.
pub fn delete_transit_gateway_vpc_attachment(
&self,
) -> fluent_builders::DeleteTransitGatewayVpcAttachment<C, M, R> {
fluent_builders::DeleteTransitGatewayVpcAttachment::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteVolume` operation.
///
/// See [`DeleteVolume`](crate::client::fluent_builders::DeleteVolume) for more information about the
/// operation and its arguments.
pub fn delete_volume(&self) -> fluent_builders::DeleteVolume<C, M, R> {
fluent_builders::DeleteVolume::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteVpc` operation.
///
/// See [`DeleteVpc`](crate::client::fluent_builders::DeleteVpc) for more information about the
/// operation and its arguments.
pub fn delete_vpc(&self) -> fluent_builders::DeleteVpc<C, M, R> {
fluent_builders::DeleteVpc::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteVpcEndpointConnectionNotifications` operation.
///
/// See [`DeleteVpcEndpointConnectionNotifications`](crate::client::fluent_builders::DeleteVpcEndpointConnectionNotifications) for more information about the
/// operation and its arguments.
pub fn delete_vpc_endpoint_connection_notifications(
&self,
) -> fluent_builders::DeleteVpcEndpointConnectionNotifications<C, M, R> {
fluent_builders::DeleteVpcEndpointConnectionNotifications::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteVpcEndpoints` operation.
///
/// See [`DeleteVpcEndpoints`](crate::client::fluent_builders::DeleteVpcEndpoints) for more information about the
/// operation and its arguments.
pub fn delete_vpc_endpoints(&self) -> fluent_builders::DeleteVpcEndpoints<C, M, R> {
fluent_builders::DeleteVpcEndpoints::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteVpcEndpointServiceConfigurations` operation.
///
/// See [`DeleteVpcEndpointServiceConfigurations`](crate::client::fluent_builders::DeleteVpcEndpointServiceConfigurations) for more information about the
/// operation and its arguments.
pub fn delete_vpc_endpoint_service_configurations(
&self,
) -> fluent_builders::DeleteVpcEndpointServiceConfigurations<C, M, R> {
fluent_builders::DeleteVpcEndpointServiceConfigurations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteVpcPeeringConnection` operation.
///
/// See [`DeleteVpcPeeringConnection`](crate::client::fluent_builders::DeleteVpcPeeringConnection) for more information about the
/// operation and its arguments.
pub fn delete_vpc_peering_connection(
&self,
) -> fluent_builders::DeleteVpcPeeringConnection<C, M, R> {
fluent_builders::DeleteVpcPeeringConnection::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteVpnConnection` operation.
///
/// See [`DeleteVpnConnection`](crate::client::fluent_builders::DeleteVpnConnection) for more information about the
/// operation and its arguments.
pub fn delete_vpn_connection(&self) -> fluent_builders::DeleteVpnConnection<C, M, R> {
fluent_builders::DeleteVpnConnection::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteVpnConnectionRoute` operation.
///
/// See [`DeleteVpnConnectionRoute`](crate::client::fluent_builders::DeleteVpnConnectionRoute) for more information about the
/// operation and its arguments.
pub fn delete_vpn_connection_route(
&self,
) -> fluent_builders::DeleteVpnConnectionRoute<C, M, R> {
fluent_builders::DeleteVpnConnectionRoute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeleteVpnGateway` operation.
///
/// See [`DeleteVpnGateway`](crate::client::fluent_builders::DeleteVpnGateway) for more information about the
/// operation and its arguments.
pub fn delete_vpn_gateway(&self) -> fluent_builders::DeleteVpnGateway<C, M, R> {
fluent_builders::DeleteVpnGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeprovisionByoipCidr` operation.
///
/// See [`DeprovisionByoipCidr`](crate::client::fluent_builders::DeprovisionByoipCidr) for more information about the
/// operation and its arguments.
pub fn deprovision_byoip_cidr(&self) -> fluent_builders::DeprovisionByoipCidr<C, M, R> {
fluent_builders::DeprovisionByoipCidr::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeregisterImage` operation.
///
/// See [`DeregisterImage`](crate::client::fluent_builders::DeregisterImage) for more information about the
/// operation and its arguments.
pub fn deregister_image(&self) -> fluent_builders::DeregisterImage<C, M, R> {
fluent_builders::DeregisterImage::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeregisterInstanceEventNotificationAttributes` operation.
///
/// See [`DeregisterInstanceEventNotificationAttributes`](crate::client::fluent_builders::DeregisterInstanceEventNotificationAttributes) for more information about the
/// operation and its arguments.
pub fn deregister_instance_event_notification_attributes(
&self,
) -> fluent_builders::DeregisterInstanceEventNotificationAttributes<C, M, R> {
fluent_builders::DeregisterInstanceEventNotificationAttributes::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeregisterTransitGatewayMulticastGroupMembers` operation.
///
/// See [`DeregisterTransitGatewayMulticastGroupMembers`](crate::client::fluent_builders::DeregisterTransitGatewayMulticastGroupMembers) for more information about the
/// operation and its arguments.
pub fn deregister_transit_gateway_multicast_group_members(
&self,
) -> fluent_builders::DeregisterTransitGatewayMulticastGroupMembers<C, M, R> {
fluent_builders::DeregisterTransitGatewayMulticastGroupMembers::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DeregisterTransitGatewayMulticastGroupSources` operation.
///
/// See [`DeregisterTransitGatewayMulticastGroupSources`](crate::client::fluent_builders::DeregisterTransitGatewayMulticastGroupSources) for more information about the
/// operation and its arguments.
pub fn deregister_transit_gateway_multicast_group_sources(
&self,
) -> fluent_builders::DeregisterTransitGatewayMulticastGroupSources<C, M, R> {
fluent_builders::DeregisterTransitGatewayMulticastGroupSources::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeAccountAttributes` operation.
///
/// See [`DescribeAccountAttributes`](crate::client::fluent_builders::DescribeAccountAttributes) for more information about the
/// operation and its arguments.
pub fn describe_account_attributes(
&self,
) -> fluent_builders::DescribeAccountAttributes<C, M, R> {
fluent_builders::DescribeAccountAttributes::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeAddresses` operation.
///
/// See [`DescribeAddresses`](crate::client::fluent_builders::DescribeAddresses) for more information about the
/// operation and its arguments.
pub fn describe_addresses(&self) -> fluent_builders::DescribeAddresses<C, M, R> {
fluent_builders::DescribeAddresses::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeAddressesAttribute` operation.
///
/// See [`DescribeAddressesAttribute`](crate::client::fluent_builders::DescribeAddressesAttribute) for more information about the
/// operation and its arguments.
pub fn describe_addresses_attribute(
&self,
) -> fluent_builders::DescribeAddressesAttribute<C, M, R> {
fluent_builders::DescribeAddressesAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeAggregateIdFormat` operation.
///
/// See [`DescribeAggregateIdFormat`](crate::client::fluent_builders::DescribeAggregateIdFormat) for more information about the
/// operation and its arguments.
pub fn describe_aggregate_id_format(
&self,
) -> fluent_builders::DescribeAggregateIdFormat<C, M, R> {
fluent_builders::DescribeAggregateIdFormat::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeAvailabilityZones` operation.
///
/// See [`DescribeAvailabilityZones`](crate::client::fluent_builders::DescribeAvailabilityZones) for more information about the
/// operation and its arguments.
pub fn describe_availability_zones(
&self,
) -> fluent_builders::DescribeAvailabilityZones<C, M, R> {
fluent_builders::DescribeAvailabilityZones::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeBundleTasks` operation.
///
/// See [`DescribeBundleTasks`](crate::client::fluent_builders::DescribeBundleTasks) for more information about the
/// operation and its arguments.
pub fn describe_bundle_tasks(&self) -> fluent_builders::DescribeBundleTasks<C, M, R> {
fluent_builders::DescribeBundleTasks::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeByoipCidrs` operation.
///
/// See [`DescribeByoipCidrs`](crate::client::fluent_builders::DescribeByoipCidrs) for more information about the
/// operation and its arguments.
pub fn describe_byoip_cidrs(&self) -> fluent_builders::DescribeByoipCidrs<C, M, R> {
fluent_builders::DescribeByoipCidrs::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeCapacityReservationFleets` operation.
///
/// See [`DescribeCapacityReservationFleets`](crate::client::fluent_builders::DescribeCapacityReservationFleets) for more information about the
/// operation and its arguments.
pub fn describe_capacity_reservation_fleets(
&self,
) -> fluent_builders::DescribeCapacityReservationFleets<C, M, R> {
fluent_builders::DescribeCapacityReservationFleets::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeCapacityReservations` operation.
///
/// See [`DescribeCapacityReservations`](crate::client::fluent_builders::DescribeCapacityReservations) for more information about the
/// operation and its arguments.
pub fn describe_capacity_reservations(
&self,
) -> fluent_builders::DescribeCapacityReservations<C, M, R> {
fluent_builders::DescribeCapacityReservations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeCarrierGateways` operation.
///
/// See [`DescribeCarrierGateways`](crate::client::fluent_builders::DescribeCarrierGateways) for more information about the
/// operation and its arguments.
pub fn describe_carrier_gateways(&self) -> fluent_builders::DescribeCarrierGateways<C, M, R> {
fluent_builders::DescribeCarrierGateways::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeClassicLinkInstances` operation.
///
/// See [`DescribeClassicLinkInstances`](crate::client::fluent_builders::DescribeClassicLinkInstances) for more information about the
/// operation and its arguments.
pub fn describe_classic_link_instances(
&self,
) -> fluent_builders::DescribeClassicLinkInstances<C, M, R> {
fluent_builders::DescribeClassicLinkInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeClientVpnAuthorizationRules` operation.
///
/// See [`DescribeClientVpnAuthorizationRules`](crate::client::fluent_builders::DescribeClientVpnAuthorizationRules) for more information about the
/// operation and its arguments.
pub fn describe_client_vpn_authorization_rules(
&self,
) -> fluent_builders::DescribeClientVpnAuthorizationRules<C, M, R> {
fluent_builders::DescribeClientVpnAuthorizationRules::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeClientVpnConnections` operation.
///
/// See [`DescribeClientVpnConnections`](crate::client::fluent_builders::DescribeClientVpnConnections) for more information about the
/// operation and its arguments.
pub fn describe_client_vpn_connections(
&self,
) -> fluent_builders::DescribeClientVpnConnections<C, M, R> {
fluent_builders::DescribeClientVpnConnections::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeClientVpnEndpoints` operation.
///
/// See [`DescribeClientVpnEndpoints`](crate::client::fluent_builders::DescribeClientVpnEndpoints) for more information about the
/// operation and its arguments.
pub fn describe_client_vpn_endpoints(
&self,
) -> fluent_builders::DescribeClientVpnEndpoints<C, M, R> {
fluent_builders::DescribeClientVpnEndpoints::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeClientVpnRoutes` operation.
///
/// See [`DescribeClientVpnRoutes`](crate::client::fluent_builders::DescribeClientVpnRoutes) for more information about the
/// operation and its arguments.
pub fn describe_client_vpn_routes(&self) -> fluent_builders::DescribeClientVpnRoutes<C, M, R> {
fluent_builders::DescribeClientVpnRoutes::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeClientVpnTargetNetworks` operation.
///
/// See [`DescribeClientVpnTargetNetworks`](crate::client::fluent_builders::DescribeClientVpnTargetNetworks) for more information about the
/// operation and its arguments.
pub fn describe_client_vpn_target_networks(
&self,
) -> fluent_builders::DescribeClientVpnTargetNetworks<C, M, R> {
fluent_builders::DescribeClientVpnTargetNetworks::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeCoipPools` operation.
///
/// See [`DescribeCoipPools`](crate::client::fluent_builders::DescribeCoipPools) for more information about the
/// operation and its arguments.
pub fn describe_coip_pools(&self) -> fluent_builders::DescribeCoipPools<C, M, R> {
fluent_builders::DescribeCoipPools::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeConversionTasks` operation.
///
/// See [`DescribeConversionTasks`](crate::client::fluent_builders::DescribeConversionTasks) for more information about the
/// operation and its arguments.
pub fn describe_conversion_tasks(&self) -> fluent_builders::DescribeConversionTasks<C, M, R> {
fluent_builders::DescribeConversionTasks::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeCustomerGateways` operation.
///
/// See [`DescribeCustomerGateways`](crate::client::fluent_builders::DescribeCustomerGateways) for more information about the
/// operation and its arguments.
pub fn describe_customer_gateways(&self) -> fluent_builders::DescribeCustomerGateways<C, M, R> {
fluent_builders::DescribeCustomerGateways::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeDhcpOptions` operation.
///
/// See [`DescribeDhcpOptions`](crate::client::fluent_builders::DescribeDhcpOptions) for more information about the
/// operation and its arguments.
pub fn describe_dhcp_options(&self) -> fluent_builders::DescribeDhcpOptions<C, M, R> {
fluent_builders::DescribeDhcpOptions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeEgressOnlyInternetGateways` operation.
///
/// See [`DescribeEgressOnlyInternetGateways`](crate::client::fluent_builders::DescribeEgressOnlyInternetGateways) for more information about the
/// operation and its arguments.
pub fn describe_egress_only_internet_gateways(
&self,
) -> fluent_builders::DescribeEgressOnlyInternetGateways<C, M, R> {
fluent_builders::DescribeEgressOnlyInternetGateways::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeElasticGpus` operation.
///
/// See [`DescribeElasticGpus`](crate::client::fluent_builders::DescribeElasticGpus) for more information about the
/// operation and its arguments.
pub fn describe_elastic_gpus(&self) -> fluent_builders::DescribeElasticGpus<C, M, R> {
fluent_builders::DescribeElasticGpus::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeExportImageTasks` operation.
///
/// See [`DescribeExportImageTasks`](crate::client::fluent_builders::DescribeExportImageTasks) for more information about the
/// operation and its arguments.
pub fn describe_export_image_tasks(
&self,
) -> fluent_builders::DescribeExportImageTasks<C, M, R> {
fluent_builders::DescribeExportImageTasks::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeExportTasks` operation.
///
/// See [`DescribeExportTasks`](crate::client::fluent_builders::DescribeExportTasks) for more information about the
/// operation and its arguments.
pub fn describe_export_tasks(&self) -> fluent_builders::DescribeExportTasks<C, M, R> {
fluent_builders::DescribeExportTasks::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeFastSnapshotRestores` operation.
///
/// See [`DescribeFastSnapshotRestores`](crate::client::fluent_builders::DescribeFastSnapshotRestores) for more information about the
/// operation and its arguments.
pub fn describe_fast_snapshot_restores(
&self,
) -> fluent_builders::DescribeFastSnapshotRestores<C, M, R> {
fluent_builders::DescribeFastSnapshotRestores::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeFleetHistory` operation.
///
/// See [`DescribeFleetHistory`](crate::client::fluent_builders::DescribeFleetHistory) for more information about the
/// operation and its arguments.
pub fn describe_fleet_history(&self) -> fluent_builders::DescribeFleetHistory<C, M, R> {
fluent_builders::DescribeFleetHistory::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeFleetInstances` operation.
///
/// See [`DescribeFleetInstances`](crate::client::fluent_builders::DescribeFleetInstances) for more information about the
/// operation and its arguments.
pub fn describe_fleet_instances(&self) -> fluent_builders::DescribeFleetInstances<C, M, R> {
fluent_builders::DescribeFleetInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeFleets` operation.
///
/// See [`DescribeFleets`](crate::client::fluent_builders::DescribeFleets) for more information about the
/// operation and its arguments.
pub fn describe_fleets(&self) -> fluent_builders::DescribeFleets<C, M, R> {
fluent_builders::DescribeFleets::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeFlowLogs` operation.
///
/// See [`DescribeFlowLogs`](crate::client::fluent_builders::DescribeFlowLogs) for more information about the
/// operation and its arguments.
pub fn describe_flow_logs(&self) -> fluent_builders::DescribeFlowLogs<C, M, R> {
fluent_builders::DescribeFlowLogs::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeFpgaImageAttribute` operation.
///
/// See [`DescribeFpgaImageAttribute`](crate::client::fluent_builders::DescribeFpgaImageAttribute) for more information about the
/// operation and its arguments.
pub fn describe_fpga_image_attribute(
&self,
) -> fluent_builders::DescribeFpgaImageAttribute<C, M, R> {
fluent_builders::DescribeFpgaImageAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeFpgaImages` operation.
///
/// See [`DescribeFpgaImages`](crate::client::fluent_builders::DescribeFpgaImages) for more information about the
/// operation and its arguments.
pub fn describe_fpga_images(&self) -> fluent_builders::DescribeFpgaImages<C, M, R> {
fluent_builders::DescribeFpgaImages::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeHostReservationOfferings` operation.
///
/// See [`DescribeHostReservationOfferings`](crate::client::fluent_builders::DescribeHostReservationOfferings) for more information about the
/// operation and its arguments.
pub fn describe_host_reservation_offerings(
&self,
) -> fluent_builders::DescribeHostReservationOfferings<C, M, R> {
fluent_builders::DescribeHostReservationOfferings::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeHostReservations` operation.
///
/// See [`DescribeHostReservations`](crate::client::fluent_builders::DescribeHostReservations) for more information about the
/// operation and its arguments.
pub fn describe_host_reservations(&self) -> fluent_builders::DescribeHostReservations<C, M, R> {
fluent_builders::DescribeHostReservations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeHosts` operation.
///
/// See [`DescribeHosts`](crate::client::fluent_builders::DescribeHosts) for more information about the
/// operation and its arguments.
pub fn describe_hosts(&self) -> fluent_builders::DescribeHosts<C, M, R> {
fluent_builders::DescribeHosts::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeIamInstanceProfileAssociations` operation.
///
/// See [`DescribeIamInstanceProfileAssociations`](crate::client::fluent_builders::DescribeIamInstanceProfileAssociations) for more information about the
/// operation and its arguments.
pub fn describe_iam_instance_profile_associations(
&self,
) -> fluent_builders::DescribeIamInstanceProfileAssociations<C, M, R> {
fluent_builders::DescribeIamInstanceProfileAssociations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeIdentityIdFormat` operation.
///
/// See [`DescribeIdentityIdFormat`](crate::client::fluent_builders::DescribeIdentityIdFormat) for more information about the
/// operation and its arguments.
pub fn describe_identity_id_format(
&self,
) -> fluent_builders::DescribeIdentityIdFormat<C, M, R> {
fluent_builders::DescribeIdentityIdFormat::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeIdFormat` operation.
///
/// See [`DescribeIdFormat`](crate::client::fluent_builders::DescribeIdFormat) for more information about the
/// operation and its arguments.
pub fn describe_id_format(&self) -> fluent_builders::DescribeIdFormat<C, M, R> {
fluent_builders::DescribeIdFormat::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeImageAttribute` operation.
///
/// See [`DescribeImageAttribute`](crate::client::fluent_builders::DescribeImageAttribute) for more information about the
/// operation and its arguments.
pub fn describe_image_attribute(&self) -> fluent_builders::DescribeImageAttribute<C, M, R> {
fluent_builders::DescribeImageAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeImages` operation.
///
/// See [`DescribeImages`](crate::client::fluent_builders::DescribeImages) for more information about the
/// operation and its arguments.
pub fn describe_images(&self) -> fluent_builders::DescribeImages<C, M, R> {
fluent_builders::DescribeImages::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeImportImageTasks` operation.
///
/// See [`DescribeImportImageTasks`](crate::client::fluent_builders::DescribeImportImageTasks) for more information about the
/// operation and its arguments.
pub fn describe_import_image_tasks(
&self,
) -> fluent_builders::DescribeImportImageTasks<C, M, R> {
fluent_builders::DescribeImportImageTasks::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeImportSnapshotTasks` operation.
///
/// See [`DescribeImportSnapshotTasks`](crate::client::fluent_builders::DescribeImportSnapshotTasks) for more information about the
/// operation and its arguments.
pub fn describe_import_snapshot_tasks(
&self,
) -> fluent_builders::DescribeImportSnapshotTasks<C, M, R> {
fluent_builders::DescribeImportSnapshotTasks::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeInstanceAttribute` operation.
///
/// See [`DescribeInstanceAttribute`](crate::client::fluent_builders::DescribeInstanceAttribute) for more information about the
/// operation and its arguments.
pub fn describe_instance_attribute(
&self,
) -> fluent_builders::DescribeInstanceAttribute<C, M, R> {
fluent_builders::DescribeInstanceAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeInstanceCreditSpecifications` operation.
///
/// See [`DescribeInstanceCreditSpecifications`](crate::client::fluent_builders::DescribeInstanceCreditSpecifications) for more information about the
/// operation and its arguments.
pub fn describe_instance_credit_specifications(
&self,
) -> fluent_builders::DescribeInstanceCreditSpecifications<C, M, R> {
fluent_builders::DescribeInstanceCreditSpecifications::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeInstanceEventNotificationAttributes` operation.
///
/// See [`DescribeInstanceEventNotificationAttributes`](crate::client::fluent_builders::DescribeInstanceEventNotificationAttributes) for more information about the
/// operation and its arguments.
pub fn describe_instance_event_notification_attributes(
&self,
) -> fluent_builders::DescribeInstanceEventNotificationAttributes<C, M, R> {
fluent_builders::DescribeInstanceEventNotificationAttributes::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeInstanceEventWindows` operation.
///
/// See [`DescribeInstanceEventWindows`](crate::client::fluent_builders::DescribeInstanceEventWindows) for more information about the
/// operation and its arguments.
pub fn describe_instance_event_windows(
&self,
) -> fluent_builders::DescribeInstanceEventWindows<C, M, R> {
fluent_builders::DescribeInstanceEventWindows::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeInstances` operation.
///
/// See [`DescribeInstances`](crate::client::fluent_builders::DescribeInstances) for more information about the
/// operation and its arguments.
pub fn describe_instances(&self) -> fluent_builders::DescribeInstances<C, M, R> {
fluent_builders::DescribeInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeInstanceStatus` operation.
///
/// See [`DescribeInstanceStatus`](crate::client::fluent_builders::DescribeInstanceStatus) for more information about the
/// operation and its arguments.
pub fn describe_instance_status(&self) -> fluent_builders::DescribeInstanceStatus<C, M, R> {
fluent_builders::DescribeInstanceStatus::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeInstanceTypeOfferings` operation.
///
/// See [`DescribeInstanceTypeOfferings`](crate::client::fluent_builders::DescribeInstanceTypeOfferings) for more information about the
/// operation and its arguments.
pub fn describe_instance_type_offerings(
&self,
) -> fluent_builders::DescribeInstanceTypeOfferings<C, M, R> {
fluent_builders::DescribeInstanceTypeOfferings::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeInstanceTypes` operation.
///
/// See [`DescribeInstanceTypes`](crate::client::fluent_builders::DescribeInstanceTypes) for more information about the
/// operation and its arguments.
pub fn describe_instance_types(&self) -> fluent_builders::DescribeInstanceTypes<C, M, R> {
fluent_builders::DescribeInstanceTypes::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeInternetGateways` operation.
///
/// See [`DescribeInternetGateways`](crate::client::fluent_builders::DescribeInternetGateways) for more information about the
/// operation and its arguments.
pub fn describe_internet_gateways(&self) -> fluent_builders::DescribeInternetGateways<C, M, R> {
fluent_builders::DescribeInternetGateways::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeIpv6Pools` operation.
///
/// See [`DescribeIpv6Pools`](crate::client::fluent_builders::DescribeIpv6Pools) for more information about the
/// operation and its arguments.
pub fn describe_ipv6_pools(&self) -> fluent_builders::DescribeIpv6Pools<C, M, R> {
fluent_builders::DescribeIpv6Pools::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeKeyPairs` operation.
///
/// See [`DescribeKeyPairs`](crate::client::fluent_builders::DescribeKeyPairs) for more information about the
/// operation and its arguments.
pub fn describe_key_pairs(&self) -> fluent_builders::DescribeKeyPairs<C, M, R> {
fluent_builders::DescribeKeyPairs::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeLaunchTemplates` operation.
///
/// See [`DescribeLaunchTemplates`](crate::client::fluent_builders::DescribeLaunchTemplates) for more information about the
/// operation and its arguments.
pub fn describe_launch_templates(&self) -> fluent_builders::DescribeLaunchTemplates<C, M, R> {
fluent_builders::DescribeLaunchTemplates::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeLaunchTemplateVersions` operation.
///
/// See [`DescribeLaunchTemplateVersions`](crate::client::fluent_builders::DescribeLaunchTemplateVersions) for more information about the
/// operation and its arguments.
pub fn describe_launch_template_versions(
&self,
) -> fluent_builders::DescribeLaunchTemplateVersions<C, M, R> {
fluent_builders::DescribeLaunchTemplateVersions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeLocalGatewayRouteTables` operation.
///
/// See [`DescribeLocalGatewayRouteTables`](crate::client::fluent_builders::DescribeLocalGatewayRouteTables) for more information about the
/// operation and its arguments.
pub fn describe_local_gateway_route_tables(
&self,
) -> fluent_builders::DescribeLocalGatewayRouteTables<C, M, R> {
fluent_builders::DescribeLocalGatewayRouteTables::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations` operation.
///
/// See [`DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations`](crate::client::fluent_builders::DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations) for more information about the
/// operation and its arguments.
pub fn describe_local_gateway_route_table_virtual_interface_group_associations(
&self,
) -> fluent_builders::DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations<C, M, R>
{
fluent_builders::DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations::new(
self.handle.clone(),
)
}
/// Constructs a fluent builder for the `DescribeLocalGatewayRouteTableVpcAssociations` operation.
///
/// See [`DescribeLocalGatewayRouteTableVpcAssociations`](crate::client::fluent_builders::DescribeLocalGatewayRouteTableVpcAssociations) for more information about the
/// operation and its arguments.
pub fn describe_local_gateway_route_table_vpc_associations(
&self,
) -> fluent_builders::DescribeLocalGatewayRouteTableVpcAssociations<C, M, R> {
fluent_builders::DescribeLocalGatewayRouteTableVpcAssociations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeLocalGateways` operation.
///
/// See [`DescribeLocalGateways`](crate::client::fluent_builders::DescribeLocalGateways) for more information about the
/// operation and its arguments.
pub fn describe_local_gateways(&self) -> fluent_builders::DescribeLocalGateways<C, M, R> {
fluent_builders::DescribeLocalGateways::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeLocalGatewayVirtualInterfaceGroups` operation.
///
/// See [`DescribeLocalGatewayVirtualInterfaceGroups`](crate::client::fluent_builders::DescribeLocalGatewayVirtualInterfaceGroups) for more information about the
/// operation and its arguments.
pub fn describe_local_gateway_virtual_interface_groups(
&self,
) -> fluent_builders::DescribeLocalGatewayVirtualInterfaceGroups<C, M, R> {
fluent_builders::DescribeLocalGatewayVirtualInterfaceGroups::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeLocalGatewayVirtualInterfaces` operation.
///
/// See [`DescribeLocalGatewayVirtualInterfaces`](crate::client::fluent_builders::DescribeLocalGatewayVirtualInterfaces) for more information about the
/// operation and its arguments.
pub fn describe_local_gateway_virtual_interfaces(
&self,
) -> fluent_builders::DescribeLocalGatewayVirtualInterfaces<C, M, R> {
fluent_builders::DescribeLocalGatewayVirtualInterfaces::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeManagedPrefixLists` operation.
///
/// See [`DescribeManagedPrefixLists`](crate::client::fluent_builders::DescribeManagedPrefixLists) for more information about the
/// operation and its arguments.
pub fn describe_managed_prefix_lists(
&self,
) -> fluent_builders::DescribeManagedPrefixLists<C, M, R> {
fluent_builders::DescribeManagedPrefixLists::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeMovingAddresses` operation.
///
/// See [`DescribeMovingAddresses`](crate::client::fluent_builders::DescribeMovingAddresses) for more information about the
/// operation and its arguments.
pub fn describe_moving_addresses(&self) -> fluent_builders::DescribeMovingAddresses<C, M, R> {
fluent_builders::DescribeMovingAddresses::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeNatGateways` operation.
///
/// See [`DescribeNatGateways`](crate::client::fluent_builders::DescribeNatGateways) for more information about the
/// operation and its arguments.
pub fn describe_nat_gateways(&self) -> fluent_builders::DescribeNatGateways<C, M, R> {
fluent_builders::DescribeNatGateways::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeNetworkAcls` operation.
///
/// See [`DescribeNetworkAcls`](crate::client::fluent_builders::DescribeNetworkAcls) for more information about the
/// operation and its arguments.
pub fn describe_network_acls(&self) -> fluent_builders::DescribeNetworkAcls<C, M, R> {
fluent_builders::DescribeNetworkAcls::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeNetworkInsightsAnalyses` operation.
///
/// See [`DescribeNetworkInsightsAnalyses`](crate::client::fluent_builders::DescribeNetworkInsightsAnalyses) for more information about the
/// operation and its arguments.
pub fn describe_network_insights_analyses(
&self,
) -> fluent_builders::DescribeNetworkInsightsAnalyses<C, M, R> {
fluent_builders::DescribeNetworkInsightsAnalyses::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeNetworkInsightsPaths` operation.
///
/// See [`DescribeNetworkInsightsPaths`](crate::client::fluent_builders::DescribeNetworkInsightsPaths) for more information about the
/// operation and its arguments.
pub fn describe_network_insights_paths(
&self,
) -> fluent_builders::DescribeNetworkInsightsPaths<C, M, R> {
fluent_builders::DescribeNetworkInsightsPaths::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeNetworkInterfaceAttribute` operation.
///
/// See [`DescribeNetworkInterfaceAttribute`](crate::client::fluent_builders::DescribeNetworkInterfaceAttribute) for more information about the
/// operation and its arguments.
pub fn describe_network_interface_attribute(
&self,
) -> fluent_builders::DescribeNetworkInterfaceAttribute<C, M, R> {
fluent_builders::DescribeNetworkInterfaceAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeNetworkInterfacePermissions` operation.
///
/// See [`DescribeNetworkInterfacePermissions`](crate::client::fluent_builders::DescribeNetworkInterfacePermissions) for more information about the
/// operation and its arguments.
pub fn describe_network_interface_permissions(
&self,
) -> fluent_builders::DescribeNetworkInterfacePermissions<C, M, R> {
fluent_builders::DescribeNetworkInterfacePermissions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeNetworkInterfaces` operation.
///
/// See [`DescribeNetworkInterfaces`](crate::client::fluent_builders::DescribeNetworkInterfaces) for more information about the
/// operation and its arguments.
pub fn describe_network_interfaces(
&self,
) -> fluent_builders::DescribeNetworkInterfaces<C, M, R> {
fluent_builders::DescribeNetworkInterfaces::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribePlacementGroups` operation.
///
/// See [`DescribePlacementGroups`](crate::client::fluent_builders::DescribePlacementGroups) for more information about the
/// operation and its arguments.
pub fn describe_placement_groups(&self) -> fluent_builders::DescribePlacementGroups<C, M, R> {
fluent_builders::DescribePlacementGroups::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribePrefixLists` operation.
///
/// See [`DescribePrefixLists`](crate::client::fluent_builders::DescribePrefixLists) for more information about the
/// operation and its arguments.
pub fn describe_prefix_lists(&self) -> fluent_builders::DescribePrefixLists<C, M, R> {
fluent_builders::DescribePrefixLists::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribePrincipalIdFormat` operation.
///
/// See [`DescribePrincipalIdFormat`](crate::client::fluent_builders::DescribePrincipalIdFormat) for more information about the
/// operation and its arguments.
pub fn describe_principal_id_format(
&self,
) -> fluent_builders::DescribePrincipalIdFormat<C, M, R> {
fluent_builders::DescribePrincipalIdFormat::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribePublicIpv4Pools` operation.
///
/// See [`DescribePublicIpv4Pools`](crate::client::fluent_builders::DescribePublicIpv4Pools) for more information about the
/// operation and its arguments.
pub fn describe_public_ipv4_pools(&self) -> fluent_builders::DescribePublicIpv4Pools<C, M, R> {
fluent_builders::DescribePublicIpv4Pools::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeRegions` operation.
///
/// See [`DescribeRegions`](crate::client::fluent_builders::DescribeRegions) for more information about the
/// operation and its arguments.
pub fn describe_regions(&self) -> fluent_builders::DescribeRegions<C, M, R> {
fluent_builders::DescribeRegions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeReplaceRootVolumeTasks` operation.
///
/// See [`DescribeReplaceRootVolumeTasks`](crate::client::fluent_builders::DescribeReplaceRootVolumeTasks) for more information about the
/// operation and its arguments.
pub fn describe_replace_root_volume_tasks(
&self,
) -> fluent_builders::DescribeReplaceRootVolumeTasks<C, M, R> {
fluent_builders::DescribeReplaceRootVolumeTasks::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeReservedInstances` operation.
///
/// See [`DescribeReservedInstances`](crate::client::fluent_builders::DescribeReservedInstances) for more information about the
/// operation and its arguments.
pub fn describe_reserved_instances(
&self,
) -> fluent_builders::DescribeReservedInstances<C, M, R> {
fluent_builders::DescribeReservedInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeReservedInstancesListings` operation.
///
/// See [`DescribeReservedInstancesListings`](crate::client::fluent_builders::DescribeReservedInstancesListings) for more information about the
/// operation and its arguments.
pub fn describe_reserved_instances_listings(
&self,
) -> fluent_builders::DescribeReservedInstancesListings<C, M, R> {
fluent_builders::DescribeReservedInstancesListings::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeReservedInstancesModifications` operation.
///
/// See [`DescribeReservedInstancesModifications`](crate::client::fluent_builders::DescribeReservedInstancesModifications) for more information about the
/// operation and its arguments.
pub fn describe_reserved_instances_modifications(
&self,
) -> fluent_builders::DescribeReservedInstancesModifications<C, M, R> {
fluent_builders::DescribeReservedInstancesModifications::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeReservedInstancesOfferings` operation.
///
/// See [`DescribeReservedInstancesOfferings`](crate::client::fluent_builders::DescribeReservedInstancesOfferings) for more information about the
/// operation and its arguments.
pub fn describe_reserved_instances_offerings(
&self,
) -> fluent_builders::DescribeReservedInstancesOfferings<C, M, R> {
fluent_builders::DescribeReservedInstancesOfferings::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeRouteTables` operation.
///
/// See [`DescribeRouteTables`](crate::client::fluent_builders::DescribeRouteTables) for more information about the
/// operation and its arguments.
pub fn describe_route_tables(&self) -> fluent_builders::DescribeRouteTables<C, M, R> {
fluent_builders::DescribeRouteTables::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeScheduledInstanceAvailability` operation.
///
/// See [`DescribeScheduledInstanceAvailability`](crate::client::fluent_builders::DescribeScheduledInstanceAvailability) for more information about the
/// operation and its arguments.
pub fn describe_scheduled_instance_availability(
&self,
) -> fluent_builders::DescribeScheduledInstanceAvailability<C, M, R> {
fluent_builders::DescribeScheduledInstanceAvailability::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeScheduledInstances` operation.
///
/// See [`DescribeScheduledInstances`](crate::client::fluent_builders::DescribeScheduledInstances) for more information about the
/// operation and its arguments.
pub fn describe_scheduled_instances(
&self,
) -> fluent_builders::DescribeScheduledInstances<C, M, R> {
fluent_builders::DescribeScheduledInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeSecurityGroupReferences` operation.
///
/// See [`DescribeSecurityGroupReferences`](crate::client::fluent_builders::DescribeSecurityGroupReferences) for more information about the
/// operation and its arguments.
pub fn describe_security_group_references(
&self,
) -> fluent_builders::DescribeSecurityGroupReferences<C, M, R> {
fluent_builders::DescribeSecurityGroupReferences::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeSecurityGroupRules` operation.
///
/// See [`DescribeSecurityGroupRules`](crate::client::fluent_builders::DescribeSecurityGroupRules) for more information about the
/// operation and its arguments.
pub fn describe_security_group_rules(
&self,
) -> fluent_builders::DescribeSecurityGroupRules<C, M, R> {
fluent_builders::DescribeSecurityGroupRules::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeSecurityGroups` operation.
///
/// See [`DescribeSecurityGroups`](crate::client::fluent_builders::DescribeSecurityGroups) for more information about the
/// operation and its arguments.
pub fn describe_security_groups(&self) -> fluent_builders::DescribeSecurityGroups<C, M, R> {
fluent_builders::DescribeSecurityGroups::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeSnapshotAttribute` operation.
///
/// See [`DescribeSnapshotAttribute`](crate::client::fluent_builders::DescribeSnapshotAttribute) for more information about the
/// operation and its arguments.
pub fn describe_snapshot_attribute(
&self,
) -> fluent_builders::DescribeSnapshotAttribute<C, M, R> {
fluent_builders::DescribeSnapshotAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeSnapshots` operation.
///
/// See [`DescribeSnapshots`](crate::client::fluent_builders::DescribeSnapshots) for more information about the
/// operation and its arguments.
pub fn describe_snapshots(&self) -> fluent_builders::DescribeSnapshots<C, M, R> {
fluent_builders::DescribeSnapshots::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeSpotDatafeedSubscription` operation.
///
/// See [`DescribeSpotDatafeedSubscription`](crate::client::fluent_builders::DescribeSpotDatafeedSubscription) for more information about the
/// operation and its arguments.
pub fn describe_spot_datafeed_subscription(
&self,
) -> fluent_builders::DescribeSpotDatafeedSubscription<C, M, R> {
fluent_builders::DescribeSpotDatafeedSubscription::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeSpotFleetInstances` operation.
///
/// See [`DescribeSpotFleetInstances`](crate::client::fluent_builders::DescribeSpotFleetInstances) for more information about the
/// operation and its arguments.
pub fn describe_spot_fleet_instances(
&self,
) -> fluent_builders::DescribeSpotFleetInstances<C, M, R> {
fluent_builders::DescribeSpotFleetInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeSpotFleetRequestHistory` operation.
///
/// See [`DescribeSpotFleetRequestHistory`](crate::client::fluent_builders::DescribeSpotFleetRequestHistory) for more information about the
/// operation and its arguments.
pub fn describe_spot_fleet_request_history(
&self,
) -> fluent_builders::DescribeSpotFleetRequestHistory<C, M, R> {
fluent_builders::DescribeSpotFleetRequestHistory::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeSpotFleetRequests` operation.
///
/// See [`DescribeSpotFleetRequests`](crate::client::fluent_builders::DescribeSpotFleetRequests) for more information about the
/// operation and its arguments.
pub fn describe_spot_fleet_requests(
&self,
) -> fluent_builders::DescribeSpotFleetRequests<C, M, R> {
fluent_builders::DescribeSpotFleetRequests::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeSpotInstanceRequests` operation.
///
/// See [`DescribeSpotInstanceRequests`](crate::client::fluent_builders::DescribeSpotInstanceRequests) for more information about the
/// operation and its arguments.
pub fn describe_spot_instance_requests(
&self,
) -> fluent_builders::DescribeSpotInstanceRequests<C, M, R> {
fluent_builders::DescribeSpotInstanceRequests::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeSpotPriceHistory` operation.
///
/// See [`DescribeSpotPriceHistory`](crate::client::fluent_builders::DescribeSpotPriceHistory) for more information about the
/// operation and its arguments.
pub fn describe_spot_price_history(
&self,
) -> fluent_builders::DescribeSpotPriceHistory<C, M, R> {
fluent_builders::DescribeSpotPriceHistory::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeStaleSecurityGroups` operation.
///
/// See [`DescribeStaleSecurityGroups`](crate::client::fluent_builders::DescribeStaleSecurityGroups) for more information about the
/// operation and its arguments.
pub fn describe_stale_security_groups(
&self,
) -> fluent_builders::DescribeStaleSecurityGroups<C, M, R> {
fluent_builders::DescribeStaleSecurityGroups::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeStoreImageTasks` operation.
///
/// See [`DescribeStoreImageTasks`](crate::client::fluent_builders::DescribeStoreImageTasks) for more information about the
/// operation and its arguments.
pub fn describe_store_image_tasks(&self) -> fluent_builders::DescribeStoreImageTasks<C, M, R> {
fluent_builders::DescribeStoreImageTasks::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeSubnets` operation.
///
/// See [`DescribeSubnets`](crate::client::fluent_builders::DescribeSubnets) for more information about the
/// operation and its arguments.
pub fn describe_subnets(&self) -> fluent_builders::DescribeSubnets<C, M, R> {
fluent_builders::DescribeSubnets::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTags` operation.
///
/// See [`DescribeTags`](crate::client::fluent_builders::DescribeTags) for more information about the
/// operation and its arguments.
pub fn describe_tags(&self) -> fluent_builders::DescribeTags<C, M, R> {
fluent_builders::DescribeTags::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTrafficMirrorFilters` operation.
///
/// See [`DescribeTrafficMirrorFilters`](crate::client::fluent_builders::DescribeTrafficMirrorFilters) for more information about the
/// operation and its arguments.
pub fn describe_traffic_mirror_filters(
&self,
) -> fluent_builders::DescribeTrafficMirrorFilters<C, M, R> {
fluent_builders::DescribeTrafficMirrorFilters::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTrafficMirrorSessions` operation.
///
/// See [`DescribeTrafficMirrorSessions`](crate::client::fluent_builders::DescribeTrafficMirrorSessions) for more information about the
/// operation and its arguments.
pub fn describe_traffic_mirror_sessions(
&self,
) -> fluent_builders::DescribeTrafficMirrorSessions<C, M, R> {
fluent_builders::DescribeTrafficMirrorSessions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTrafficMirrorTargets` operation.
///
/// See [`DescribeTrafficMirrorTargets`](crate::client::fluent_builders::DescribeTrafficMirrorTargets) for more information about the
/// operation and its arguments.
pub fn describe_traffic_mirror_targets(
&self,
) -> fluent_builders::DescribeTrafficMirrorTargets<C, M, R> {
fluent_builders::DescribeTrafficMirrorTargets::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTransitGatewayAttachments` operation.
///
/// See [`DescribeTransitGatewayAttachments`](crate::client::fluent_builders::DescribeTransitGatewayAttachments) for more information about the
/// operation and its arguments.
pub fn describe_transit_gateway_attachments(
&self,
) -> fluent_builders::DescribeTransitGatewayAttachments<C, M, R> {
fluent_builders::DescribeTransitGatewayAttachments::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTransitGatewayConnectPeers` operation.
///
/// See [`DescribeTransitGatewayConnectPeers`](crate::client::fluent_builders::DescribeTransitGatewayConnectPeers) for more information about the
/// operation and its arguments.
pub fn describe_transit_gateway_connect_peers(
&self,
) -> fluent_builders::DescribeTransitGatewayConnectPeers<C, M, R> {
fluent_builders::DescribeTransitGatewayConnectPeers::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTransitGatewayConnects` operation.
///
/// See [`DescribeTransitGatewayConnects`](crate::client::fluent_builders::DescribeTransitGatewayConnects) for more information about the
/// operation and its arguments.
pub fn describe_transit_gateway_connects(
&self,
) -> fluent_builders::DescribeTransitGatewayConnects<C, M, R> {
fluent_builders::DescribeTransitGatewayConnects::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTransitGatewayMulticastDomains` operation.
///
/// See [`DescribeTransitGatewayMulticastDomains`](crate::client::fluent_builders::DescribeTransitGatewayMulticastDomains) for more information about the
/// operation and its arguments.
pub fn describe_transit_gateway_multicast_domains(
&self,
) -> fluent_builders::DescribeTransitGatewayMulticastDomains<C, M, R> {
fluent_builders::DescribeTransitGatewayMulticastDomains::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTransitGatewayPeeringAttachments` operation.
///
/// See [`DescribeTransitGatewayPeeringAttachments`](crate::client::fluent_builders::DescribeTransitGatewayPeeringAttachments) for more information about the
/// operation and its arguments.
pub fn describe_transit_gateway_peering_attachments(
&self,
) -> fluent_builders::DescribeTransitGatewayPeeringAttachments<C, M, R> {
fluent_builders::DescribeTransitGatewayPeeringAttachments::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTransitGatewayRouteTables` operation.
///
/// See [`DescribeTransitGatewayRouteTables`](crate::client::fluent_builders::DescribeTransitGatewayRouteTables) for more information about the
/// operation and its arguments.
pub fn describe_transit_gateway_route_tables(
&self,
) -> fluent_builders::DescribeTransitGatewayRouteTables<C, M, R> {
fluent_builders::DescribeTransitGatewayRouteTables::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTransitGateways` operation.
///
/// See [`DescribeTransitGateways`](crate::client::fluent_builders::DescribeTransitGateways) for more information about the
/// operation and its arguments.
pub fn describe_transit_gateways(&self) -> fluent_builders::DescribeTransitGateways<C, M, R> {
fluent_builders::DescribeTransitGateways::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTransitGatewayVpcAttachments` operation.
///
/// See [`DescribeTransitGatewayVpcAttachments`](crate::client::fluent_builders::DescribeTransitGatewayVpcAttachments) for more information about the
/// operation and its arguments.
pub fn describe_transit_gateway_vpc_attachments(
&self,
) -> fluent_builders::DescribeTransitGatewayVpcAttachments<C, M, R> {
fluent_builders::DescribeTransitGatewayVpcAttachments::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeTrunkInterfaceAssociations` operation.
///
/// See [`DescribeTrunkInterfaceAssociations`](crate::client::fluent_builders::DescribeTrunkInterfaceAssociations) for more information about the
/// operation and its arguments.
pub fn describe_trunk_interface_associations(
&self,
) -> fluent_builders::DescribeTrunkInterfaceAssociations<C, M, R> {
fluent_builders::DescribeTrunkInterfaceAssociations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVolumeAttribute` operation.
///
/// See [`DescribeVolumeAttribute`](crate::client::fluent_builders::DescribeVolumeAttribute) for more information about the
/// operation and its arguments.
pub fn describe_volume_attribute(&self) -> fluent_builders::DescribeVolumeAttribute<C, M, R> {
fluent_builders::DescribeVolumeAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVolumes` operation.
///
/// See [`DescribeVolumes`](crate::client::fluent_builders::DescribeVolumes) for more information about the
/// operation and its arguments.
pub fn describe_volumes(&self) -> fluent_builders::DescribeVolumes<C, M, R> {
fluent_builders::DescribeVolumes::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVolumesModifications` operation.
///
/// See [`DescribeVolumesModifications`](crate::client::fluent_builders::DescribeVolumesModifications) for more information about the
/// operation and its arguments.
pub fn describe_volumes_modifications(
&self,
) -> fluent_builders::DescribeVolumesModifications<C, M, R> {
fluent_builders::DescribeVolumesModifications::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVolumeStatus` operation.
///
/// See [`DescribeVolumeStatus`](crate::client::fluent_builders::DescribeVolumeStatus) for more information about the
/// operation and its arguments.
pub fn describe_volume_status(&self) -> fluent_builders::DescribeVolumeStatus<C, M, R> {
fluent_builders::DescribeVolumeStatus::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpcAttribute` operation.
///
/// See [`DescribeVpcAttribute`](crate::client::fluent_builders::DescribeVpcAttribute) for more information about the
/// operation and its arguments.
pub fn describe_vpc_attribute(&self) -> fluent_builders::DescribeVpcAttribute<C, M, R> {
fluent_builders::DescribeVpcAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpcClassicLink` operation.
///
/// See [`DescribeVpcClassicLink`](crate::client::fluent_builders::DescribeVpcClassicLink) for more information about the
/// operation and its arguments.
pub fn describe_vpc_classic_link(&self) -> fluent_builders::DescribeVpcClassicLink<C, M, R> {
fluent_builders::DescribeVpcClassicLink::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpcClassicLinkDnsSupport` operation.
///
/// See [`DescribeVpcClassicLinkDnsSupport`](crate::client::fluent_builders::DescribeVpcClassicLinkDnsSupport) for more information about the
/// operation and its arguments.
pub fn describe_vpc_classic_link_dns_support(
&self,
) -> fluent_builders::DescribeVpcClassicLinkDnsSupport<C, M, R> {
fluent_builders::DescribeVpcClassicLinkDnsSupport::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpcEndpointConnectionNotifications` operation.
///
/// See [`DescribeVpcEndpointConnectionNotifications`](crate::client::fluent_builders::DescribeVpcEndpointConnectionNotifications) for more information about the
/// operation and its arguments.
pub fn describe_vpc_endpoint_connection_notifications(
&self,
) -> fluent_builders::DescribeVpcEndpointConnectionNotifications<C, M, R> {
fluent_builders::DescribeVpcEndpointConnectionNotifications::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpcEndpointConnections` operation.
///
/// See [`DescribeVpcEndpointConnections`](crate::client::fluent_builders::DescribeVpcEndpointConnections) for more information about the
/// operation and its arguments.
pub fn describe_vpc_endpoint_connections(
&self,
) -> fluent_builders::DescribeVpcEndpointConnections<C, M, R> {
fluent_builders::DescribeVpcEndpointConnections::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpcEndpoints` operation.
///
/// See [`DescribeVpcEndpoints`](crate::client::fluent_builders::DescribeVpcEndpoints) for more information about the
/// operation and its arguments.
pub fn describe_vpc_endpoints(&self) -> fluent_builders::DescribeVpcEndpoints<C, M, R> {
fluent_builders::DescribeVpcEndpoints::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpcEndpointServiceConfigurations` operation.
///
/// See [`DescribeVpcEndpointServiceConfigurations`](crate::client::fluent_builders::DescribeVpcEndpointServiceConfigurations) for more information about the
/// operation and its arguments.
pub fn describe_vpc_endpoint_service_configurations(
&self,
) -> fluent_builders::DescribeVpcEndpointServiceConfigurations<C, M, R> {
fluent_builders::DescribeVpcEndpointServiceConfigurations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpcEndpointServicePermissions` operation.
///
/// See [`DescribeVpcEndpointServicePermissions`](crate::client::fluent_builders::DescribeVpcEndpointServicePermissions) for more information about the
/// operation and its arguments.
pub fn describe_vpc_endpoint_service_permissions(
&self,
) -> fluent_builders::DescribeVpcEndpointServicePermissions<C, M, R> {
fluent_builders::DescribeVpcEndpointServicePermissions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpcEndpointServices` operation.
///
/// See [`DescribeVpcEndpointServices`](crate::client::fluent_builders::DescribeVpcEndpointServices) for more information about the
/// operation and its arguments.
pub fn describe_vpc_endpoint_services(
&self,
) -> fluent_builders::DescribeVpcEndpointServices<C, M, R> {
fluent_builders::DescribeVpcEndpointServices::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpcPeeringConnections` operation.
///
/// See [`DescribeVpcPeeringConnections`](crate::client::fluent_builders::DescribeVpcPeeringConnections) for more information about the
/// operation and its arguments.
pub fn describe_vpc_peering_connections(
&self,
) -> fluent_builders::DescribeVpcPeeringConnections<C, M, R> {
fluent_builders::DescribeVpcPeeringConnections::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpcs` operation.
///
/// See [`DescribeVpcs`](crate::client::fluent_builders::DescribeVpcs) for more information about the
/// operation and its arguments.
pub fn describe_vpcs(&self) -> fluent_builders::DescribeVpcs<C, M, R> {
fluent_builders::DescribeVpcs::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpnConnections` operation.
///
/// See [`DescribeVpnConnections`](crate::client::fluent_builders::DescribeVpnConnections) for more information about the
/// operation and its arguments.
pub fn describe_vpn_connections(&self) -> fluent_builders::DescribeVpnConnections<C, M, R> {
fluent_builders::DescribeVpnConnections::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DescribeVpnGateways` operation.
///
/// See [`DescribeVpnGateways`](crate::client::fluent_builders::DescribeVpnGateways) for more information about the
/// operation and its arguments.
pub fn describe_vpn_gateways(&self) -> fluent_builders::DescribeVpnGateways<C, M, R> {
fluent_builders::DescribeVpnGateways::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DetachClassicLinkVpc` operation.
///
/// See [`DetachClassicLinkVpc`](crate::client::fluent_builders::DetachClassicLinkVpc) for more information about the
/// operation and its arguments.
pub fn detach_classic_link_vpc(&self) -> fluent_builders::DetachClassicLinkVpc<C, M, R> {
fluent_builders::DetachClassicLinkVpc::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DetachInternetGateway` operation.
///
/// See [`DetachInternetGateway`](crate::client::fluent_builders::DetachInternetGateway) for more information about the
/// operation and its arguments.
pub fn detach_internet_gateway(&self) -> fluent_builders::DetachInternetGateway<C, M, R> {
fluent_builders::DetachInternetGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DetachNetworkInterface` operation.
///
/// See [`DetachNetworkInterface`](crate::client::fluent_builders::DetachNetworkInterface) for more information about the
/// operation and its arguments.
pub fn detach_network_interface(&self) -> fluent_builders::DetachNetworkInterface<C, M, R> {
fluent_builders::DetachNetworkInterface::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DetachVolume` operation.
///
/// See [`DetachVolume`](crate::client::fluent_builders::DetachVolume) for more information about the
/// operation and its arguments.
pub fn detach_volume(&self) -> fluent_builders::DetachVolume<C, M, R> {
fluent_builders::DetachVolume::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DetachVpnGateway` operation.
///
/// See [`DetachVpnGateway`](crate::client::fluent_builders::DetachVpnGateway) for more information about the
/// operation and its arguments.
pub fn detach_vpn_gateway(&self) -> fluent_builders::DetachVpnGateway<C, M, R> {
fluent_builders::DetachVpnGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisableEbsEncryptionByDefault` operation.
///
/// See [`DisableEbsEncryptionByDefault`](crate::client::fluent_builders::DisableEbsEncryptionByDefault) for more information about the
/// operation and its arguments.
pub fn disable_ebs_encryption_by_default(
&self,
) -> fluent_builders::DisableEbsEncryptionByDefault<C, M, R> {
fluent_builders::DisableEbsEncryptionByDefault::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisableFastSnapshotRestores` operation.
///
/// See [`DisableFastSnapshotRestores`](crate::client::fluent_builders::DisableFastSnapshotRestores) for more information about the
/// operation and its arguments.
pub fn disable_fast_snapshot_restores(
&self,
) -> fluent_builders::DisableFastSnapshotRestores<C, M, R> {
fluent_builders::DisableFastSnapshotRestores::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisableImageDeprecation` operation.
///
/// See [`DisableImageDeprecation`](crate::client::fluent_builders::DisableImageDeprecation) for more information about the
/// operation and its arguments.
pub fn disable_image_deprecation(&self) -> fluent_builders::DisableImageDeprecation<C, M, R> {
fluent_builders::DisableImageDeprecation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisableSerialConsoleAccess` operation.
///
/// See [`DisableSerialConsoleAccess`](crate::client::fluent_builders::DisableSerialConsoleAccess) for more information about the
/// operation and its arguments.
pub fn disable_serial_console_access(
&self,
) -> fluent_builders::DisableSerialConsoleAccess<C, M, R> {
fluent_builders::DisableSerialConsoleAccess::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisableTransitGatewayRouteTablePropagation` operation.
///
/// See [`DisableTransitGatewayRouteTablePropagation`](crate::client::fluent_builders::DisableTransitGatewayRouteTablePropagation) for more information about the
/// operation and its arguments.
pub fn disable_transit_gateway_route_table_propagation(
&self,
) -> fluent_builders::DisableTransitGatewayRouteTablePropagation<C, M, R> {
fluent_builders::DisableTransitGatewayRouteTablePropagation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisableVgwRoutePropagation` operation.
///
/// See [`DisableVgwRoutePropagation`](crate::client::fluent_builders::DisableVgwRoutePropagation) for more information about the
/// operation and its arguments.
pub fn disable_vgw_route_propagation(
&self,
) -> fluent_builders::DisableVgwRoutePropagation<C, M, R> {
fluent_builders::DisableVgwRoutePropagation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisableVpcClassicLink` operation.
///
/// See [`DisableVpcClassicLink`](crate::client::fluent_builders::DisableVpcClassicLink) for more information about the
/// operation and its arguments.
pub fn disable_vpc_classic_link(&self) -> fluent_builders::DisableVpcClassicLink<C, M, R> {
fluent_builders::DisableVpcClassicLink::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisableVpcClassicLinkDnsSupport` operation.
///
/// See [`DisableVpcClassicLinkDnsSupport`](crate::client::fluent_builders::DisableVpcClassicLinkDnsSupport) for more information about the
/// operation and its arguments.
pub fn disable_vpc_classic_link_dns_support(
&self,
) -> fluent_builders::DisableVpcClassicLinkDnsSupport<C, M, R> {
fluent_builders::DisableVpcClassicLinkDnsSupport::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisassociateAddress` operation.
///
/// See [`DisassociateAddress`](crate::client::fluent_builders::DisassociateAddress) for more information about the
/// operation and its arguments.
pub fn disassociate_address(&self) -> fluent_builders::DisassociateAddress<C, M, R> {
fluent_builders::DisassociateAddress::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisassociateClientVpnTargetNetwork` operation.
///
/// See [`DisassociateClientVpnTargetNetwork`](crate::client::fluent_builders::DisassociateClientVpnTargetNetwork) for more information about the
/// operation and its arguments.
pub fn disassociate_client_vpn_target_network(
&self,
) -> fluent_builders::DisassociateClientVpnTargetNetwork<C, M, R> {
fluent_builders::DisassociateClientVpnTargetNetwork::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisassociateEnclaveCertificateIamRole` operation.
///
/// See [`DisassociateEnclaveCertificateIamRole`](crate::client::fluent_builders::DisassociateEnclaveCertificateIamRole) for more information about the
/// operation and its arguments.
pub fn disassociate_enclave_certificate_iam_role(
&self,
) -> fluent_builders::DisassociateEnclaveCertificateIamRole<C, M, R> {
fluent_builders::DisassociateEnclaveCertificateIamRole::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisassociateIamInstanceProfile` operation.
///
/// See [`DisassociateIamInstanceProfile`](crate::client::fluent_builders::DisassociateIamInstanceProfile) for more information about the
/// operation and its arguments.
pub fn disassociate_iam_instance_profile(
&self,
) -> fluent_builders::DisassociateIamInstanceProfile<C, M, R> {
fluent_builders::DisassociateIamInstanceProfile::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisassociateInstanceEventWindow` operation.
///
/// See [`DisassociateInstanceEventWindow`](crate::client::fluent_builders::DisassociateInstanceEventWindow) for more information about the
/// operation and its arguments.
pub fn disassociate_instance_event_window(
&self,
) -> fluent_builders::DisassociateInstanceEventWindow<C, M, R> {
fluent_builders::DisassociateInstanceEventWindow::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisassociateRouteTable` operation.
///
/// See [`DisassociateRouteTable`](crate::client::fluent_builders::DisassociateRouteTable) for more information about the
/// operation and its arguments.
pub fn disassociate_route_table(&self) -> fluent_builders::DisassociateRouteTable<C, M, R> {
fluent_builders::DisassociateRouteTable::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisassociateSubnetCidrBlock` operation.
///
/// See [`DisassociateSubnetCidrBlock`](crate::client::fluent_builders::DisassociateSubnetCidrBlock) for more information about the
/// operation and its arguments.
pub fn disassociate_subnet_cidr_block(
&self,
) -> fluent_builders::DisassociateSubnetCidrBlock<C, M, R> {
fluent_builders::DisassociateSubnetCidrBlock::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisassociateTransitGatewayMulticastDomain` operation.
///
/// See [`DisassociateTransitGatewayMulticastDomain`](crate::client::fluent_builders::DisassociateTransitGatewayMulticastDomain) for more information about the
/// operation and its arguments.
pub fn disassociate_transit_gateway_multicast_domain(
&self,
) -> fluent_builders::DisassociateTransitGatewayMulticastDomain<C, M, R> {
fluent_builders::DisassociateTransitGatewayMulticastDomain::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisassociateTransitGatewayRouteTable` operation.
///
/// See [`DisassociateTransitGatewayRouteTable`](crate::client::fluent_builders::DisassociateTransitGatewayRouteTable) for more information about the
/// operation and its arguments.
pub fn disassociate_transit_gateway_route_table(
&self,
) -> fluent_builders::DisassociateTransitGatewayRouteTable<C, M, R> {
fluent_builders::DisassociateTransitGatewayRouteTable::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisassociateTrunkInterface` operation.
///
/// See [`DisassociateTrunkInterface`](crate::client::fluent_builders::DisassociateTrunkInterface) for more information about the
/// operation and its arguments.
pub fn disassociate_trunk_interface(
&self,
) -> fluent_builders::DisassociateTrunkInterface<C, M, R> {
fluent_builders::DisassociateTrunkInterface::new(self.handle.clone())
}
/// Constructs a fluent builder for the `DisassociateVpcCidrBlock` operation.
///
/// See [`DisassociateVpcCidrBlock`](crate::client::fluent_builders::DisassociateVpcCidrBlock) for more information about the
/// operation and its arguments.
pub fn disassociate_vpc_cidr_block(
&self,
) -> fluent_builders::DisassociateVpcCidrBlock<C, M, R> {
fluent_builders::DisassociateVpcCidrBlock::new(self.handle.clone())
}
/// Constructs a fluent builder for the `EnableEbsEncryptionByDefault` operation.
///
/// See [`EnableEbsEncryptionByDefault`](crate::client::fluent_builders::EnableEbsEncryptionByDefault) for more information about the
/// operation and its arguments.
pub fn enable_ebs_encryption_by_default(
&self,
) -> fluent_builders::EnableEbsEncryptionByDefault<C, M, R> {
fluent_builders::EnableEbsEncryptionByDefault::new(self.handle.clone())
}
/// Constructs a fluent builder for the `EnableFastSnapshotRestores` operation.
///
/// See [`EnableFastSnapshotRestores`](crate::client::fluent_builders::EnableFastSnapshotRestores) for more information about the
/// operation and its arguments.
pub fn enable_fast_snapshot_restores(
&self,
) -> fluent_builders::EnableFastSnapshotRestores<C, M, R> {
fluent_builders::EnableFastSnapshotRestores::new(self.handle.clone())
}
/// Constructs a fluent builder for the `EnableImageDeprecation` operation.
///
/// See [`EnableImageDeprecation`](crate::client::fluent_builders::EnableImageDeprecation) for more information about the
/// operation and its arguments.
pub fn enable_image_deprecation(&self) -> fluent_builders::EnableImageDeprecation<C, M, R> {
fluent_builders::EnableImageDeprecation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `EnableSerialConsoleAccess` operation.
///
/// See [`EnableSerialConsoleAccess`](crate::client::fluent_builders::EnableSerialConsoleAccess) for more information about the
/// operation and its arguments.
pub fn enable_serial_console_access(
&self,
) -> fluent_builders::EnableSerialConsoleAccess<C, M, R> {
fluent_builders::EnableSerialConsoleAccess::new(self.handle.clone())
}
/// Constructs a fluent builder for the `EnableTransitGatewayRouteTablePropagation` operation.
///
/// See [`EnableTransitGatewayRouteTablePropagation`](crate::client::fluent_builders::EnableTransitGatewayRouteTablePropagation) for more information about the
/// operation and its arguments.
pub fn enable_transit_gateway_route_table_propagation(
&self,
) -> fluent_builders::EnableTransitGatewayRouteTablePropagation<C, M, R> {
fluent_builders::EnableTransitGatewayRouteTablePropagation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `EnableVgwRoutePropagation` operation.
///
/// See [`EnableVgwRoutePropagation`](crate::client::fluent_builders::EnableVgwRoutePropagation) for more information about the
/// operation and its arguments.
pub fn enable_vgw_route_propagation(
&self,
) -> fluent_builders::EnableVgwRoutePropagation<C, M, R> {
fluent_builders::EnableVgwRoutePropagation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `EnableVolumeIO` operation.
///
/// See [`EnableVolumeIO`](crate::client::fluent_builders::EnableVolumeIO) for more information about the
/// operation and its arguments.
pub fn enable_volume_io(&self) -> fluent_builders::EnableVolumeIO<C, M, R> {
fluent_builders::EnableVolumeIO::new(self.handle.clone())
}
/// Constructs a fluent builder for the `EnableVpcClassicLink` operation.
///
/// See [`EnableVpcClassicLink`](crate::client::fluent_builders::EnableVpcClassicLink) for more information about the
/// operation and its arguments.
pub fn enable_vpc_classic_link(&self) -> fluent_builders::EnableVpcClassicLink<C, M, R> {
fluent_builders::EnableVpcClassicLink::new(self.handle.clone())
}
/// Constructs a fluent builder for the `EnableVpcClassicLinkDnsSupport` operation.
///
/// See [`EnableVpcClassicLinkDnsSupport`](crate::client::fluent_builders::EnableVpcClassicLinkDnsSupport) for more information about the
/// operation and its arguments.
pub fn enable_vpc_classic_link_dns_support(
&self,
) -> fluent_builders::EnableVpcClassicLinkDnsSupport<C, M, R> {
fluent_builders::EnableVpcClassicLinkDnsSupport::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ExportClientVpnClientCertificateRevocationList` operation.
///
/// See [`ExportClientVpnClientCertificateRevocationList`](crate::client::fluent_builders::ExportClientVpnClientCertificateRevocationList) for more information about the
/// operation and its arguments.
pub fn export_client_vpn_client_certificate_revocation_list(
&self,
) -> fluent_builders::ExportClientVpnClientCertificateRevocationList<C, M, R> {
fluent_builders::ExportClientVpnClientCertificateRevocationList::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ExportClientVpnClientConfiguration` operation.
///
/// See [`ExportClientVpnClientConfiguration`](crate::client::fluent_builders::ExportClientVpnClientConfiguration) for more information about the
/// operation and its arguments.
pub fn export_client_vpn_client_configuration(
&self,
) -> fluent_builders::ExportClientVpnClientConfiguration<C, M, R> {
fluent_builders::ExportClientVpnClientConfiguration::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ExportImage` operation.
///
/// See [`ExportImage`](crate::client::fluent_builders::ExportImage) for more information about the
/// operation and its arguments.
pub fn export_image(&self) -> fluent_builders::ExportImage<C, M, R> {
fluent_builders::ExportImage::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ExportTransitGatewayRoutes` operation.
///
/// See [`ExportTransitGatewayRoutes`](crate::client::fluent_builders::ExportTransitGatewayRoutes) for more information about the
/// operation and its arguments.
pub fn export_transit_gateway_routes(
&self,
) -> fluent_builders::ExportTransitGatewayRoutes<C, M, R> {
fluent_builders::ExportTransitGatewayRoutes::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetAssociatedEnclaveCertificateIamRoles` operation.
///
/// See [`GetAssociatedEnclaveCertificateIamRoles`](crate::client::fluent_builders::GetAssociatedEnclaveCertificateIamRoles) for more information about the
/// operation and its arguments.
pub fn get_associated_enclave_certificate_iam_roles(
&self,
) -> fluent_builders::GetAssociatedEnclaveCertificateIamRoles<C, M, R> {
fluent_builders::GetAssociatedEnclaveCertificateIamRoles::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetAssociatedIpv6PoolCidrs` operation.
///
/// See [`GetAssociatedIpv6PoolCidrs`](crate::client::fluent_builders::GetAssociatedIpv6PoolCidrs) for more information about the
/// operation and its arguments.
pub fn get_associated_ipv6_pool_cidrs(
&self,
) -> fluent_builders::GetAssociatedIpv6PoolCidrs<C, M, R> {
fluent_builders::GetAssociatedIpv6PoolCidrs::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetCapacityReservationUsage` operation.
///
/// See [`GetCapacityReservationUsage`](crate::client::fluent_builders::GetCapacityReservationUsage) for more information about the
/// operation and its arguments.
pub fn get_capacity_reservation_usage(
&self,
) -> fluent_builders::GetCapacityReservationUsage<C, M, R> {
fluent_builders::GetCapacityReservationUsage::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetCoipPoolUsage` operation.
///
/// See [`GetCoipPoolUsage`](crate::client::fluent_builders::GetCoipPoolUsage) for more information about the
/// operation and its arguments.
pub fn get_coip_pool_usage(&self) -> fluent_builders::GetCoipPoolUsage<C, M, R> {
fluent_builders::GetCoipPoolUsage::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetConsoleOutput` operation.
///
/// See [`GetConsoleOutput`](crate::client::fluent_builders::GetConsoleOutput) for more information about the
/// operation and its arguments.
pub fn get_console_output(&self) -> fluent_builders::GetConsoleOutput<C, M, R> {
fluent_builders::GetConsoleOutput::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetConsoleScreenshot` operation.
///
/// See [`GetConsoleScreenshot`](crate::client::fluent_builders::GetConsoleScreenshot) for more information about the
/// operation and its arguments.
pub fn get_console_screenshot(&self) -> fluent_builders::GetConsoleScreenshot<C, M, R> {
fluent_builders::GetConsoleScreenshot::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetDefaultCreditSpecification` operation.
///
/// See [`GetDefaultCreditSpecification`](crate::client::fluent_builders::GetDefaultCreditSpecification) for more information about the
/// operation and its arguments.
pub fn get_default_credit_specification(
&self,
) -> fluent_builders::GetDefaultCreditSpecification<C, M, R> {
fluent_builders::GetDefaultCreditSpecification::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetEbsDefaultKmsKeyId` operation.
///
/// See [`GetEbsDefaultKmsKeyId`](crate::client::fluent_builders::GetEbsDefaultKmsKeyId) for more information about the
/// operation and its arguments.
pub fn get_ebs_default_kms_key_id(&self) -> fluent_builders::GetEbsDefaultKmsKeyId<C, M, R> {
fluent_builders::GetEbsDefaultKmsKeyId::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetEbsEncryptionByDefault` operation.
///
/// See [`GetEbsEncryptionByDefault`](crate::client::fluent_builders::GetEbsEncryptionByDefault) for more information about the
/// operation and its arguments.
pub fn get_ebs_encryption_by_default(
&self,
) -> fluent_builders::GetEbsEncryptionByDefault<C, M, R> {
fluent_builders::GetEbsEncryptionByDefault::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetFlowLogsIntegrationTemplate` operation.
///
/// See [`GetFlowLogsIntegrationTemplate`](crate::client::fluent_builders::GetFlowLogsIntegrationTemplate) for more information about the
/// operation and its arguments.
pub fn get_flow_logs_integration_template(
&self,
) -> fluent_builders::GetFlowLogsIntegrationTemplate<C, M, R> {
fluent_builders::GetFlowLogsIntegrationTemplate::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetGroupsForCapacityReservation` operation.
///
/// See [`GetGroupsForCapacityReservation`](crate::client::fluent_builders::GetGroupsForCapacityReservation) for more information about the
/// operation and its arguments.
pub fn get_groups_for_capacity_reservation(
&self,
) -> fluent_builders::GetGroupsForCapacityReservation<C, M, R> {
fluent_builders::GetGroupsForCapacityReservation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetHostReservationPurchasePreview` operation.
///
/// See [`GetHostReservationPurchasePreview`](crate::client::fluent_builders::GetHostReservationPurchasePreview) for more information about the
/// operation and its arguments.
pub fn get_host_reservation_purchase_preview(
&self,
) -> fluent_builders::GetHostReservationPurchasePreview<C, M, R> {
fluent_builders::GetHostReservationPurchasePreview::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetLaunchTemplateData` operation.
///
/// See [`GetLaunchTemplateData`](crate::client::fluent_builders::GetLaunchTemplateData) for more information about the
/// operation and its arguments.
pub fn get_launch_template_data(&self) -> fluent_builders::GetLaunchTemplateData<C, M, R> {
fluent_builders::GetLaunchTemplateData::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetManagedPrefixListAssociations` operation.
///
/// See [`GetManagedPrefixListAssociations`](crate::client::fluent_builders::GetManagedPrefixListAssociations) for more information about the
/// operation and its arguments.
pub fn get_managed_prefix_list_associations(
&self,
) -> fluent_builders::GetManagedPrefixListAssociations<C, M, R> {
fluent_builders::GetManagedPrefixListAssociations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetManagedPrefixListEntries` operation.
///
/// See [`GetManagedPrefixListEntries`](crate::client::fluent_builders::GetManagedPrefixListEntries) for more information about the
/// operation and its arguments.
pub fn get_managed_prefix_list_entries(
&self,
) -> fluent_builders::GetManagedPrefixListEntries<C, M, R> {
fluent_builders::GetManagedPrefixListEntries::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetPasswordData` operation.
///
/// See [`GetPasswordData`](crate::client::fluent_builders::GetPasswordData) for more information about the
/// operation and its arguments.
pub fn get_password_data(&self) -> fluent_builders::GetPasswordData<C, M, R> {
fluent_builders::GetPasswordData::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetReservedInstancesExchangeQuote` operation.
///
/// See [`GetReservedInstancesExchangeQuote`](crate::client::fluent_builders::GetReservedInstancesExchangeQuote) for more information about the
/// operation and its arguments.
pub fn get_reserved_instances_exchange_quote(
&self,
) -> fluent_builders::GetReservedInstancesExchangeQuote<C, M, R> {
fluent_builders::GetReservedInstancesExchangeQuote::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetSerialConsoleAccessStatus` operation.
///
/// See [`GetSerialConsoleAccessStatus`](crate::client::fluent_builders::GetSerialConsoleAccessStatus) for more information about the
/// operation and its arguments.
pub fn get_serial_console_access_status(
&self,
) -> fluent_builders::GetSerialConsoleAccessStatus<C, M, R> {
fluent_builders::GetSerialConsoleAccessStatus::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetSubnetCidrReservations` operation.
///
/// See [`GetSubnetCidrReservations`](crate::client::fluent_builders::GetSubnetCidrReservations) for more information about the
/// operation and its arguments.
pub fn get_subnet_cidr_reservations(
&self,
) -> fluent_builders::GetSubnetCidrReservations<C, M, R> {
fluent_builders::GetSubnetCidrReservations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetTransitGatewayAttachmentPropagations` operation.
///
/// See [`GetTransitGatewayAttachmentPropagations`](crate::client::fluent_builders::GetTransitGatewayAttachmentPropagations) for more information about the
/// operation and its arguments.
pub fn get_transit_gateway_attachment_propagations(
&self,
) -> fluent_builders::GetTransitGatewayAttachmentPropagations<C, M, R> {
fluent_builders::GetTransitGatewayAttachmentPropagations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetTransitGatewayMulticastDomainAssociations` operation.
///
/// See [`GetTransitGatewayMulticastDomainAssociations`](crate::client::fluent_builders::GetTransitGatewayMulticastDomainAssociations) for more information about the
/// operation and its arguments.
pub fn get_transit_gateway_multicast_domain_associations(
&self,
) -> fluent_builders::GetTransitGatewayMulticastDomainAssociations<C, M, R> {
fluent_builders::GetTransitGatewayMulticastDomainAssociations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetTransitGatewayPrefixListReferences` operation.
///
/// See [`GetTransitGatewayPrefixListReferences`](crate::client::fluent_builders::GetTransitGatewayPrefixListReferences) for more information about the
/// operation and its arguments.
pub fn get_transit_gateway_prefix_list_references(
&self,
) -> fluent_builders::GetTransitGatewayPrefixListReferences<C, M, R> {
fluent_builders::GetTransitGatewayPrefixListReferences::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetTransitGatewayRouteTableAssociations` operation.
///
/// See [`GetTransitGatewayRouteTableAssociations`](crate::client::fluent_builders::GetTransitGatewayRouteTableAssociations) for more information about the
/// operation and its arguments.
pub fn get_transit_gateway_route_table_associations(
&self,
) -> fluent_builders::GetTransitGatewayRouteTableAssociations<C, M, R> {
fluent_builders::GetTransitGatewayRouteTableAssociations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetTransitGatewayRouteTablePropagations` operation.
///
/// See [`GetTransitGatewayRouteTablePropagations`](crate::client::fluent_builders::GetTransitGatewayRouteTablePropagations) for more information about the
/// operation and its arguments.
pub fn get_transit_gateway_route_table_propagations(
&self,
) -> fluent_builders::GetTransitGatewayRouteTablePropagations<C, M, R> {
fluent_builders::GetTransitGatewayRouteTablePropagations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetVpnConnectionDeviceSampleConfiguration` operation.
///
/// See [`GetVpnConnectionDeviceSampleConfiguration`](crate::client::fluent_builders::GetVpnConnectionDeviceSampleConfiguration) for more information about the
/// operation and its arguments.
pub fn get_vpn_connection_device_sample_configuration(
&self,
) -> fluent_builders::GetVpnConnectionDeviceSampleConfiguration<C, M, R> {
fluent_builders::GetVpnConnectionDeviceSampleConfiguration::new(self.handle.clone())
}
/// Constructs a fluent builder for the `GetVpnConnectionDeviceTypes` operation.
///
/// See [`GetVpnConnectionDeviceTypes`](crate::client::fluent_builders::GetVpnConnectionDeviceTypes) for more information about the
/// operation and its arguments.
pub fn get_vpn_connection_device_types(
&self,
) -> fluent_builders::GetVpnConnectionDeviceTypes<C, M, R> {
fluent_builders::GetVpnConnectionDeviceTypes::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ImportClientVpnClientCertificateRevocationList` operation.
///
/// See [`ImportClientVpnClientCertificateRevocationList`](crate::client::fluent_builders::ImportClientVpnClientCertificateRevocationList) for more information about the
/// operation and its arguments.
pub fn import_client_vpn_client_certificate_revocation_list(
&self,
) -> fluent_builders::ImportClientVpnClientCertificateRevocationList<C, M, R> {
fluent_builders::ImportClientVpnClientCertificateRevocationList::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ImportImage` operation.
///
/// See [`ImportImage`](crate::client::fluent_builders::ImportImage) for more information about the
/// operation and its arguments.
pub fn import_image(&self) -> fluent_builders::ImportImage<C, M, R> {
fluent_builders::ImportImage::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ImportInstance` operation.
///
/// See [`ImportInstance`](crate::client::fluent_builders::ImportInstance) for more information about the
/// operation and its arguments.
pub fn import_instance(&self) -> fluent_builders::ImportInstance<C, M, R> {
fluent_builders::ImportInstance::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ImportKeyPair` operation.
///
/// See [`ImportKeyPair`](crate::client::fluent_builders::ImportKeyPair) for more information about the
/// operation and its arguments.
pub fn import_key_pair(&self) -> fluent_builders::ImportKeyPair<C, M, R> {
fluent_builders::ImportKeyPair::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ImportSnapshot` operation.
///
/// See [`ImportSnapshot`](crate::client::fluent_builders::ImportSnapshot) for more information about the
/// operation and its arguments.
pub fn import_snapshot(&self) -> fluent_builders::ImportSnapshot<C, M, R> {
fluent_builders::ImportSnapshot::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ImportVolume` operation.
///
/// See [`ImportVolume`](crate::client::fluent_builders::ImportVolume) for more information about the
/// operation and its arguments.
pub fn import_volume(&self) -> fluent_builders::ImportVolume<C, M, R> {
fluent_builders::ImportVolume::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyAddressAttribute` operation.
///
/// See [`ModifyAddressAttribute`](crate::client::fluent_builders::ModifyAddressAttribute) for more information about the
/// operation and its arguments.
pub fn modify_address_attribute(&self) -> fluent_builders::ModifyAddressAttribute<C, M, R> {
fluent_builders::ModifyAddressAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyAvailabilityZoneGroup` operation.
///
/// See [`ModifyAvailabilityZoneGroup`](crate::client::fluent_builders::ModifyAvailabilityZoneGroup) for more information about the
/// operation and its arguments.
pub fn modify_availability_zone_group(
&self,
) -> fluent_builders::ModifyAvailabilityZoneGroup<C, M, R> {
fluent_builders::ModifyAvailabilityZoneGroup::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyCapacityReservation` operation.
///
/// See [`ModifyCapacityReservation`](crate::client::fluent_builders::ModifyCapacityReservation) for more information about the
/// operation and its arguments.
pub fn modify_capacity_reservation(
&self,
) -> fluent_builders::ModifyCapacityReservation<C, M, R> {
fluent_builders::ModifyCapacityReservation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyCapacityReservationFleet` operation.
///
/// See [`ModifyCapacityReservationFleet`](crate::client::fluent_builders::ModifyCapacityReservationFleet) for more information about the
/// operation and its arguments.
pub fn modify_capacity_reservation_fleet(
&self,
) -> fluent_builders::ModifyCapacityReservationFleet<C, M, R> {
fluent_builders::ModifyCapacityReservationFleet::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyClientVpnEndpoint` operation.
///
/// See [`ModifyClientVpnEndpoint`](crate::client::fluent_builders::ModifyClientVpnEndpoint) for more information about the
/// operation and its arguments.
pub fn modify_client_vpn_endpoint(&self) -> fluent_builders::ModifyClientVpnEndpoint<C, M, R> {
fluent_builders::ModifyClientVpnEndpoint::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyDefaultCreditSpecification` operation.
///
/// See [`ModifyDefaultCreditSpecification`](crate::client::fluent_builders::ModifyDefaultCreditSpecification) for more information about the
/// operation and its arguments.
pub fn modify_default_credit_specification(
&self,
) -> fluent_builders::ModifyDefaultCreditSpecification<C, M, R> {
fluent_builders::ModifyDefaultCreditSpecification::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyEbsDefaultKmsKeyId` operation.
///
/// See [`ModifyEbsDefaultKmsKeyId`](crate::client::fluent_builders::ModifyEbsDefaultKmsKeyId) for more information about the
/// operation and its arguments.
pub fn modify_ebs_default_kms_key_id(
&self,
) -> fluent_builders::ModifyEbsDefaultKmsKeyId<C, M, R> {
fluent_builders::ModifyEbsDefaultKmsKeyId::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyFleet` operation.
///
/// See [`ModifyFleet`](crate::client::fluent_builders::ModifyFleet) for more information about the
/// operation and its arguments.
pub fn modify_fleet(&self) -> fluent_builders::ModifyFleet<C, M, R> {
fluent_builders::ModifyFleet::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyFpgaImageAttribute` operation.
///
/// See [`ModifyFpgaImageAttribute`](crate::client::fluent_builders::ModifyFpgaImageAttribute) for more information about the
/// operation and its arguments.
pub fn modify_fpga_image_attribute(
&self,
) -> fluent_builders::ModifyFpgaImageAttribute<C, M, R> {
fluent_builders::ModifyFpgaImageAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyHosts` operation.
///
/// See [`ModifyHosts`](crate::client::fluent_builders::ModifyHosts) for more information about the
/// operation and its arguments.
pub fn modify_hosts(&self) -> fluent_builders::ModifyHosts<C, M, R> {
fluent_builders::ModifyHosts::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyIdentityIdFormat` operation.
///
/// See [`ModifyIdentityIdFormat`](crate::client::fluent_builders::ModifyIdentityIdFormat) for more information about the
/// operation and its arguments.
pub fn modify_identity_id_format(&self) -> fluent_builders::ModifyIdentityIdFormat<C, M, R> {
fluent_builders::ModifyIdentityIdFormat::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyIdFormat` operation.
///
/// See [`ModifyIdFormat`](crate::client::fluent_builders::ModifyIdFormat) for more information about the
/// operation and its arguments.
pub fn modify_id_format(&self) -> fluent_builders::ModifyIdFormat<C, M, R> {
fluent_builders::ModifyIdFormat::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyImageAttribute` operation.
///
/// See [`ModifyImageAttribute`](crate::client::fluent_builders::ModifyImageAttribute) for more information about the
/// operation and its arguments.
pub fn modify_image_attribute(&self) -> fluent_builders::ModifyImageAttribute<C, M, R> {
fluent_builders::ModifyImageAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyInstanceAttribute` operation.
///
/// See [`ModifyInstanceAttribute`](crate::client::fluent_builders::ModifyInstanceAttribute) for more information about the
/// operation and its arguments.
pub fn modify_instance_attribute(&self) -> fluent_builders::ModifyInstanceAttribute<C, M, R> {
fluent_builders::ModifyInstanceAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyInstanceCapacityReservationAttributes` operation.
///
/// See [`ModifyInstanceCapacityReservationAttributes`](crate::client::fluent_builders::ModifyInstanceCapacityReservationAttributes) for more information about the
/// operation and its arguments.
pub fn modify_instance_capacity_reservation_attributes(
&self,
) -> fluent_builders::ModifyInstanceCapacityReservationAttributes<C, M, R> {
fluent_builders::ModifyInstanceCapacityReservationAttributes::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyInstanceCreditSpecification` operation.
///
/// See [`ModifyInstanceCreditSpecification`](crate::client::fluent_builders::ModifyInstanceCreditSpecification) for more information about the
/// operation and its arguments.
pub fn modify_instance_credit_specification(
&self,
) -> fluent_builders::ModifyInstanceCreditSpecification<C, M, R> {
fluent_builders::ModifyInstanceCreditSpecification::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyInstanceEventStartTime` operation.
///
/// See [`ModifyInstanceEventStartTime`](crate::client::fluent_builders::ModifyInstanceEventStartTime) for more information about the
/// operation and its arguments.
pub fn modify_instance_event_start_time(
&self,
) -> fluent_builders::ModifyInstanceEventStartTime<C, M, R> {
fluent_builders::ModifyInstanceEventStartTime::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyInstanceEventWindow` operation.
///
/// See [`ModifyInstanceEventWindow`](crate::client::fluent_builders::ModifyInstanceEventWindow) for more information about the
/// operation and its arguments.
pub fn modify_instance_event_window(
&self,
) -> fluent_builders::ModifyInstanceEventWindow<C, M, R> {
fluent_builders::ModifyInstanceEventWindow::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyInstanceMetadataOptions` operation.
///
/// See [`ModifyInstanceMetadataOptions`](crate::client::fluent_builders::ModifyInstanceMetadataOptions) for more information about the
/// operation and its arguments.
pub fn modify_instance_metadata_options(
&self,
) -> fluent_builders::ModifyInstanceMetadataOptions<C, M, R> {
fluent_builders::ModifyInstanceMetadataOptions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyInstancePlacement` operation.
///
/// See [`ModifyInstancePlacement`](crate::client::fluent_builders::ModifyInstancePlacement) for more information about the
/// operation and its arguments.
pub fn modify_instance_placement(&self) -> fluent_builders::ModifyInstancePlacement<C, M, R> {
fluent_builders::ModifyInstancePlacement::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyLaunchTemplate` operation.
///
/// See [`ModifyLaunchTemplate`](crate::client::fluent_builders::ModifyLaunchTemplate) for more information about the
/// operation and its arguments.
pub fn modify_launch_template(&self) -> fluent_builders::ModifyLaunchTemplate<C, M, R> {
fluent_builders::ModifyLaunchTemplate::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyManagedPrefixList` operation.
///
/// See [`ModifyManagedPrefixList`](crate::client::fluent_builders::ModifyManagedPrefixList) for more information about the
/// operation and its arguments.
pub fn modify_managed_prefix_list(&self) -> fluent_builders::ModifyManagedPrefixList<C, M, R> {
fluent_builders::ModifyManagedPrefixList::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyNetworkInterfaceAttribute` operation.
///
/// See [`ModifyNetworkInterfaceAttribute`](crate::client::fluent_builders::ModifyNetworkInterfaceAttribute) for more information about the
/// operation and its arguments.
pub fn modify_network_interface_attribute(
&self,
) -> fluent_builders::ModifyNetworkInterfaceAttribute<C, M, R> {
fluent_builders::ModifyNetworkInterfaceAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyReservedInstances` operation.
///
/// See [`ModifyReservedInstances`](crate::client::fluent_builders::ModifyReservedInstances) for more information about the
/// operation and its arguments.
pub fn modify_reserved_instances(&self) -> fluent_builders::ModifyReservedInstances<C, M, R> {
fluent_builders::ModifyReservedInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifySecurityGroupRules` operation.
///
/// See [`ModifySecurityGroupRules`](crate::client::fluent_builders::ModifySecurityGroupRules) for more information about the
/// operation and its arguments.
pub fn modify_security_group_rules(
&self,
) -> fluent_builders::ModifySecurityGroupRules<C, M, R> {
fluent_builders::ModifySecurityGroupRules::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifySnapshotAttribute` operation.
///
/// See [`ModifySnapshotAttribute`](crate::client::fluent_builders::ModifySnapshotAttribute) for more information about the
/// operation and its arguments.
pub fn modify_snapshot_attribute(&self) -> fluent_builders::ModifySnapshotAttribute<C, M, R> {
fluent_builders::ModifySnapshotAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifySpotFleetRequest` operation.
///
/// See [`ModifySpotFleetRequest`](crate::client::fluent_builders::ModifySpotFleetRequest) for more information about the
/// operation and its arguments.
pub fn modify_spot_fleet_request(&self) -> fluent_builders::ModifySpotFleetRequest<C, M, R> {
fluent_builders::ModifySpotFleetRequest::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifySubnetAttribute` operation.
///
/// See [`ModifySubnetAttribute`](crate::client::fluent_builders::ModifySubnetAttribute) for more information about the
/// operation and its arguments.
pub fn modify_subnet_attribute(&self) -> fluent_builders::ModifySubnetAttribute<C, M, R> {
fluent_builders::ModifySubnetAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyTrafficMirrorFilterNetworkServices` operation.
///
/// See [`ModifyTrafficMirrorFilterNetworkServices`](crate::client::fluent_builders::ModifyTrafficMirrorFilterNetworkServices) for more information about the
/// operation and its arguments.
pub fn modify_traffic_mirror_filter_network_services(
&self,
) -> fluent_builders::ModifyTrafficMirrorFilterNetworkServices<C, M, R> {
fluent_builders::ModifyTrafficMirrorFilterNetworkServices::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyTrafficMirrorFilterRule` operation.
///
/// See [`ModifyTrafficMirrorFilterRule`](crate::client::fluent_builders::ModifyTrafficMirrorFilterRule) for more information about the
/// operation and its arguments.
pub fn modify_traffic_mirror_filter_rule(
&self,
) -> fluent_builders::ModifyTrafficMirrorFilterRule<C, M, R> {
fluent_builders::ModifyTrafficMirrorFilterRule::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyTrafficMirrorSession` operation.
///
/// See [`ModifyTrafficMirrorSession`](crate::client::fluent_builders::ModifyTrafficMirrorSession) for more information about the
/// operation and its arguments.
pub fn modify_traffic_mirror_session(
&self,
) -> fluent_builders::ModifyTrafficMirrorSession<C, M, R> {
fluent_builders::ModifyTrafficMirrorSession::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyTransitGateway` operation.
///
/// See [`ModifyTransitGateway`](crate::client::fluent_builders::ModifyTransitGateway) for more information about the
/// operation and its arguments.
pub fn modify_transit_gateway(&self) -> fluent_builders::ModifyTransitGateway<C, M, R> {
fluent_builders::ModifyTransitGateway::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyTransitGatewayPrefixListReference` operation.
///
/// See [`ModifyTransitGatewayPrefixListReference`](crate::client::fluent_builders::ModifyTransitGatewayPrefixListReference) for more information about the
/// operation and its arguments.
pub fn modify_transit_gateway_prefix_list_reference(
&self,
) -> fluent_builders::ModifyTransitGatewayPrefixListReference<C, M, R> {
fluent_builders::ModifyTransitGatewayPrefixListReference::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyTransitGatewayVpcAttachment` operation.
///
/// See [`ModifyTransitGatewayVpcAttachment`](crate::client::fluent_builders::ModifyTransitGatewayVpcAttachment) for more information about the
/// operation and its arguments.
pub fn modify_transit_gateway_vpc_attachment(
&self,
) -> fluent_builders::ModifyTransitGatewayVpcAttachment<C, M, R> {
fluent_builders::ModifyTransitGatewayVpcAttachment::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVolume` operation.
///
/// See [`ModifyVolume`](crate::client::fluent_builders::ModifyVolume) for more information about the
/// operation and its arguments.
pub fn modify_volume(&self) -> fluent_builders::ModifyVolume<C, M, R> {
fluent_builders::ModifyVolume::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVolumeAttribute` operation.
///
/// See [`ModifyVolumeAttribute`](crate::client::fluent_builders::ModifyVolumeAttribute) for more information about the
/// operation and its arguments.
pub fn modify_volume_attribute(&self) -> fluent_builders::ModifyVolumeAttribute<C, M, R> {
fluent_builders::ModifyVolumeAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVpcAttribute` operation.
///
/// See [`ModifyVpcAttribute`](crate::client::fluent_builders::ModifyVpcAttribute) for more information about the
/// operation and its arguments.
pub fn modify_vpc_attribute(&self) -> fluent_builders::ModifyVpcAttribute<C, M, R> {
fluent_builders::ModifyVpcAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVpcEndpoint` operation.
///
/// See [`ModifyVpcEndpoint`](crate::client::fluent_builders::ModifyVpcEndpoint) for more information about the
/// operation and its arguments.
pub fn modify_vpc_endpoint(&self) -> fluent_builders::ModifyVpcEndpoint<C, M, R> {
fluent_builders::ModifyVpcEndpoint::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVpcEndpointConnectionNotification` operation.
///
/// See [`ModifyVpcEndpointConnectionNotification`](crate::client::fluent_builders::ModifyVpcEndpointConnectionNotification) for more information about the
/// operation and its arguments.
pub fn modify_vpc_endpoint_connection_notification(
&self,
) -> fluent_builders::ModifyVpcEndpointConnectionNotification<C, M, R> {
fluent_builders::ModifyVpcEndpointConnectionNotification::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVpcEndpointServiceConfiguration` operation.
///
/// See [`ModifyVpcEndpointServiceConfiguration`](crate::client::fluent_builders::ModifyVpcEndpointServiceConfiguration) for more information about the
/// operation and its arguments.
pub fn modify_vpc_endpoint_service_configuration(
&self,
) -> fluent_builders::ModifyVpcEndpointServiceConfiguration<C, M, R> {
fluent_builders::ModifyVpcEndpointServiceConfiguration::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVpcEndpointServicePermissions` operation.
///
/// See [`ModifyVpcEndpointServicePermissions`](crate::client::fluent_builders::ModifyVpcEndpointServicePermissions) for more information about the
/// operation and its arguments.
pub fn modify_vpc_endpoint_service_permissions(
&self,
) -> fluent_builders::ModifyVpcEndpointServicePermissions<C, M, R> {
fluent_builders::ModifyVpcEndpointServicePermissions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVpcPeeringConnectionOptions` operation.
///
/// See [`ModifyVpcPeeringConnectionOptions`](crate::client::fluent_builders::ModifyVpcPeeringConnectionOptions) for more information about the
/// operation and its arguments.
pub fn modify_vpc_peering_connection_options(
&self,
) -> fluent_builders::ModifyVpcPeeringConnectionOptions<C, M, R> {
fluent_builders::ModifyVpcPeeringConnectionOptions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVpcTenancy` operation.
///
/// See [`ModifyVpcTenancy`](crate::client::fluent_builders::ModifyVpcTenancy) for more information about the
/// operation and its arguments.
pub fn modify_vpc_tenancy(&self) -> fluent_builders::ModifyVpcTenancy<C, M, R> {
fluent_builders::ModifyVpcTenancy::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVpnConnection` operation.
///
/// See [`ModifyVpnConnection`](crate::client::fluent_builders::ModifyVpnConnection) for more information about the
/// operation and its arguments.
pub fn modify_vpn_connection(&self) -> fluent_builders::ModifyVpnConnection<C, M, R> {
fluent_builders::ModifyVpnConnection::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVpnConnectionOptions` operation.
///
/// See [`ModifyVpnConnectionOptions`](crate::client::fluent_builders::ModifyVpnConnectionOptions) for more information about the
/// operation and its arguments.
pub fn modify_vpn_connection_options(
&self,
) -> fluent_builders::ModifyVpnConnectionOptions<C, M, R> {
fluent_builders::ModifyVpnConnectionOptions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVpnTunnelCertificate` operation.
///
/// See [`ModifyVpnTunnelCertificate`](crate::client::fluent_builders::ModifyVpnTunnelCertificate) for more information about the
/// operation and its arguments.
pub fn modify_vpn_tunnel_certificate(
&self,
) -> fluent_builders::ModifyVpnTunnelCertificate<C, M, R> {
fluent_builders::ModifyVpnTunnelCertificate::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ModifyVpnTunnelOptions` operation.
///
/// See [`ModifyVpnTunnelOptions`](crate::client::fluent_builders::ModifyVpnTunnelOptions) for more information about the
/// operation and its arguments.
pub fn modify_vpn_tunnel_options(&self) -> fluent_builders::ModifyVpnTunnelOptions<C, M, R> {
fluent_builders::ModifyVpnTunnelOptions::new(self.handle.clone())
}
/// Constructs a fluent builder for the `MonitorInstances` operation.
///
/// See [`MonitorInstances`](crate::client::fluent_builders::MonitorInstances) for more information about the
/// operation and its arguments.
pub fn monitor_instances(&self) -> fluent_builders::MonitorInstances<C, M, R> {
fluent_builders::MonitorInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `MoveAddressToVpc` operation.
///
/// See [`MoveAddressToVpc`](crate::client::fluent_builders::MoveAddressToVpc) for more information about the
/// operation and its arguments.
pub fn move_address_to_vpc(&self) -> fluent_builders::MoveAddressToVpc<C, M, R> {
fluent_builders::MoveAddressToVpc::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ProvisionByoipCidr` operation.
///
/// See [`ProvisionByoipCidr`](crate::client::fluent_builders::ProvisionByoipCidr) for more information about the
/// operation and its arguments.
pub fn provision_byoip_cidr(&self) -> fluent_builders::ProvisionByoipCidr<C, M, R> {
fluent_builders::ProvisionByoipCidr::new(self.handle.clone())
}
/// Constructs a fluent builder for the `PurchaseHostReservation` operation.
///
/// See [`PurchaseHostReservation`](crate::client::fluent_builders::PurchaseHostReservation) for more information about the
/// operation and its arguments.
pub fn purchase_host_reservation(&self) -> fluent_builders::PurchaseHostReservation<C, M, R> {
fluent_builders::PurchaseHostReservation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `PurchaseReservedInstancesOffering` operation.
///
/// See [`PurchaseReservedInstancesOffering`](crate::client::fluent_builders::PurchaseReservedInstancesOffering) for more information about the
/// operation and its arguments.
pub fn purchase_reserved_instances_offering(
&self,
) -> fluent_builders::PurchaseReservedInstancesOffering<C, M, R> {
fluent_builders::PurchaseReservedInstancesOffering::new(self.handle.clone())
}
/// Constructs a fluent builder for the `PurchaseScheduledInstances` operation.
///
/// See [`PurchaseScheduledInstances`](crate::client::fluent_builders::PurchaseScheduledInstances) for more information about the
/// operation and its arguments.
pub fn purchase_scheduled_instances(
&self,
) -> fluent_builders::PurchaseScheduledInstances<C, M, R> {
fluent_builders::PurchaseScheduledInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RebootInstances` operation.
///
/// See [`RebootInstances`](crate::client::fluent_builders::RebootInstances) for more information about the
/// operation and its arguments.
pub fn reboot_instances(&self) -> fluent_builders::RebootInstances<C, M, R> {
fluent_builders::RebootInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RegisterImage` operation.
///
/// See [`RegisterImage`](crate::client::fluent_builders::RegisterImage) for more information about the
/// operation and its arguments.
pub fn register_image(&self) -> fluent_builders::RegisterImage<C, M, R> {
fluent_builders::RegisterImage::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RegisterInstanceEventNotificationAttributes` operation.
///
/// See [`RegisterInstanceEventNotificationAttributes`](crate::client::fluent_builders::RegisterInstanceEventNotificationAttributes) for more information about the
/// operation and its arguments.
pub fn register_instance_event_notification_attributes(
&self,
) -> fluent_builders::RegisterInstanceEventNotificationAttributes<C, M, R> {
fluent_builders::RegisterInstanceEventNotificationAttributes::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RegisterTransitGatewayMulticastGroupMembers` operation.
///
/// See [`RegisterTransitGatewayMulticastGroupMembers`](crate::client::fluent_builders::RegisterTransitGatewayMulticastGroupMembers) for more information about the
/// operation and its arguments.
pub fn register_transit_gateway_multicast_group_members(
&self,
) -> fluent_builders::RegisterTransitGatewayMulticastGroupMembers<C, M, R> {
fluent_builders::RegisterTransitGatewayMulticastGroupMembers::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RegisterTransitGatewayMulticastGroupSources` operation.
///
/// See [`RegisterTransitGatewayMulticastGroupSources`](crate::client::fluent_builders::RegisterTransitGatewayMulticastGroupSources) for more information about the
/// operation and its arguments.
pub fn register_transit_gateway_multicast_group_sources(
&self,
) -> fluent_builders::RegisterTransitGatewayMulticastGroupSources<C, M, R> {
fluent_builders::RegisterTransitGatewayMulticastGroupSources::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RejectTransitGatewayMulticastDomainAssociations` operation.
///
/// See [`RejectTransitGatewayMulticastDomainAssociations`](crate::client::fluent_builders::RejectTransitGatewayMulticastDomainAssociations) for more information about the
/// operation and its arguments.
pub fn reject_transit_gateway_multicast_domain_associations(
&self,
) -> fluent_builders::RejectTransitGatewayMulticastDomainAssociations<C, M, R> {
fluent_builders::RejectTransitGatewayMulticastDomainAssociations::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RejectTransitGatewayPeeringAttachment` operation.
///
/// See [`RejectTransitGatewayPeeringAttachment`](crate::client::fluent_builders::RejectTransitGatewayPeeringAttachment) for more information about the
/// operation and its arguments.
pub fn reject_transit_gateway_peering_attachment(
&self,
) -> fluent_builders::RejectTransitGatewayPeeringAttachment<C, M, R> {
fluent_builders::RejectTransitGatewayPeeringAttachment::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RejectTransitGatewayVpcAttachment` operation.
///
/// See [`RejectTransitGatewayVpcAttachment`](crate::client::fluent_builders::RejectTransitGatewayVpcAttachment) for more information about the
/// operation and its arguments.
pub fn reject_transit_gateway_vpc_attachment(
&self,
) -> fluent_builders::RejectTransitGatewayVpcAttachment<C, M, R> {
fluent_builders::RejectTransitGatewayVpcAttachment::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RejectVpcEndpointConnections` operation.
///
/// See [`RejectVpcEndpointConnections`](crate::client::fluent_builders::RejectVpcEndpointConnections) for more information about the
/// operation and its arguments.
pub fn reject_vpc_endpoint_connections(
&self,
) -> fluent_builders::RejectVpcEndpointConnections<C, M, R> {
fluent_builders::RejectVpcEndpointConnections::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RejectVpcPeeringConnection` operation.
///
/// See [`RejectVpcPeeringConnection`](crate::client::fluent_builders::RejectVpcPeeringConnection) for more information about the
/// operation and its arguments.
pub fn reject_vpc_peering_connection(
&self,
) -> fluent_builders::RejectVpcPeeringConnection<C, M, R> {
fluent_builders::RejectVpcPeeringConnection::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ReleaseAddress` operation.
///
/// See [`ReleaseAddress`](crate::client::fluent_builders::ReleaseAddress) for more information about the
/// operation and its arguments.
pub fn release_address(&self) -> fluent_builders::ReleaseAddress<C, M, R> {
fluent_builders::ReleaseAddress::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ReleaseHosts` operation.
///
/// See [`ReleaseHosts`](crate::client::fluent_builders::ReleaseHosts) for more information about the
/// operation and its arguments.
pub fn release_hosts(&self) -> fluent_builders::ReleaseHosts<C, M, R> {
fluent_builders::ReleaseHosts::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ReplaceIamInstanceProfileAssociation` operation.
///
/// See [`ReplaceIamInstanceProfileAssociation`](crate::client::fluent_builders::ReplaceIamInstanceProfileAssociation) for more information about the
/// operation and its arguments.
pub fn replace_iam_instance_profile_association(
&self,
) -> fluent_builders::ReplaceIamInstanceProfileAssociation<C, M, R> {
fluent_builders::ReplaceIamInstanceProfileAssociation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ReplaceNetworkAclAssociation` operation.
///
/// See [`ReplaceNetworkAclAssociation`](crate::client::fluent_builders::ReplaceNetworkAclAssociation) for more information about the
/// operation and its arguments.
pub fn replace_network_acl_association(
&self,
) -> fluent_builders::ReplaceNetworkAclAssociation<C, M, R> {
fluent_builders::ReplaceNetworkAclAssociation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ReplaceNetworkAclEntry` operation.
///
/// See [`ReplaceNetworkAclEntry`](crate::client::fluent_builders::ReplaceNetworkAclEntry) for more information about the
/// operation and its arguments.
pub fn replace_network_acl_entry(&self) -> fluent_builders::ReplaceNetworkAclEntry<C, M, R> {
fluent_builders::ReplaceNetworkAclEntry::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ReplaceRoute` operation.
///
/// See [`ReplaceRoute`](crate::client::fluent_builders::ReplaceRoute) for more information about the
/// operation and its arguments.
pub fn replace_route(&self) -> fluent_builders::ReplaceRoute<C, M, R> {
fluent_builders::ReplaceRoute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ReplaceRouteTableAssociation` operation.
///
/// See [`ReplaceRouteTableAssociation`](crate::client::fluent_builders::ReplaceRouteTableAssociation) for more information about the
/// operation and its arguments.
pub fn replace_route_table_association(
&self,
) -> fluent_builders::ReplaceRouteTableAssociation<C, M, R> {
fluent_builders::ReplaceRouteTableAssociation::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ReplaceTransitGatewayRoute` operation.
///
/// See [`ReplaceTransitGatewayRoute`](crate::client::fluent_builders::ReplaceTransitGatewayRoute) for more information about the
/// operation and its arguments.
pub fn replace_transit_gateway_route(
&self,
) -> fluent_builders::ReplaceTransitGatewayRoute<C, M, R> {
fluent_builders::ReplaceTransitGatewayRoute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ReportInstanceStatus` operation.
///
/// See [`ReportInstanceStatus`](crate::client::fluent_builders::ReportInstanceStatus) for more information about the
/// operation and its arguments.
pub fn report_instance_status(&self) -> fluent_builders::ReportInstanceStatus<C, M, R> {
fluent_builders::ReportInstanceStatus::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RequestSpotFleet` operation.
///
/// See [`RequestSpotFleet`](crate::client::fluent_builders::RequestSpotFleet) for more information about the
/// operation and its arguments.
pub fn request_spot_fleet(&self) -> fluent_builders::RequestSpotFleet<C, M, R> {
fluent_builders::RequestSpotFleet::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RequestSpotInstances` operation.
///
/// See [`RequestSpotInstances`](crate::client::fluent_builders::RequestSpotInstances) for more information about the
/// operation and its arguments.
pub fn request_spot_instances(&self) -> fluent_builders::RequestSpotInstances<C, M, R> {
fluent_builders::RequestSpotInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ResetAddressAttribute` operation.
///
/// See [`ResetAddressAttribute`](crate::client::fluent_builders::ResetAddressAttribute) for more information about the
/// operation and its arguments.
pub fn reset_address_attribute(&self) -> fluent_builders::ResetAddressAttribute<C, M, R> {
fluent_builders::ResetAddressAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ResetEbsDefaultKmsKeyId` operation.
///
/// See [`ResetEbsDefaultKmsKeyId`](crate::client::fluent_builders::ResetEbsDefaultKmsKeyId) for more information about the
/// operation and its arguments.
pub fn reset_ebs_default_kms_key_id(
&self,
) -> fluent_builders::ResetEbsDefaultKmsKeyId<C, M, R> {
fluent_builders::ResetEbsDefaultKmsKeyId::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ResetFpgaImageAttribute` operation.
///
/// See [`ResetFpgaImageAttribute`](crate::client::fluent_builders::ResetFpgaImageAttribute) for more information about the
/// operation and its arguments.
pub fn reset_fpga_image_attribute(&self) -> fluent_builders::ResetFpgaImageAttribute<C, M, R> {
fluent_builders::ResetFpgaImageAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ResetImageAttribute` operation.
///
/// See [`ResetImageAttribute`](crate::client::fluent_builders::ResetImageAttribute) for more information about the
/// operation and its arguments.
pub fn reset_image_attribute(&self) -> fluent_builders::ResetImageAttribute<C, M, R> {
fluent_builders::ResetImageAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ResetInstanceAttribute` operation.
///
/// See [`ResetInstanceAttribute`](crate::client::fluent_builders::ResetInstanceAttribute) for more information about the
/// operation and its arguments.
pub fn reset_instance_attribute(&self) -> fluent_builders::ResetInstanceAttribute<C, M, R> {
fluent_builders::ResetInstanceAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ResetNetworkInterfaceAttribute` operation.
///
/// See [`ResetNetworkInterfaceAttribute`](crate::client::fluent_builders::ResetNetworkInterfaceAttribute) for more information about the
/// operation and its arguments.
pub fn reset_network_interface_attribute(
&self,
) -> fluent_builders::ResetNetworkInterfaceAttribute<C, M, R> {
fluent_builders::ResetNetworkInterfaceAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `ResetSnapshotAttribute` operation.
///
/// See [`ResetSnapshotAttribute`](crate::client::fluent_builders::ResetSnapshotAttribute) for more information about the
/// operation and its arguments.
pub fn reset_snapshot_attribute(&self) -> fluent_builders::ResetSnapshotAttribute<C, M, R> {
fluent_builders::ResetSnapshotAttribute::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RestoreAddressToClassic` operation.
///
/// See [`RestoreAddressToClassic`](crate::client::fluent_builders::RestoreAddressToClassic) for more information about the
/// operation and its arguments.
pub fn restore_address_to_classic(&self) -> fluent_builders::RestoreAddressToClassic<C, M, R> {
fluent_builders::RestoreAddressToClassic::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RestoreManagedPrefixListVersion` operation.
///
/// See [`RestoreManagedPrefixListVersion`](crate::client::fluent_builders::RestoreManagedPrefixListVersion) for more information about the
/// operation and its arguments.
pub fn restore_managed_prefix_list_version(
&self,
) -> fluent_builders::RestoreManagedPrefixListVersion<C, M, R> {
fluent_builders::RestoreManagedPrefixListVersion::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RevokeClientVpnIngress` operation.
///
/// See [`RevokeClientVpnIngress`](crate::client::fluent_builders::RevokeClientVpnIngress) for more information about the
/// operation and its arguments.
pub fn revoke_client_vpn_ingress(&self) -> fluent_builders::RevokeClientVpnIngress<C, M, R> {
fluent_builders::RevokeClientVpnIngress::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RevokeSecurityGroupEgress` operation.
///
/// See [`RevokeSecurityGroupEgress`](crate::client::fluent_builders::RevokeSecurityGroupEgress) for more information about the
/// operation and its arguments.
pub fn revoke_security_group_egress(
&self,
) -> fluent_builders::RevokeSecurityGroupEgress<C, M, R> {
fluent_builders::RevokeSecurityGroupEgress::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RevokeSecurityGroupIngress` operation.
///
/// See [`RevokeSecurityGroupIngress`](crate::client::fluent_builders::RevokeSecurityGroupIngress) for more information about the
/// operation and its arguments.
pub fn revoke_security_group_ingress(
&self,
) -> fluent_builders::RevokeSecurityGroupIngress<C, M, R> {
fluent_builders::RevokeSecurityGroupIngress::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RunInstances` operation.
///
/// See [`RunInstances`](crate::client::fluent_builders::RunInstances) for more information about the
/// operation and its arguments.
pub fn run_instances(&self) -> fluent_builders::RunInstances<C, M, R> {
fluent_builders::RunInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `RunScheduledInstances` operation.
///
/// See [`RunScheduledInstances`](crate::client::fluent_builders::RunScheduledInstances) for more information about the
/// operation and its arguments.
pub fn run_scheduled_instances(&self) -> fluent_builders::RunScheduledInstances<C, M, R> {
fluent_builders::RunScheduledInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `SearchLocalGatewayRoutes` operation.
///
/// See [`SearchLocalGatewayRoutes`](crate::client::fluent_builders::SearchLocalGatewayRoutes) for more information about the
/// operation and its arguments.
pub fn search_local_gateway_routes(
&self,
) -> fluent_builders::SearchLocalGatewayRoutes<C, M, R> {
fluent_builders::SearchLocalGatewayRoutes::new(self.handle.clone())
}
/// Constructs a fluent builder for the `SearchTransitGatewayMulticastGroups` operation.
///
/// See [`SearchTransitGatewayMulticastGroups`](crate::client::fluent_builders::SearchTransitGatewayMulticastGroups) for more information about the
/// operation and its arguments.
pub fn search_transit_gateway_multicast_groups(
&self,
) -> fluent_builders::SearchTransitGatewayMulticastGroups<C, M, R> {
fluent_builders::SearchTransitGatewayMulticastGroups::new(self.handle.clone())
}
/// Constructs a fluent builder for the `SearchTransitGatewayRoutes` operation.
///
/// See [`SearchTransitGatewayRoutes`](crate::client::fluent_builders::SearchTransitGatewayRoutes) for more information about the
/// operation and its arguments.
pub fn search_transit_gateway_routes(
&self,
) -> fluent_builders::SearchTransitGatewayRoutes<C, M, R> {
fluent_builders::SearchTransitGatewayRoutes::new(self.handle.clone())
}
/// Constructs a fluent builder for the `SendDiagnosticInterrupt` operation.
///
/// See [`SendDiagnosticInterrupt`](crate::client::fluent_builders::SendDiagnosticInterrupt) for more information about the
/// operation and its arguments.
pub fn send_diagnostic_interrupt(&self) -> fluent_builders::SendDiagnosticInterrupt<C, M, R> {
fluent_builders::SendDiagnosticInterrupt::new(self.handle.clone())
}
/// Constructs a fluent builder for the `StartInstances` operation.
///
/// See [`StartInstances`](crate::client::fluent_builders::StartInstances) for more information about the
/// operation and its arguments.
pub fn start_instances(&self) -> fluent_builders::StartInstances<C, M, R> {
fluent_builders::StartInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `StartNetworkInsightsAnalysis` operation.
///
/// See [`StartNetworkInsightsAnalysis`](crate::client::fluent_builders::StartNetworkInsightsAnalysis) for more information about the
/// operation and its arguments.
pub fn start_network_insights_analysis(
&self,
) -> fluent_builders::StartNetworkInsightsAnalysis<C, M, R> {
fluent_builders::StartNetworkInsightsAnalysis::new(self.handle.clone())
}
/// Constructs a fluent builder for the `StartVpcEndpointServicePrivateDnsVerification` operation.
///
/// See [`StartVpcEndpointServicePrivateDnsVerification`](crate::client::fluent_builders::StartVpcEndpointServicePrivateDnsVerification) for more information about the
/// operation and its arguments.
pub fn start_vpc_endpoint_service_private_dns_verification(
&self,
) -> fluent_builders::StartVpcEndpointServicePrivateDnsVerification<C, M, R> {
fluent_builders::StartVpcEndpointServicePrivateDnsVerification::new(self.handle.clone())
}
/// Constructs a fluent builder for the `StopInstances` operation.
///
/// See [`StopInstances`](crate::client::fluent_builders::StopInstances) for more information about the
/// operation and its arguments.
pub fn stop_instances(&self) -> fluent_builders::StopInstances<C, M, R> {
fluent_builders::StopInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `TerminateClientVpnConnections` operation.
///
/// See [`TerminateClientVpnConnections`](crate::client::fluent_builders::TerminateClientVpnConnections) for more information about the
/// operation and its arguments.
pub fn terminate_client_vpn_connections(
&self,
) -> fluent_builders::TerminateClientVpnConnections<C, M, R> {
fluent_builders::TerminateClientVpnConnections::new(self.handle.clone())
}
/// Constructs a fluent builder for the `TerminateInstances` operation.
///
/// See [`TerminateInstances`](crate::client::fluent_builders::TerminateInstances) for more information about the
/// operation and its arguments.
pub fn terminate_instances(&self) -> fluent_builders::TerminateInstances<C, M, R> {
fluent_builders::TerminateInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `UnassignIpv6Addresses` operation.
///
/// See [`UnassignIpv6Addresses`](crate::client::fluent_builders::UnassignIpv6Addresses) for more information about the
/// operation and its arguments.
pub fn unassign_ipv6_addresses(&self) -> fluent_builders::UnassignIpv6Addresses<C, M, R> {
fluent_builders::UnassignIpv6Addresses::new(self.handle.clone())
}
/// Constructs a fluent builder for the `UnassignPrivateIpAddresses` operation.
///
/// See [`UnassignPrivateIpAddresses`](crate::client::fluent_builders::UnassignPrivateIpAddresses) for more information about the
/// operation and its arguments.
pub fn unassign_private_ip_addresses(
&self,
) -> fluent_builders::UnassignPrivateIpAddresses<C, M, R> {
fluent_builders::UnassignPrivateIpAddresses::new(self.handle.clone())
}
/// Constructs a fluent builder for the `UnmonitorInstances` operation.
///
/// See [`UnmonitorInstances`](crate::client::fluent_builders::UnmonitorInstances) for more information about the
/// operation and its arguments.
pub fn unmonitor_instances(&self) -> fluent_builders::UnmonitorInstances<C, M, R> {
fluent_builders::UnmonitorInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the `UpdateSecurityGroupRuleDescriptionsEgress` operation.
///
/// See [`UpdateSecurityGroupRuleDescriptionsEgress`](crate::client::fluent_builders::UpdateSecurityGroupRuleDescriptionsEgress) for more information about the
/// operation and its arguments.
pub fn update_security_group_rule_descriptions_egress(
&self,
) -> fluent_builders::UpdateSecurityGroupRuleDescriptionsEgress<C, M, R> {
fluent_builders::UpdateSecurityGroupRuleDescriptionsEgress::new(self.handle.clone())
}
/// Constructs a fluent builder for the `UpdateSecurityGroupRuleDescriptionsIngress` operation.
///
/// See [`UpdateSecurityGroupRuleDescriptionsIngress`](crate::client::fluent_builders::UpdateSecurityGroupRuleDescriptionsIngress) for more information about the
/// operation and its arguments.
pub fn update_security_group_rule_descriptions_ingress(
&self,
) -> fluent_builders::UpdateSecurityGroupRuleDescriptionsIngress<C, M, R> {
fluent_builders::UpdateSecurityGroupRuleDescriptionsIngress::new(self.handle.clone())
}
/// Constructs a fluent builder for the `WithdrawByoipCidr` operation.
///
/// See [`WithdrawByoipCidr`](crate::client::fluent_builders::WithdrawByoipCidr) for more information about the
/// operation and its arguments.
pub fn withdraw_byoip_cidr(&self) -> fluent_builders::WithdrawByoipCidr<C, M, R> {
fluent_builders::WithdrawByoipCidr::new(self.handle.clone())
}
}
pub mod fluent_builders {
//!
//! Utilities to ergonomically construct a request to the service.
//!
//! Fluent builders are created through the [`Client`](crate::client::Client) by calling
//! one if its operation methods. After parameters are set using the builder methods,
//! the `send` method can be called to initiate the request.
//!
/// Fluent builder constructing a request to `AcceptReservedInstancesExchangeQuote`.
///
/// <p>Accepts the Convertible Reserved Instance exchange quote described in the <a>GetReservedInstancesExchangeQuote</a> call.</p>
#[derive(std::fmt::Debug)]
pub struct AcceptReservedInstancesExchangeQuote<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::accept_reserved_instances_exchange_quote_input::Builder,
}
impl<C, M, R> AcceptReservedInstancesExchangeQuote<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AcceptReservedInstancesExchangeQuote`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AcceptReservedInstancesExchangeQuoteOutput,
aws_smithy_http::result::SdkError<
crate::error::AcceptReservedInstancesExchangeQuoteError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AcceptReservedInstancesExchangeQuoteInputOperationOutputAlias,
crate::output::AcceptReservedInstancesExchangeQuoteOutput,
crate::error::AcceptReservedInstancesExchangeQuoteError,
crate::input::AcceptReservedInstancesExchangeQuoteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `ReservedInstanceIds`.
///
/// To override the contents of this collection use [`set_reserved_instance_ids`](Self::set_reserved_instance_ids).
///
/// <p>The IDs of the Convertible Reserved Instances to exchange for another Convertible
/// Reserved Instance of the same or higher value.</p>
pub fn reserved_instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.reserved_instance_ids(inp);
self
}
/// <p>The IDs of the Convertible Reserved Instances to exchange for another Convertible
/// Reserved Instance of the same or higher value.</p>
pub fn set_reserved_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_reserved_instance_ids(input);
self
}
/// Appends an item to `TargetConfigurations`.
///
/// To override the contents of this collection use [`set_target_configurations`](Self::set_target_configurations).
///
/// <p>The configuration of the target Convertible Reserved Instance to exchange for your
/// current Convertible Reserved Instances.</p>
pub fn target_configurations(
mut self,
inp: impl Into<crate::model::TargetConfigurationRequest>,
) -> Self {
self.inner = self.inner.target_configurations(inp);
self
}
/// <p>The configuration of the target Convertible Reserved Instance to exchange for your
/// current Convertible Reserved Instances.</p>
pub fn set_target_configurations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TargetConfigurationRequest>>,
) -> Self {
self.inner = self.inner.set_target_configurations(input);
self
}
}
/// Fluent builder constructing a request to `AcceptTransitGatewayMulticastDomainAssociations`.
///
/// <p>Accepts a request to associate subnets with a transit gateway multicast domain.</p>
#[derive(std::fmt::Debug)]
pub struct AcceptTransitGatewayMulticastDomainAssociations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::accept_transit_gateway_multicast_domain_associations_input::Builder,
}
impl<C, M, R> AcceptTransitGatewayMulticastDomainAssociations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AcceptTransitGatewayMulticastDomainAssociations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(self) -> std::result::Result<crate::output::AcceptTransitGatewayMulticastDomainAssociationsOutput, aws_smithy_http::result::SdkError<crate::error::AcceptTransitGatewayMulticastDomainAssociationsError>>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<crate::input::AcceptTransitGatewayMulticastDomainAssociationsInputOperationOutputAlias,
crate::output::AcceptTransitGatewayMulticastDomainAssociationsOutput,
crate::error::AcceptTransitGatewayMulticastDomainAssociationsError,
crate::input::AcceptTransitGatewayMulticastDomainAssociationsInputOperationRetryAlias>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn transit_gateway_multicast_domain_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_multicast_domain_id(inp);
self
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn set_transit_gateway_multicast_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_multicast_domain_id(input);
self
}
/// <p>The ID of the transit gateway attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the transit gateway attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// Appends an item to `SubnetIds`.
///
/// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
///
/// <p>The IDs of the subnets to associate with the transit gateway multicast domain.</p>
pub fn subnet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_ids(inp);
self
}
/// <p>The IDs of the subnets to associate with the transit gateway multicast domain.</p>
pub fn set_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_subnet_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AcceptTransitGatewayPeeringAttachment`.
///
/// <p>Accepts a transit gateway peering attachment request. The peering attachment must be
/// in the <code>pendingAcceptance</code> state.</p>
#[derive(std::fmt::Debug)]
pub struct AcceptTransitGatewayPeeringAttachment<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::accept_transit_gateway_peering_attachment_input::Builder,
}
impl<C, M, R> AcceptTransitGatewayPeeringAttachment<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AcceptTransitGatewayPeeringAttachment`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AcceptTransitGatewayPeeringAttachmentOutput,
aws_smithy_http::result::SdkError<
crate::error::AcceptTransitGatewayPeeringAttachmentError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AcceptTransitGatewayPeeringAttachmentInputOperationOutputAlias,
crate::output::AcceptTransitGatewayPeeringAttachmentOutput,
crate::error::AcceptTransitGatewayPeeringAttachmentError,
crate::input::AcceptTransitGatewayPeeringAttachmentInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the transit gateway attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AcceptTransitGatewayVpcAttachment`.
///
/// <p>Accepts a request to attach a VPC to a transit gateway.</p>
/// <p>The VPC attachment must be in the <code>pendingAcceptance</code> state.
/// Use <a>DescribeTransitGatewayVpcAttachments</a> to view your pending VPC attachment requests.
/// Use <a>RejectTransitGatewayVpcAttachment</a> to reject a VPC attachment request.</p>
#[derive(std::fmt::Debug)]
pub struct AcceptTransitGatewayVpcAttachment<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::accept_transit_gateway_vpc_attachment_input::Builder,
}
impl<C, M, R> AcceptTransitGatewayVpcAttachment<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AcceptTransitGatewayVpcAttachment`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AcceptTransitGatewayVpcAttachmentOutput,
aws_smithy_http::result::SdkError<crate::error::AcceptTransitGatewayVpcAttachmentError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AcceptTransitGatewayVpcAttachmentInputOperationOutputAlias,
crate::output::AcceptTransitGatewayVpcAttachmentOutput,
crate::error::AcceptTransitGatewayVpcAttachmentError,
crate::input::AcceptTransitGatewayVpcAttachmentInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AcceptVpcEndpointConnections`.
///
/// <p>Accepts one or more interface VPC endpoint connection requests to your VPC endpoint
/// service.</p>
#[derive(std::fmt::Debug)]
pub struct AcceptVpcEndpointConnections<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::accept_vpc_endpoint_connections_input::Builder,
}
impl<C, M, R> AcceptVpcEndpointConnections<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AcceptVpcEndpointConnections`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AcceptVpcEndpointConnectionsOutput,
aws_smithy_http::result::SdkError<crate::error::AcceptVpcEndpointConnectionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AcceptVpcEndpointConnectionsInputOperationOutputAlias,
crate::output::AcceptVpcEndpointConnectionsOutput,
crate::error::AcceptVpcEndpointConnectionsError,
crate::input::AcceptVpcEndpointConnectionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the VPC endpoint service.</p>
pub fn service_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(inp);
self
}
/// <p>The ID of the VPC endpoint service.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
/// Appends an item to `VpcEndpointIds`.
///
/// To override the contents of this collection use [`set_vpc_endpoint_ids`](Self::set_vpc_endpoint_ids).
///
/// <p>The IDs of one or more interface VPC endpoints.</p>
pub fn vpc_endpoint_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_endpoint_ids(inp);
self
}
/// <p>The IDs of one or more interface VPC endpoints.</p>
pub fn set_vpc_endpoint_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_vpc_endpoint_ids(input);
self
}
}
/// Fluent builder constructing a request to `AcceptVpcPeeringConnection`.
///
/// <p>Accept a VPC peering connection request. To accept a request, the VPC peering connection must
/// be in the <code>pending-acceptance</code> state, and you must be the owner of the peer VPC.
/// Use <a>DescribeVpcPeeringConnections</a> to view your outstanding VPC
/// peering connection requests.</p>
/// <p>For an inter-Region VPC peering connection request, you must accept the VPC peering
/// connection in the Region of the accepter VPC.</p>
#[derive(std::fmt::Debug)]
pub struct AcceptVpcPeeringConnection<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::accept_vpc_peering_connection_input::Builder,
}
impl<C, M, R> AcceptVpcPeeringConnection<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AcceptVpcPeeringConnection`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AcceptVpcPeeringConnectionOutput,
aws_smithy_http::result::SdkError<crate::error::AcceptVpcPeeringConnectionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AcceptVpcPeeringConnectionInputOperationOutputAlias,
crate::output::AcceptVpcPeeringConnectionOutput,
crate::error::AcceptVpcPeeringConnectionError,
crate::input::AcceptVpcPeeringConnectionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the VPC peering connection. You must specify this parameter in the
/// request.</p>
pub fn vpc_peering_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_peering_connection_id(inp);
self
}
/// <p>The ID of the VPC peering connection. You must specify this parameter in the
/// request.</p>
pub fn set_vpc_peering_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpc_peering_connection_id(input);
self
}
}
/// Fluent builder constructing a request to `AdvertiseByoipCidr`.
///
/// <p>Advertises an IPv4 or IPv6 address range that is provisioned for use with your Amazon Web Services resources through
/// bring your own IP addresses (BYOIP).</p>
/// <p>You can perform this operation at most once every 10 seconds, even if you specify different
/// address ranges each time.</p>
/// <p>We recommend that you stop advertising the BYOIP CIDR from other locations when you advertise
/// it from Amazon Web Services. To minimize down time, you can configure your Amazon Web Services resources to use an address from a
/// BYOIP CIDR before it is advertised, and then simultaneously stop advertising it from the current
/// location and start advertising it through Amazon Web Services.</p>
/// <p>It can take a few minutes before traffic to the specified addresses starts routing to Amazon Web Services
/// because of BGP propagation delays.</p>
/// <p>To stop advertising the BYOIP CIDR, use <a>WithdrawByoipCidr</a>.</p>
#[derive(std::fmt::Debug)]
pub struct AdvertiseByoipCidr<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::advertise_byoip_cidr_input::Builder,
}
impl<C, M, R> AdvertiseByoipCidr<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AdvertiseByoipCidr`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AdvertiseByoipCidrOutput,
aws_smithy_http::result::SdkError<crate::error::AdvertiseByoipCidrError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AdvertiseByoipCidrInputOperationOutputAlias,
crate::output::AdvertiseByoipCidrOutput,
crate::error::AdvertiseByoipCidrError,
crate::input::AdvertiseByoipCidrInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The address range, in CIDR notation. This must be the exact range that you provisioned.
/// You can't advertise only a portion of the provisioned range.</p>
pub fn cidr(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr(inp);
self
}
/// <p>The address range, in CIDR notation. This must be the exact range that you provisioned.
/// You can't advertise only a portion of the provisioned range.</p>
pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AllocateAddress`.
///
/// <p>Allocates an Elastic IP address to your Amazon Web Services account. After you allocate the Elastic IP address you can associate
/// it with an instance or network interface. After you release an Elastic IP address, it is released to the IP address
/// pool and can be allocated to a different Amazon Web Services account.</p>
/// <p>You can allocate an Elastic IP address from an address pool owned by Amazon Web Services or from an address pool created
/// from a public IPv4 address range that you have brought to Amazon Web Services for use with your Amazon Web Services resources using bring your own
/// IP addresses (BYOIP). For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html">Bring Your Own IP Addresses (BYOIP)</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>[EC2-VPC] If you release an Elastic IP address, you might be able to recover it. You cannot recover an
/// Elastic IP address that you released after it is allocated to another Amazon Web Services account. You cannot recover an Elastic IP
/// address for EC2-Classic. To attempt to recover an Elastic IP address that you released, specify it in this operation.</p>
/// <p>An Elastic IP address is for use either in the EC2-Classic platform or in a VPC. By default, you can allocate
/// 5 Elastic IP addresses for EC2-Classic per Region and 5 Elastic IP addresses for EC2-VPC per Region.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>You can allocate a carrier IP address which is a public IP address from a telecommunication carrier, to a network interface which resides in a subnet in a Wavelength Zone (for example an EC2 instance). </p>
#[derive(std::fmt::Debug)]
pub struct AllocateAddress<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::allocate_address_input::Builder,
}
impl<C, M, R> AllocateAddress<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AllocateAddress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AllocateAddressOutput,
aws_smithy_http::result::SdkError<crate::error::AllocateAddressError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AllocateAddressInputOperationOutputAlias,
crate::output::AllocateAddressOutput,
crate::error::AllocateAddressError,
crate::input::AllocateAddressInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Indicates whether the Elastic IP address is for use with instances in a VPC or instances in EC2-Classic.</p>
/// <p>Default: If the Region supports EC2-Classic, the default is <code>standard</code>. Otherwise, the default
/// is <code>vpc</code>.</p>
pub fn domain(mut self, inp: crate::model::DomainType) -> Self {
self.inner = self.inner.domain(inp);
self
}
/// <p>Indicates whether the Elastic IP address is for use with instances in a VPC or instances in EC2-Classic.</p>
/// <p>Default: If the Region supports EC2-Classic, the default is <code>standard</code>. Otherwise, the default
/// is <code>vpc</code>.</p>
pub fn set_domain(mut self, input: std::option::Option<crate::model::DomainType>) -> Self {
self.inner = self.inner.set_domain(input);
self
}
/// <p>[EC2-VPC] The Elastic IP address to recover or an IPv4 address from an address pool.</p>
pub fn address(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.address(inp);
self
}
/// <p>[EC2-VPC] The Elastic IP address to recover or an IPv4 address from an address pool.</p>
pub fn set_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_address(input);
self
}
/// <p>The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool.
/// To specify a specific address from the address pool, use the <code>Address</code> parameter instead.</p>
pub fn public_ipv4_pool(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.public_ipv4_pool(inp);
self
}
/// <p>The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool.
/// To specify a specific address from the address pool, use the <code>Address</code> parameter instead.</p>
pub fn set_public_ipv4_pool(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_public_ipv4_pool(input);
self
}
/// <p> A unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services
/// advertises IP addresses. Use this parameter to limit the IP address to this location. IP
/// addresses cannot move between network border groups.</p>
/// <p>Use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html">DescribeAvailabilityZones</a> to view the network border groups.</p>
///
/// <p>You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 Classic,
/// you receive an <code>InvalidParameterCombination</code> error.</p>
pub fn network_border_group(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_border_group(inp);
self
}
/// <p> A unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services
/// advertises IP addresses. Use this parameter to limit the IP address to this location. IP
/// addresses cannot move between network border groups.</p>
/// <p>Use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html">DescribeAvailabilityZones</a> to view the network border groups.</p>
///
/// <p>You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 Classic,
/// you receive an <code>InvalidParameterCombination</code> error.</p>
pub fn set_network_border_group(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_border_group(input);
self
}
/// <p>The ID of a customer-owned address pool. Use this parameter to let Amazon EC2
/// select an address from the address pool. Alternatively, specify a specific
/// address from the address pool.</p>
pub fn customer_owned_ipv4_pool(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.customer_owned_ipv4_pool(inp);
self
}
/// <p>The ID of a customer-owned address pool. Use this parameter to let Amazon EC2
/// select an address from the address pool. Alternatively, specify a specific
/// address from the address pool.</p>
pub fn set_customer_owned_ipv4_pool(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_customer_owned_ipv4_pool(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the Elastic IP address.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the Elastic IP address.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `AllocateHosts`.
///
/// <p>Allocates a Dedicated Host to your account. At a minimum, specify the supported instance
/// type or instance family, the Availability Zone in which to allocate the host, and the number of
/// hosts to allocate.</p>
#[derive(std::fmt::Debug)]
pub struct AllocateHosts<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::allocate_hosts_input::Builder,
}
impl<C, M, R> AllocateHosts<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AllocateHosts`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AllocateHostsOutput,
aws_smithy_http::result::SdkError<crate::error::AllocateHostsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AllocateHostsInputOperationOutputAlias,
crate::output::AllocateHostsOutput,
crate::error::AllocateHostsError,
crate::input::AllocateHostsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Indicates whether the host accepts any untargeted instance launches that
/// match its instance type configuration, or if it only accepts Host tenancy
/// instance launches that specify its unique host ID. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#dedicated-hosts-understanding">
/// Understanding auto-placement and affinity</a> in the <i>Amazon EC2 User Guide</i>.</p>
///
/// <p>Default: <code>on</code>
/// </p>
pub fn auto_placement(mut self, inp: crate::model::AutoPlacement) -> Self {
self.inner = self.inner.auto_placement(inp);
self
}
/// <p>Indicates whether the host accepts any untargeted instance launches that
/// match its instance type configuration, or if it only accepts Host tenancy
/// instance launches that specify its unique host ID. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#dedicated-hosts-understanding">
/// Understanding auto-placement and affinity</a> in the <i>Amazon EC2 User Guide</i>.</p>
///
/// <p>Default: <code>on</code>
/// </p>
pub fn set_auto_placement(
mut self,
input: std::option::Option<crate::model::AutoPlacement>,
) -> Self {
self.inner = self.inner.set_auto_placement(input);
self
}
/// <p>The Availability Zone in which to allocate the Dedicated Host.</p>
pub fn availability_zone(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zone(inp);
self
}
/// <p>The Availability Zone in which to allocate the Dedicated Host.</p>
pub fn set_availability_zone(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_availability_zone(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>Specifies the instance type to be supported by the Dedicated Hosts. If you
/// specify an instance type, the Dedicated Hosts support instances of the
/// specified instance type only.</p>
///
/// <p>If you want the Dedicated Hosts to support multiple instance types in a specific
/// instance family, omit this parameter and specify <b>InstanceFamily</b>
/// instead. You cannot specify <b>InstanceType</b> and
/// <b>InstanceFamily</b> in the same request.</p>
pub fn instance_type(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_type(inp);
self
}
/// <p>Specifies the instance type to be supported by the Dedicated Hosts. If you
/// specify an instance type, the Dedicated Hosts support instances of the
/// specified instance type only.</p>
///
/// <p>If you want the Dedicated Hosts to support multiple instance types in a specific
/// instance family, omit this parameter and specify <b>InstanceFamily</b>
/// instead. You cannot specify <b>InstanceType</b> and
/// <b>InstanceFamily</b> in the same request.</p>
pub fn set_instance_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_instance_type(input);
self
}
/// <p>Specifies the instance family to be supported by the Dedicated Hosts. If you specify
/// an instance family, the Dedicated Hosts support multiple instance types within that
/// instance family.</p>
///
/// <p>If you want the Dedicated Hosts to support a specific instance type only, omit this
/// parameter and specify <b>InstanceType</b>
/// instead. You cannot specify <b>InstanceFamily</b> and
/// <b>InstanceType</b> in the same request.</p>
pub fn instance_family(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_family(inp);
self
}
/// <p>Specifies the instance family to be supported by the Dedicated Hosts. If you specify
/// an instance family, the Dedicated Hosts support multiple instance types within that
/// instance family.</p>
///
/// <p>If you want the Dedicated Hosts to support a specific instance type only, omit this
/// parameter and specify <b>InstanceType</b>
/// instead. You cannot specify <b>InstanceFamily</b> and
/// <b>InstanceType</b> in the same request.</p>
pub fn set_instance_family(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_instance_family(input);
self
}
/// <p>The number of Dedicated Hosts to allocate to your account with these parameters.</p>
pub fn quantity(mut self, inp: i32) -> Self {
self.inner = self.inner.quantity(inp);
self
}
/// <p>The number of Dedicated Hosts to allocate to your account with these parameters.</p>
pub fn set_quantity(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_quantity(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the Dedicated Host during creation.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the Dedicated Host during creation.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>Indicates whether to enable or disable host recovery for the Dedicated Host.
/// Host recovery is disabled by default. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html">
/// Host recovery</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// <p>Default: <code>off</code>
/// </p>
pub fn host_recovery(mut self, inp: crate::model::HostRecovery) -> Self {
self.inner = self.inner.host_recovery(inp);
self
}
/// <p>Indicates whether to enable or disable host recovery for the Dedicated Host.
/// Host recovery is disabled by default. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html">
/// Host recovery</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// <p>Default: <code>off</code>
/// </p>
pub fn set_host_recovery(
mut self,
input: std::option::Option<crate::model::HostRecovery>,
) -> Self {
self.inner = self.inner.set_host_recovery(input);
self
}
}
/// Fluent builder constructing a request to `ApplySecurityGroupsToClientVpnTargetNetwork`.
///
/// <p>Applies a security group to the association between the target network and the Client VPN endpoint. This action replaces the existing
/// security groups with the specified security groups.</p>
#[derive(std::fmt::Debug)]
pub struct ApplySecurityGroupsToClientVpnTargetNetwork<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::apply_security_groups_to_client_vpn_target_network_input::Builder,
}
impl<C, M, R> ApplySecurityGroupsToClientVpnTargetNetwork<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ApplySecurityGroupsToClientVpnTargetNetwork`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ApplySecurityGroupsToClientVpnTargetNetworkOutput,
aws_smithy_http::result::SdkError<
crate::error::ApplySecurityGroupsToClientVpnTargetNetworkError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ApplySecurityGroupsToClientVpnTargetNetworkInputOperationOutputAlias,
crate::output::ApplySecurityGroupsToClientVpnTargetNetworkOutput,
crate::error::ApplySecurityGroupsToClientVpnTargetNetworkError,
crate::input::ApplySecurityGroupsToClientVpnTargetNetworkInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <p>The ID of the VPC in which the associated target network is located.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC in which the associated target network is located.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// Appends an item to `SecurityGroupIds`.
///
/// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
///
/// <p>The IDs of the security groups to apply to the associated target network. Up to 5 security groups can
/// be applied to an associated target network.</p>
pub fn security_group_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.security_group_ids(inp);
self
}
/// <p>The IDs of the security groups to apply to the associated target network. Up to 5 security groups can
/// be applied to an associated target network.</p>
pub fn set_security_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_security_group_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AssignIpv6Addresses`.
///
/// <p>Assigns one or more IPv6 addresses to the specified network interface. You can
/// specify one or more specific IPv6 addresses, or you can specify the number of IPv6
/// addresses to be automatically assigned from within the subnet's IPv6 CIDR block range.
/// You can assign as many IPv6 addresses to a network interface as you can assign private
/// IPv4 addresses, and the limit varies per instance type. For information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI">IP Addresses Per Network Interface Per Instance Type</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>You must specify either the IPv6 addresses or the IPv6 address count in the request. </p>
/// <p>You can optionally use Prefix Delegation on the network interface. You must specify
/// either the IPV6 Prefix Delegation prefixes, or the IPv6 Prefix Delegation count. For
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html">
/// Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct AssignIpv6Addresses<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::assign_ipv6_addresses_input::Builder,
}
impl<C, M, R> AssignIpv6Addresses<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssignIpv6Addresses`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssignIpv6AddressesOutput,
aws_smithy_http::result::SdkError<crate::error::AssignIpv6AddressesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssignIpv6AddressesInputOperationOutputAlias,
crate::output::AssignIpv6AddressesOutput,
crate::error::AssignIpv6AddressesError,
crate::input::AssignIpv6AddressesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The number of additional IPv6 addresses to assign to the network interface.
/// The specified number of IPv6 addresses are assigned in addition to the
/// existing IPv6 addresses that are already assigned to the network interface.
/// Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You
/// can't use this option if specifying specific IPv6 addresses.</p>
pub fn ipv6_address_count(mut self, inp: i32) -> Self {
self.inner = self.inner.ipv6_address_count(inp);
self
}
/// <p>The number of additional IPv6 addresses to assign to the network interface.
/// The specified number of IPv6 addresses are assigned in addition to the
/// existing IPv6 addresses that are already assigned to the network interface.
/// Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You
/// can't use this option if specifying specific IPv6 addresses.</p>
pub fn set_ipv6_address_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_ipv6_address_count(input);
self
}
/// Appends an item to `Ipv6Addresses`.
///
/// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
///
/// <p>One or more specific IPv6 addresses to be assigned to the network interface. You can't use this option if you're specifying a number of IPv6 addresses.</p>
pub fn ipv6_addresses(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv6_addresses(inp);
self
}
/// <p>One or more specific IPv6 addresses to be assigned to the network interface. You can't use this option if you're specifying a number of IPv6 addresses.</p>
pub fn set_ipv6_addresses(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_ipv6_addresses(input);
self
}
/// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigns to the
/// network interface. You cannot use this option if you use the <code>Ipv6Prefixes</code>
/// option.</p>
pub fn ipv6_prefix_count(mut self, inp: i32) -> Self {
self.inner = self.inner.ipv6_prefix_count(inp);
self
}
/// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigns to the
/// network interface. You cannot use this option if you use the <code>Ipv6Prefixes</code>
/// option.</p>
pub fn set_ipv6_prefix_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_ipv6_prefix_count(input);
self
}
/// Appends an item to `Ipv6Prefixes`.
///
/// To override the contents of this collection use [`set_ipv6_prefixes`](Self::set_ipv6_prefixes).
///
/// <p>One or more IPv6 prefixes assigned to the network interface. You cannot use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
pub fn ipv6_prefixes(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv6_prefixes(inp);
self
}
/// <p>One or more IPv6 prefixes assigned to the network interface. You cannot use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
pub fn set_ipv6_prefixes(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_ipv6_prefixes(input);
self
}
/// <p>The ID of the network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of the network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
}
/// Fluent builder constructing a request to `AssignPrivateIpAddresses`.
///
/// <p>Assigns one or more secondary private IP addresses to the specified network interface.</p>
/// <p>You can specify one or more specific secondary IP addresses, or you can specify the number
/// of secondary IP addresses to be automatically assigned within the subnet's CIDR block range.
/// The number of secondary IP addresses that you can assign to an instance varies by instance type.
/// For information about instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance Types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about
/// Elastic IP addresses, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>When you move a secondary private IP address to another network interface, any Elastic IP address
/// that is associated with the IP address is also moved.</p>
/// <p>Remapping an IP address is an asynchronous operation. When you move an IP address from one network
/// interface to another, check <code>network/interfaces/macs/mac/local-ipv4s</code> in the instance
/// metadata to confirm that the remapping is complete.</p>
/// <p>You must specify either the IP addresses or the IP address count in the request.</p>
/// <p>You can optionally use Prefix Delegation on the network interface. You must specify
/// either the IPv4 Prefix Delegation prefixes, or the IPv4 Prefix Delegation count. For
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html">
/// Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct AssignPrivateIpAddresses<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::assign_private_ip_addresses_input::Builder,
}
impl<C, M, R> AssignPrivateIpAddresses<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssignPrivateIpAddresses`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssignPrivateIpAddressesOutput,
aws_smithy_http::result::SdkError<crate::error::AssignPrivateIpAddressesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssignPrivateIpAddressesInputOperationOutputAlias,
crate::output::AssignPrivateIpAddressesOutput,
crate::error::AssignPrivateIpAddressesError,
crate::input::AssignPrivateIpAddressesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.</p>
pub fn allow_reassignment(mut self, inp: bool) -> Self {
self.inner = self.inner.allow_reassignment(inp);
self
}
/// <p>Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.</p>
pub fn set_allow_reassignment(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_allow_reassignment(input);
self
}
/// <p>The ID of the network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of the network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
/// Appends an item to `PrivateIpAddresses`.
///
/// To override the contents of this collection use [`set_private_ip_addresses`](Self::set_private_ip_addresses).
///
/// <p>One or more IP addresses to be assigned as a secondary private IP address to the network interface. You can't specify this parameter when also specifying a number of secondary IP addresses.</p>
/// <p>If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.</p>
pub fn private_ip_addresses(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.private_ip_addresses(inp);
self
}
/// <p>One or more IP addresses to be assigned as a secondary private IP address to the network interface. You can't specify this parameter when also specifying a number of secondary IP addresses.</p>
/// <p>If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.</p>
pub fn set_private_ip_addresses(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_private_ip_addresses(input);
self
}
/// <p>The number of secondary IP addresses to assign to the network interface. You can't specify this parameter when also specifying private IP addresses.</p>
pub fn secondary_private_ip_address_count(mut self, inp: i32) -> Self {
self.inner = self.inner.secondary_private_ip_address_count(inp);
self
}
/// <p>The number of secondary IP addresses to assign to the network interface. You can't specify this parameter when also specifying private IP addresses.</p>
pub fn set_secondary_private_ip_address_count(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.inner = self.inner.set_secondary_private_ip_address_count(input);
self
}
/// Appends an item to `Ipv4Prefixes`.
///
/// To override the contents of this collection use [`set_ipv4_prefixes`](Self::set_ipv4_prefixes).
///
/// <p>One or more IPv4 prefixes assigned to the network interface. You cannot use this option if you use the <code>Ipv4PrefixCount</code> option.</p>
pub fn ipv4_prefixes(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv4_prefixes(inp);
self
}
/// <p>One or more IPv4 prefixes assigned to the network interface. You cannot use this option if you use the <code>Ipv4PrefixCount</code> option.</p>
pub fn set_ipv4_prefixes(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_ipv4_prefixes(input);
self
}
/// <p>The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the <code>Ipv4 Prefixes</code> option.</p>
pub fn ipv4_prefix_count(mut self, inp: i32) -> Self {
self.inner = self.inner.ipv4_prefix_count(inp);
self
}
/// <p>The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the <code>Ipv4 Prefixes</code> option.</p>
pub fn set_ipv4_prefix_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_ipv4_prefix_count(input);
self
}
}
/// Fluent builder constructing a request to `AssociateAddress`.
///
/// <p>Associates an Elastic IP address, or carrier IP address (for instances that are in
/// subnets in Wavelength Zones) with an instance or a network interface. Before you can use an
/// Elastic IP address, you must allocate it to your account.</p>
/// <p>An Elastic IP address is for use in either the EC2-Classic platform or in a VPC.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>[EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already
/// associated with a different instance, it is disassociated from that instance and associated
/// with the specified instance. If you associate an Elastic IP address with an instance that has
/// an existing Elastic IP address, the existing address is disassociated from the instance, but
/// remains allocated to your account.</p>
/// <p>[VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic
/// IP address is associated with the primary IP address. If the Elastic IP address is already
/// associated with a different instance or a network interface, you get an error unless you allow
/// reassociation. You cannot associate an Elastic IP address with an instance or network
/// interface that has an existing Elastic IP address.</p>
/// <p>[Subnets in Wavelength Zones] You can associate an IP address from the telecommunication
/// carrier to the instance or network interface. </p>
/// <p>You cannot associate an Elastic IP address with an interface in a different network border group.</p>
/// <important>
/// <p>This is an idempotent operation. If you perform the operation more than once, Amazon EC2
/// doesn't return an error, and you may be charged for each time the Elastic IP address is
/// remapped to the same instance. For more information, see the <i>Elastic IP
/// Addresses</i> section of <a href="http://aws.amazon.com/ec2/pricing/">Amazon EC2
/// Pricing</a>.</p>
/// </important>
#[derive(std::fmt::Debug)]
pub struct AssociateAddress<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::associate_address_input::Builder,
}
impl<C, M, R> AssociateAddress<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssociateAddress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateAddressOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateAddressError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssociateAddressInputOperationOutputAlias,
crate::output::AssociateAddressOutput,
crate::error::AssociateAddressError,
crate::input::AssociateAddressInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>[EC2-VPC] The allocation ID. This is required for EC2-VPC.</p>
pub fn allocation_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.allocation_id(inp);
self
}
/// <p>[EC2-VPC] The allocation ID. This is required for EC2-VPC.</p>
pub fn set_allocation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_allocation_id(input);
self
}
/// <p>The ID of the instance. The instance must have exactly one attached network interface.
/// For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both.
/// For EC2-Classic, you must specify an instance ID and the instance must be in the running
/// state.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance. The instance must have exactly one attached network interface.
/// For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both.
/// For EC2-Classic, you must specify an instance ID and the instance must be in the running
/// state.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>[EC2-Classic] The Elastic IP address to associate with the instance. This is required for
/// EC2-Classic.</p>
pub fn public_ip(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.public_ip(inp);
self
}
/// <p>[EC2-Classic] The Elastic IP address to associate with the instance. This is required for
/// EC2-Classic.</p>
pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_public_ip(input);
self
}
/// <p>[EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.</p>
pub fn allow_reassociation(mut self, inp: bool) -> Self {
self.inner = self.inner.allow_reassociation(inp);
self
}
/// <p>[EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.</p>
pub fn set_allow_reassociation(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_allow_reassociation(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>[EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.</p>
/// <p>For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. </p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>[EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.</p>
/// <p>For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. </p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
/// <p>[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.</p>
pub fn private_ip_address(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.private_ip_address(inp);
self
}
/// <p>[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.</p>
pub fn set_private_ip_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_private_ip_address(input);
self
}
}
/// Fluent builder constructing a request to `AssociateClientVpnTargetNetwork`.
///
/// <p>Associates a target network with a Client VPN endpoint. A target network is a subnet in a VPC. You can associate multiple subnets from the same VPC with a Client VPN endpoint. You can associate only one subnet in each Availability Zone. We recommend that you associate at least two subnets to provide Availability Zone redundancy.</p>
/// <p>If you specified a VPC when you created the Client VPN endpoint or if you have previous subnet associations, the specified subnet must be in the same VPC. To specify a subnet that's in a different VPC, you must first modify the Client VPN endpoint (<a>ModifyClientVpnEndpoint</a>) and change the VPC that's associated with it.</p>
#[derive(std::fmt::Debug)]
pub struct AssociateClientVpnTargetNetwork<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::associate_client_vpn_target_network_input::Builder,
}
impl<C, M, R> AssociateClientVpnTargetNetwork<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssociateClientVpnTargetNetwork`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateClientVpnTargetNetworkOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateClientVpnTargetNetworkError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssociateClientVpnTargetNetworkInputOperationOutputAlias,
crate::output::AssociateClientVpnTargetNetworkOutput,
crate::error::AssociateClientVpnTargetNetworkError,
crate::input::AssociateClientVpnTargetNetworkInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <p>The ID of the subnet to associate with the Client VPN endpoint.</p>
pub fn subnet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_id(inp);
self
}
/// <p>The ID of the subnet to associate with the Client VPN endpoint.</p>
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_subnet_id(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AssociateDhcpOptions`.
///
/// <p>Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.</p>
/// <p>After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html">DHCP options sets</a>
/// in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct AssociateDhcpOptions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::associate_dhcp_options_input::Builder,
}
impl<C, M, R> AssociateDhcpOptions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssociateDhcpOptions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateDhcpOptionsOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateDhcpOptionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssociateDhcpOptionsInputOperationOutputAlias,
crate::output::AssociateDhcpOptionsOutput,
crate::error::AssociateDhcpOptionsError,
crate::input::AssociateDhcpOptionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the DHCP options set, or <code>default</code> to associate
/// no DHCP options with the VPC.</p>
pub fn dhcp_options_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.dhcp_options_id(inp);
self
}
/// <p>The ID of the DHCP options set, or <code>default</code> to associate
/// no DHCP options with the VPC.</p>
pub fn set_dhcp_options_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_dhcp_options_id(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AssociateEnclaveCertificateIamRole`.
///
/// <p>Associates an Identity and Access Management (IAM) role with an Certificate Manager (ACM) certificate.
/// This enables the certificate to be used by the ACM for Nitro Enclaves application inside an enclave. For more
/// information, see <a href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave-refapp.html">Certificate Manager for Nitro Enclaves</a> in the <i>Amazon Web Services Nitro Enclaves
/// User Guide</i>.</p>
///
/// <p>When the IAM role is associated with the ACM certificate, the certificate, certificate chain, and encrypted
/// private key are placed in an Amazon S3 bucket that only the associated IAM role can access. The private key of the certificate
/// is encrypted with an Amazon Web Services managed key that has an attached attestation-based key policy.</p>
///
/// <p>To enable the IAM role to access the Amazon S3 object, you must grant it permission to call <code>s3:GetObject</code>
/// on the Amazon S3 bucket returned by the command. To enable the IAM role to access the KMS key,
/// you must grant it permission to call <code>kms:Decrypt</code> on the KMS key returned by the command.
/// For more information, see <a href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave-refapp.html#add-policy">
/// Grant the role permission to access the certificate and encryption key</a> in the
/// <i>Amazon Web Services Nitro Enclaves User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct AssociateEnclaveCertificateIamRole<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::associate_enclave_certificate_iam_role_input::Builder,
}
impl<C, M, R> AssociateEnclaveCertificateIamRole<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssociateEnclaveCertificateIamRole`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateEnclaveCertificateIamRoleOutput,
aws_smithy_http::result::SdkError<
crate::error::AssociateEnclaveCertificateIamRoleError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssociateEnclaveCertificateIamRoleInputOperationOutputAlias,
crate::output::AssociateEnclaveCertificateIamRoleOutput,
crate::error::AssociateEnclaveCertificateIamRoleError,
crate::input::AssociateEnclaveCertificateIamRoleInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ARN of the ACM certificate with which to associate the IAM role.</p>
pub fn certificate_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.certificate_arn(inp);
self
}
/// <p>The ARN of the ACM certificate with which to associate the IAM role.</p>
pub fn set_certificate_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_certificate_arn(input);
self
}
/// <p>The ARN of the IAM role to associate with the ACM certificate. You can associate up to 16 IAM roles with an ACM
/// certificate.</p>
pub fn role_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.role_arn(inp);
self
}
/// <p>The ARN of the IAM role to associate with the ACM certificate. You can associate up to 16 IAM roles with an ACM
/// certificate.</p>
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_role_arn(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AssociateIamInstanceProfile`.
///
/// <p>Associates an IAM instance profile with a running or stopped instance. You cannot
/// associate more than one IAM instance profile with an instance.</p>
#[derive(std::fmt::Debug)]
pub struct AssociateIamInstanceProfile<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::associate_iam_instance_profile_input::Builder,
}
impl<C, M, R> AssociateIamInstanceProfile<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssociateIamInstanceProfile`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateIamInstanceProfileOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateIamInstanceProfileError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssociateIamInstanceProfileInputOperationOutputAlias,
crate::output::AssociateIamInstanceProfileOutput,
crate::error::AssociateIamInstanceProfileError,
crate::input::AssociateIamInstanceProfileInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The IAM instance profile.</p>
pub fn iam_instance_profile(
mut self,
inp: crate::model::IamInstanceProfileSpecification,
) -> Self {
self.inner = self.inner.iam_instance_profile(inp);
self
}
/// <p>The IAM instance profile.</p>
pub fn set_iam_instance_profile(
mut self,
input: std::option::Option<crate::model::IamInstanceProfileSpecification>,
) -> Self {
self.inner = self.inner.set_iam_instance_profile(input);
self
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
}
/// Fluent builder constructing a request to `AssociateInstanceEventWindow`.
///
/// <p>Associates one or more targets with an event window. Only one type of target (instance IDs,
/// Dedicated Host IDs, or tags) can be specified with an event window.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html">Define event windows for scheduled
/// events</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct AssociateInstanceEventWindow<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::associate_instance_event_window_input::Builder,
}
impl<C, M, R> AssociateInstanceEventWindow<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssociateInstanceEventWindow`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateInstanceEventWindowOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateInstanceEventWindowError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssociateInstanceEventWindowInputOperationOutputAlias,
crate::output::AssociateInstanceEventWindowOutput,
crate::error::AssociateInstanceEventWindowError,
crate::input::AssociateInstanceEventWindowInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the event window.</p>
pub fn instance_event_window_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_event_window_id(inp);
self
}
/// <p>The ID of the event window.</p>
pub fn set_instance_event_window_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_instance_event_window_id(input);
self
}
/// <p>One or more targets associated with the specified event window.</p>
pub fn association_target(
mut self,
inp: crate::model::InstanceEventWindowAssociationRequest,
) -> Self {
self.inner = self.inner.association_target(inp);
self
}
/// <p>One or more targets associated with the specified event window.</p>
pub fn set_association_target(
mut self,
input: std::option::Option<crate::model::InstanceEventWindowAssociationRequest>,
) -> Self {
self.inner = self.inner.set_association_target(input);
self
}
}
/// Fluent builder constructing a request to `AssociateRouteTable`.
///
/// <p>Associates a subnet in your VPC or an internet gateway or virtual private gateway
/// attached to your VPC with a route table in your VPC. This association causes traffic
/// from the subnet or gateway to be routed according to the routes in the route table. The
/// action returns an association ID, which you need in order to disassociate the route
/// table later. A route table can be associated with multiple subnets.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route tables</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct AssociateRouteTable<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::associate_route_table_input::Builder,
}
impl<C, M, R> AssociateRouteTable<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssociateRouteTable`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateRouteTableOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateRouteTableError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssociateRouteTableInputOperationOutputAlias,
crate::output::AssociateRouteTableOutput,
crate::error::AssociateRouteTableError,
crate::input::AssociateRouteTableInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the route table.</p>
pub fn route_table_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.route_table_id(inp);
self
}
/// <p>The ID of the route table.</p>
pub fn set_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_route_table_id(input);
self
}
/// <p>The ID of the subnet.</p>
pub fn subnet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_id(inp);
self
}
/// <p>The ID of the subnet.</p>
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_subnet_id(input);
self
}
/// <p>The ID of the internet gateway or virtual private gateway.</p>
pub fn gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.gateway_id(inp);
self
}
/// <p>The ID of the internet gateway or virtual private gateway.</p>
pub fn set_gateway_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_gateway_id(input);
self
}
}
/// Fluent builder constructing a request to `AssociateSubnetCidrBlock`.
///
/// <p>Associates a CIDR block with your subnet. You can only associate a single IPv6 CIDR
/// block with your subnet. An IPv6 CIDR block must have a prefix length of /64.</p>
#[derive(std::fmt::Debug)]
pub struct AssociateSubnetCidrBlock<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::associate_subnet_cidr_block_input::Builder,
}
impl<C, M, R> AssociateSubnetCidrBlock<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssociateSubnetCidrBlock`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateSubnetCidrBlockOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateSubnetCidrBlockError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssociateSubnetCidrBlockInputOperationOutputAlias,
crate::output::AssociateSubnetCidrBlockOutput,
crate::error::AssociateSubnetCidrBlockError,
crate::input::AssociateSubnetCidrBlockInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The IPv6 CIDR block for your subnet. The subnet must have a /64 prefix
/// length.</p>
pub fn ipv6_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv6_cidr_block(inp);
self
}
/// <p>The IPv6 CIDR block for your subnet. The subnet must have a /64 prefix
/// length.</p>
pub fn set_ipv6_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_ipv6_cidr_block(input);
self
}
/// <p>The ID of your subnet.</p>
pub fn subnet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_id(inp);
self
}
/// <p>The ID of your subnet.</p>
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_subnet_id(input);
self
}
}
/// Fluent builder constructing a request to `AssociateTransitGatewayMulticastDomain`.
///
/// <p>Associates the specified subnets and transit gateway attachments with the specified transit gateway multicast domain.</p>
/// <p>The transit gateway attachment must be in the available state before you can add a resource. Use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTransitGatewayAttachments.html">DescribeTransitGatewayAttachments</a>
/// to see the state of the attachment.</p>
#[derive(std::fmt::Debug)]
pub struct AssociateTransitGatewayMulticastDomain<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::associate_transit_gateway_multicast_domain_input::Builder,
}
impl<C, M, R> AssociateTransitGatewayMulticastDomain<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssociateTransitGatewayMulticastDomain`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateTransitGatewayMulticastDomainOutput,
aws_smithy_http::result::SdkError<
crate::error::AssociateTransitGatewayMulticastDomainError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssociateTransitGatewayMulticastDomainInputOperationOutputAlias,
crate::output::AssociateTransitGatewayMulticastDomainOutput,
crate::error::AssociateTransitGatewayMulticastDomainError,
crate::input::AssociateTransitGatewayMulticastDomainInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn transit_gateway_multicast_domain_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_multicast_domain_id(inp);
self
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn set_transit_gateway_multicast_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_multicast_domain_id(input);
self
}
/// <p>The ID of the transit gateway attachment to associate with the transit gateway multicast domain.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the transit gateway attachment to associate with the transit gateway multicast domain.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// Appends an item to `SubnetIds`.
///
/// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
///
/// <p>The IDs of the subnets to associate with the transit gateway multicast domain.</p>
pub fn subnet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_ids(inp);
self
}
/// <p>The IDs of the subnets to associate with the transit gateway multicast domain.</p>
pub fn set_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_subnet_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AssociateTransitGatewayRouteTable`.
///
/// <p>Associates the specified attachment with the specified transit gateway route table. You can
/// associate only one route table with an attachment.</p>
#[derive(std::fmt::Debug)]
pub struct AssociateTransitGatewayRouteTable<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::associate_transit_gateway_route_table_input::Builder,
}
impl<C, M, R> AssociateTransitGatewayRouteTable<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssociateTransitGatewayRouteTable`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateTransitGatewayRouteTableOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateTransitGatewayRouteTableError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssociateTransitGatewayRouteTableInputOperationOutputAlias,
crate::output::AssociateTransitGatewayRouteTableOutput,
crate::error::AssociateTransitGatewayRouteTableError,
crate::input::AssociateTransitGatewayRouteTableInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the transit gateway route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// <p>The ID of the attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AssociateTrunkInterface`.
///
/// <note>
/// <p>This API action is currently in <b>limited preview only</b>.
/// If you are interested in using this feature, contact your account manager.</p>
/// </note>
///
/// <p>Associates a branch network interface with a trunk network interface.</p>
/// <p>Before you create the association, run the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html">create-network-interface</a> command and set
/// <code>--interface-type</code> to <code>trunk</code>. You must also create a network interface for each branch network interface that you want to associate with the trunk network interface.</p>
#[derive(std::fmt::Debug)]
pub struct AssociateTrunkInterface<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::associate_trunk_interface_input::Builder,
}
impl<C, M, R> AssociateTrunkInterface<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssociateTrunkInterface`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateTrunkInterfaceOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateTrunkInterfaceError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssociateTrunkInterfaceInputOperationOutputAlias,
crate::output::AssociateTrunkInterfaceOutput,
crate::error::AssociateTrunkInterfaceError,
crate::input::AssociateTrunkInterfaceInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the branch network interface.</p>
pub fn branch_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.branch_interface_id(inp);
self
}
/// <p>The ID of the branch network interface.</p>
pub fn set_branch_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_branch_interface_id(input);
self
}
/// <p>The ID of the trunk network interface.</p>
pub fn trunk_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.trunk_interface_id(inp);
self
}
/// <p>The ID of the trunk network interface.</p>
pub fn set_trunk_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_trunk_interface_id(input);
self
}
/// <p>The ID of the VLAN. This applies to the VLAN protocol.</p>
pub fn vlan_id(mut self, inp: i32) -> Self {
self.inner = self.inner.vlan_id(inp);
self
}
/// <p>The ID of the VLAN. This applies to the VLAN protocol.</p>
pub fn set_vlan_id(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_vlan_id(input);
self
}
/// <p>The application key. This applies to the GRE protocol.</p>
pub fn gre_key(mut self, inp: i32) -> Self {
self.inner = self.inner.gre_key(inp);
self
}
/// <p>The application key. This applies to the GRE protocol.</p>
pub fn set_gre_key(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_gre_key(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to Ensure
/// Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to Ensure
/// Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AssociateVpcCidrBlock`.
///
/// <p>Associates a CIDR block with your VPC. You can associate a secondary IPv4 CIDR block,
/// an Amazon-provided IPv6 CIDR block, or an IPv6 CIDR block from an IPv6 address pool that
/// you provisioned through bring your own IP addresses (<a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html">BYOIP</a>). The IPv6 CIDR block size is fixed
/// at /56.</p>
/// <p>You must specify one of the following in the request: an IPv4 CIDR block, an IPv6
/// pool, or an Amazon-provided IPv6 CIDR block.</p>
/// <p>For more information about associating CIDR blocks with your VPC and applicable
/// restrictions, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html#VPC_Sizing">VPC and subnet sizing</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct AssociateVpcCidrBlock<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::associate_vpc_cidr_block_input::Builder,
}
impl<C, M, R> AssociateVpcCidrBlock<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AssociateVpcCidrBlock`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateVpcCidrBlockOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateVpcCidrBlockError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AssociateVpcCidrBlockInputOperationOutputAlias,
crate::output::AssociateVpcCidrBlockOutput,
crate::error::AssociateVpcCidrBlockError,
crate::input::AssociateVpcCidrBlockInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IPv6 addresses, or the size of the CIDR block.</p>
pub fn amazon_provided_ipv6_cidr_block(mut self, inp: bool) -> Self {
self.inner = self.inner.amazon_provided_ipv6_cidr_block(inp);
self
}
/// <p>Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IPv6 addresses, or the size of the CIDR block.</p>
pub fn set_amazon_provided_ipv6_cidr_block(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.inner = self.inner.set_amazon_provided_ipv6_cidr_block(input);
self
}
/// <p>An IPv4 CIDR block to associate with the VPC.</p>
pub fn cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr_block(inp);
self
}
/// <p>An IPv4 CIDR block to associate with the VPC.</p>
pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr_block(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// <p>The name of the location from which we advertise the IPV6 CIDR block. Use this parameter
/// to limit the CIDR block to this location.</p>
/// <p> You must set <code>AmazonProvidedIpv6CidrBlock</code> to <code>true</code> to use this parameter.</p>
/// <p> You can have one IPv6 CIDR block association per network border group.</p>
pub fn ipv6_cidr_block_network_border_group(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.ipv6_cidr_block_network_border_group(inp);
self
}
/// <p>The name of the location from which we advertise the IPV6 CIDR block. Use this parameter
/// to limit the CIDR block to this location.</p>
/// <p> You must set <code>AmazonProvidedIpv6CidrBlock</code> to <code>true</code> to use this parameter.</p>
/// <p> You can have one IPv6 CIDR block association per network border group.</p>
pub fn set_ipv6_cidr_block_network_border_group(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_ipv6_cidr_block_network_border_group(input);
self
}
/// <p>The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.</p>
pub fn ipv6_pool(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv6_pool(inp);
self
}
/// <p>The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.</p>
pub fn set_ipv6_pool(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_ipv6_pool(input);
self
}
/// <p>An IPv6 CIDR block from the IPv6 address pool. You must also specify <code>Ipv6Pool</code> in the request.</p>
/// <p>To let Amazon choose the IPv6 CIDR block for you, omit this parameter.</p>
pub fn ipv6_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv6_cidr_block(inp);
self
}
/// <p>An IPv6 CIDR block from the IPv6 address pool. You must also specify <code>Ipv6Pool</code> in the request.</p>
/// <p>To let Amazon choose the IPv6 CIDR block for you, omit this parameter.</p>
pub fn set_ipv6_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_ipv6_cidr_block(input);
self
}
}
/// Fluent builder constructing a request to `AttachClassicLinkVpc`.
///
/// <p>Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's
/// security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You
/// can only link an instance that's in the <code>running</code> state. An instance is
/// automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when
/// you restart it.</p>
/// <p>After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.</p>
/// <p>Linking your instance to a VPC is sometimes referred to as <i>attaching</i> your instance.</p>
#[derive(std::fmt::Debug)]
pub struct AttachClassicLinkVpc<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::attach_classic_link_vpc_input::Builder,
}
impl<C, M, R> AttachClassicLinkVpc<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AttachClassicLinkVpc`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AttachClassicLinkVpcOutput,
aws_smithy_http::result::SdkError<crate::error::AttachClassicLinkVpcError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AttachClassicLinkVpcInputOperationOutputAlias,
crate::output::AttachClassicLinkVpcOutput,
crate::error::AttachClassicLinkVpcError,
crate::input::AttachClassicLinkVpcInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Groups`.
///
/// To override the contents of this collection use [`set_groups`](Self::set_groups).
///
/// <p>The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.</p>
pub fn groups(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.groups(inp);
self
}
/// <p>The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.</p>
pub fn set_groups(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_groups(input);
self
}
/// <p>The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The ID of a ClassicLink-enabled VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of a ClassicLink-enabled VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
}
/// Fluent builder constructing a request to `AttachInternetGateway`.
///
/// <p>Attaches an internet gateway or a virtual private gateway to a VPC, enabling connectivity between the internet and
/// the VPC. For more information about your VPC and internet gateway, see the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/">Amazon Virtual Private Cloud User Guide</a>.</p>
#[derive(std::fmt::Debug)]
pub struct AttachInternetGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::attach_internet_gateway_input::Builder,
}
impl<C, M, R> AttachInternetGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AttachInternetGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AttachInternetGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::AttachInternetGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AttachInternetGatewayInputOperationOutputAlias,
crate::output::AttachInternetGatewayOutput,
crate::error::AttachInternetGatewayError,
crate::input::AttachInternetGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the internet gateway.</p>
pub fn internet_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.internet_gateway_id(inp);
self
}
/// <p>The ID of the internet gateway.</p>
pub fn set_internet_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_internet_gateway_id(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
}
/// Fluent builder constructing a request to `AttachNetworkInterface`.
///
/// <p>Attaches a network interface to an instance.</p>
#[derive(std::fmt::Debug)]
pub struct AttachNetworkInterface<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::attach_network_interface_input::Builder,
}
impl<C, M, R> AttachNetworkInterface<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AttachNetworkInterface`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AttachNetworkInterfaceOutput,
aws_smithy_http::result::SdkError<crate::error::AttachNetworkInterfaceError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AttachNetworkInterfaceInputOperationOutputAlias,
crate::output::AttachNetworkInterfaceOutput,
crate::error::AttachNetworkInterfaceError,
crate::input::AttachNetworkInterfaceInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The index of the device for the network interface attachment.</p>
pub fn device_index(mut self, inp: i32) -> Self {
self.inner = self.inner.device_index(inp);
self
}
/// <p>The index of the device for the network interface attachment.</p>
pub fn set_device_index(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_device_index(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The ID of the network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of the network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
/// <p>The index of the network card. Some instance types support multiple network cards.
/// The primary network interface must be assigned to network card index 0.
/// The default is network card index 0.</p>
pub fn network_card_index(mut self, inp: i32) -> Self {
self.inner = self.inner.network_card_index(inp);
self
}
/// <p>The index of the network card. Some instance types support multiple network cards.
/// The primary network interface must be assigned to network card index 0.
/// The default is network card index 0.</p>
pub fn set_network_card_index(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_network_card_index(input);
self
}
}
/// Fluent builder constructing a request to `AttachVolume`.
///
/// <p>Attaches an EBS volume to a running or stopped instance and exposes it to the instance
/// with the specified device name.</p>
/// <p>Encrypted EBS volumes must be attached to instances that support Amazon EBS encryption. For
/// more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>After you attach an EBS volume, you must make it available. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html">Make an EBS volume available for use</a>.</p>
/// <p>If a volume has an Amazon Web Services Marketplace product code:</p>
/// <ul>
/// <li>
/// <p>The volume can be attached only to a stopped instance.</p>
/// </li>
/// <li>
/// <p>Amazon Web Services Marketplace product codes are copied from the volume to the instance.</p>
/// </li>
/// <li>
/// <p>You must be subscribed to the product.</p>
/// </li>
/// <li>
/// <p>The instance type and operating system of the instance must support the product. For
/// example, you can't detach a volume from a Windows instance and attach it to a Linux
/// instance.</p>
/// </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html">Attach an Amazon EBS volume to an instance</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct AttachVolume<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::attach_volume_input::Builder,
}
impl<C, M, R> AttachVolume<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AttachVolume`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AttachVolumeOutput,
aws_smithy_http::result::SdkError<crate::error::AttachVolumeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AttachVolumeInputOperationOutputAlias,
crate::output::AttachVolumeOutput,
crate::error::AttachVolumeError,
crate::input::AttachVolumeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
pub fn device(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.device(inp);
self
}
/// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
pub fn set_device(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_device(input);
self
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The ID of the EBS volume. The volume and instance must be within the same Availability
/// Zone.</p>
pub fn volume_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.volume_id(inp);
self
}
/// <p>The ID of the EBS volume. The volume and instance must be within the same Availability
/// Zone.</p>
pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_volume_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AttachVpnGateway`.
///
/// <p>Attaches a virtual private gateway to a VPC. You can attach one virtual private
/// gateway to one VPC at a time.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">Amazon Web Services Site-to-Site VPN</a> in the <i>Amazon Web Services Site-to-Site VPN
/// User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct AttachVpnGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::attach_vpn_gateway_input::Builder,
}
impl<C, M, R> AttachVpnGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AttachVpnGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AttachVpnGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::AttachVpnGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AttachVpnGatewayInputOperationOutputAlias,
crate::output::AttachVpnGatewayOutput,
crate::error::AttachVpnGatewayError,
crate::input::AttachVpnGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// <p>The ID of the virtual private gateway.</p>
pub fn vpn_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_gateway_id(inp);
self
}
/// <p>The ID of the virtual private gateway.</p>
pub fn set_vpn_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_gateway_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AuthorizeClientVpnIngress`.
///
/// <p>Adds an ingress authorization rule to a Client VPN endpoint. Ingress authorization rules act as
/// firewall rules that grant access to networks. You must configure ingress authorization rules to
/// enable clients to access resources in Amazon Web Services or on-premises networks.</p>
#[derive(std::fmt::Debug)]
pub struct AuthorizeClientVpnIngress<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::authorize_client_vpn_ingress_input::Builder,
}
impl<C, M, R> AuthorizeClientVpnIngress<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AuthorizeClientVpnIngress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AuthorizeClientVpnIngressOutput,
aws_smithy_http::result::SdkError<crate::error::AuthorizeClientVpnIngressError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AuthorizeClientVpnIngressInputOperationOutputAlias,
crate::output::AuthorizeClientVpnIngressOutput,
crate::error::AuthorizeClientVpnIngressError,
crate::input::AuthorizeClientVpnIngressInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <p>The IPv4 address range, in CIDR notation, of the network for which access is being authorized.</p>
pub fn target_network_cidr(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.target_network_cidr(inp);
self
}
/// <p>The IPv4 address range, in CIDR notation, of the network for which access is being authorized.</p>
pub fn set_target_network_cidr(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_target_network_cidr(input);
self
}
/// <p>The ID of the group to grant access to, for example, the Active Directory group or identity provider (IdP) group. Required if <code>AuthorizeAllGroups</code> is <code>false</code> or not specified.</p>
pub fn access_group_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.access_group_id(inp);
self
}
/// <p>The ID of the group to grant access to, for example, the Active Directory group or identity provider (IdP) group. Required if <code>AuthorizeAllGroups</code> is <code>false</code> or not specified.</p>
pub fn set_access_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_access_group_id(input);
self
}
/// <p>Indicates whether to grant access to all clients. Specify <code>true</code> to grant all
/// clients who successfully establish a VPN connection access to the network. Must be set
/// to <code>true</code> if <code>AccessGroupId</code> is not specified.</p>
pub fn authorize_all_groups(mut self, inp: bool) -> Self {
self.inner = self.inner.authorize_all_groups(inp);
self
}
/// <p>Indicates whether to grant access to all clients. Specify <code>true</code> to grant all
/// clients who successfully establish a VPN connection access to the network. Must be set
/// to <code>true</code> if <code>AccessGroupId</code> is not specified.</p>
pub fn set_authorize_all_groups(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_authorize_all_groups(input);
self
}
/// <p>A brief description of the authorization rule.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A brief description of the authorization rule.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `AuthorizeSecurityGroupEgress`.
///
/// <p>[VPC only] Adds the specified outbound (egress) rules to a security group for use with a VPC.</p>
/// <p>An outbound rule permits instances to send traffic to the specified IPv4 or IPv6 CIDR address
/// ranges, or to the instances that are associated with the specified destination security groups.</p>
/// <p>You specify a protocol for each rule (for example, TCP).
/// For the TCP and UDP protocols, you must also specify the destination port or port range.
/// For the ICMP protocol, you must also specify the ICMP type and code.
/// You can use -1 for the type or code to mean all types or all codes.</p>
/// <p>Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.</p>
/// <p>For information about VPC security group quotas, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html">Amazon VPC quotas</a>.</p>
#[derive(std::fmt::Debug)]
pub struct AuthorizeSecurityGroupEgress<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::authorize_security_group_egress_input::Builder,
}
impl<C, M, R> AuthorizeSecurityGroupEgress<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AuthorizeSecurityGroupEgress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AuthorizeSecurityGroupEgressOutput,
aws_smithy_http::result::SdkError<crate::error::AuthorizeSecurityGroupEgressError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AuthorizeSecurityGroupEgressInputOperationOutputAlias,
crate::output::AuthorizeSecurityGroupEgressOutput,
crate::error::AuthorizeSecurityGroupEgressError,
crate::input::AuthorizeSecurityGroupEgressInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the security group.</p>
pub fn group_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_id(inp);
self
}
/// <p>The ID of the security group.</p>
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_id(input);
self
}
/// Appends an item to `IpPermissions`.
///
/// To override the contents of this collection use [`set_ip_permissions`](Self::set_ip_permissions).
///
/// <p>The sets of IP permissions. You can't specify a destination security group and a CIDR IP
/// address range in the same set of permissions.</p>
pub fn ip_permissions(mut self, inp: impl Into<crate::model::IpPermission>) -> Self {
self.inner = self.inner.ip_permissions(inp);
self
}
/// <p>The sets of IP permissions. You can't specify a destination security group and a CIDR IP
/// address range in the same set of permissions.</p>
pub fn set_ip_permissions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::IpPermission>>,
) -> Self {
self.inner = self.inner.set_ip_permissions(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags applied to the security group rule.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags applied to the security group rule.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the CIDR.</p>
pub fn cidr_ip(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr_ip(inp);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the CIDR.</p>
pub fn set_cidr_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr_ip(input);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the port.</p>
pub fn from_port(mut self, inp: i32) -> Self {
self.inner = self.inner.from_port(inp);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the port.</p>
pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_from_port(input);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the protocol name or
/// number.</p>
pub fn ip_protocol(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ip_protocol(inp);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the protocol name or
/// number.</p>
pub fn set_ip_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_ip_protocol(input);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the port.</p>
pub fn to_port(mut self, inp: i32) -> Self {
self.inner = self.inner.to_port(inp);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the port.</p>
pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_to_port(input);
self
}
/// <p>Not supported. Use a set of IP permissions to specify a
/// destination security group.</p>
pub fn source_security_group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_security_group_name(inp);
self
}
/// <p>Not supported. Use a set of IP permissions to specify a
/// destination security group.</p>
pub fn set_source_security_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_security_group_name(input);
self
}
/// <p>Not supported. Use a set of IP permissions to specify a
/// destination security group.</p>
pub fn source_security_group_owner_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.source_security_group_owner_id(inp);
self
}
/// <p>Not supported. Use a set of IP permissions to specify a
/// destination security group.</p>
pub fn set_source_security_group_owner_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_security_group_owner_id(input);
self
}
}
/// Fluent builder constructing a request to `AuthorizeSecurityGroupIngress`.
///
/// <p>Adds the specified inbound (ingress) rules to a security group.</p>
/// <p>An inbound rule permits instances to receive traffic from the specified IPv4 or IPv6 CIDR
/// address range, or from the instances that are associated with the specified destination security
/// groups.</p>
/// <p>You specify a protocol for each rule (for example, TCP).
/// For TCP and UDP, you must also specify the destination port or port range.
/// For ICMP/ICMPv6, you must also specify the ICMP/ICMPv6 type and code.
/// You can use -1 to mean all types or all codes.</p>
/// <p>Rule changes are propagated to instances within the security group as quickly as possible.
/// However, a small delay might occur.</p>
/// <p>For more information about VPC security group quotas, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html">Amazon VPC quotas</a>.</p>
#[derive(std::fmt::Debug)]
pub struct AuthorizeSecurityGroupIngress<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::authorize_security_group_ingress_input::Builder,
}
impl<C, M, R> AuthorizeSecurityGroupIngress<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `AuthorizeSecurityGroupIngress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AuthorizeSecurityGroupIngressOutput,
aws_smithy_http::result::SdkError<crate::error::AuthorizeSecurityGroupIngressError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::AuthorizeSecurityGroupIngressInputOperationOutputAlias,
crate::output::AuthorizeSecurityGroupIngressOutput,
crate::error::AuthorizeSecurityGroupIngressError,
crate::input::AuthorizeSecurityGroupIngressInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The IPv4 address range, in CIDR format. You can't specify this parameter when specifying a source
/// security group. To specify an IPv6 address range, use a set of IP permissions.</p>
/// <p>Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.</p>
pub fn cidr_ip(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr_ip(inp);
self
}
/// <p>The IPv4 address range, in CIDR format. You can't specify this parameter when specifying a source
/// security group. To specify an IPv6 address range, use a set of IP permissions.</p>
/// <p>Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.</p>
pub fn set_cidr_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr_ip(input);
self
}
/// <p>The start of port range for the TCP and UDP protocols, or an ICMP type number.
/// For the ICMP type number, use <code>-1</code> to specify all types. If you
/// specify all ICMP types, you must specify all codes.</p>
/// <p>Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.</p>
pub fn from_port(mut self, inp: i32) -> Self {
self.inner = self.inner.from_port(inp);
self
}
/// <p>The start of port range for the TCP and UDP protocols, or an ICMP type number.
/// For the ICMP type number, use <code>-1</code> to specify all types. If you
/// specify all ICMP types, you must specify all codes.</p>
/// <p>Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.</p>
pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_from_port(input);
self
}
/// <p>The ID of the security group. You must specify either the security group ID or the
/// security group name in the request. For security groups in a nondefault VPC, you must
/// specify the security group ID.</p>
pub fn group_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_id(inp);
self
}
/// <p>The ID of the security group. You must specify either the security group ID or the
/// security group name in the request. For security groups in a nondefault VPC, you must
/// specify the security group ID.</p>
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_id(input);
self
}
/// <p>[EC2-Classic, default VPC] The name of the security group. You must specify either the
/// security group ID or the security group name in the request.</p>
pub fn group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_name(inp);
self
}
/// <p>[EC2-Classic, default VPC] The name of the security group. You must specify either the
/// security group ID or the security group name in the request.</p>
pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_name(input);
self
}
/// Appends an item to `IpPermissions`.
///
/// To override the contents of this collection use [`set_ip_permissions`](Self::set_ip_permissions).
///
/// <p>The sets of IP permissions.</p>
pub fn ip_permissions(mut self, inp: impl Into<crate::model::IpPermission>) -> Self {
self.inner = self.inner.ip_permissions(inp);
self
}
/// <p>The sets of IP permissions.</p>
pub fn set_ip_permissions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::IpPermission>>,
) -> Self {
self.inner = self.inner.set_ip_permissions(input);
self
}
/// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>) or number
/// (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). To specify <code>icmpv6</code>, use a set of IP permissions.</p>
/// <p>[VPC only] Use <code>-1</code> to specify all protocols. If you specify <code>-1</code> or a
/// protocol other than <code>tcp</code>, <code>udp</code>, or <code>icmp</code>, traffic on all ports
/// is allowed, regardless of any ports you specify.</p>
/// <p>Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.</p>
pub fn ip_protocol(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ip_protocol(inp);
self
}
/// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>) or number
/// (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). To specify <code>icmpv6</code>, use a set of IP permissions.</p>
/// <p>[VPC only] Use <code>-1</code> to specify all protocols. If you specify <code>-1</code> or a
/// protocol other than <code>tcp</code>, <code>udp</code>, or <code>icmp</code>, traffic on all ports
/// is allowed, regardless of any ports you specify.</p>
/// <p>Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.</p>
pub fn set_ip_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_ip_protocol(input);
self
}
/// <p>[EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter
/// in combination with the following parameters: the CIDR IP address range, the start of the port range,
/// the IP protocol, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access.
/// To create a rule with a specific IP protocol and port range, use a set of IP permissions instead. For
/// EC2-VPC, the source security group must be in the same VPC.</p>
pub fn source_security_group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_security_group_name(inp);
self
}
/// <p>[EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter
/// in combination with the following parameters: the CIDR IP address range, the start of the port range,
/// the IP protocol, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access.
/// To create a rule with a specific IP protocol and port range, use a set of IP permissions instead. For
/// EC2-VPC, the source security group must be in the same VPC.</p>
pub fn set_source_security_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_security_group_name(input);
self
}
/// <p>[nondefault VPC] The Amazon Web Services account ID for the source security group, if the source security group is
/// in a different account. You can't specify this parameter in combination with the following parameters:
/// the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range.
/// Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol
/// and port range, use a set of IP permissions instead.</p>
pub fn source_security_group_owner_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.source_security_group_owner_id(inp);
self
}
/// <p>[nondefault VPC] The Amazon Web Services account ID for the source security group, if the source security group is
/// in a different account. You can't specify this parameter in combination with the following parameters:
/// the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range.
/// Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol
/// and port range, use a set of IP permissions instead.</p>
pub fn set_source_security_group_owner_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_security_group_owner_id(input);
self
}
/// <p>The end of port range for the TCP and UDP protocols, or an ICMP code number.
/// For the ICMP code number, use <code>-1</code> to specify all codes. If you
/// specify all ICMP types, you must specify all codes.</p>
/// <p>Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.</p>
pub fn to_port(mut self, inp: i32) -> Self {
self.inner = self.inner.to_port(inp);
self
}
/// <p>The end of port range for the TCP and UDP protocols, or an ICMP code number.
/// For the ICMP code number, use <code>-1</code> to specify all codes. If you
/// specify all ICMP types, you must specify all codes.</p>
/// <p>Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.</p>
pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_to_port(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>[VPC Only] The tags applied to the security group rule.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>[VPC Only] The tags applied to the security group rule.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `BundleInstance`.
///
/// <p>Bundles an Amazon instance store-backed Windows instance.</p>
/// <p>During bundling, only the root device volume (C:\) is bundled. Data on other instance store volumes is not preserved.</p>
/// <note>
/// <p>This action is not applicable for Linux/Unix instances or Windows instances that are backed by Amazon EBS.</p>
/// </note>
#[derive(std::fmt::Debug)]
pub struct BundleInstance<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::bundle_instance_input::Builder,
}
impl<C, M, R> BundleInstance<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `BundleInstance`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::BundleInstanceOutput,
aws_smithy_http::result::SdkError<crate::error::BundleInstanceError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::BundleInstanceInputOperationOutputAlias,
crate::output::BundleInstanceOutput,
crate::error::BundleInstanceError,
crate::input::BundleInstanceInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the instance to bundle.</p>
/// <p>Type: String</p>
/// <p>Default: None</p>
/// <p>Required: Yes</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance to bundle.</p>
/// <p>Type: String</p>
/// <p>Default: None</p>
/// <p>Required: Yes</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
pub fn storage(mut self, inp: crate::model::Storage) -> Self {
self.inner = self.inner.storage(inp);
self
}
/// <p>The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
pub fn set_storage(mut self, input: std::option::Option<crate::model::Storage>) -> Self {
self.inner = self.inner.set_storage(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CancelBundleTask`.
///
/// <p>Cancels a bundling operation for an instance store-backed Windows instance.</p>
#[derive(std::fmt::Debug)]
pub struct CancelBundleTask<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::cancel_bundle_task_input::Builder,
}
impl<C, M, R> CancelBundleTask<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CancelBundleTask`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CancelBundleTaskOutput,
aws_smithy_http::result::SdkError<crate::error::CancelBundleTaskError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CancelBundleTaskInputOperationOutputAlias,
crate::output::CancelBundleTaskOutput,
crate::error::CancelBundleTaskError,
crate::input::CancelBundleTaskInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the bundle task.</p>
pub fn bundle_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.bundle_id(inp);
self
}
/// <p>The ID of the bundle task.</p>
pub fn set_bundle_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_bundle_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CancelCapacityReservation`.
///
/// <p>Cancels the specified Capacity Reservation, releases the reserved capacity, and changes the Capacity Reservation's state to
/// <code>cancelled</code>.</p>
/// <p>Instances running in the reserved capacity continue running until you stop them. Stopped
/// instances that target the Capacity Reservation can no longer launch. Modify these instances to either
/// target a different Capacity Reservation, launch On-Demand Instance capacity, or run in any open Capacity Reservation
/// that has matching attributes and sufficient capacity.</p>
#[derive(std::fmt::Debug)]
pub struct CancelCapacityReservation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::cancel_capacity_reservation_input::Builder,
}
impl<C, M, R> CancelCapacityReservation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CancelCapacityReservation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CancelCapacityReservationOutput,
aws_smithy_http::result::SdkError<crate::error::CancelCapacityReservationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CancelCapacityReservationInputOperationOutputAlias,
crate::output::CancelCapacityReservationOutput,
crate::error::CancelCapacityReservationError,
crate::input::CancelCapacityReservationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Capacity Reservation to be cancelled.</p>
pub fn capacity_reservation_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.capacity_reservation_id(inp);
self
}
/// <p>The ID of the Capacity Reservation to be cancelled.</p>
pub fn set_capacity_reservation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_capacity_reservation_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CancelCapacityReservationFleets`.
///
/// <p>Cancels one or more Capacity Reservation Fleets. When you cancel a Capacity Reservation
/// Fleet, the following happens:</p>
/// <ul>
/// <li>
/// <p>The Capacity Reservation Fleet's status changes to <code>cancelled</code>.</p>
/// </li>
/// <li>
/// <p>The individual Capacity Reservations in the Fleet are cancelled. Instances running
/// in the Capacity Reservations at the time of cancelling the Fleet continue to run in
/// shared capacity.</p>
/// </li>
/// <li>
/// <p>The Fleet stops creating new Capacity Reservations.</p>
/// </li>
/// </ul>
#[derive(std::fmt::Debug)]
pub struct CancelCapacityReservationFleets<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::cancel_capacity_reservation_fleets_input::Builder,
}
impl<C, M, R> CancelCapacityReservationFleets<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CancelCapacityReservationFleets`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CancelCapacityReservationFleetsOutput,
aws_smithy_http::result::SdkError<crate::error::CancelCapacityReservationFleetsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CancelCapacityReservationFleetsInputOperationOutputAlias,
crate::output::CancelCapacityReservationFleetsOutput,
crate::error::CancelCapacityReservationFleetsError,
crate::input::CancelCapacityReservationFleetsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `CapacityReservationFleetIds`.
///
/// To override the contents of this collection use [`set_capacity_reservation_fleet_ids`](Self::set_capacity_reservation_fleet_ids).
///
/// <p>The IDs of the Capacity Reservation Fleets to cancel.</p>
pub fn capacity_reservation_fleet_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.capacity_reservation_fleet_ids(inp);
self
}
/// <p>The IDs of the Capacity Reservation Fleets to cancel.</p>
pub fn set_capacity_reservation_fleet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_capacity_reservation_fleet_ids(input);
self
}
}
/// Fluent builder constructing a request to `CancelConversionTask`.
///
/// <p>Cancels an active conversion task. The task can be the import of an instance or volume. The action removes all
/// artifacts of the conversion, including a partially uploaded volume or instance. If the conversion is complete or is
/// in the process of transferring the final disk image, the command fails and returns an exception.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html">Importing a Virtual Machine Using the Amazon
/// EC2 CLI</a>.</p>
#[derive(std::fmt::Debug)]
pub struct CancelConversionTask<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::cancel_conversion_task_input::Builder,
}
impl<C, M, R> CancelConversionTask<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CancelConversionTask`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CancelConversionTaskOutput,
aws_smithy_http::result::SdkError<crate::error::CancelConversionTaskError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CancelConversionTaskInputOperationOutputAlias,
crate::output::CancelConversionTaskOutput,
crate::error::CancelConversionTaskError,
crate::input::CancelConversionTaskInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the conversion task.</p>
pub fn conversion_task_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.conversion_task_id(inp);
self
}
/// <p>The ID of the conversion task.</p>
pub fn set_conversion_task_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_conversion_task_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The reason for canceling the conversion task.</p>
pub fn reason_message(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.reason_message(inp);
self
}
/// <p>The reason for canceling the conversion task.</p>
pub fn set_reason_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_reason_message(input);
self
}
}
/// Fluent builder constructing a request to `CancelExportTask`.
///
/// <p>Cancels an active export task. The request removes all artifacts of the export, including any partially-created
/// Amazon S3 objects. If the export task is complete or is in the process of transferring the final disk image, the
/// command fails and returns an error.</p>
#[derive(std::fmt::Debug)]
pub struct CancelExportTask<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::cancel_export_task_input::Builder,
}
impl<C, M, R> CancelExportTask<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CancelExportTask`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CancelExportTaskOutput,
aws_smithy_http::result::SdkError<crate::error::CancelExportTaskError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CancelExportTaskInputOperationOutputAlias,
crate::output::CancelExportTaskOutput,
crate::error::CancelExportTaskError,
crate::input::CancelExportTaskInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the export task. This is the ID returned by <code>CreateInstanceExportTask</code>.</p>
pub fn export_task_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.export_task_id(inp);
self
}
/// <p>The ID of the export task. This is the ID returned by <code>CreateInstanceExportTask</code>.</p>
pub fn set_export_task_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_export_task_id(input);
self
}
}
/// Fluent builder constructing a request to `CancelImportTask`.
///
/// <p>Cancels an in-process import virtual machine or import snapshot task.</p>
#[derive(std::fmt::Debug)]
pub struct CancelImportTask<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::cancel_import_task_input::Builder,
}
impl<C, M, R> CancelImportTask<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CancelImportTask`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CancelImportTaskOutput,
aws_smithy_http::result::SdkError<crate::error::CancelImportTaskError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CancelImportTaskInputOperationOutputAlias,
crate::output::CancelImportTaskOutput,
crate::error::CancelImportTaskError,
crate::input::CancelImportTaskInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The reason for canceling the task.</p>
pub fn cancel_reason(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cancel_reason(inp);
self
}
/// <p>The reason for canceling the task.</p>
pub fn set_cancel_reason(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_cancel_reason(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the import image or import snapshot task to be canceled.</p>
pub fn import_task_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.import_task_id(inp);
self
}
/// <p>The ID of the import image or import snapshot task to be canceled.</p>
pub fn set_import_task_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_import_task_id(input);
self
}
}
/// Fluent builder constructing a request to `CancelReservedInstancesListing`.
///
/// <p>Cancels the specified Reserved Instance listing in the Reserved Instance Marketplace.</p>
/// <p>For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved Instance Marketplace</a>
/// in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CancelReservedInstancesListing<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::cancel_reserved_instances_listing_input::Builder,
}
impl<C, M, R> CancelReservedInstancesListing<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CancelReservedInstancesListing`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CancelReservedInstancesListingOutput,
aws_smithy_http::result::SdkError<crate::error::CancelReservedInstancesListingError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CancelReservedInstancesListingInputOperationOutputAlias,
crate::output::CancelReservedInstancesListingOutput,
crate::error::CancelReservedInstancesListingError,
crate::input::CancelReservedInstancesListingInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Reserved Instance listing.</p>
pub fn reserved_instances_listing_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.reserved_instances_listing_id(inp);
self
}
/// <p>The ID of the Reserved Instance listing.</p>
pub fn set_reserved_instances_listing_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_reserved_instances_listing_id(input);
self
}
}
/// Fluent builder constructing a request to `CancelSpotFleetRequests`.
///
/// <p>Cancels the specified Spot Fleet requests.</p>
/// <p>After you cancel a Spot Fleet request, the Spot Fleet launches no new Spot Instances.
/// You must specify whether the Spot Fleet should also terminate its Spot Instances. If you
/// terminate the instances, the Spot Fleet request enters the
/// <code>cancelled_terminating</code> state. Otherwise, the Spot Fleet request enters
/// the <code>cancelled_running</code> state and the instances continue to run until they
/// are interrupted or you terminate them manually.</p>
#[derive(std::fmt::Debug)]
pub struct CancelSpotFleetRequests<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::cancel_spot_fleet_requests_input::Builder,
}
impl<C, M, R> CancelSpotFleetRequests<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CancelSpotFleetRequests`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CancelSpotFleetRequestsOutput,
aws_smithy_http::result::SdkError<crate::error::CancelSpotFleetRequestsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CancelSpotFleetRequestsInputOperationOutputAlias,
crate::output::CancelSpotFleetRequestsOutput,
crate::error::CancelSpotFleetRequestsError,
crate::input::CancelSpotFleetRequestsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `SpotFleetRequestIds`.
///
/// To override the contents of this collection use [`set_spot_fleet_request_ids`](Self::set_spot_fleet_request_ids).
///
/// <p>The IDs of the Spot Fleet requests.</p>
pub fn spot_fleet_request_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.spot_fleet_request_ids(inp);
self
}
/// <p>The IDs of the Spot Fleet requests.</p>
pub fn set_spot_fleet_request_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_spot_fleet_request_ids(input);
self
}
/// <p>Indicates whether to terminate instances for a Spot Fleet request if it is canceled
/// successfully.</p>
pub fn terminate_instances(mut self, inp: bool) -> Self {
self.inner = self.inner.terminate_instances(inp);
self
}
/// <p>Indicates whether to terminate instances for a Spot Fleet request if it is canceled
/// successfully.</p>
pub fn set_terminate_instances(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_terminate_instances(input);
self
}
}
/// Fluent builder constructing a request to `CancelSpotInstanceRequests`.
///
/// <p>Cancels one or more Spot Instance requests.</p>
/// <important>
/// <p>Canceling a Spot Instance request does not terminate running Spot Instances
/// associated with the request.</p>
/// </important>
#[derive(std::fmt::Debug)]
pub struct CancelSpotInstanceRequests<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::cancel_spot_instance_requests_input::Builder,
}
impl<C, M, R> CancelSpotInstanceRequests<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CancelSpotInstanceRequests`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CancelSpotInstanceRequestsOutput,
aws_smithy_http::result::SdkError<crate::error::CancelSpotInstanceRequestsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CancelSpotInstanceRequestsInputOperationOutputAlias,
crate::output::CancelSpotInstanceRequestsOutput,
crate::error::CancelSpotInstanceRequestsError,
crate::input::CancelSpotInstanceRequestsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `SpotInstanceRequestIds`.
///
/// To override the contents of this collection use [`set_spot_instance_request_ids`](Self::set_spot_instance_request_ids).
///
/// <p>One or more Spot Instance request IDs.</p>
pub fn spot_instance_request_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.spot_instance_request_ids(inp);
self
}
/// <p>One or more Spot Instance request IDs.</p>
pub fn set_spot_instance_request_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_spot_instance_request_ids(input);
self
}
}
/// Fluent builder constructing a request to `ConfirmProductInstance`.
///
/// <p>Determines whether a product code is associated with an instance. This action can only
/// be used by the owner of the product code. It is useful when a product code owner must
/// verify whether another user's instance is eligible for support.</p>
#[derive(std::fmt::Debug)]
pub struct ConfirmProductInstance<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::confirm_product_instance_input::Builder,
}
impl<C, M, R> ConfirmProductInstance<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ConfirmProductInstance`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ConfirmProductInstanceOutput,
aws_smithy_http::result::SdkError<crate::error::ConfirmProductInstanceError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ConfirmProductInstanceInputOperationOutputAlias,
crate::output::ConfirmProductInstanceOutput,
crate::error::ConfirmProductInstanceError,
crate::input::ConfirmProductInstanceInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The product code. This must be a product code that you own.</p>
pub fn product_code(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.product_code(inp);
self
}
/// <p>The product code. This must be a product code that you own.</p>
pub fn set_product_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_product_code(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CopyFpgaImage`.
///
/// <p>Copies the specified Amazon FPGA Image (AFI) to the current Region.</p>
#[derive(std::fmt::Debug)]
pub struct CopyFpgaImage<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::copy_fpga_image_input::Builder,
}
impl<C, M, R> CopyFpgaImage<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CopyFpgaImage`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CopyFpgaImageOutput,
aws_smithy_http::result::SdkError<crate::error::CopyFpgaImageError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CopyFpgaImageInputOperationOutputAlias,
crate::output::CopyFpgaImageOutput,
crate::error::CopyFpgaImageError,
crate::input::CopyFpgaImageInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the source AFI.</p>
pub fn source_fpga_image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_fpga_image_id(inp);
self
}
/// <p>The ID of the source AFI.</p>
pub fn set_source_fpga_image_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_fpga_image_id(input);
self
}
/// <p>The description for the new AFI.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>The description for the new AFI.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>The name for the new AFI. The default is the name of the source AFI.</p>
pub fn name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(inp);
self
}
/// <p>The name for the new AFI. The default is the name of the source AFI.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The Region that contains the source AFI.</p>
pub fn source_region(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_region(inp);
self
}
/// <p>The Region that contains the source AFI.</p>
pub fn set_source_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_region(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `CopyImage`.
///
/// <p>Initiates the copy of an AMI. You can copy an AMI from one Region to another, or from a
/// Region to an Outpost. You can't copy an AMI from an Outpost to a Region, from one Outpost
/// to another, or within the same Outpost. To copy an AMI to another partition, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html">CreateStoreImageTask</a>.</p>
///
/// <p>To copy an AMI from one Region to another, specify the source Region using the
/// <b>SourceRegion</b> parameter, and specify the
/// destination Region using its endpoint. Copies of encrypted backing snapshots for
/// the AMI are encrypted. Copies of unencrypted backing snapshots remain unencrypted,
/// unless you set <code>Encrypted</code> during the copy operation. You cannot
/// create an unencrypted copy of an encrypted backing snapshot.</p>
///
/// <p>To copy an AMI from a Region to an Outpost, specify the source Region using the
/// <b>SourceRegion</b> parameter, and specify the
/// ARN of the destination Outpost using <b>DestinationOutpostArn</b>.
/// Backing snapshots copied to an Outpost are encrypted by default using the default
/// encryption key for the Region, or a different key that you specify in the request using
/// <b>KmsKeyId</b>. Outposts do not support unencrypted
/// snapshots. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami">
/// Amazon EBS local snapshots on Outposts</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
///
/// <p>For more information about the prerequisites and limits when copying an AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html">Copying an AMI</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CopyImage<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::copy_image_input::Builder,
}
impl<C, M, R> CopyImage<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CopyImage`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CopyImageOutput,
aws_smithy_http::result::SdkError<crate::error::CopyImageError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CopyImageInputOperationOutputAlias,
crate::output::CopyImageOutput,
crate::error::CopyImageError,
crate::input::CopyImageInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Unique, case-sensitive identifier you provide to ensure
/// idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>
/// in the <i>Amazon EC2 API Reference</i>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure
/// idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>
/// in the <i>Amazon EC2 API Reference</i>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>A description for the new AMI in the destination Region.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for the new AMI in the destination Region.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>Specifies whether the destination snapshots of the copied image should be encrypted.
/// You can encrypt a copy of an unencrypted snapshot, but you cannot create an unencrypted
/// copy of an encrypted snapshot. The default KMS key for Amazon EBS is used unless you specify a non-default
/// Key Management Service (KMS) KMS key using <code>KmsKeyId</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn encrypted(mut self, inp: bool) -> Self {
self.inner = self.inner.encrypted(inp);
self
}
/// <p>Specifies whether the destination snapshots of the copied image should be encrypted.
/// You can encrypt a copy of an unencrypted snapshot, but you cannot create an unencrypted
/// copy of an encrypted snapshot. The default KMS key for Amazon EBS is used unless you specify a non-default
/// Key Management Service (KMS) KMS key using <code>KmsKeyId</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_encrypted(input);
self
}
/// <p>The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating
/// encrypted volumes. If this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is used.
/// If you specify a KMS key, you must also set the encrypted state to <code>true</code>.</p>
/// <p>You can specify a KMS key using any of the following:</p>
/// <ul>
/// <li>
/// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Key alias. For example, alias/ExampleAlias.</p>
/// </li>
/// <li>
/// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p>
/// </li>
/// </ul>
/// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that is not valid,
/// the action can appear to complete, but eventually fails.</p>
/// <p>The specified KMS key must exist in the destination Region.</p>
/// <p>Amazon EBS does not support asymmetric KMS keys.</p>
pub fn kms_key_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.kms_key_id(inp);
self
}
/// <p>The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating
/// encrypted volumes. If this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is used.
/// If you specify a KMS key, you must also set the encrypted state to <code>true</code>.</p>
/// <p>You can specify a KMS key using any of the following:</p>
/// <ul>
/// <li>
/// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Key alias. For example, alias/ExampleAlias.</p>
/// </li>
/// <li>
/// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p>
/// </li>
/// </ul>
/// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that is not valid,
/// the action can appear to complete, but eventually fails.</p>
/// <p>The specified KMS key must exist in the destination Region.</p>
/// <p>Amazon EBS does not support asymmetric KMS keys.</p>
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_kms_key_id(input);
self
}
/// <p>The name of the new AMI in the destination Region.</p>
pub fn name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(inp);
self
}
/// <p>The name of the new AMI in the destination Region.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The ID of the AMI to copy.</p>
pub fn source_image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_image_id(inp);
self
}
/// <p>The ID of the AMI to copy.</p>
pub fn set_source_image_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_image_id(input);
self
}
/// <p>The name of the Region that contains the AMI to copy.</p>
pub fn source_region(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_region(inp);
self
}
/// <p>The name of the Region that contains the AMI to copy.</p>
pub fn set_source_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_region(input);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only
/// specify this parameter when copying an AMI from an Amazon Web Services Region to an Outpost.
/// The AMI must be in the Region of the destination Outpost. You cannot copy an
/// AMI from an Outpost to a Region, from one Outpost to another, or within the same
/// Outpost.</p>
///
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-amis">
/// Copying AMIs from an Amazon Web Services Region to an Outpost</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn destination_outpost_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_outpost_arn(inp);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only
/// specify this parameter when copying an AMI from an Amazon Web Services Region to an Outpost.
/// The AMI must be in the Region of the destination Outpost. You cannot copy an
/// AMI from an Outpost to a Region, from one Outpost to another, or within the same
/// Outpost.</p>
///
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-amis">
/// Copying AMIs from an Amazon Web Services Region to an Outpost</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_destination_outpost_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_outpost_arn(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CopySnapshot`.
///
/// <p>Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You can copy a
/// snapshot within the same Region, from one Region to another, or from a Region to an Outpost.
/// You can't copy a snapshot from an Outpost to a Region, from one Outpost to another, or within
/// the same Outpost.</p>
/// <p>You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs).</p>
///
///
/// <p>When copying snapshots to a Region, copies of encrypted EBS snapshots remain encrypted.
/// Copies of unencrypted snapshots remain unencrypted, unless you enable encryption for the
/// snapshot copy operation. By default, encrypted snapshot copies use the default Key Management Service (KMS)
/// KMS key; however, you can specify a different KMS key. To copy an encrypted
/// snapshot that has been shared from another account, you must have permissions for the KMS key
/// used to encrypt the snapshot.</p>
///
/// <p>Snapshots copied to an Outpost are encrypted by default using the default
/// encryption key for the Region, or a different key that you specify in the request using
/// <b>KmsKeyId</b>. Outposts do not support unencrypted
/// snapshots. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami">
/// Amazon EBS local snapshots on Outposts</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>Snapshots created by copying another snapshot have an arbitrary volume ID that should not
/// be used for any purpose.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html">Copy an Amazon EBS snapshot</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CopySnapshot<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::copy_snapshot_input::Builder,
}
impl<C, M, R> CopySnapshot<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CopySnapshot`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CopySnapshotOutput,
aws_smithy_http::result::SdkError<crate::error::CopySnapshotError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CopySnapshotInputOperationOutputAlias,
crate::output::CopySnapshotOutput,
crate::error::CopySnapshotError,
crate::input::CopySnapshotInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>A description for the EBS snapshot.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for the EBS snapshot.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost to which to copy the snapshot. Only
/// specify this parameter when copying a snapshot from an Amazon Web Services Region to an Outpost.
/// The snapshot must be in the Region for the destination Outpost. You cannot copy a
/// snapshot from an Outpost to a Region, from one Outpost to another, or within the same
/// Outpost.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-snapshots">
/// Copy snapshots from an Amazon Web Services Region to an Outpost</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn destination_outpost_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_outpost_arn(inp);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost to which to copy the snapshot. Only
/// specify this parameter when copying a snapshot from an Amazon Web Services Region to an Outpost.
/// The snapshot must be in the Region for the destination Outpost. You cannot copy a
/// snapshot from an Outpost to a Region, from one Outpost to another, or within the same
/// Outpost.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-snapshots">
/// Copy snapshots from an Amazon Web Services Region to an Outpost</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_destination_outpost_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_outpost_arn(input);
self
}
/// <p>The destination Region to use in the <code>PresignedUrl</code> parameter of a snapshot
/// copy operation. This parameter is only valid for specifying the destination Region in a
/// <code>PresignedUrl</code> parameter, where it is required.</p>
///
/// <p>The snapshot copy is sent to the regional endpoint that you sent the HTTP
/// request to (for example, <code>ec2.us-east-1.amazonaws.com</code>). With the CLI, this is
/// specified using the <code>--region</code> parameter or the default Region in your Amazon Web Services
/// configuration file.</p>
pub fn destination_region(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_region(inp);
self
}
/// <p>The destination Region to use in the <code>PresignedUrl</code> parameter of a snapshot
/// copy operation. This parameter is only valid for specifying the destination Region in a
/// <code>PresignedUrl</code> parameter, where it is required.</p>
///
/// <p>The snapshot copy is sent to the regional endpoint that you sent the HTTP
/// request to (for example, <code>ec2.us-east-1.amazonaws.com</code>). With the CLI, this is
/// specified using the <code>--region</code> parameter or the default Region in your Amazon Web Services
/// configuration file.</p>
pub fn set_destination_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_region(input);
self
}
/// <p>To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled,
/// enable encryption using this parameter. Otherwise, omit this parameter. Encrypted snapshots
/// are encrypted, even if you omit this parameter and encryption by default is not enabled. You
/// cannot set this parameter to false. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS encryption</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn encrypted(mut self, inp: bool) -> Self {
self.inner = self.inner.encrypted(inp);
self
}
/// <p>To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled,
/// enable encryption using this parameter. Otherwise, omit this parameter. Encrypted snapshots
/// are encrypted, even if you omit this parameter and encryption by default is not enabled. You
/// cannot set this parameter to false. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS encryption</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_encrypted(input);
self
}
/// <p>The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption.
/// If this parameter is not specified, your KMS key for Amazon EBS is used. If <code>KmsKeyId</code> is
/// specified, the encrypted state must be <code>true</code>.</p>
/// <p>You can specify the KMS key using any of the following:</p>
/// <ul>
/// <li>
/// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Key alias. For example, alias/ExampleAlias.</p>
/// </li>
/// <li>
/// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p>
/// </li>
/// </ul>
/// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid,
/// the action can appear to complete, but eventually fails.</p>
pub fn kms_key_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.kms_key_id(inp);
self
}
/// <p>The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption.
/// If this parameter is not specified, your KMS key for Amazon EBS is used. If <code>KmsKeyId</code> is
/// specified, the encrypted state must be <code>true</code>.</p>
/// <p>You can specify the KMS key using any of the following:</p>
/// <ul>
/// <li>
/// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Key alias. For example, alias/ExampleAlias.</p>
/// </li>
/// <li>
/// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p>
/// </li>
/// </ul>
/// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid,
/// the action can appear to complete, but eventually fails.</p>
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_kms_key_id(input);
self
}
/// <p>When you copy an encrypted source snapshot using the Amazon EC2 Query API, you must supply a
/// pre-signed URL. This parameter is optional for unencrypted snapshots. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html">Query
/// requests</a>.</p>
/// <p>The <code>PresignedUrl</code> should use the snapshot source endpoint, the
/// <code>CopySnapshot</code> action, and include the <code>SourceRegion</code>,
/// <code>SourceSnapshotId</code>, and <code>DestinationRegion</code> parameters. The
/// <code>PresignedUrl</code> must be signed using Amazon Web Services Signature Version 4. Because EBS
/// snapshots are stored in Amazon S3, the signing algorithm for this parameter uses the same logic
/// that is described in <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html">Authenticating Requests: Using Query
/// Parameters (Amazon Web Services Signature Version 4)</a> in the <i>Amazon Simple Storage Service API Reference</i>. An
/// invalid or improperly signed <code>PresignedUrl</code> will cause the copy operation to fail
/// asynchronously, and the snapshot will move to an <code>error</code> state.</p>
pub fn presigned_url(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.presigned_url(inp);
self
}
/// <p>When you copy an encrypted source snapshot using the Amazon EC2 Query API, you must supply a
/// pre-signed URL. This parameter is optional for unencrypted snapshots. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html">Query
/// requests</a>.</p>
/// <p>The <code>PresignedUrl</code> should use the snapshot source endpoint, the
/// <code>CopySnapshot</code> action, and include the <code>SourceRegion</code>,
/// <code>SourceSnapshotId</code>, and <code>DestinationRegion</code> parameters. The
/// <code>PresignedUrl</code> must be signed using Amazon Web Services Signature Version 4. Because EBS
/// snapshots are stored in Amazon S3, the signing algorithm for this parameter uses the same logic
/// that is described in <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html">Authenticating Requests: Using Query
/// Parameters (Amazon Web Services Signature Version 4)</a> in the <i>Amazon Simple Storage Service API Reference</i>. An
/// invalid or improperly signed <code>PresignedUrl</code> will cause the copy operation to fail
/// asynchronously, and the snapshot will move to an <code>error</code> state.</p>
pub fn set_presigned_url(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_presigned_url(input);
self
}
/// <p>The ID of the Region that contains the snapshot to be copied.</p>
pub fn source_region(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_region(inp);
self
}
/// <p>The ID of the Region that contains the snapshot to be copied.</p>
pub fn set_source_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_region(input);
self
}
/// <p>The ID of the EBS snapshot to copy.</p>
pub fn source_snapshot_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_snapshot_id(inp);
self
}
/// <p>The ID of the EBS snapshot to copy.</p>
pub fn set_source_snapshot_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_snapshot_id(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the new snapshot.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the new snapshot.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateCapacityReservation`.
///
/// <p>Creates a new Capacity Reservation with the specified attributes.</p>
/// <p>Capacity Reservations enable you to reserve capacity for your Amazon EC2 instances in a specific Availability Zone for any duration. This
/// gives you the flexibility to selectively add capacity reservations and still get the Regional RI discounts for that usage.
/// By creating Capacity Reservations, you ensure that you always have access to Amazon EC2 capacity when you need it, for as long as you need it.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html">Capacity Reservations</a> in the <i>Amazon EC2 User Guide</i>.</p>
///
/// <p>Your request to create a Capacity Reservation could fail if Amazon EC2 does not have sufficient capacity to
/// fulfill the request. If your request fails due to Amazon EC2 capacity constraints, either try
/// again at a later time, try in a different Availability Zone, or request a smaller
/// capacity reservation. If your application is flexible across instance types and sizes,
/// try to create a Capacity Reservation with different instance attributes.</p>
///
/// <p>Your request could also fail if the requested quantity exceeds your On-Demand Instance
/// limit for the selected instance type. If your request fails due to limit constraints,
/// increase your On-Demand Instance limit for the required instance type and try again. For
/// more information about increasing your instance limits, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html">Amazon EC2 Service
/// Quotas</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateCapacityReservation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_capacity_reservation_input::Builder,
}
impl<C, M, R> CreateCapacityReservation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateCapacityReservation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateCapacityReservationOutput,
aws_smithy_http::result::SdkError<crate::error::CreateCapacityReservationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateCapacityReservationInputOperationOutputAlias,
crate::output::CreateCapacityReservationOutput,
crate::error::CreateCapacityReservationError,
crate::input::CreateCapacityReservationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensure Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensure Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>The instance type for which to reserve capacity. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn instance_type(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_type(inp);
self
}
/// <p>The instance type for which to reserve capacity. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_instance_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_instance_type(input);
self
}
/// <p>The type of operating system for which to reserve capacity.</p>
pub fn instance_platform(
mut self,
inp: crate::model::CapacityReservationInstancePlatform,
) -> Self {
self.inner = self.inner.instance_platform(inp);
self
}
/// <p>The type of operating system for which to reserve capacity.</p>
pub fn set_instance_platform(
mut self,
input: std::option::Option<crate::model::CapacityReservationInstancePlatform>,
) -> Self {
self.inner = self.inner.set_instance_platform(input);
self
}
/// <p>The Availability Zone in which to create the Capacity Reservation.</p>
pub fn availability_zone(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zone(inp);
self
}
/// <p>The Availability Zone in which to create the Capacity Reservation.</p>
pub fn set_availability_zone(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_availability_zone(input);
self
}
/// <p>The ID of the Availability Zone in which to create the Capacity Reservation.</p>
pub fn availability_zone_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zone_id(inp);
self
}
/// <p>The ID of the Availability Zone in which to create the Capacity Reservation.</p>
pub fn set_availability_zone_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_availability_zone_id(input);
self
}
/// <p>Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:</p>
/// <ul>
/// <li>
/// <p>
/// <code>default</code> - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.</p>
/// </li>
/// <li>
/// <p>
/// <code>dedicated</code> - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p>
/// </li>
/// </ul>
pub fn tenancy(mut self, inp: crate::model::CapacityReservationTenancy) -> Self {
self.inner = self.inner.tenancy(inp);
self
}
/// <p>Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:</p>
/// <ul>
/// <li>
/// <p>
/// <code>default</code> - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.</p>
/// </li>
/// <li>
/// <p>
/// <code>dedicated</code> - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p>
/// </li>
/// </ul>
pub fn set_tenancy(
mut self,
input: std::option::Option<crate::model::CapacityReservationTenancy>,
) -> Self {
self.inner = self.inner.set_tenancy(input);
self
}
/// <p>The number of instances for which to reserve capacity.</p>
/// <p>Valid range: 1 - 1000</p>
pub fn instance_count(mut self, inp: i32) -> Self {
self.inner = self.inner.instance_count(inp);
self
}
/// <p>The number of instances for which to reserve capacity.</p>
/// <p>Valid range: 1 - 1000</p>
pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_instance_count(input);
self
}
/// <p>Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides
/// dedicated throughput to Amazon EBS and an optimized configuration stack to provide
/// optimal I/O performance. This optimization isn't available with all instance types.
/// Additional usage charges apply when using an EBS- optimized instance.</p>
pub fn ebs_optimized(mut self, inp: bool) -> Self {
self.inner = self.inner.ebs_optimized(inp);
self
}
/// <p>Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides
/// dedicated throughput to Amazon EBS and an optimized configuration stack to provide
/// optimal I/O performance. This optimization isn't available with all instance types.
/// Additional usage charges apply when using an EBS- optimized instance.</p>
pub fn set_ebs_optimized(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_ebs_optimized(input);
self
}
/// <p>Indicates whether the Capacity Reservation supports instances with temporary, block-level
/// storage.</p>
pub fn ephemeral_storage(mut self, inp: bool) -> Self {
self.inner = self.inner.ephemeral_storage(inp);
self
}
/// <p>Indicates whether the Capacity Reservation supports instances with temporary, block-level
/// storage.</p>
pub fn set_ephemeral_storage(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_ephemeral_storage(input);
self
}
/// <p>The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity
/// is released and you can no longer launch instances into it. The Capacity Reservation's state changes to
/// <code>expired</code> when it reaches its end date and time.</p>
/// <p>You must provide an <code>EndDate</code> value if <code>EndDateType</code> is
/// <code>limited</code>. Omit <code>EndDate</code> if <code>EndDateType</code> is
/// <code>unlimited</code>.</p>
///
/// <p>If the <code>EndDateType</code> is <code>limited</code>, the Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify
/// 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.</p>
pub fn end_date(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.end_date(inp);
self
}
/// <p>The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity
/// is released and you can no longer launch instances into it. The Capacity Reservation's state changes to
/// <code>expired</code> when it reaches its end date and time.</p>
/// <p>You must provide an <code>EndDate</code> value if <code>EndDateType</code> is
/// <code>limited</code>. Omit <code>EndDate</code> if <code>EndDateType</code> is
/// <code>unlimited</code>.</p>
///
/// <p>If the <code>EndDateType</code> is <code>limited</code>, the Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify
/// 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.</p>
pub fn set_end_date(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_end_date(input);
self
}
/// <p>Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end
/// types:</p>
/// <ul>
/// <li>
/// <p>
/// <code>unlimited</code> - The Capacity Reservation remains active until you explicitly cancel it. Do not
/// provide an <code>EndDate</code> if the <code>EndDateType</code> is
/// <code>unlimited</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>limited</code> - The Capacity Reservation expires automatically at a specified date and time. You must
/// provide an <code>EndDate</code> value if the <code>EndDateType</code> value is
/// <code>limited</code>.</p>
/// </li>
/// </ul>
pub fn end_date_type(mut self, inp: crate::model::EndDateType) -> Self {
self.inner = self.inner.end_date_type(inp);
self
}
/// <p>Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end
/// types:</p>
/// <ul>
/// <li>
/// <p>
/// <code>unlimited</code> - The Capacity Reservation remains active until you explicitly cancel it. Do not
/// provide an <code>EndDate</code> if the <code>EndDateType</code> is
/// <code>unlimited</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>limited</code> - The Capacity Reservation expires automatically at a specified date and time. You must
/// provide an <code>EndDate</code> value if the <code>EndDateType</code> value is
/// <code>limited</code>.</p>
/// </li>
/// </ul>
pub fn set_end_date_type(
mut self,
input: std::option::Option<crate::model::EndDateType>,
) -> Self {
self.inner = self.inner.set_end_date_type(input);
self
}
/// <p>Indicates the type of instance launches that the Capacity Reservation accepts. The options
/// include:</p>
/// <ul>
/// <li>
/// <p>
/// <code>open</code> - The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform,
/// and Availability Zone). Instances that have matching attributes run in the Capacity Reservation automatically without specifying
/// any additional parameters.</p>
/// </li>
/// <li>
/// <p>
/// <code>targeted</code> - The Capacity Reservation only accepts instances that have matching attributes
/// (instance type, platform, and Availability Zone), and explicitly target the
/// Capacity Reservation. This ensures that only permitted instances can use the reserved capacity. </p>
/// </li>
/// </ul>
/// <p>Default: <code>open</code>
/// </p>
pub fn instance_match_criteria(mut self, inp: crate::model::InstanceMatchCriteria) -> Self {
self.inner = self.inner.instance_match_criteria(inp);
self
}
/// <p>Indicates the type of instance launches that the Capacity Reservation accepts. The options
/// include:</p>
/// <ul>
/// <li>
/// <p>
/// <code>open</code> - The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform,
/// and Availability Zone). Instances that have matching attributes run in the Capacity Reservation automatically without specifying
/// any additional parameters.</p>
/// </li>
/// <li>
/// <p>
/// <code>targeted</code> - The Capacity Reservation only accepts instances that have matching attributes
/// (instance type, platform, and Availability Zone), and explicitly target the
/// Capacity Reservation. This ensures that only permitted instances can use the reserved capacity. </p>
/// </li>
/// </ul>
/// <p>Default: <code>open</code>
/// </p>
pub fn set_instance_match_criteria(
mut self,
input: std::option::Option<crate::model::InstanceMatchCriteria>,
) -> Self {
self.inner = self.inner.set_instance_match_criteria(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the Capacity Reservation during launch.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the Capacity Reservation during launch.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.</p>
pub fn outpost_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.outpost_arn(inp);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.</p>
pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_outpost_arn(input);
self
}
}
/// Fluent builder constructing a request to `CreateCapacityReservationFleet`.
///
/// <p>Creates a Capacity Reservation Fleet. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/work-with-cr-fleets.html#create-crfleet">Create a Capacity
/// Reservation Fleet</a> in the Amazon EC2 User Guide.</p>
#[derive(std::fmt::Debug)]
pub struct CreateCapacityReservationFleet<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_capacity_reservation_fleet_input::Builder,
}
impl<C, M, R> CreateCapacityReservationFleet<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateCapacityReservationFleet`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateCapacityReservationFleetOutput,
aws_smithy_http::result::SdkError<crate::error::CreateCapacityReservationFleetError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateCapacityReservationFleetInputOperationOutputAlias,
crate::output::CreateCapacityReservationFleetOutput,
crate::error::CreateCapacityReservationFleetError,
crate::input::CreateCapacityReservationFleetInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The strategy used by the Capacity Reservation Fleet to determine which of the
/// specified instance types to use. Currently, only the <code>prioritized</code>
/// allocation strategy is supported. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#allocation-strategy">
/// Allocation strategy</a> in the Amazon EC2 User Guide.</p>
/// <p>Valid values: <code>prioritized</code>
/// </p>
pub fn allocation_strategy(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.allocation_strategy(inp);
self
}
/// <p>The strategy used by the Capacity Reservation Fleet to determine which of the
/// specified instance types to use. Currently, only the <code>prioritized</code>
/// allocation strategy is supported. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#allocation-strategy">
/// Allocation strategy</a> in the Amazon EC2 User Guide.</p>
/// <p>Valid values: <code>prioritized</code>
/// </p>
pub fn set_allocation_strategy(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_allocation_strategy(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensure Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensure Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// Appends an item to `InstanceTypeSpecifications`.
///
/// To override the contents of this collection use [`set_instance_type_specifications`](Self::set_instance_type_specifications).
///
/// <p>Information about the instance types for which to reserve the capacity.</p>
pub fn instance_type_specifications(
mut self,
inp: impl Into<crate::model::ReservationFleetInstanceSpecification>,
) -> Self {
self.inner = self.inner.instance_type_specifications(inp);
self
}
/// <p>Information about the instance types for which to reserve the capacity.</p>
pub fn set_instance_type_specifications(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::ReservationFleetInstanceSpecification>,
>,
) -> Self {
self.inner = self.inner.set_instance_type_specifications(input);
self
}
/// <p>Indicates the tenancy of the Capacity Reservation Fleet. All Capacity Reservations
/// in the Fleet inherit this tenancy. The Capacity Reservation Fleet can have one of
/// the following tenancy settings:</p>
/// <ul>
/// <li>
/// <p>
/// <code>default</code> - The Capacity Reservation Fleet is created on hardware
/// that is shared with other Amazon Web Services accounts.</p>
/// </li>
/// <li>
/// <p>
/// <code>dedicated</code> - The Capacity Reservations are created on single-tenant
/// hardware that is dedicated to a single Amazon Web Services account.</p>
/// </li>
/// </ul>
pub fn tenancy(mut self, inp: crate::model::FleetCapacityReservationTenancy) -> Self {
self.inner = self.inner.tenancy(inp);
self
}
/// <p>Indicates the tenancy of the Capacity Reservation Fleet. All Capacity Reservations
/// in the Fleet inherit this tenancy. The Capacity Reservation Fleet can have one of
/// the following tenancy settings:</p>
/// <ul>
/// <li>
/// <p>
/// <code>default</code> - The Capacity Reservation Fleet is created on hardware
/// that is shared with other Amazon Web Services accounts.</p>
/// </li>
/// <li>
/// <p>
/// <code>dedicated</code> - The Capacity Reservations are created on single-tenant
/// hardware that is dedicated to a single Amazon Web Services account.</p>
/// </li>
/// </ul>
pub fn set_tenancy(
mut self,
input: std::option::Option<crate::model::FleetCapacityReservationTenancy>,
) -> Self {
self.inner = self.inner.set_tenancy(input);
self
}
/// <p>The total number of capacity units to be reserved by the Capacity Reservation Fleet. This
/// value, together with the instance type weights that you assign to each instance type used by
/// the Fleet determine the number of instances for which the Fleet reserves capacity. Both values
/// are based on units that make sense for your workload. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity">
/// Total target capacity</a> in the Amazon EC2 User Guide.</p>
pub fn total_target_capacity(mut self, inp: i32) -> Self {
self.inner = self.inner.total_target_capacity(inp);
self
}
/// <p>The total number of capacity units to be reserved by the Capacity Reservation Fleet. This
/// value, together with the instance type weights that you assign to each instance type used by
/// the Fleet determine the number of instances for which the Fleet reserves capacity. Both values
/// are based on units that make sense for your workload. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity">
/// Total target capacity</a> in the Amazon EC2 User Guide.</p>
pub fn set_total_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_total_target_capacity(input);
self
}
/// <p>The date and time at which the Capacity Reservation Fleet expires. When the Capacity
/// Reservation Fleet expires, its state changes to <code>expired</code> and all of the Capacity
/// Reservations in the Fleet expire.</p>
/// <p>The Capacity Reservation Fleet expires within an hour after the specified time. For example,
/// if you specify <code>5/31/2019</code>, <code>13:30:55</code>, the Capacity Reservation Fleet
/// is guaranteed to expire between <code>13:30:55</code> and <code>14:30:55</code> on
/// <code>5/31/2019</code>.
/// </p>
pub fn end_date(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.end_date(inp);
self
}
/// <p>The date and time at which the Capacity Reservation Fleet expires. When the Capacity
/// Reservation Fleet expires, its state changes to <code>expired</code> and all of the Capacity
/// Reservations in the Fleet expire.</p>
/// <p>The Capacity Reservation Fleet expires within an hour after the specified time. For example,
/// if you specify <code>5/31/2019</code>, <code>13:30:55</code>, the Capacity Reservation Fleet
/// is guaranteed to expire between <code>13:30:55</code> and <code>14:30:55</code> on
/// <code>5/31/2019</code>.
/// </p>
pub fn set_end_date(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_end_date(input);
self
}
/// <p>Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All
/// Capacity Reservations in the Fleet inherit this instance matching criteria.</p>
/// <p>Currently, Capacity Reservation Fleets support <code>open</code> instance matching criteria
/// only. This means that instances that have matching attributes (instance type, platform, and
/// Availability Zone) run in the Capacity Reservations automatically. Instances do not need to
/// explicitly target a Capacity Reservation Fleet to use its reserved capacity.</p>
pub fn instance_match_criteria(
mut self,
inp: crate::model::FleetInstanceMatchCriteria,
) -> Self {
self.inner = self.inner.instance_match_criteria(inp);
self
}
/// <p>Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All
/// Capacity Reservations in the Fleet inherit this instance matching criteria.</p>
/// <p>Currently, Capacity Reservation Fleets support <code>open</code> instance matching criteria
/// only. This means that instances that have matching attributes (instance type, platform, and
/// Availability Zone) run in the Capacity Reservations automatically. Instances do not need to
/// explicitly target a Capacity Reservation Fleet to use its reserved capacity.</p>
pub fn set_instance_match_criteria(
mut self,
input: std::option::Option<crate::model::FleetInstanceMatchCriteria>,
) -> Self {
self.inner = self.inner.set_instance_match_criteria(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the Capacity Reservation Fleet. The tags are automatically assigned
/// to the Capacity Reservations in the Fleet.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the Capacity Reservation Fleet. The tags are automatically assigned
/// to the Capacity Reservations in the Fleet.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateCarrierGateway`.
///
/// <p>Creates a carrier gateway. For more information about carrier gateways, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#wavelength-carrier-gateway">Carrier gateways</a> in the <i>Amazon Web Services Wavelength Developer Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateCarrierGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_carrier_gateway_input::Builder,
}
impl<C, M, R> CreateCarrierGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateCarrierGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateCarrierGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::CreateCarrierGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateCarrierGatewayInputOperationOutputAlias,
crate::output::CreateCarrierGatewayOutput,
crate::error::CreateCarrierGatewayError,
crate::input::CreateCarrierGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the VPC to associate with the carrier gateway.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC to associate with the carrier gateway.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to associate with the carrier gateway.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to associate with the carrier gateway.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `CreateClientVpnEndpoint`.
///
/// <p>Creates a Client VPN endpoint. A Client VPN endpoint is the resource you create and configure to
/// enable and manage client VPN sessions. It is the destination endpoint at which all client VPN sessions
/// are terminated.</p>
#[derive(std::fmt::Debug)]
pub struct CreateClientVpnEndpoint<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_client_vpn_endpoint_input::Builder,
}
impl<C, M, R> CreateClientVpnEndpoint<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateClientVpnEndpoint`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateClientVpnEndpointOutput,
aws_smithy_http::result::SdkError<crate::error::CreateClientVpnEndpointError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateClientVpnEndpointInputOperationOutputAlias,
crate::output::CreateClientVpnEndpointOutput,
crate::error::CreateClientVpnEndpointError,
crate::input::CreateClientVpnEndpointInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. The CIDR block should be /22 or greater.</p>
pub fn client_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_cidr_block(inp);
self
}
/// <p>The IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. The CIDR block should be /22 or greater.</p>
pub fn set_client_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_cidr_block(input);
self
}
/// <p>The ARN of the server certificate. For more information, see
/// the <a href="https://docs.aws.amazon.com/acm/latest/userguide/">Certificate Manager User Guide</a>.</p>
pub fn server_certificate_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.server_certificate_arn(inp);
self
}
/// <p>The ARN of the server certificate. For more information, see
/// the <a href="https://docs.aws.amazon.com/acm/latest/userguide/">Certificate Manager User Guide</a>.</p>
pub fn set_server_certificate_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_server_certificate_arn(input);
self
}
/// Appends an item to `AuthenticationOptions`.
///
/// To override the contents of this collection use [`set_authentication_options`](Self::set_authentication_options).
///
/// <p>Information about the authentication method to be used to authenticate clients.</p>
pub fn authentication_options(
mut self,
inp: impl Into<crate::model::ClientVpnAuthenticationRequest>,
) -> Self {
self.inner = self.inner.authentication_options(inp);
self
}
/// <p>Information about the authentication method to be used to authenticate clients.</p>
pub fn set_authentication_options(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ClientVpnAuthenticationRequest>>,
) -> Self {
self.inner = self.inner.set_authentication_options(input);
self
}
/// <p>Information about the client connection logging options.</p>
/// <p>If you enable client connection logging, data about client connections is sent to a
/// Cloudwatch Logs log stream. The following information is logged:</p>
/// <ul>
/// <li>
/// <p>Client connection requests</p>
/// </li>
/// <li>
/// <p>Client connection results (successful and unsuccessful)</p>
/// </li>
/// <li>
/// <p>Reasons for unsuccessful client connection requests</p>
/// </li>
/// <li>
/// <p>Client connection termination time</p>
/// </li>
/// </ul>
pub fn connection_log_options(mut self, inp: crate::model::ConnectionLogOptions) -> Self {
self.inner = self.inner.connection_log_options(inp);
self
}
/// <p>Information about the client connection logging options.</p>
/// <p>If you enable client connection logging, data about client connections is sent to a
/// Cloudwatch Logs log stream. The following information is logged:</p>
/// <ul>
/// <li>
/// <p>Client connection requests</p>
/// </li>
/// <li>
/// <p>Client connection results (successful and unsuccessful)</p>
/// </li>
/// <li>
/// <p>Reasons for unsuccessful client connection requests</p>
/// </li>
/// <li>
/// <p>Client connection termination time</p>
/// </li>
/// </ul>
pub fn set_connection_log_options(
mut self,
input: std::option::Option<crate::model::ConnectionLogOptions>,
) -> Self {
self.inner = self.inner.set_connection_log_options(input);
self
}
/// Appends an item to `DnsServers`.
///
/// To override the contents of this collection use [`set_dns_servers`](Self::set_dns_servers).
///
/// <p>Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can
/// have up to two DNS servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS server.</p>
pub fn dns_servers(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.dns_servers(inp);
self
}
/// <p>Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can
/// have up to two DNS servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS server.</p>
pub fn set_dns_servers(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_dns_servers(input);
self
}
/// <p>The transport protocol to be used by the VPN session.</p>
/// <p>Default value: <code>udp</code>
/// </p>
pub fn transport_protocol(mut self, inp: crate::model::TransportProtocol) -> Self {
self.inner = self.inner.transport_protocol(inp);
self
}
/// <p>The transport protocol to be used by the VPN session.</p>
/// <p>Default value: <code>udp</code>
/// </p>
pub fn set_transport_protocol(
mut self,
input: std::option::Option<crate::model::TransportProtocol>,
) -> Self {
self.inner = self.inner.set_transport_protocol(input);
self
}
/// <p>The port number to assign to the Client VPN endpoint for TCP and UDP traffic.</p>
/// <p>Valid Values: <code>443</code> | <code>1194</code>
/// </p>
/// <p>Default Value: <code>443</code>
/// </p>
pub fn vpn_port(mut self, inp: i32) -> Self {
self.inner = self.inner.vpn_port(inp);
self
}
/// <p>The port number to assign to the Client VPN endpoint for TCP and UDP traffic.</p>
/// <p>Valid Values: <code>443</code> | <code>1194</code>
/// </p>
/// <p>Default Value: <code>443</code>
/// </p>
pub fn set_vpn_port(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_vpn_port(input);
self
}
/// <p>A brief description of the Client VPN endpoint.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A brief description of the Client VPN endpoint.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>Indicates whether split-tunnel is enabled on the Client VPN endpoint.</p>
/// <p>By default, split-tunnel on a VPN endpoint is disabled.</p>
/// <p>For information about split-tunnel VPN endpoints, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html">Split-tunnel Client VPN endpoint</a> in the
/// <i>Client VPN Administrator Guide</i>.</p>
pub fn split_tunnel(mut self, inp: bool) -> Self {
self.inner = self.inner.split_tunnel(inp);
self
}
/// <p>Indicates whether split-tunnel is enabled on the Client VPN endpoint.</p>
/// <p>By default, split-tunnel on a VPN endpoint is disabled.</p>
/// <p>For information about split-tunnel VPN endpoints, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html">Split-tunnel Client VPN endpoint</a> in the
/// <i>Client VPN Administrator Guide</i>.</p>
pub fn set_split_tunnel(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_split_tunnel(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the Client VPN endpoint during creation.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the Client VPN endpoint during creation.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// Appends an item to `SecurityGroupIds`.
///
/// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
///
/// <p>The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC that contains the security groups.</p>
pub fn security_group_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.security_group_ids(inp);
self
}
/// <p>The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC that contains the security groups.</p>
pub fn set_security_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_security_group_ids(input);
self
}
/// <p>The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the request, the default security group for the VPC is applied.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the request, the default security group for the VPC is applied.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// <p>Specify whether to enable the self-service portal for the Client VPN endpoint.</p>
/// <p>Default Value: <code>enabled</code>
/// </p>
pub fn self_service_portal(mut self, inp: crate::model::SelfServicePortal) -> Self {
self.inner = self.inner.self_service_portal(inp);
self
}
/// <p>Specify whether to enable the self-service portal for the Client VPN endpoint.</p>
/// <p>Default Value: <code>enabled</code>
/// </p>
pub fn set_self_service_portal(
mut self,
input: std::option::Option<crate::model::SelfServicePortal>,
) -> Self {
self.inner = self.inner.set_self_service_portal(input);
self
}
/// <p>The options for managing connection authorization for new client connections.</p>
pub fn client_connect_options(mut self, inp: crate::model::ClientConnectOptions) -> Self {
self.inner = self.inner.client_connect_options(inp);
self
}
/// <p>The options for managing connection authorization for new client connections.</p>
pub fn set_client_connect_options(
mut self,
input: std::option::Option<crate::model::ClientConnectOptions>,
) -> Self {
self.inner = self.inner.set_client_connect_options(input);
self
}
}
/// Fluent builder constructing a request to `CreateClientVpnRoute`.
///
/// <p>Adds a route to a network to a Client VPN endpoint. Each Client VPN endpoint has a route table that describes the
/// available destination network routes. Each route in the route table specifies the path for traffic to specific resources or networks.</p>
#[derive(std::fmt::Debug)]
pub struct CreateClientVpnRoute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_client_vpn_route_input::Builder,
}
impl<C, M, R> CreateClientVpnRoute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateClientVpnRoute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateClientVpnRouteOutput,
aws_smithy_http::result::SdkError<crate::error::CreateClientVpnRouteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateClientVpnRouteInputOperationOutputAlias,
crate::output::CreateClientVpnRouteOutput,
crate::error::CreateClientVpnRouteError,
crate::input::CreateClientVpnRouteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint to which to add the route.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint to which to add the route.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <p>The IPv4 address range, in CIDR notation, of the route destination. For example:</p>
/// <ul>
/// <li>
/// <p>To add a route for Internet access, enter <code>0.0.0.0/0</code>
/// </p>
/// </li>
/// <li>
/// <p>To add a route for a peered VPC, enter the peered VPC's IPv4 CIDR range</p>
/// </li>
/// <li>
/// <p>To add a route for an on-premises network, enter the Amazon Web Services Site-to-Site VPN connection's IPv4 CIDR range</p>
/// </li>
/// <li>
/// <p>To add a route for the local network, enter the client CIDR range</p>
/// </li>
/// </ul>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The IPv4 address range, in CIDR notation, of the route destination. For example:</p>
/// <ul>
/// <li>
/// <p>To add a route for Internet access, enter <code>0.0.0.0/0</code>
/// </p>
/// </li>
/// <li>
/// <p>To add a route for a peered VPC, enter the peered VPC's IPv4 CIDR range</p>
/// </li>
/// <li>
/// <p>To add a route for an on-premises network, enter the Amazon Web Services Site-to-Site VPN connection's IPv4 CIDR range</p>
/// </li>
/// <li>
/// <p>To add a route for the local network, enter the client CIDR range</p>
/// </li>
/// </ul>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <p>The ID of the subnet through which you want to route traffic. The specified subnet must be
/// an existing target network of the Client VPN endpoint.</p>
/// <p>Alternatively, if you're adding a route for the local network, specify <code>local</code>.</p>
pub fn target_vpc_subnet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.target_vpc_subnet_id(inp);
self
}
/// <p>The ID of the subnet through which you want to route traffic. The specified subnet must be
/// an existing target network of the Client VPN endpoint.</p>
/// <p>Alternatively, if you're adding a route for the local network, specify <code>local</code>.</p>
pub fn set_target_vpc_subnet_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_target_vpc_subnet_id(input);
self
}
/// <p>A brief description of the route.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A brief description of the route.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateCustomerGateway`.
///
/// <p>Provides information to Amazon Web Services about your VPN customer gateway device. The
/// customer gateway is the appliance at your end of the VPN connection. (The device on the
/// Amazon Web Services side of the VPN connection is the virtual private gateway.) You
/// must provide the internet-routable IP address of the customer gateway's external
/// interface. The IP address must be static and can be behind a device performing network
/// address translation (NAT).</p>
/// <p>For devices that use Border Gateway Protocol (BGP), you can also provide the device's
/// BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your
/// network. If you don't have an ASN already, you can use a private ASN (in the 64512 -
/// 65534 range).</p>
/// <note>
/// <p>Amazon EC2 supports all 4-byte ASN numbers in the range of 1 - 2147483647, with
/// the exception of the following:</p>
/// <ul>
/// <li>
/// <p>7224 - reserved in the <code>us-east-1</code> Region</p>
/// </li>
/// <li>
/// <p>9059 - reserved in the <code>eu-west-1</code> Region</p>
/// </li>
/// <li>
/// <p>17943 - reserved in the <code>ap-southeast-1</code> Region</p>
/// </li>
/// <li>
/// <p>10124 - reserved in the <code>ap-northeast-1</code> Region</p>
/// </li>
/// </ul>
/// </note>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">Amazon Web Services Site-to-Site VPN</a> in the <i>Amazon Web Services Site-to-Site VPN
/// User Guide</i>.</p>
/// <important>
/// <p>To create more than one customer gateway with the same VPN type, IP address, and
/// BGP ASN, specify a unique device name for each customer gateway. Identical requests
/// return information about the existing customer gateway and do not create new
/// customer gateways.</p>
/// </important>
#[derive(std::fmt::Debug)]
pub struct CreateCustomerGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_customer_gateway_input::Builder,
}
impl<C, M, R> CreateCustomerGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateCustomerGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateCustomerGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::CreateCustomerGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateCustomerGatewayInputOperationOutputAlias,
crate::output::CreateCustomerGatewayOutput,
crate::error::CreateCustomerGatewayError,
crate::input::CreateCustomerGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>For devices that support BGP, the customer gateway's BGP ASN.</p>
/// <p>Default: 65000</p>
pub fn bgp_asn(mut self, inp: i32) -> Self {
self.inner = self.inner.bgp_asn(inp);
self
}
/// <p>For devices that support BGP, the customer gateway's BGP ASN.</p>
/// <p>Default: 65000</p>
pub fn set_bgp_asn(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_bgp_asn(input);
self
}
/// <p>The Internet-routable IP address for the customer gateway's outside interface. The
/// address must be static.</p>
pub fn public_ip(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.public_ip(inp);
self
}
/// <p>The Internet-routable IP address for the customer gateway's outside interface. The
/// address must be static.</p>
pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_public_ip(input);
self
}
/// <p>The Amazon Resource Name (ARN) for the customer gateway certificate.</p>
pub fn certificate_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.certificate_arn(inp);
self
}
/// <p>The Amazon Resource Name (ARN) for the customer gateway certificate.</p>
pub fn set_certificate_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_certificate_arn(input);
self
}
/// <p>The type of VPN connection that this customer gateway supports
/// (<code>ipsec.1</code>).</p>
pub fn r#type(mut self, inp: crate::model::GatewayType) -> Self {
self.inner = self.inner.r#type(inp);
self
}
/// <p>The type of VPN connection that this customer gateway supports
/// (<code>ipsec.1</code>).</p>
pub fn set_type(mut self, input: std::option::Option<crate::model::GatewayType>) -> Self {
self.inner = self.inner.set_type(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the customer gateway.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the customer gateway.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>A name for the customer gateway device.</p>
/// <p>Length Constraints: Up to 255 characters.</p>
pub fn device_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.device_name(inp);
self
}
/// <p>A name for the customer gateway device.</p>
/// <p>Length Constraints: Up to 255 characters.</p>
pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_device_name(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateDefaultSubnet`.
///
/// <p>Creates a default subnet with a size <code>/20</code> IPv4 CIDR block in the
/// specified Availability Zone in your default VPC. You can have only one default subnet
/// per Availability Zone. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html#create-default-subnet">Creating a default
/// subnet</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateDefaultSubnet<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_default_subnet_input::Builder,
}
impl<C, M, R> CreateDefaultSubnet<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateDefaultSubnet`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateDefaultSubnetOutput,
aws_smithy_http::result::SdkError<crate::error::CreateDefaultSubnetError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateDefaultSubnetInputOperationOutputAlias,
crate::output::CreateDefaultSubnetOutput,
crate::error::CreateDefaultSubnetError,
crate::input::CreateDefaultSubnetInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The Availability Zone in which to create the default subnet.</p>
pub fn availability_zone(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zone(inp);
self
}
/// <p>The Availability Zone in which to create the default subnet.</p>
pub fn set_availability_zone(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_availability_zone(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateDefaultVpc`.
///
/// <p>Creates a default VPC with a size <code>/16</code> IPv4 CIDR block and a default subnet
/// in each Availability Zone. For more information about the components of a default VPC,
/// see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html">Default VPC and
/// default subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>. You cannot
/// specify the components of the default VPC yourself.</p>
/// <p>If you deleted your previous default VPC, you can create a default VPC. You cannot have
/// more than one default VPC per Region.</p>
/// <p>If your account supports EC2-Classic, you cannot use this action to create a default VPC
/// in a Region that supports EC2-Classic. If you want a default VPC in a Region that
/// supports EC2-Classic, see "I really want a default VPC for my existing EC2 account. Is
/// that possible?" in the <a href="http://aws.amazon.com/vpc/faqs/#Default_VPCs">Default VPCs
/// FAQ</a>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateDefaultVpc<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_default_vpc_input::Builder,
}
impl<C, M, R> CreateDefaultVpc<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateDefaultVpc`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateDefaultVpcOutput,
aws_smithy_http::result::SdkError<crate::error::CreateDefaultVpcError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateDefaultVpcInputOperationOutputAlias,
crate::output::CreateDefaultVpcOutput,
crate::error::CreateDefaultVpcError,
crate::input::CreateDefaultVpcInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateDhcpOptions`.
///
/// <p>Creates a set of DHCP options for your VPC. After creating the set, you must
/// associate it with the VPC, causing all existing and new instances that you launch in
/// the VPC to use this set of DHCP options. The following are the individual DHCP
/// options you can specify. For more information about the options, see <a href="http://www.ietf.org/rfc/rfc2132.txt">RFC 2132</a>.</p>
/// <ul>
/// <li>
/// <p>
/// <code>domain-name-servers</code> - The IP addresses of up to four domain name
/// servers, or AmazonProvidedDNS. The default DHCP option set specifies
/// AmazonProvidedDNS. If specifying more than one domain name server, specify the
/// IP addresses in a single parameter, separated by commas. To have your instance
/// receive a custom DNS hostname as specified in <code>domain-name</code>, you must
/// set <code>domain-name-servers</code> to a custom DNS server.</p>
/// </li>
/// <li>
/// <p>
/// <code>domain-name</code> - If you're using AmazonProvidedDNS in
/// <code>us-east-1</code>, specify <code>ec2.internal</code>. If you're using
/// AmazonProvidedDNS in another Region, specify
/// <code>region.compute.internal</code> (for example,
/// <code>ap-northeast-1.compute.internal</code>). Otherwise, specify a domain
/// name (for example, <code>ExampleCompany.com</code>). This value is used to complete
/// unqualified DNS hostnames. <b>Important</b>: Some
/// Linux operating systems accept multiple domain names separated by spaces.
/// However, Windows and other Linux operating systems treat the value as a single
/// domain, which results in unexpected behavior. If your DHCP options set is
/// associated with a VPC that has instances with multiple operating systems,
/// specify only one domain name.</p>
/// </li>
/// <li>
/// <p>
/// <code>ntp-servers</code> - The IP addresses of up to four Network Time Protocol (NTP)
/// servers.</p>
/// </li>
/// <li>
/// <p>
/// <code>netbios-name-servers</code> - The IP addresses of up to four NetBIOS name
/// servers.</p>
/// </li>
/// <li>
/// <p>
/// <code>netbios-node-type</code> - The NetBIOS node type (1, 2, 4, or 8). We recommend that
/// you specify 2 (broadcast and multicast are not currently supported). For more information
/// about these node types, see <a href="http://www.ietf.org/rfc/rfc2132.txt">RFC 2132</a>.</p>
/// </li>
/// </ul>
///
/// <p>Your VPC automatically starts out with a set of DHCP options that includes only a DNS
/// server that we provide (AmazonProvidedDNS). If you create a set of options, and if your
/// VPC has an internet gateway, make sure to set the <code>domain-name-servers</code>
/// option either to <code>AmazonProvidedDNS</code> or to a domain name server of your
/// choice. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html">DHCP options sets</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateDhcpOptions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_dhcp_options_input::Builder,
}
impl<C, M, R> CreateDhcpOptions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateDhcpOptions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateDhcpOptionsOutput,
aws_smithy_http::result::SdkError<crate::error::CreateDhcpOptionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateDhcpOptionsInputOperationOutputAlias,
crate::output::CreateDhcpOptionsOutput,
crate::error::CreateDhcpOptionsError,
crate::input::CreateDhcpOptionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `DhcpConfigurations`.
///
/// To override the contents of this collection use [`set_dhcp_configurations`](Self::set_dhcp_configurations).
///
/// <p>A DHCP configuration option.</p>
pub fn dhcp_configurations(
mut self,
inp: impl Into<crate::model::NewDhcpConfiguration>,
) -> Self {
self.inner = self.inner.dhcp_configurations(inp);
self
}
/// <p>A DHCP configuration option.</p>
pub fn set_dhcp_configurations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::NewDhcpConfiguration>>,
) -> Self {
self.inner = self.inner.set_dhcp_configurations(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the DHCP option.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the DHCP option.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateEgressOnlyInternetGateway`.
///
/// <p>[IPv6 only] Creates an egress-only internet gateway for your VPC. An egress-only
/// internet gateway is used to enable outbound communication over IPv6 from instances in
/// your VPC to the internet, and prevents hosts outside of your VPC from initiating an IPv6
/// connection with your instance.</p>
#[derive(std::fmt::Debug)]
pub struct CreateEgressOnlyInternetGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_egress_only_internet_gateway_input::Builder,
}
impl<C, M, R> CreateEgressOnlyInternetGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateEgressOnlyInternetGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateEgressOnlyInternetGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::CreateEgressOnlyInternetGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateEgressOnlyInternetGatewayInputOperationOutputAlias,
crate::output::CreateEgressOnlyInternetGatewayOutput,
crate::error::CreateEgressOnlyInternetGatewayError,
crate::input::CreateEgressOnlyInternetGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the VPC for which to create the egress-only internet gateway.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC for which to create the egress-only internet gateway.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the egress-only internet gateway.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the egress-only internet gateway.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateFleet`.
///
/// <p>Launches an EC2 Fleet.</p>
/// <p>You can create a single EC2 Fleet that includes multiple launch specifications that vary by
/// instance type, AMI, Availability Zone, or subnet.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html">Launching an EC2 Fleet</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateFleet<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_fleet_input::Builder,
}
impl<C, M, R> CreateFleet<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateFleet`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateFleetOutput,
aws_smithy_http::result::SdkError<crate::error::CreateFleetError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateFleetInputOperationOutputAlias,
crate::output::CreateFleetOutput,
crate::error::CreateFleetError,
crate::input::CreateFleetInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>Describes the configuration of Spot Instances in an EC2 Fleet.</p>
pub fn spot_options(mut self, inp: crate::model::SpotOptionsRequest) -> Self {
self.inner = self.inner.spot_options(inp);
self
}
/// <p>Describes the configuration of Spot Instances in an EC2 Fleet.</p>
pub fn set_spot_options(
mut self,
input: std::option::Option<crate::model::SpotOptionsRequest>,
) -> Self {
self.inner = self.inner.set_spot_options(input);
self
}
/// <p>Describes the configuration of On-Demand Instances in an EC2 Fleet.</p>
pub fn on_demand_options(mut self, inp: crate::model::OnDemandOptionsRequest) -> Self {
self.inner = self.inner.on_demand_options(inp);
self
}
/// <p>Describes the configuration of On-Demand Instances in an EC2 Fleet.</p>
pub fn set_on_demand_options(
mut self,
input: std::option::Option<crate::model::OnDemandOptionsRequest>,
) -> Self {
self.inner = self.inner.set_on_demand_options(input);
self
}
/// <p>Indicates whether running instances should be terminated if the total target capacity of
/// the EC2 Fleet is decreased below the current size of the EC2 Fleet.</p>
pub fn excess_capacity_termination_policy(
mut self,
inp: crate::model::FleetExcessCapacityTerminationPolicy,
) -> Self {
self.inner = self.inner.excess_capacity_termination_policy(inp);
self
}
/// <p>Indicates whether running instances should be terminated if the total target capacity of
/// the EC2 Fleet is decreased below the current size of the EC2 Fleet.</p>
pub fn set_excess_capacity_termination_policy(
mut self,
input: std::option::Option<crate::model::FleetExcessCapacityTerminationPolicy>,
) -> Self {
self.inner = self.inner.set_excess_capacity_termination_policy(input);
self
}
/// Appends an item to `LaunchTemplateConfigs`.
///
/// To override the contents of this collection use [`set_launch_template_configs`](Self::set_launch_template_configs).
///
/// <p>The configuration for the EC2 Fleet.</p>
pub fn launch_template_configs(
mut self,
inp: impl Into<crate::model::FleetLaunchTemplateConfigRequest>,
) -> Self {
self.inner = self.inner.launch_template_configs(inp);
self
}
/// <p>The configuration for the EC2 Fleet.</p>
pub fn set_launch_template_configs(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::FleetLaunchTemplateConfigRequest>,
>,
) -> Self {
self.inner = self.inner.set_launch_template_configs(input);
self
}
/// <p>The number of units to request.</p>
pub fn target_capacity_specification(
mut self,
inp: crate::model::TargetCapacitySpecificationRequest,
) -> Self {
self.inner = self.inner.target_capacity_specification(inp);
self
}
/// <p>The number of units to request.</p>
pub fn set_target_capacity_specification(
mut self,
input: std::option::Option<crate::model::TargetCapacitySpecificationRequest>,
) -> Self {
self.inner = self.inner.set_target_capacity_specification(input);
self
}
/// <p>Indicates whether running instances should be terminated when the EC2 Fleet expires.</p>
pub fn terminate_instances_with_expiration(mut self, inp: bool) -> Self {
self.inner = self.inner.terminate_instances_with_expiration(inp);
self
}
/// <p>Indicates whether running instances should be terminated when the EC2 Fleet expires.</p>
pub fn set_terminate_instances_with_expiration(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.inner = self.inner.set_terminate_instances_with_expiration(input);
self
}
/// <p>The fleet type. The default value is <code>maintain</code>.</p>
/// <ul>
/// <li>
/// <p>
/// <code>maintain</code> - The EC2 Fleet places an asynchronous request for your desired
/// capacity, and continues to maintain your desired Spot capacity by replenishing
/// interrupted Spot Instances.</p>
/// </li>
/// <li>
/// <p>
/// <code>request</code> - The EC2 Fleet places an asynchronous one-time request for your
/// desired capacity, but does submit Spot requests in alternative capacity pools if Spot
/// capacity is unavailable, and does not maintain Spot capacity if Spot Instances are
/// interrupted.</p>
/// </li>
/// <li>
/// <p>
/// <code>instant</code> - The EC2 Fleet places a synchronous one-time request for your
/// desired capacity, and returns errors for any instances that could not be
/// launched.</p>
/// </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-configuration-strategies.html#ec2-fleet-request-type">EC2 Fleet
/// request types</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn r#type(mut self, inp: crate::model::FleetType) -> Self {
self.inner = self.inner.r#type(inp);
self
}
/// <p>The fleet type. The default value is <code>maintain</code>.</p>
/// <ul>
/// <li>
/// <p>
/// <code>maintain</code> - The EC2 Fleet places an asynchronous request for your desired
/// capacity, and continues to maintain your desired Spot capacity by replenishing
/// interrupted Spot Instances.</p>
/// </li>
/// <li>
/// <p>
/// <code>request</code> - The EC2 Fleet places an asynchronous one-time request for your
/// desired capacity, but does submit Spot requests in alternative capacity pools if Spot
/// capacity is unavailable, and does not maintain Spot capacity if Spot Instances are
/// interrupted.</p>
/// </li>
/// <li>
/// <p>
/// <code>instant</code> - The EC2 Fleet places a synchronous one-time request for your
/// desired capacity, and returns errors for any instances that could not be
/// launched.</p>
/// </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-configuration-strategies.html#ec2-fleet-request-type">EC2 Fleet
/// request types</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_type(mut self, input: std::option::Option<crate::model::FleetType>) -> Self {
self.inner = self.inner.set_type(input);
self
}
/// <p>The start date and time of the request, in UTC format (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).
/// The default is to start fulfilling the request immediately.</p>
pub fn valid_from(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.valid_from(inp);
self
}
/// <p>The start date and time of the request, in UTC format (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).
/// The default is to start fulfilling the request immediately.</p>
pub fn set_valid_from(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_valid_from(input);
self
}
/// <p>The end date and time of the request, in UTC format (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).
/// At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.</p>
pub fn valid_until(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.valid_until(inp);
self
}
/// <p>The end date and time of the request, in UTC format (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).
/// At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.</p>
pub fn set_valid_until(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_valid_until(input);
self
}
/// <p>Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for
/// fleets of type <code>maintain</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks">EC2 Fleet
/// health checks</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn replace_unhealthy_instances(mut self, inp: bool) -> Self {
self.inner = self.inner.replace_unhealthy_instances(inp);
self
}
/// <p>Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for
/// fleets of type <code>maintain</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks">EC2 Fleet
/// health checks</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_replace_unhealthy_instances(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_replace_unhealthy_instances(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The key-value pair for tagging the EC2 Fleet request on creation. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources">Tagging your resources</a>.</p>
/// <p>If the fleet type is <code>instant</code>, specify a resource type of <code>fleet</code>
/// to tag the fleet or <code>instance</code> to tag the instances at launch.</p>
/// <p>If the fleet type is <code>maintain</code> or <code>request</code>, specify a resource
/// type of <code>fleet</code> to tag the fleet. You cannot specify a resource type of
/// <code>instance</code>. To tag instances at launch, specify the tags in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template">launch template</a>.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The key-value pair for tagging the EC2 Fleet request on creation. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources">Tagging your resources</a>.</p>
/// <p>If the fleet type is <code>instant</code>, specify a resource type of <code>fleet</code>
/// to tag the fleet or <code>instance</code> to tag the instances at launch.</p>
/// <p>If the fleet type is <code>maintain</code> or <code>request</code>, specify a resource
/// type of <code>fleet</code> to tag the fleet. You cannot specify a resource type of
/// <code>instance</code>. To tag instances at launch, specify the tags in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template">launch template</a>.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>Reserved.</p>
pub fn context(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.context(inp);
self
}
/// <p>Reserved.</p>
pub fn set_context(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_context(input);
self
}
}
/// Fluent builder constructing a request to `CreateFlowLogs`.
///
/// <p>Creates one or more flow logs to capture information about IP traffic for a specific network interface,
/// subnet, or VPC. </p>
///
/// <p>Flow log data for a monitored network interface is recorded as flow log records, which are log events
/// consisting of fields that describe the traffic flow. For more information, see
/// <a href="https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records">Flow log records</a>
/// in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
///
/// <p>When publishing to CloudWatch Logs, flow log records are published to a log group, and each network
/// interface has a unique log stream in the log group. When publishing to Amazon S3, flow log records for all
/// of the monitored network interfaces are published to a single log file object that is stored in the specified
/// bucket.</p>
///
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html">VPC Flow Logs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateFlowLogs<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_flow_logs_input::Builder,
}
impl<C, M, R> CreateFlowLogs<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateFlowLogs`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateFlowLogsOutput,
aws_smithy_http::result::SdkError<crate::error::CreateFlowLogsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateFlowLogsInputOperationOutputAlias,
crate::output::CreateFlowLogsOutput,
crate::error::CreateFlowLogsError,
crate::input::CreateFlowLogsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group
/// in your account.</p>
/// <p>If you specify <code>LogDestinationType</code> as <code>s3</code>, do not specify
/// <code>DeliverLogsPermissionArn</code> or <code>LogGroupName</code>.</p>
pub fn deliver_logs_permission_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.deliver_logs_permission_arn(inp);
self
}
/// <p>The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group
/// in your account.</p>
/// <p>If you specify <code>LogDestinationType</code> as <code>s3</code>, do not specify
/// <code>DeliverLogsPermissionArn</code> or <code>LogGroupName</code>.</p>
pub fn set_deliver_logs_permission_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_deliver_logs_permission_arn(input);
self
}
/// <p>The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.</p>
/// <p>If you specify <code>LogDestinationType</code> as <code>s3</code>, do not specify
/// <code>DeliverLogsPermissionArn</code> or <code>LogGroupName</code>.</p>
pub fn log_group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.log_group_name(inp);
self
}
/// <p>The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.</p>
/// <p>If you specify <code>LogDestinationType</code> as <code>s3</code>, do not specify
/// <code>DeliverLogsPermissionArn</code> or <code>LogGroupName</code>.</p>
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_log_group_name(input);
self
}
/// Appends an item to `ResourceIds`.
///
/// To override the contents of this collection use [`set_resource_ids`](Self::set_resource_ids).
///
/// <p>The ID of the subnet, network interface, or VPC for which you want to create a flow log.</p>
/// <p>Constraints: Maximum of 1000 resources</p>
pub fn resource_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_ids(inp);
self
}
/// <p>The ID of the subnet, network interface, or VPC for which you want to create a flow log.</p>
/// <p>Constraints: Maximum of 1000 resources</p>
pub fn set_resource_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resource_ids(input);
self
}
/// <p>The type of resource for which to create the flow log. For example, if you specified a VPC ID for
/// the <code>ResourceId</code> property, specify <code>VPC</code> for this property.</p>
pub fn resource_type(mut self, inp: crate::model::FlowLogsResourceType) -> Self {
self.inner = self.inner.resource_type(inp);
self
}
/// <p>The type of resource for which to create the flow log. For example, if you specified a VPC ID for
/// the <code>ResourceId</code> property, specify <code>VPC</code> for this property.</p>
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::FlowLogsResourceType>,
) -> Self {
self.inner = self.inner.set_resource_type(input);
self
}
/// <p>The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic.</p>
pub fn traffic_type(mut self, inp: crate::model::TrafficType) -> Self {
self.inner = self.inner.traffic_type(inp);
self
}
/// <p>The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic.</p>
pub fn set_traffic_type(
mut self,
input: std::option::Option<crate::model::TrafficType>,
) -> Self {
self.inner = self.inner.set_traffic_type(input);
self
}
/// <p>The type of destination to which the flow log data is to be published. Flow log data can be
/// published to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify <code>cloud-watch-logs</code>. To
/// publish flow log data to Amazon S3, specify <code>s3</code>.</p>
/// <p>If you specify <code>LogDestinationType</code> as <code>s3</code>, do not specify
/// <code>DeliverLogsPermissionArn</code> or <code>LogGroupName</code>.</p>
/// <p>Default: <code>cloud-watch-logs</code>
/// </p>
pub fn log_destination_type(mut self, inp: crate::model::LogDestinationType) -> Self {
self.inner = self.inner.log_destination_type(inp);
self
}
/// <p>The type of destination to which the flow log data is to be published. Flow log data can be
/// published to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify <code>cloud-watch-logs</code>. To
/// publish flow log data to Amazon S3, specify <code>s3</code>.</p>
/// <p>If you specify <code>LogDestinationType</code> as <code>s3</code>, do not specify
/// <code>DeliverLogsPermissionArn</code> or <code>LogGroupName</code>.</p>
/// <p>Default: <code>cloud-watch-logs</code>
/// </p>
pub fn set_log_destination_type(
mut self,
input: std::option::Option<crate::model::LogDestinationType>,
) -> Self {
self.inner = self.inner.set_log_destination_type(input);
self
}
/// <p>The destination to which the flow log data is to be published. Flow log data can be published
/// to a CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on the value specified
/// for <code>LogDestinationType</code>.</p>
/// <p>If <code>LogDestinationType</code> is not specified or <code>cloud-watch-logs</code>,
/// specify the Amazon Resource Name (ARN) of the CloudWatch Logs log group. For example, to publish
/// to a log group called <code>my-logs</code>, specify
/// <code>arn:aws:logs:us-east-1:123456789012:log-group:my-logs</code>. Alternatively,
/// use <code>LogGroupName</code> instead.</p>
/// <p>If LogDestinationType is <code>s3</code>, specify the ARN of the Amazon S3 bucket. You can also specify a
/// subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format:
/// <code>bucket_ARN/subfolder_name/</code>. For example, to specify a subfolder named <code>my-logs</code> in a
/// bucket named <code>my-bucket</code>, use the following ARN: <code>arn:aws:s3:::my-bucket/my-logs/</code>. You
/// cannot use <code>AWSLogs</code> as a subfolder name. This is a reserved term.</p>
pub fn log_destination(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.log_destination(inp);
self
}
/// <p>The destination to which the flow log data is to be published. Flow log data can be published
/// to a CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on the value specified
/// for <code>LogDestinationType</code>.</p>
/// <p>If <code>LogDestinationType</code> is not specified or <code>cloud-watch-logs</code>,
/// specify the Amazon Resource Name (ARN) of the CloudWatch Logs log group. For example, to publish
/// to a log group called <code>my-logs</code>, specify
/// <code>arn:aws:logs:us-east-1:123456789012:log-group:my-logs</code>. Alternatively,
/// use <code>LogGroupName</code> instead.</p>
/// <p>If LogDestinationType is <code>s3</code>, specify the ARN of the Amazon S3 bucket. You can also specify a
/// subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format:
/// <code>bucket_ARN/subfolder_name/</code>. For example, to specify a subfolder named <code>my-logs</code> in a
/// bucket named <code>my-bucket</code>, use the following ARN: <code>arn:aws:s3:::my-bucket/my-logs/</code>. You
/// cannot use <code>AWSLogs</code> as a subfolder name. This is a reserved term.</p>
pub fn set_log_destination(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_log_destination(input);
self
}
/// <p>The fields to include in the flow log record, in the order in which they should
/// appear. For a list of available fields, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records">Flow log records</a>. If you
/// omit this parameter, the flow log is created using the default format. If you specify this parameter,
/// you must specify at least one field.</p>
/// <p>Specify the fields using the <code>${field-id}</code> format, separated by spaces. For
/// the CLI, surround this parameter value with single quotes on Linux or
/// double quotes on Windows.</p>
pub fn log_format(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.log_format(inp);
self
}
/// <p>The fields to include in the flow log record, in the order in which they should
/// appear. For a list of available fields, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records">Flow log records</a>. If you
/// omit this parameter, the flow log is created using the default format. If you specify this parameter,
/// you must specify at least one field.</p>
/// <p>Specify the fields using the <code>${field-id}</code> format, separated by spaces. For
/// the CLI, surround this parameter value with single quotes on Linux or
/// double quotes on Windows.</p>
pub fn set_log_format(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_log_format(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the flow logs.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the flow logs.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. You can specify 60 seconds (1 minute) or 600 seconds (10 minutes).</p>
/// <p>When a network interface is attached to a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Nitro-based
/// instance</a>, the aggregation interval is always 60 seconds or less, regardless
/// of the value that you specify.</p>
/// <p>Default: 600</p>
pub fn max_aggregation_interval(mut self, inp: i32) -> Self {
self.inner = self.inner.max_aggregation_interval(inp);
self
}
/// <p>The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. You can specify 60 seconds (1 minute) or 600 seconds (10 minutes).</p>
/// <p>When a network interface is attached to a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Nitro-based
/// instance</a>, the aggregation interval is always 60 seconds or less, regardless
/// of the value that you specify.</p>
/// <p>Default: 600</p>
pub fn set_max_aggregation_interval(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_aggregation_interval(input);
self
}
/// <p>The destination options.</p>
pub fn destination_options(mut self, inp: crate::model::DestinationOptionsRequest) -> Self {
self.inner = self.inner.destination_options(inp);
self
}
/// <p>The destination options.</p>
pub fn set_destination_options(
mut self,
input: std::option::Option<crate::model::DestinationOptionsRequest>,
) -> Self {
self.inner = self.inner.set_destination_options(input);
self
}
}
/// Fluent builder constructing a request to `CreateFpgaImage`.
///
/// <p>Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).</p>
/// <p>The create operation is asynchronous. To verify that the AFI is ready for use,
/// check the output logs.</p>
/// <p>An AFI contains the FPGA bitstream that is ready to download to an FPGA.
/// You can securely deploy an AFI on multiple FPGA-accelerated instances.
/// For more information, see the <a href="https://github.com/aws/aws-fpga/">Amazon Web Services FPGA Hardware Development Kit</a>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateFpgaImage<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_fpga_image_input::Builder,
}
impl<C, M, R> CreateFpgaImage<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateFpgaImage`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateFpgaImageOutput,
aws_smithy_http::result::SdkError<crate::error::CreateFpgaImageError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateFpgaImageInputOperationOutputAlias,
crate::output::CreateFpgaImageOutput,
crate::error::CreateFpgaImageError,
crate::input::CreateFpgaImageInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The location of the encrypted design checkpoint in Amazon S3. The input must be a tarball.</p>
pub fn input_storage_location(mut self, inp: crate::model::StorageLocation) -> Self {
self.inner = self.inner.input_storage_location(inp);
self
}
/// <p>The location of the encrypted design checkpoint in Amazon S3. The input must be a tarball.</p>
pub fn set_input_storage_location(
mut self,
input: std::option::Option<crate::model::StorageLocation>,
) -> Self {
self.inner = self.inner.set_input_storage_location(input);
self
}
/// <p>The location in Amazon S3 for the output logs.</p>
pub fn logs_storage_location(mut self, inp: crate::model::StorageLocation) -> Self {
self.inner = self.inner.logs_storage_location(inp);
self
}
/// <p>The location in Amazon S3 for the output logs.</p>
pub fn set_logs_storage_location(
mut self,
input: std::option::Option<crate::model::StorageLocation>,
) -> Self {
self.inner = self.inner.set_logs_storage_location(input);
self
}
/// <p>A description for the AFI.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for the AFI.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>A name for the AFI.</p>
pub fn name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(inp);
self
}
/// <p>A name for the AFI.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the FPGA image during creation.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the FPGA image during creation.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateImage`.
///
/// <p>Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance
/// that is either running or stopped.</p>
///
///
///
///
/// <p>If you customized your instance with instance store volumes or Amazon EBS volumes in addition to the root device volume, the
/// new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI,
/// the instance automatically launches with those additional volumes.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating Amazon EBS-Backed Linux AMIs</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateImage<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_image_input::Builder,
}
impl<C, M, R> CreateImage<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateImage`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateImageOutput,
aws_smithy_http::result::SdkError<crate::error::CreateImageError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateImageInputOperationOutputAlias,
crate::output::CreateImageOutput,
crate::error::CreateImageError,
crate::input::CreateImageInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `BlockDeviceMappings`.
///
/// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
///
/// <p>The block device mappings. This parameter cannot be used to modify the encryption
/// status of existing volumes or snapshots. To create an AMI with encrypted snapshots,
/// use the <a>CopyImage</a> action.</p>
pub fn block_device_mappings(
mut self,
inp: impl Into<crate::model::BlockDeviceMapping>,
) -> Self {
self.inner = self.inner.block_device_mappings(inp);
self
}
/// <p>The block device mappings. This parameter cannot be used to modify the encryption
/// status of existing volumes or snapshots. To create an AMI with encrypted snapshots,
/// use the <a>CopyImage</a> action.</p>
pub fn set_block_device_mappings(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
) -> Self {
self.inner = self.inner.set_block_device_mappings(input);
self
}
/// <p>A description for the new image.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for the new image.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>A name for the new image.</p>
/// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
pub fn name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(inp);
self
}
/// <p>A name for the new image.</p>
/// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image.
/// If the <code>No Reboot</code> option is set, Amazon EC2 doesn't shut down the instance before creating
/// the image. Without a reboot, the AMI will be crash consistent (all the volumes are snapshotted
/// at the same time), but not application consistent (all the operating system buffers are not flushed
/// to disk before the snapshots are created).</p>
pub fn no_reboot(mut self, inp: bool) -> Self {
self.inner = self.inner.no_reboot(inp);
self
}
/// <p>By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image.
/// If the <code>No Reboot</code> option is set, Amazon EC2 doesn't shut down the instance before creating
/// the image. Without a reboot, the AMI will be crash consistent (all the volumes are snapshotted
/// at the same time), but not application consistent (all the operating system buffers are not flushed
/// to disk before the snapshots are created).</p>
pub fn set_no_reboot(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_no_reboot(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the
/// snapshots, or both.</p>
/// <ul>
/// <li>
/// <p>To tag the AMI, the value for <code>ResourceType</code> must be
/// <code>image</code>.</p>
/// </li>
/// <li>
/// <p>To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that
/// are attached to the instance, the value for <code>ResourceType</code> must be
/// <code>snapshot</code>. The same tag is applied to all of the snapshots that are
/// created.</p>
/// </li>
/// </ul>
/// <p>If you specify other values for <code>ResourceType</code>, the request fails.</p>
/// <p>To tag an AMI or snapshot after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>. </p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the
/// snapshots, or both.</p>
/// <ul>
/// <li>
/// <p>To tag the AMI, the value for <code>ResourceType</code> must be
/// <code>image</code>.</p>
/// </li>
/// <li>
/// <p>To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that
/// are attached to the instance, the value for <code>ResourceType</code> must be
/// <code>snapshot</code>. The same tag is applied to all of the snapshots that are
/// created.</p>
/// </li>
/// </ul>
/// <p>If you specify other values for <code>ResourceType</code>, the request fails.</p>
/// <p>To tag an AMI or snapshot after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>. </p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateInstanceEventWindow`.
///
/// <p>Creates an event window in which scheduled events for the associated Amazon EC2 instances can
/// run.</p>
/// <p>You can define either a set of time ranges or a cron expression when creating the event
/// window, but not both. All event window times are in UTC.</p>
/// <p>You can create up to 200 event windows per Amazon Web Services Region.</p>
/// <p>When you create the event window, targets (instance IDs, Dedicated Host IDs, or tags)
/// are not yet associated with it. To ensure that the event window can be used, you must
/// associate one or more targets with it by using the <a>AssociateInstanceEventWindow</a> API.</p>
///
/// <important>
/// <p>Event windows are applicable only for scheduled events that stop, reboot, or
/// terminate instances.</p>
/// <p>Event windows are <i>not</i> applicable for:</p>
/// <ul>
/// <li>
/// <p>Expedited scheduled events and network maintenance events. </p>
/// </li>
/// <li>
/// <p>Unscheduled maintenance such as AutoRecovery and unplanned reboots.</p>
/// </li>
/// </ul>
/// </important>
///
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html">Define event windows for scheduled
/// events</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateInstanceEventWindow<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_instance_event_window_input::Builder,
}
impl<C, M, R> CreateInstanceEventWindow<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateInstanceEventWindow`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateInstanceEventWindowOutput,
aws_smithy_http::result::SdkError<crate::error::CreateInstanceEventWindowError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateInstanceEventWindowInputOperationOutputAlias,
crate::output::CreateInstanceEventWindowOutput,
crate::error::CreateInstanceEventWindowError,
crate::input::CreateInstanceEventWindowInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The name of the event window.</p>
pub fn name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(inp);
self
}
/// <p>The name of the event window.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// Appends an item to `TimeRanges`.
///
/// To override the contents of this collection use [`set_time_ranges`](Self::set_time_ranges).
///
/// <p>The time range for the event window. If you specify a time range, you can't specify a cron
/// expression.</p>
pub fn time_ranges(
mut self,
inp: impl Into<crate::model::InstanceEventWindowTimeRangeRequest>,
) -> Self {
self.inner = self.inner.time_ranges(inp);
self
}
/// <p>The time range for the event window. If you specify a time range, you can't specify a cron
/// expression.</p>
pub fn set_time_ranges(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::InstanceEventWindowTimeRangeRequest>,
>,
) -> Self {
self.inner = self.inner.set_time_ranges(input);
self
}
/// <p>The cron expression for the event window, for example, <code>* 0-4,20-23 * * 1,5</code>. If
/// you specify a cron expression, you can't specify a time range.</p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>Only hour and day of the week values are supported.</p>
/// </li>
/// <li>
/// <p>For day of the week values, you can specify either integers <code>0</code> through
/// <code>6</code>, or alternative single values <code>SUN</code> through
/// <code>SAT</code>.</p>
/// </li>
/// <li>
/// <p>The minute, month, and year must be specified by <code>*</code>.</p>
/// </li>
/// <li>
/// <p>The hour value must be one or a multiple range, for example, <code>0-4</code> or
/// <code>0-4,20-23</code>.</p>
/// </li>
/// <li>
/// <p>Each hour range must be >= 2 hours, for example, <code>0-2</code> or
/// <code>20-23</code>.</p>
/// </li>
/// <li>
/// <p>The event window must be >= 4 hours. The combined total time ranges in the event
/// window must be >= 4 hours.</p>
/// </li>
/// </ul>
/// <p>For more information about cron expressions, see <a href="https://en.wikipedia.org/wiki/Cron">cron</a> on the <i>Wikipedia
/// website</i>.</p>
pub fn cron_expression(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cron_expression(inp);
self
}
/// <p>The cron expression for the event window, for example, <code>* 0-4,20-23 * * 1,5</code>. If
/// you specify a cron expression, you can't specify a time range.</p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>Only hour and day of the week values are supported.</p>
/// </li>
/// <li>
/// <p>For day of the week values, you can specify either integers <code>0</code> through
/// <code>6</code>, or alternative single values <code>SUN</code> through
/// <code>SAT</code>.</p>
/// </li>
/// <li>
/// <p>The minute, month, and year must be specified by <code>*</code>.</p>
/// </li>
/// <li>
/// <p>The hour value must be one or a multiple range, for example, <code>0-4</code> or
/// <code>0-4,20-23</code>.</p>
/// </li>
/// <li>
/// <p>Each hour range must be >= 2 hours, for example, <code>0-2</code> or
/// <code>20-23</code>.</p>
/// </li>
/// <li>
/// <p>The event window must be >= 4 hours. The combined total time ranges in the event
/// window must be >= 4 hours.</p>
/// </li>
/// </ul>
/// <p>For more information about cron expressions, see <a href="https://en.wikipedia.org/wiki/Cron">cron</a> on the <i>Wikipedia
/// website</i>.</p>
pub fn set_cron_expression(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_cron_expression(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the event window.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the event window.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateInstanceExportTask`.
///
/// <p>Exports a running or stopped instance to an Amazon S3 bucket.</p>
/// <p>For information about the supported operating systems, image formats, and known limitations
/// for the types of instances you can export, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html">Exporting an instance as a VM Using VM Import/Export</a>
/// in the <i>VM Import/Export User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateInstanceExportTask<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_instance_export_task_input::Builder,
}
impl<C, M, R> CreateInstanceExportTask<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateInstanceExportTask`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateInstanceExportTaskOutput,
aws_smithy_http::result::SdkError<crate::error::CreateInstanceExportTaskError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateInstanceExportTaskInputOperationOutputAlias,
crate::output::CreateInstanceExportTaskOutput,
crate::error::CreateInstanceExportTaskError,
crate::input::CreateInstanceExportTaskInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>A description for the conversion task or the resource being exported. The maximum length is 255 characters.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for the conversion task or the resource being exported. The maximum length is 255 characters.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>The format and location for an export instance task.</p>
pub fn export_to_s3_task(mut self, inp: crate::model::ExportToS3TaskSpecification) -> Self {
self.inner = self.inner.export_to_s3_task(inp);
self
}
/// <p>The format and location for an export instance task.</p>
pub fn set_export_to_s3_task(
mut self,
input: std::option::Option<crate::model::ExportToS3TaskSpecification>,
) -> Self {
self.inner = self.inner.set_export_to_s3_task(input);
self
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The target virtualization environment.</p>
pub fn target_environment(mut self, inp: crate::model::ExportEnvironment) -> Self {
self.inner = self.inner.target_environment(inp);
self
}
/// <p>The target virtualization environment.</p>
pub fn set_target_environment(
mut self,
input: std::option::Option<crate::model::ExportEnvironment>,
) -> Self {
self.inner = self.inner.set_target_environment(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the export instance task during creation.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the export instance task during creation.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateInternetGateway`.
///
/// <p>Creates an internet gateway for use with a VPC. After creating the internet gateway,
/// you attach it to a VPC using <a>AttachInternetGateway</a>.</p>
/// <p>For more information about your VPC and internet gateway, see the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/">Amazon Virtual Private Cloud User Guide</a>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateInternetGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_internet_gateway_input::Builder,
}
impl<C, M, R> CreateInternetGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateInternetGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateInternetGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::CreateInternetGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateInternetGatewayInputOperationOutputAlias,
crate::output::CreateInternetGatewayOutput,
crate::error::CreateInternetGatewayError,
crate::input::CreateInternetGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the internet gateway.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the internet gateway.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateKeyPair`.
///
/// <p>Creates an ED25519 or 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public
/// key and displays the private key for you to save to a file. The private key is returned
/// as an unencrypted PEM encoded PKCS#1 private key. If a key with the specified name
/// already exists, Amazon EC2 returns an error.</p>
/// <p>The key pair returned to you is available only in the Amazon Web Services Region in which you create it.
/// If you prefer, you can create your own key pair using a third-party tool and upload it
/// to any Region using <a>ImportKeyPair</a>.</p>
/// <p>You can have up to 5,000 key pairs per Amazon Web Services Region.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html">Amazon EC2 key pairs</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateKeyPair<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_key_pair_input::Builder,
}
impl<C, M, R> CreateKeyPair<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateKeyPair`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateKeyPairOutput,
aws_smithy_http::result::SdkError<crate::error::CreateKeyPairError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateKeyPairInputOperationOutputAlias,
crate::output::CreateKeyPairOutput,
crate::error::CreateKeyPairError,
crate::input::CreateKeyPairInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>A unique name for the key pair.</p>
/// <p>Constraints: Up to 255 ASCII characters</p>
pub fn key_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.key_name(inp);
self
}
/// <p>A unique name for the key pair.</p>
/// <p>Constraints: Up to 255 ASCII characters</p>
pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_key_name(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The type of key pair. Note that ED25519 keys are not supported for Windows instances, EC2 Instance Connect, and EC2 Serial Console.</p>
/// <p>Default: <code>rsa</code>
/// </p>
pub fn key_type(mut self, inp: crate::model::KeyType) -> Self {
self.inner = self.inner.key_type(inp);
self
}
/// <p>The type of key pair. Note that ED25519 keys are not supported for Windows instances, EC2 Instance Connect, and EC2 Serial Console.</p>
/// <p>Default: <code>rsa</code>
/// </p>
pub fn set_key_type(mut self, input: std::option::Option<crate::model::KeyType>) -> Self {
self.inner = self.inner.set_key_type(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the new key pair.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the new key pair.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateLaunchTemplate`.
///
/// <p>Creates a launch template. A launch template contains the parameters to launch an
/// instance. When you launch an instance using <a>RunInstances</a>, you can
/// specify a launch template instead of providing the launch parameters in the request. For
/// more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html">Launching an instance from a
/// launch template</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateLaunchTemplate<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_launch_template_input::Builder,
}
impl<C, M, R> CreateLaunchTemplate<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateLaunchTemplate`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateLaunchTemplateOutput,
aws_smithy_http::result::SdkError<crate::error::CreateLaunchTemplateError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateLaunchTemplateInputOperationOutputAlias,
crate::output::CreateLaunchTemplateOutput,
crate::error::CreateLaunchTemplateError,
crate::input::CreateLaunchTemplateInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
/// <p>Constraint: Maximum 128 ASCII characters.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
/// <p>Constraint: Maximum 128 ASCII characters.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>A name for the launch template.</p>
pub fn launch_template_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_name(inp);
self
}
/// <p>A name for the launch template.</p>
pub fn set_launch_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_launch_template_name(input);
self
}
/// <p>A description for the first version of the launch template.</p>
pub fn version_description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.version_description(inp);
self
}
/// <p>A description for the first version of the launch template.</p>
pub fn set_version_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_version_description(input);
self
}
/// <p>The information for the launch template.</p>
pub fn launch_template_data(
mut self,
inp: crate::model::RequestLaunchTemplateData,
) -> Self {
self.inner = self.inner.launch_template_data(inp);
self
}
/// <p>The information for the launch template.</p>
pub fn set_launch_template_data(
mut self,
input: std::option::Option<crate::model::RequestLaunchTemplateData>,
) -> Self {
self.inner = self.inner.set_launch_template_data(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the launch template during creation.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the launch template during creation.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateLaunchTemplateVersion`.
///
/// <p>Creates a new version for a launch template. You can specify an existing version of
/// launch template from which to base the new version.</p>
/// <p>Launch template versions are numbered in the order in which they are created. You
/// cannot specify, change, or replace the numbering of launch template versions.</p>
/// <p>For
/// more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#manage-launch-template-versions">Managing launch template versions</a>in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateLaunchTemplateVersion<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_launch_template_version_input::Builder,
}
impl<C, M, R> CreateLaunchTemplateVersion<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateLaunchTemplateVersion`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateLaunchTemplateVersionOutput,
aws_smithy_http::result::SdkError<crate::error::CreateLaunchTemplateVersionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateLaunchTemplateVersionInputOperationOutputAlias,
crate::output::CreateLaunchTemplateVersionOutput,
crate::error::CreateLaunchTemplateVersionError,
crate::input::CreateLaunchTemplateVersionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
/// <p>Constraint: Maximum 128 ASCII characters.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
/// <p>Constraint: Maximum 128 ASCII characters.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>The ID of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn launch_template_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_id(inp);
self
}
/// <p>The ID of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn set_launch_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_launch_template_id(input);
self
}
/// <p>The name of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn launch_template_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_name(inp);
self
}
/// <p>The name of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn set_launch_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_launch_template_name(input);
self
}
/// <p>The version number of the launch template version on which to base the new version.
/// The new version inherits the same launch parameters as the source version, except for
/// parameters that you specify in <code>LaunchTemplateData</code>. Snapshots applied
/// to the block device mapping are ignored when creating a new version unless they
/// are explicitly included.</p>
pub fn source_version(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_version(inp);
self
}
/// <p>The version number of the launch template version on which to base the new version.
/// The new version inherits the same launch parameters as the source version, except for
/// parameters that you specify in <code>LaunchTemplateData</code>. Snapshots applied
/// to the block device mapping are ignored when creating a new version unless they
/// are explicitly included.</p>
pub fn set_source_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_version(input);
self
}
/// <p>A description for the version of the launch template.</p>
pub fn version_description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.version_description(inp);
self
}
/// <p>A description for the version of the launch template.</p>
pub fn set_version_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_version_description(input);
self
}
/// <p>The information for the launch template.</p>
pub fn launch_template_data(
mut self,
inp: crate::model::RequestLaunchTemplateData,
) -> Self {
self.inner = self.inner.launch_template_data(inp);
self
}
/// <p>The information for the launch template.</p>
pub fn set_launch_template_data(
mut self,
input: std::option::Option<crate::model::RequestLaunchTemplateData>,
) -> Self {
self.inner = self.inner.set_launch_template_data(input);
self
}
}
/// Fluent builder constructing a request to `CreateLocalGatewayRoute`.
///
/// <p>Creates a static route for the specified local gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct CreateLocalGatewayRoute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_local_gateway_route_input::Builder,
}
impl<C, M, R> CreateLocalGatewayRoute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateLocalGatewayRoute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateLocalGatewayRouteOutput,
aws_smithy_http::result::SdkError<crate::error::CreateLocalGatewayRouteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateLocalGatewayRouteInputOperationOutputAlias,
crate::output::CreateLocalGatewayRouteOutput,
crate::error::CreateLocalGatewayRouteError,
crate::input::CreateLocalGatewayRouteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The CIDR range used for destination matches. Routing decisions are based on
/// the most specific match.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The CIDR range used for destination matches. Routing decisions are based on
/// the most specific match.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <p>The ID of the local gateway route table.</p>
pub fn local_gateway_route_table_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.local_gateway_route_table_id(inp);
self
}
/// <p>The ID of the local gateway route table.</p>
pub fn set_local_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_local_gateway_route_table_id(input);
self
}
/// <p>The ID of the virtual interface group.</p>
pub fn local_gateway_virtual_interface_group_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.local_gateway_virtual_interface_group_id(inp);
self
}
/// <p>The ID of the virtual interface group.</p>
pub fn set_local_gateway_virtual_interface_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self
.inner
.set_local_gateway_virtual_interface_group_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateLocalGatewayRouteTableVpcAssociation`.
///
/// <p>Associates the specified VPC with the specified local gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct CreateLocalGatewayRouteTableVpcAssociation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_local_gateway_route_table_vpc_association_input::Builder,
}
impl<C, M, R> CreateLocalGatewayRouteTableVpcAssociation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateLocalGatewayRouteTableVpcAssociation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateLocalGatewayRouteTableVpcAssociationOutput,
aws_smithy_http::result::SdkError<
crate::error::CreateLocalGatewayRouteTableVpcAssociationError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateLocalGatewayRouteTableVpcAssociationInputOperationOutputAlias,
crate::output::CreateLocalGatewayRouteTableVpcAssociationOutput,
crate::error::CreateLocalGatewayRouteTableVpcAssociationError,
crate::input::CreateLocalGatewayRouteTableVpcAssociationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the local gateway route table.</p>
pub fn local_gateway_route_table_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.local_gateway_route_table_id(inp);
self
}
/// <p>The ID of the local gateway route table.</p>
pub fn set_local_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_local_gateway_route_table_id(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the local gateway route table VPC association.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the local gateway route table VPC association.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateManagedPrefixList`.
///
/// <p>Creates a managed prefix list. You can specify one or more entries for the prefix list.
/// Each entry consists of a CIDR block and an optional description.</p>
#[derive(std::fmt::Debug)]
pub struct CreateManagedPrefixList<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_managed_prefix_list_input::Builder,
}
impl<C, M, R> CreateManagedPrefixList<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateManagedPrefixList`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateManagedPrefixListOutput,
aws_smithy_http::result::SdkError<crate::error::CreateManagedPrefixListError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateManagedPrefixListInputOperationOutputAlias,
crate::output::CreateManagedPrefixListOutput,
crate::error::CreateManagedPrefixListError,
crate::input::CreateManagedPrefixListInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>A name for the prefix list.</p>
/// <p>Constraints: Up to 255 characters in length. The name cannot start with <code>com.amazonaws</code>.</p>
pub fn prefix_list_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix_list_name(inp);
self
}
/// <p>A name for the prefix list.</p>
/// <p>Constraints: Up to 255 characters in length. The name cannot start with <code>com.amazonaws</code>.</p>
pub fn set_prefix_list_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_prefix_list_name(input);
self
}
/// Appends an item to `Entries`.
///
/// To override the contents of this collection use [`set_entries`](Self::set_entries).
///
/// <p>One or more entries for the prefix list.</p>
pub fn entries(mut self, inp: impl Into<crate::model::AddPrefixListEntry>) -> Self {
self.inner = self.inner.entries(inp);
self
}
/// <p>One or more entries for the prefix list.</p>
pub fn set_entries(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AddPrefixListEntry>>,
) -> Self {
self.inner = self.inner.set_entries(input);
self
}
/// <p>The maximum number of entries for the prefix list.</p>
pub fn max_entries(mut self, inp: i32) -> Self {
self.inner = self.inner.max_entries(inp);
self
}
/// <p>The maximum number of entries for the prefix list.</p>
pub fn set_max_entries(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_entries(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the prefix list during creation.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the prefix list during creation.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>The IP address type.</p>
/// <p>Valid Values: <code>IPv4</code> | <code>IPv6</code>
/// </p>
pub fn address_family(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.address_family(inp);
self
}
/// <p>The IP address type.</p>
/// <p>Valid Values: <code>IPv4</code> | <code>IPv6</code>
/// </p>
pub fn set_address_family(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_address_family(input);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
/// <p>Constraints: Up to 255 UTF-8 characters in length.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
/// <p>Constraints: Up to 255 UTF-8 characters in length.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `CreateNatGateway`.
///
/// <p>Creates a NAT gateway in the specified subnet. This action creates a network interface
/// in the specified subnet with a private IP address from the IP address range of the
/// subnet. You can create either a public NAT gateway or a private NAT gateway.</p>
/// <p>With a public NAT gateway, internet-bound traffic from a private subnet can be routed
/// to the NAT gateway, so that instances in a private subnet can connect to the internet.</p>
/// <p>With a private NAT gateway, private communication is routed across VPCs and on-premises
/// networks through a transit gateway or virtual private gateway. Common use cases include
/// running large workloads behind a small pool of allowlisted IPv4 addresses, preserving
/// private IPv4 addresses, and communicating between overlapping networks.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">NAT gateways</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateNatGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_nat_gateway_input::Builder,
}
impl<C, M, R> CreateNatGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateNatGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateNatGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::CreateNatGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateNatGatewayInputOperationOutputAlias,
crate::output::CreateNatGatewayOutput,
crate::error::CreateNatGatewayError,
crate::input::CreateNatGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>[Public NAT gateways only] The allocation ID of an Elastic IP address to associate
/// with the NAT gateway. You cannot specify an Elastic IP address with a private NAT gateway.
/// If the Elastic IP address is associated with another resource, you must first disassociate it.</p>
pub fn allocation_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.allocation_id(inp);
self
}
/// <p>[Public NAT gateways only] The allocation ID of an Elastic IP address to associate
/// with the NAT gateway. You cannot specify an Elastic IP address with a private NAT gateway.
/// If the Elastic IP address is associated with another resource, you must first disassociate it.</p>
pub fn set_allocation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_allocation_id(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
/// <p>Constraint: Maximum 64 ASCII characters.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
/// <p>Constraint: Maximum 64 ASCII characters.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The subnet in which to create the NAT gateway.</p>
pub fn subnet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_id(inp);
self
}
/// <p>The subnet in which to create the NAT gateway.</p>
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_subnet_id(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the NAT gateway.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the NAT gateway.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>Indicates whether the NAT gateway supports public or private connectivity.
/// The default is public connectivity.</p>
pub fn connectivity_type(mut self, inp: crate::model::ConnectivityType) -> Self {
self.inner = self.inner.connectivity_type(inp);
self
}
/// <p>Indicates whether the NAT gateway supports public or private connectivity.
/// The default is public connectivity.</p>
pub fn set_connectivity_type(
mut self,
input: std::option::Option<crate::model::ConnectivityType>,
) -> Self {
self.inner = self.inner.set_connectivity_type(input);
self
}
}
/// Fluent builder constructing a request to `CreateNetworkAcl`.
///
/// <p>Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html">Network ACLs</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateNetworkAcl<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_network_acl_input::Builder,
}
impl<C, M, R> CreateNetworkAcl<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateNetworkAcl`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateNetworkAclOutput,
aws_smithy_http::result::SdkError<crate::error::CreateNetworkAclError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateNetworkAclInputOperationOutputAlias,
crate::output::CreateNetworkAclOutput,
crate::error::CreateNetworkAclError,
crate::input::CreateNetworkAclInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the network ACL.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the network ACL.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateNetworkAclEntry`.
///
/// <p>Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules
/// and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated
/// with the ACL, we process the entries in the ACL according to the rule numbers, in ascending order. Each network ACL has a set of
/// ingress rules and a separate set of egress rules.</p>
/// <p>We recommend that you leave room between the rule numbers (for example, 100, 110, 120, ...), and not number them one right after the
/// other (for example, 101, 102, 103, ...). This makes it easier to add a rule between existing ones without having to renumber the rules.</p>
/// <p>After you add an entry, you can't modify it; you must either replace it, or create an entry and delete the old one.</p>
/// <p>For more information about network ACLs, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html">Network ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateNetworkAclEntry<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_network_acl_entry_input::Builder,
}
impl<C, M, R> CreateNetworkAclEntry<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateNetworkAclEntry`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateNetworkAclEntryOutput,
aws_smithy_http::result::SdkError<crate::error::CreateNetworkAclEntryError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateNetworkAclEntryInputOperationOutputAlias,
crate::output::CreateNetworkAclEntryOutput,
crate::error::CreateNetworkAclEntryError,
crate::input::CreateNetworkAclEntryInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The IPv4 network range to allow or deny, in CIDR notation (for example
/// <code>172.16.0.0/24</code>). We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
pub fn cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr_block(inp);
self
}
/// <p>The IPv4 network range to allow or deny, in CIDR notation (for example
/// <code>172.16.0.0/24</code>). We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr_block(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).</p>
pub fn egress(mut self, inp: bool) -> Self {
self.inner = self.inner.egress(inp);
self
}
/// <p>Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).</p>
pub fn set_egress(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_egress(input);
self
}
/// <p>ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol
/// 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.</p>
pub fn icmp_type_code(mut self, inp: crate::model::IcmpTypeCode) -> Self {
self.inner = self.inner.icmp_type_code(inp);
self
}
/// <p>ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol
/// 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.</p>
pub fn set_icmp_type_code(
mut self,
input: std::option::Option<crate::model::IcmpTypeCode>,
) -> Self {
self.inner = self.inner.set_icmp_type_code(input);
self
}
/// <p>The IPv6 network range to allow or deny, in CIDR notation (for example
/// <code>2001:db8:1234:1a00::/64</code>).</p>
pub fn ipv6_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv6_cidr_block(inp);
self
}
/// <p>The IPv6 network range to allow or deny, in CIDR notation (for example
/// <code>2001:db8:1234:1a00::/64</code>).</p>
pub fn set_ipv6_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_ipv6_cidr_block(input);
self
}
/// <p>The ID of the network ACL.</p>
pub fn network_acl_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_acl_id(inp);
self
}
/// <p>The ID of the network ACL.</p>
pub fn set_network_acl_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_acl_id(input);
self
}
/// <p>TCP or UDP protocols: The range of ports the rule applies to.
/// Required if specifying protocol 6 (TCP) or 17 (UDP).</p>
pub fn port_range(mut self, inp: crate::model::PortRange) -> Self {
self.inner = self.inner.port_range(inp);
self
}
/// <p>TCP or UDP protocols: The range of ports the rule applies to.
/// Required if specifying protocol 6 (TCP) or 17 (UDP).</p>
pub fn set_port_range(
mut self,
input: std::option::Option<crate::model::PortRange>,
) -> Self {
self.inner = self.inner.set_port_range(input);
self
}
/// <p>The protocol number. A value of "-1" means all protocols. If you specify "-1" or a
/// protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is
/// allowed, regardless of any ports or ICMP types or codes that you specify. If you specify
/// protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and
/// codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6)
/// and specify an IPv6 CIDR block, you must specify an ICMP type and code.</p>
pub fn protocol(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.protocol(inp);
self
}
/// <p>The protocol number. A value of "-1" means all protocols. If you specify "-1" or a
/// protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is
/// allowed, regardless of any ports or ICMP types or codes that you specify. If you specify
/// protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and
/// codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6)
/// and specify an IPv6 CIDR block, you must specify an ICMP type and code.</p>
pub fn set_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_protocol(input);
self
}
/// <p>Indicates whether to allow or deny the traffic that matches the rule.</p>
pub fn rule_action(mut self, inp: crate::model::RuleAction) -> Self {
self.inner = self.inner.rule_action(inp);
self
}
/// <p>Indicates whether to allow or deny the traffic that matches the rule.</p>
pub fn set_rule_action(
mut self,
input: std::option::Option<crate::model::RuleAction>,
) -> Self {
self.inner = self.inner.set_rule_action(input);
self
}
/// <p>The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.</p>
/// <p>Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.</p>
pub fn rule_number(mut self, inp: i32) -> Self {
self.inner = self.inner.rule_number(inp);
self
}
/// <p>The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.</p>
/// <p>Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.</p>
pub fn set_rule_number(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_rule_number(input);
self
}
}
/// Fluent builder constructing a request to `CreateNetworkInsightsPath`.
///
/// <p>Creates a path to analyze for reachability.</p>
/// <p>Reachability Analyzer enables you to analyze and debug network reachability between
/// two resources in your virtual private cloud (VPC). For more information, see
/// <a href="https://docs.aws.amazon.com/vpc/latest/reachability/">What is Reachability Analyzer</a>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateNetworkInsightsPath<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_network_insights_path_input::Builder,
}
impl<C, M, R> CreateNetworkInsightsPath<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateNetworkInsightsPath`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateNetworkInsightsPathOutput,
aws_smithy_http::result::SdkError<crate::error::CreateNetworkInsightsPathError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateNetworkInsightsPathInputOperationOutputAlias,
crate::output::CreateNetworkInsightsPathOutput,
crate::error::CreateNetworkInsightsPathError,
crate::input::CreateNetworkInsightsPathInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The IP address of the Amazon Web Services resource that is the source of the path.</p>
pub fn source_ip(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_ip(inp);
self
}
/// <p>The IP address of the Amazon Web Services resource that is the source of the path.</p>
pub fn set_source_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_source_ip(input);
self
}
/// <p>The IP address of the Amazon Web Services resource that is the destination of the path.</p>
pub fn destination_ip(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_ip(inp);
self
}
/// <p>The IP address of the Amazon Web Services resource that is the destination of the path.</p>
pub fn set_destination_ip(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_ip(input);
self
}
/// <p>The Amazon Web Services resource that is the source of the path.</p>
pub fn source(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source(inp);
self
}
/// <p>The Amazon Web Services resource that is the source of the path.</p>
pub fn set_source(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_source(input);
self
}
/// <p>The Amazon Web Services resource that is the destination of the path.</p>
pub fn destination(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination(inp);
self
}
/// <p>The Amazon Web Services resource that is the destination of the path.</p>
pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_destination(input);
self
}
/// <p>The protocol.</p>
pub fn protocol(mut self, inp: crate::model::Protocol) -> Self {
self.inner = self.inner.protocol(inp);
self
}
/// <p>The protocol.</p>
pub fn set_protocol(mut self, input: std::option::Option<crate::model::Protocol>) -> Self {
self.inner = self.inner.set_protocol(input);
self
}
/// <p>The destination port.</p>
pub fn destination_port(mut self, inp: i32) -> Self {
self.inner = self.inner.destination_port(inp);
self
}
/// <p>The destination port.</p>
pub fn set_destination_port(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_destination_port(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to add to the path.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to add to the path.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `CreateNetworkInterface`.
///
/// <p>Creates a network interface in the specified subnet.</p>
/// <p>For more information about network interfaces, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html">Elastic Network Interfaces</a>
/// in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateNetworkInterface<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_network_interface_input::Builder,
}
impl<C, M, R> CreateNetworkInterface<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateNetworkInterface`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateNetworkInterfaceOutput,
aws_smithy_http::result::SdkError<crate::error::CreateNetworkInterfaceError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateNetworkInterfaceInputOperationOutputAlias,
crate::output::CreateNetworkInterfaceOutput,
crate::error::CreateNetworkInterfaceError,
crate::input::CreateNetworkInterfaceInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>A description for the network interface.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for the network interface.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Groups`.
///
/// To override the contents of this collection use [`set_groups`](Self::set_groups).
///
/// <p>The IDs of one or more security groups.</p>
pub fn groups(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.groups(inp);
self
}
/// <p>The IDs of one or more security groups.</p>
pub fn set_groups(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_groups(input);
self
}
/// <p>The number of IPv6 addresses to assign to a network interface. Amazon EC2
/// automatically selects the IPv6 addresses from the subnet range. You can't use this
/// option if specifying specific IPv6 addresses. If your subnet has the <code>AssignIpv6AddressOnCreation</code> attribute set
/// to <code>true</code>, you can specify <code>0</code> to override this setting.</p>
pub fn ipv6_address_count(mut self, inp: i32) -> Self {
self.inner = self.inner.ipv6_address_count(inp);
self
}
/// <p>The number of IPv6 addresses to assign to a network interface. Amazon EC2
/// automatically selects the IPv6 addresses from the subnet range. You can't use this
/// option if specifying specific IPv6 addresses. If your subnet has the <code>AssignIpv6AddressOnCreation</code> attribute set
/// to <code>true</code>, you can specify <code>0</code> to override this setting.</p>
pub fn set_ipv6_address_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_ipv6_address_count(input);
self
}
/// Appends an item to `Ipv6Addresses`.
///
/// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
///
/// <p>One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet.
/// You can't use this option if you're specifying a number of IPv6 addresses.</p>
pub fn ipv6_addresses(mut self, inp: impl Into<crate::model::InstanceIpv6Address>) -> Self {
self.inner = self.inner.ipv6_addresses(inp);
self
}
/// <p>One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet.
/// You can't use this option if you're specifying a number of IPv6 addresses.</p>
pub fn set_ipv6_addresses(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Address>>,
) -> Self {
self.inner = self.inner.set_ipv6_addresses(input);
self
}
/// <p>The primary private IPv4 address of the network interface. If you don't specify an
/// IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you
/// specify an IP address, you cannot indicate any IP addresses specified in
/// <code>privateIpAddresses</code> as primary (only one IP address can be designated as
/// primary).</p>
pub fn private_ip_address(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.private_ip_address(inp);
self
}
/// <p>The primary private IPv4 address of the network interface. If you don't specify an
/// IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you
/// specify an IP address, you cannot indicate any IP addresses specified in
/// <code>privateIpAddresses</code> as primary (only one IP address can be designated as
/// primary).</p>
pub fn set_private_ip_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_private_ip_address(input);
self
}
/// Appends an item to `PrivateIpAddresses`.
///
/// To override the contents of this collection use [`set_private_ip_addresses`](Self::set_private_ip_addresses).
///
/// <p>One or more private IPv4 addresses.</p>
pub fn private_ip_addresses(
mut self,
inp: impl Into<crate::model::PrivateIpAddressSpecification>,
) -> Self {
self.inner = self.inner.private_ip_addresses(inp);
self
}
/// <p>One or more private IPv4 addresses.</p>
pub fn set_private_ip_addresses(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PrivateIpAddressSpecification>>,
) -> Self {
self.inner = self.inner.set_private_ip_addresses(input);
self
}
/// <p>The number of secondary private IPv4 addresses to assign to a network interface. When
/// you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses
/// within the subnet's IPv4 CIDR range. You can't specify this option and specify more than
/// one private IP address using <code>privateIpAddresses</code>.</p>
/// <p>The number of IP addresses you can assign to a network interface varies by instance
/// type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI">IP Addresses Per ENI Per
/// Instance Type</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
pub fn secondary_private_ip_address_count(mut self, inp: i32) -> Self {
self.inner = self.inner.secondary_private_ip_address_count(inp);
self
}
/// <p>The number of secondary private IPv4 addresses to assign to a network interface. When
/// you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses
/// within the subnet's IPv4 CIDR range. You can't specify this option and specify more than
/// one private IP address using <code>privateIpAddresses</code>.</p>
/// <p>The number of IP addresses you can assign to a network interface varies by instance
/// type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI">IP Addresses Per ENI Per
/// Instance Type</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
pub fn set_secondary_private_ip_address_count(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.inner = self.inner.set_secondary_private_ip_address_count(input);
self
}
/// Appends an item to `Ipv4Prefixes`.
///
/// To override the contents of this collection use [`set_ipv4_prefixes`](Self::set_ipv4_prefixes).
///
/// <p>One or more IPv4 prefixes assigned to the network interface. You cannot use this option if you use the <code>Ipv4PrefixCount</code> option.</p>
pub fn ipv4_prefixes(
mut self,
inp: impl Into<crate::model::Ipv4PrefixSpecificationRequest>,
) -> Self {
self.inner = self.inner.ipv4_prefixes(inp);
self
}
/// <p>One or more IPv4 prefixes assigned to the network interface. You cannot use this option if you use the <code>Ipv4PrefixCount</code> option.</p>
pub fn set_ipv4_prefixes(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Ipv4PrefixSpecificationRequest>>,
) -> Self {
self.inner = self.inner.set_ipv4_prefixes(input);
self
}
/// <p>The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the <code>Ipv4 Prefixes</code> option.</p>
pub fn ipv4_prefix_count(mut self, inp: i32) -> Self {
self.inner = self.inner.ipv4_prefix_count(inp);
self
}
/// <p>The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the <code>Ipv4 Prefixes</code> option.</p>
pub fn set_ipv4_prefix_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_ipv4_prefix_count(input);
self
}
/// Appends an item to `Ipv6Prefixes`.
///
/// To override the contents of this collection use [`set_ipv6_prefixes`](Self::set_ipv6_prefixes).
///
/// <p>One or more IPv6 prefixes assigned to the network interface. You cannot use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
pub fn ipv6_prefixes(
mut self,
inp: impl Into<crate::model::Ipv6PrefixSpecificationRequest>,
) -> Self {
self.inner = self.inner.ipv6_prefixes(inp);
self
}
/// <p>One or more IPv6 prefixes assigned to the network interface. You cannot use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
pub fn set_ipv6_prefixes(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Ipv6PrefixSpecificationRequest>>,
) -> Self {
self.inner = self.inner.set_ipv6_prefixes(input);
self
}
/// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the <code>Ipv6Prefixes</code> option.</p>
pub fn ipv6_prefix_count(mut self, inp: i32) -> Self {
self.inner = self.inner.ipv6_prefix_count(inp);
self
}
/// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the <code>Ipv6Prefixes</code> option.</p>
pub fn set_ipv6_prefix_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_ipv6_prefix_count(input);
self
}
/// <p>Indicates the type of network interface. To create an Elastic Fabric Adapter (EFA), specify
/// <code>efa</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html">
/// Elastic Fabric Adapter</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. To create a trunk network interface, specify
/// <code>efa</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/eni-trunking.html">
/// Network interface trunking</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn interface_type(mut self, inp: crate::model::NetworkInterfaceCreationType) -> Self {
self.inner = self.inner.interface_type(inp);
self
}
/// <p>Indicates the type of network interface. To create an Elastic Fabric Adapter (EFA), specify
/// <code>efa</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html">
/// Elastic Fabric Adapter</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. To create a trunk network interface, specify
/// <code>efa</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/eni-trunking.html">
/// Network interface trunking</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_interface_type(
mut self,
input: std::option::Option<crate::model::NetworkInterfaceCreationType>,
) -> Self {
self.inner = self.inner.set_interface_type(input);
self
}
/// <p>The ID of the subnet to associate with the network interface.</p>
pub fn subnet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_id(inp);
self
}
/// <p>The ID of the subnet to associate with the network interface.</p>
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_subnet_id(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the new network interface.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the new network interface.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `CreateNetworkInterfacePermission`.
///
/// <p>Grants an Amazon Web Services-authorized account permission to attach the specified network interface to
/// an instance in their account.</p>
/// <p>You can grant permission to a single Amazon Web Services account only, and only one account at a time.</p>
#[derive(std::fmt::Debug)]
pub struct CreateNetworkInterfacePermission<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_network_interface_permission_input::Builder,
}
impl<C, M, R> CreateNetworkInterfacePermission<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateNetworkInterfacePermission`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateNetworkInterfacePermissionOutput,
aws_smithy_http::result::SdkError<crate::error::CreateNetworkInterfacePermissionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateNetworkInterfacePermissionInputOperationOutputAlias,
crate::output::CreateNetworkInterfacePermissionOutput,
crate::error::CreateNetworkInterfacePermissionError,
crate::input::CreateNetworkInterfacePermissionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of the network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
/// <p>The Amazon Web Services account ID.</p>
pub fn aws_account_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.aws_account_id(inp);
self
}
/// <p>The Amazon Web Services account ID.</p>
pub fn set_aws_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_aws_account_id(input);
self
}
/// <p>The Amazon Web Service. Currently not supported.</p>
pub fn aws_service(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.aws_service(inp);
self
}
/// <p>The Amazon Web Service. Currently not supported.</p>
pub fn set_aws_service(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_aws_service(input);
self
}
/// <p>The type of permission to grant.</p>
pub fn permission(mut self, inp: crate::model::InterfacePermissionType) -> Self {
self.inner = self.inner.permission(inp);
self
}
/// <p>The type of permission to grant.</p>
pub fn set_permission(
mut self,
input: std::option::Option<crate::model::InterfacePermissionType>,
) -> Self {
self.inner = self.inner.set_permission(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreatePlacementGroup`.
///
/// <p>Creates a placement group in which to launch instances. The strategy of the placement
/// group determines how the instances are organized within the group. </p>
/// <p>A <code>cluster</code> placement group is a logical grouping of instances within a
/// single Availability Zone that benefit from low network latency, high network throughput.
/// A <code>spread</code> placement group places instances on distinct hardware. A
/// <code>partition</code> placement group places groups of instances in different
/// partitions, where instances in one partition do not share the same hardware with
/// instances in another partition.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">Placement groups</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreatePlacementGroup<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_placement_group_input::Builder,
}
impl<C, M, R> CreatePlacementGroup<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreatePlacementGroup`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreatePlacementGroupOutput,
aws_smithy_http::result::SdkError<crate::error::CreatePlacementGroupError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreatePlacementGroupInputOperationOutputAlias,
crate::output::CreatePlacementGroupOutput,
crate::error::CreatePlacementGroupError,
crate::input::CreatePlacementGroupInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>A name for the placement group. Must be unique within the scope of your account for
/// the Region.</p>
/// <p>Constraints: Up to 255 ASCII characters</p>
pub fn group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_name(inp);
self
}
/// <p>A name for the placement group. Must be unique within the scope of your account for
/// the Region.</p>
/// <p>Constraints: Up to 255 ASCII characters</p>
pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_name(input);
self
}
/// <p>The placement strategy.</p>
pub fn strategy(mut self, inp: crate::model::PlacementStrategy) -> Self {
self.inner = self.inner.strategy(inp);
self
}
/// <p>The placement strategy.</p>
pub fn set_strategy(
mut self,
input: std::option::Option<crate::model::PlacementStrategy>,
) -> Self {
self.inner = self.inner.set_strategy(input);
self
}
/// <p>The number of partitions. Valid only when <b>Strategy</b> is
/// set to <code>partition</code>.</p>
pub fn partition_count(mut self, inp: i32) -> Self {
self.inner = self.inner.partition_count(inp);
self
}
/// <p>The number of partitions. Valid only when <b>Strategy</b> is
/// set to <code>partition</code>.</p>
pub fn set_partition_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_partition_count(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the new placement group.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the new placement group.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateReplaceRootVolumeTask`.
///
/// <p>Creates a root volume replacement task for an Amazon EC2 instance. The root volume
/// can either be restored to its initial launch state, or it can be restored using a
/// specific snapshot.</p>
///
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-restoring-volume.html#replace-root">Replace a root volume</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateReplaceRootVolumeTask<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_replace_root_volume_task_input::Builder,
}
impl<C, M, R> CreateReplaceRootVolumeTask<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateReplaceRootVolumeTask`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateReplaceRootVolumeTaskOutput,
aws_smithy_http::result::SdkError<crate::error::CreateReplaceRootVolumeTaskError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateReplaceRootVolumeTaskInputOperationOutputAlias,
crate::output::CreateReplaceRootVolumeTaskOutput,
crate::error::CreateReplaceRootVolumeTaskError,
crate::input::CreateReplaceRootVolumeTaskInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the instance for which to replace the root volume.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance for which to replace the root volume.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The ID of the snapshot from which to restore the replacement root volume. If you want to
/// restore the volume to the initial launch state, omit this parameter.</p>
pub fn snapshot_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.snapshot_id(inp);
self
}
/// <p>The ID of the snapshot from which to restore the replacement root volume. If you want to
/// restore the volume to the initial launch state, omit this parameter.</p>
pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_snapshot_id(input);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request.
/// If you do not specify a client token, a randomly generated token is used for the request
/// to ensure idempotency. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request.
/// If you do not specify a client token, a randomly generated token is used for the request
/// to ensure idempotency. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the root volume replacement task.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the root volume replacement task.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateReservedInstancesListing`.
///
/// <p>Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the Reserved Instance
/// Marketplace. You can submit one Standard Reserved Instance listing at a time. To get a list of your
/// Standard Reserved Instances, you can use the <a>DescribeReservedInstances</a> operation.</p>
/// <note>
/// <p>Only Standard Reserved Instances can be sold in the Reserved Instance Marketplace.
/// Convertible Reserved Instances cannot be sold.</p>
/// </note>
/// <p>The Reserved Instance Marketplace matches sellers who want to resell Standard Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.</p>
/// <p>To sell your Standard Reserved Instances, you must first register as a seller in the Reserved Instance
/// Marketplace. After completing the registration process, you can create a Reserved Instance
/// Marketplace listing of some or all of your Standard Reserved Instances, and specify the upfront price
/// to receive for them. Your Standard Reserved Instance listings then become available for purchase. To
/// view the details of your Standard Reserved Instance listing, you can use the
/// <a>DescribeReservedInstancesListings</a> operation.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved Instance Marketplace</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateReservedInstancesListing<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_reserved_instances_listing_input::Builder,
}
impl<C, M, R> CreateReservedInstancesListing<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateReservedInstancesListing`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateReservedInstancesListingOutput,
aws_smithy_http::result::SdkError<crate::error::CreateReservedInstancesListingError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateReservedInstancesListingInputOperationOutputAlias,
crate::output::CreateReservedInstancesListingOutput,
crate::error::CreateReservedInstancesListingError,
crate::input::CreateReservedInstancesListingInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Unique, case-sensitive identifier you provide to ensure idempotency of your
/// listings. This helps avoid duplicate listings. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure idempotency of your
/// listings. This helps avoid duplicate listings. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>The number of instances that are a part of a Reserved Instance account to be listed in the Reserved Instance Marketplace. This number should be less than or equal to the instance count associated with the Reserved Instance ID specified in this call.</p>
pub fn instance_count(mut self, inp: i32) -> Self {
self.inner = self.inner.instance_count(inp);
self
}
/// <p>The number of instances that are a part of a Reserved Instance account to be listed in the Reserved Instance Marketplace. This number should be less than or equal to the instance count associated with the Reserved Instance ID specified in this call.</p>
pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_instance_count(input);
self
}
/// Appends an item to `PriceSchedules`.
///
/// To override the contents of this collection use [`set_price_schedules`](Self::set_price_schedules).
///
/// <p>A list specifying the price of the Standard Reserved Instance for each month remaining in the Reserved Instance term.</p>
pub fn price_schedules(
mut self,
inp: impl Into<crate::model::PriceScheduleSpecification>,
) -> Self {
self.inner = self.inner.price_schedules(inp);
self
}
/// <p>A list specifying the price of the Standard Reserved Instance for each month remaining in the Reserved Instance term.</p>
pub fn set_price_schedules(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PriceScheduleSpecification>>,
) -> Self {
self.inner = self.inner.set_price_schedules(input);
self
}
/// <p>The ID of the active Standard Reserved Instance.</p>
pub fn reserved_instances_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.reserved_instances_id(inp);
self
}
/// <p>The ID of the active Standard Reserved Instance.</p>
pub fn set_reserved_instances_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_reserved_instances_id(input);
self
}
}
/// Fluent builder constructing a request to `CreateRestoreImageTask`.
///
/// <p>Starts a task that restores an AMI from an Amazon S3 object that was previously created by using
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html">CreateStoreImageTask</a>.</p>
/// <p>To use this API, you must have the required permissions. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions">Permissions for storing and restoring AMIs using Amazon S3</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html">Store and restore an AMI using
/// Amazon S3</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateRestoreImageTask<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_restore_image_task_input::Builder,
}
impl<C, M, R> CreateRestoreImageTask<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateRestoreImageTask`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateRestoreImageTaskOutput,
aws_smithy_http::result::SdkError<crate::error::CreateRestoreImageTaskError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateRestoreImageTaskInputOperationOutputAlias,
crate::output::CreateRestoreImageTaskOutput,
crate::error::CreateRestoreImageTaskError,
crate::input::CreateRestoreImageTaskInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the Amazon S3 bucket that contains the stored AMI object.</p>
pub fn bucket(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.bucket(inp);
self
}
/// <p>The name of the Amazon S3 bucket that contains the stored AMI object.</p>
pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_bucket(input);
self
}
/// <p>The name of the stored AMI object in the bucket.</p>
pub fn object_key(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.object_key(inp);
self
}
/// <p>The name of the stored AMI object in the bucket.</p>
pub fn set_object_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_object_key(input);
self
}
/// <p>The name for the restored AMI. The name must be unique for AMIs in the Region for this
/// account. If you do not provide a name, the new AMI gets the same name as the original
/// AMI.</p>
pub fn name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(inp);
self
}
/// <p>The name for the restored AMI. The name must be unique for AMIs in the Region for this
/// account. If you do not provide a name, the new AMI gets the same name as the original
/// AMI.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, the
/// snapshots, or both.</p>
/// <ul>
/// <li>
/// <p>To tag the AMI, the value for <code>ResourceType</code> must be <code>image</code>.</p>
/// </li>
/// <li>
/// <p>To
/// tag the snapshots, the value for <code>ResourceType</code> must be <code>snapshot</code>. The
/// same tag is applied to all of the snapshots that are created.</p>
/// </li>
/// </ul>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, the
/// snapshots, or both.</p>
/// <ul>
/// <li>
/// <p>To tag the AMI, the value for <code>ResourceType</code> must be <code>image</code>.</p>
/// </li>
/// <li>
/// <p>To
/// tag the snapshots, the value for <code>ResourceType</code> must be <code>snapshot</code>. The
/// same tag is applied to all of the snapshots that are created.</p>
/// </li>
/// </ul>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateRoute`.
///
/// <p>Creates a route in a route table within a VPC.</p>
/// <p>You must specify one of the following targets: internet gateway or virtual private
/// gateway, NAT instance, NAT gateway, VPC peering connection, network interface, egress-only internet gateway, or transit gateway.</p>
/// <p>When determining how to route traffic, we use the route with the most specific match.
/// For example, traffic is destined for the IPv4 address <code>192.0.2.3</code>, and the
/// route table includes the following two IPv4 routes:</p>
/// <ul>
/// <li>
/// <p>
/// <code>192.0.2.0/24</code> (goes to some target A)</p>
/// </li>
/// <li>
/// <p>
/// <code>192.0.2.0/28</code> (goes to some target B)</p>
/// </li>
/// </ul>
/// <p>Both routes apply to the traffic destined for <code>192.0.2.3</code>. However, the second route
/// in the list covers a smaller number of IP addresses and is therefore more specific,
/// so we use that route to determine where to target the traffic.</p>
/// <p>For more information about route tables, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route tables</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateRoute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_route_input::Builder,
}
impl<C, M, R> CreateRoute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateRoute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateRouteOutput,
aws_smithy_http::result::SdkError<crate::error::CreateRouteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateRouteInputOperationOutputAlias,
crate::output::CreateRouteOutput,
crate::error::CreateRouteError,
crate::input::CreateRouteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <p>The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.</p>
pub fn destination_ipv6_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_ipv6_cidr_block(inp);
self
}
/// <p>The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.</p>
pub fn set_destination_ipv6_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_ipv6_cidr_block(input);
self
}
/// <p>The ID of a prefix list used for the destination match.</p>
pub fn destination_prefix_list_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_prefix_list_id(inp);
self
}
/// <p>The ID of a prefix list used for the destination match.</p>
pub fn set_destination_prefix_list_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_prefix_list_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
pub fn vpc_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_endpoint_id(inp);
self
}
/// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
pub fn set_vpc_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpc_endpoint_id(input);
self
}
/// <p>[IPv6 traffic only] The ID of an egress-only internet gateway.</p>
pub fn egress_only_internet_gateway_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.egress_only_internet_gateway_id(inp);
self
}
/// <p>[IPv6 traffic only] The ID of an egress-only internet gateway.</p>
pub fn set_egress_only_internet_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_egress_only_internet_gateway_id(input);
self
}
/// <p>The ID of an internet gateway or virtual private gateway attached to your
/// VPC.</p>
pub fn gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.gateway_id(inp);
self
}
/// <p>The ID of an internet gateway or virtual private gateway attached to your
/// VPC.</p>
pub fn set_gateway_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_gateway_id(input);
self
}
/// <p>The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>[IPv4 traffic only] The ID of a NAT gateway.</p>
pub fn nat_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.nat_gateway_id(inp);
self
}
/// <p>[IPv4 traffic only] The ID of a NAT gateway.</p>
pub fn set_nat_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_nat_gateway_id(input);
self
}
/// <p>The ID of a transit gateway.</p>
pub fn transit_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.transit_gateway_id(inp);
self
}
/// <p>The ID of a transit gateway.</p>
pub fn set_transit_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_id(input);
self
}
/// <p>The ID of the local gateway.</p>
pub fn local_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.local_gateway_id(inp);
self
}
/// <p>The ID of the local gateway.</p>
pub fn set_local_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_local_gateway_id(input);
self
}
/// <p>The ID of the carrier gateway.</p>
/// <p>You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.</p>
pub fn carrier_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.carrier_gateway_id(inp);
self
}
/// <p>The ID of the carrier gateway.</p>
/// <p>You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.</p>
pub fn set_carrier_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_carrier_gateway_id(input);
self
}
/// <p>The ID of a network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of a network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
/// <p>The ID of the route table for the route.</p>
pub fn route_table_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.route_table_id(inp);
self
}
/// <p>The ID of the route table for the route.</p>
pub fn set_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_route_table_id(input);
self
}
/// <p>The ID of a VPC peering connection.</p>
pub fn vpc_peering_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_peering_connection_id(inp);
self
}
/// <p>The ID of a VPC peering connection.</p>
pub fn set_vpc_peering_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpc_peering_connection_id(input);
self
}
}
/// Fluent builder constructing a request to `CreateRouteTable`.
///
/// <p>Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route tables</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateRouteTable<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_route_table_input::Builder,
}
impl<C, M, R> CreateRouteTable<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateRouteTable`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateRouteTableOutput,
aws_smithy_http::result::SdkError<crate::error::CreateRouteTableError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateRouteTableInputOperationOutputAlias,
crate::output::CreateRouteTableOutput,
crate::error::CreateRouteTableError,
crate::input::CreateRouteTableInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the route table.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the route table.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateSecurityGroup`.
///
/// <p>Creates a security group.</p>
/// <p>A security group acts as a virtual firewall for your instance to control inbound and outbound traffic.
/// For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html">Amazon EC2 security groups</a> in
/// the <i>Amazon Elastic Compute Cloud User Guide</i> and
/// <a href="https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html">Security groups for your VPC</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
/// <p>When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.</p>
/// <p>You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.</p>
/// <p>You can add or remove rules from your security groups using
/// <a>AuthorizeSecurityGroupIngress</a>,
/// <a>AuthorizeSecurityGroupEgress</a>,
/// <a>RevokeSecurityGroupIngress</a>, and
/// <a>RevokeSecurityGroupEgress</a>.</p>
/// <p>For more information about VPC security group limits, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html">Amazon VPC Limits</a>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateSecurityGroup<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_security_group_input::Builder,
}
impl<C, M, R> CreateSecurityGroup<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateSecurityGroup`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateSecurityGroupOutput,
aws_smithy_http::result::SdkError<crate::error::CreateSecurityGroupError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateSecurityGroupInputOperationOutputAlias,
crate::output::CreateSecurityGroupOutput,
crate::error::CreateSecurityGroupError,
crate::input::CreateSecurityGroupInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>A description for the security group. This is informational only.</p>
/// <p>Constraints: Up to 255 characters in length</p>
/// <p>Constraints for EC2-Classic: ASCII characters</p>
/// <p>Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for the security group. This is informational only.</p>
/// <p>Constraints: Up to 255 characters in length</p>
/// <p>Constraints for EC2-Classic: ASCII characters</p>
/// <p>Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>The name of the security group.</p>
/// <p>Constraints: Up to 255 characters in length. Cannot start with
/// <code>sg-</code>.</p>
/// <p>Constraints for EC2-Classic: ASCII characters</p>
/// <p>Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*</p>
pub fn group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_name(inp);
self
}
/// <p>The name of the security group.</p>
/// <p>Constraints: Up to 255 characters in length. Cannot start with
/// <code>sg-</code>.</p>
/// <p>Constraints for EC2-Classic: ASCII characters</p>
/// <p>Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*</p>
pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_name(input);
self
}
/// <p>[EC2-VPC] The ID of the VPC. Required for EC2-VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>[EC2-VPC] The ID of the VPC. Required for EC2-VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the security group.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the security group.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateSnapshot`.
///
/// <p>Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for
/// backups, to make copies of EBS volumes, and to save data before shutting down an
/// instance.</p>
///
///
/// <p>You can create snapshots of volumes in a Region and volumes on an Outpost. If you
/// create a snapshot of a volume in a Region, the snapshot must be stored in the same
/// Region as the volume. If you create a snapshot of a volume on an Outpost, the snapshot
/// can be stored on the same Outpost as the volume, or in the Region for that Outpost.</p>
///
/// <p>When a snapshot is created, any Amazon Web Services Marketplace product codes that are associated with the
/// source volume are propagated to the snapshot.</p>
/// <p>You can take a snapshot of an attached volume that is in use. However, snapshots only
/// capture data that has been written to your Amazon EBS volume at the time the snapshot command is
/// issued; this might exclude any data that has been cached by any applications or the operating
/// system. If you can pause any file systems on the volume long enough to take a snapshot, your
/// snapshot should be complete. However, if you cannot pause all file writes to the volume, you
/// should unmount the volume from within the instance, issue the snapshot command, and then
/// remount the volume to ensure a consistent and complete snapshot. You may remount and use your
/// volume while the snapshot status is <code>pending</code>.</p>
/// <p>To create a snapshot for Amazon EBS volumes that serve as root devices, you should stop the
/// instance before taking the snapshot.</p>
/// <p>Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that
/// are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes
/// and any associated snapshots always remain protected.</p>
/// <p>You can tag your snapshots during creation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tag your Amazon EC2
/// resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html">Amazon Elastic Block Store</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateSnapshot<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_snapshot_input::Builder,
}
impl<C, M, R> CreateSnapshot<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateSnapshot`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateSnapshotOutput,
aws_smithy_http::result::SdkError<crate::error::CreateSnapshotError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateSnapshotInputOperationOutputAlias,
crate::output::CreateSnapshotOutput,
crate::error::CreateSnapshotError,
crate::input::CreateSnapshotInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>A description for the snapshot.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for the snapshot.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost on which to create a local
/// snapshot.</p>
/// <ul>
/// <li>
/// <p>To create a snapshot of a volume in a Region, omit this parameter. The snapshot
/// is created in the same Region as the volume.</p>
/// </li>
/// <li>
/// <p>To create a snapshot of a volume on an Outpost and store the snapshot in the
/// Region, omit this parameter. The snapshot is created in the Region for the
/// Outpost.</p>
/// </li>
/// <li>
/// <p>To create a snapshot of a volume on an Outpost and store the snapshot on an
/// Outpost, specify the ARN of the destination Outpost. The snapshot must be created on
/// the same Outpost as the volume.</p>
/// </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#create-snapshot">Create local snapshots from volumes on an Outpost</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn outpost_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.outpost_arn(inp);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost on which to create a local
/// snapshot.</p>
/// <ul>
/// <li>
/// <p>To create a snapshot of a volume in a Region, omit this parameter. The snapshot
/// is created in the same Region as the volume.</p>
/// </li>
/// <li>
/// <p>To create a snapshot of a volume on an Outpost and store the snapshot in the
/// Region, omit this parameter. The snapshot is created in the Region for the
/// Outpost.</p>
/// </li>
/// <li>
/// <p>To create a snapshot of a volume on an Outpost and store the snapshot on an
/// Outpost, specify the ARN of the destination Outpost. The snapshot must be created on
/// the same Outpost as the volume.</p>
/// </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#create-snapshot">Create local snapshots from volumes on an Outpost</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_outpost_arn(input);
self
}
/// <p>The ID of the Amazon EBS volume.</p>
pub fn volume_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.volume_id(inp);
self
}
/// <p>The ID of the Amazon EBS volume.</p>
pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_volume_id(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the snapshot during creation.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the snapshot during creation.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateSnapshots`.
///
/// <p>Creates crash-consistent snapshots of multiple EBS volumes and stores the data in S3.
/// Volumes are chosen by specifying an instance. Any attached volumes will produce one snapshot
/// each that is crash-consistent across the instance. Boot volumes can be excluded by changing the
/// parameters. </p>
///
/// <p>You can create multi-volume snapshots of instances in a Region and instances on an
/// Outpost. If you create snapshots from an instance in a Region, the snapshots must be stored
/// in the same Region as the instance. If you create snapshots from an instance on an Outpost,
/// the snapshots can be stored on the same Outpost as the instance, or in the Region for that
/// Outpost.</p>
#[derive(std::fmt::Debug)]
pub struct CreateSnapshots<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_snapshots_input::Builder,
}
impl<C, M, R> CreateSnapshots<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateSnapshots`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateSnapshotsOutput,
aws_smithy_http::result::SdkError<crate::error::CreateSnapshotsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateSnapshotsInputOperationOutputAlias,
crate::output::CreateSnapshotsOutput,
crate::error::CreateSnapshotsError,
crate::input::CreateSnapshotsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p> A description propagated to every snapshot specified by the instance.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p> A description propagated to every snapshot specified by the instance.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>The instance to specify which volumes should be included in the snapshots.</p>
pub fn instance_specification(mut self, inp: crate::model::InstanceSpecification) -> Self {
self.inner = self.inner.instance_specification(inp);
self
}
/// <p>The instance to specify which volumes should be included in the snapshots.</p>
pub fn set_instance_specification(
mut self,
input: std::option::Option<crate::model::InstanceSpecification>,
) -> Self {
self.inner = self.inner.set_instance_specification(input);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the local
/// snapshots.</p>
/// <ul>
/// <li>
/// <p>To create snapshots from an instance in a Region, omit this parameter. The
/// snapshots are created in the same Region as the instance.</p>
/// </li>
/// <li>
/// <p>To create snapshots from an instance on an Outpost and store the snapshots
/// in the Region, omit this parameter. The snapshots are created in the Region
/// for the Outpost.</p>
/// </li>
/// <li>
/// <p>To create snapshots from an instance on an Outpost and store the snapshots
/// on an Outpost, specify the ARN of the destination Outpost. The snapshots must
/// be created on the same Outpost as the instance.</p>
/// </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#create-multivol-snapshot">
/// Create multi-volume local snapshots from instances on an Outpost</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn outpost_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.outpost_arn(inp);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the local
/// snapshots.</p>
/// <ul>
/// <li>
/// <p>To create snapshots from an instance in a Region, omit this parameter. The
/// snapshots are created in the same Region as the instance.</p>
/// </li>
/// <li>
/// <p>To create snapshots from an instance on an Outpost and store the snapshots
/// in the Region, omit this parameter. The snapshots are created in the Region
/// for the Outpost.</p>
/// </li>
/// <li>
/// <p>To create snapshots from an instance on an Outpost and store the snapshots
/// on an Outpost, specify the ARN of the destination Outpost. The snapshots must
/// be created on the same Outpost as the instance.</p>
/// </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#create-multivol-snapshot">
/// Create multi-volume local snapshots from instances on an Outpost</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_outpost_arn(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>Tags to apply to every snapshot specified by the instance.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>Tags to apply to every snapshot specified by the instance.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Copies the tags from the specified volume to corresponding snapshot.</p>
pub fn copy_tags_from_source(mut self, inp: crate::model::CopyTagsFromSource) -> Self {
self.inner = self.inner.copy_tags_from_source(inp);
self
}
/// <p>Copies the tags from the specified volume to corresponding snapshot.</p>
pub fn set_copy_tags_from_source(
mut self,
input: std::option::Option<crate::model::CopyTagsFromSource>,
) -> Self {
self.inner = self.inner.set_copy_tags_from_source(input);
self
}
}
/// Fluent builder constructing a request to `CreateSpotDatafeedSubscription`.
///
/// <p>Creates a data feed for Spot Instances, enabling you to view Spot Instance usage logs.
/// You can create one data feed per Amazon Web Services account. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html">Spot Instance data feed</a>
/// in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateSpotDatafeedSubscription<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_spot_datafeed_subscription_input::Builder,
}
impl<C, M, R> CreateSpotDatafeedSubscription<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateSpotDatafeedSubscription`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateSpotDatafeedSubscriptionOutput,
aws_smithy_http::result::SdkError<crate::error::CreateSpotDatafeedSubscriptionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateSpotDatafeedSubscriptionInputOperationOutputAlias,
crate::output::CreateSpotDatafeedSubscriptionOutput,
crate::error::CreateSpotDatafeedSubscriptionError,
crate::input::CreateSpotDatafeedSubscriptionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the Amazon S3 bucket in which to store the Spot Instance data feed. For
/// more information about bucket names, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules">Rules for bucket
/// naming</a> in the <i>Amazon S3 Developer Guide</i>.</p>
pub fn bucket(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.bucket(inp);
self
}
/// <p>The name of the Amazon S3 bucket in which to store the Spot Instance data feed. For
/// more information about bucket names, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules">Rules for bucket
/// naming</a> in the <i>Amazon S3 Developer Guide</i>.</p>
pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_bucket(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The prefix for the data feed file names.</p>
pub fn prefix(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix(inp);
self
}
/// <p>The prefix for the data feed file names.</p>
pub fn set_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_prefix(input);
self
}
}
/// Fluent builder constructing a request to `CreateStoreImageTask`.
///
/// <p>Stores an AMI as a single object in an Amazon S3 bucket.</p>
/// <p>To use this API, you must have the required permissions. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions">Permissions for storing and restoring AMIs using Amazon S3</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html">Store and restore an AMI using
/// Amazon S3</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateStoreImageTask<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_store_image_task_input::Builder,
}
impl<C, M, R> CreateStoreImageTask<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateStoreImageTask`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateStoreImageTaskOutput,
aws_smithy_http::result::SdkError<crate::error::CreateStoreImageTaskError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateStoreImageTaskInputOperationOutputAlias,
crate::output::CreateStoreImageTaskOutput,
crate::error::CreateStoreImageTaskError,
crate::input::CreateStoreImageTaskInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the AMI.</p>
pub fn image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.image_id(inp);
self
}
/// <p>The ID of the AMI.</p>
pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_image_id(input);
self
}
/// <p>The name of the Amazon S3 bucket in which the AMI object will be stored. The bucket must be in
/// the Region in which the request is being made. The AMI object appears in the bucket only after
/// the upload task has completed. </p>
pub fn bucket(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.bucket(inp);
self
}
/// <p>The name of the Amazon S3 bucket in which the AMI object will be stored. The bucket must be in
/// the Region in which the request is being made. The AMI object appears in the bucket only after
/// the upload task has completed. </p>
pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_bucket(input);
self
}
/// Appends an item to `S3ObjectTags`.
///
/// To override the contents of this collection use [`set_s3_object_tags`](Self::set_s3_object_tags).
///
/// <p>The tags to apply to the AMI object that will be stored in the Amazon S3 bucket. </p>
pub fn s3_object_tags(mut self, inp: impl Into<crate::model::S3ObjectTag>) -> Self {
self.inner = self.inner.s3_object_tags(inp);
self
}
/// <p>The tags to apply to the AMI object that will be stored in the Amazon S3 bucket. </p>
pub fn set_s3_object_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::S3ObjectTag>>,
) -> Self {
self.inner = self.inner.set_s3_object_tags(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateSubnet`.
///
/// <p>Creates a subnet in a specified VPC.</p>
/// <p>You must specify an IPv4 CIDR block for the subnet. After you create a subnet, you
/// can't change its CIDR block. The allowed block size is between a /16 netmask (65,536 IP
/// addresses) and /28 netmask (16 IP addresses). The CIDR block must not overlap with the
/// CIDR block of an existing subnet in the VPC.</p>
/// <p>If you've associated an IPv6 CIDR block with your VPC, you can create a subnet with an
/// IPv6 CIDR block that uses a /64 prefix length. </p>
/// <important>
/// <p>Amazon Web Services reserves both the first four and the last IPv4 address in each subnet's CIDR
/// block. They're not available for use.</p>
/// </important>
/// <p>If you add more than one subnet to a VPC, they're set up in a star topology with a
/// logical router in the middle.</p>
/// <p>When you stop an instance in a subnet, it retains its private IPv4 address. It's
/// therefore possible to have a subnet with no running instances (they're all stopped), but
/// no remaining IP addresses available.</p>
/// <p>For more information about subnets, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html">Your VPC and subnets</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateSubnet<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_subnet_input::Builder,
}
impl<C, M, R> CreateSubnet<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateSubnet`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateSubnetOutput,
aws_smithy_http::result::SdkError<crate::error::CreateSubnetError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateSubnetInputOperationOutputAlias,
crate::output::CreateSubnetOutput,
crate::error::CreateSubnetError,
crate::input::CreateSubnetInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the subnet.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the subnet.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>The Availability Zone or Local Zone for the subnet.</p>
/// <p>Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we
/// do not necessarily select a different zone for each subnet.</p>
/// <p>To create a subnet in a Local Zone, set this value to the Local Zone ID, for example
/// <code>us-west-2-lax-1a</code>. For information about the Regions that support Local Zones,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions">Available Regions</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>To create a subnet in an Outpost, set this value to the Availability Zone for the
/// Outpost and specify the Outpost ARN.</p>
pub fn availability_zone(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zone(inp);
self
}
/// <p>The Availability Zone or Local Zone for the subnet.</p>
/// <p>Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we
/// do not necessarily select a different zone for each subnet.</p>
/// <p>To create a subnet in a Local Zone, set this value to the Local Zone ID, for example
/// <code>us-west-2-lax-1a</code>. For information about the Regions that support Local Zones,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions">Available Regions</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>To create a subnet in an Outpost, set this value to the Availability Zone for the
/// Outpost and specify the Outpost ARN.</p>
pub fn set_availability_zone(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_availability_zone(input);
self
}
/// <p>The AZ ID or the Local Zone ID of the subnet.</p>
pub fn availability_zone_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zone_id(inp);
self
}
/// <p>The AZ ID or the Local Zone ID of the subnet.</p>
pub fn set_availability_zone_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_availability_zone_id(input);
self
}
/// <p>The IPv4 network range for the subnet, in CIDR notation. For example, <code>10.0.0.0/24</code>. We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
pub fn cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr_block(inp);
self
}
/// <p>The IPv4 network range for the subnet, in CIDR notation. For example, <code>10.0.0.0/24</code>. We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr_block(input);
self
}
/// <p>The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a
/// /64 prefix length.</p>
pub fn ipv6_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv6_cidr_block(inp);
self
}
/// <p>The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a
/// /64 prefix length.</p>
pub fn set_ipv6_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_ipv6_cidr_block(input);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also
/// specify the Availability Zone of the Outpost subnet.</p>
pub fn outpost_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.outpost_arn(inp);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also
/// specify the Availability Zone of the Outpost subnet.</p>
pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_outpost_arn(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateSubnetCidrReservation`.
///
/// <p>Creates a subnet CIDR reservation. For information about subnet CIDR reservations, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/subnet-cidr-reservation.html">Subnet CIDR reservations</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateSubnetCidrReservation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_subnet_cidr_reservation_input::Builder,
}
impl<C, M, R> CreateSubnetCidrReservation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateSubnetCidrReservation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateSubnetCidrReservationOutput,
aws_smithy_http::result::SdkError<crate::error::CreateSubnetCidrReservationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateSubnetCidrReservationInputOperationOutputAlias,
crate::output::CreateSubnetCidrReservationOutput,
crate::error::CreateSubnetCidrReservationError,
crate::input::CreateSubnetCidrReservationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the subnet CIDR reservation.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the subnet CIDR reservation.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>The ID of the subnet.</p>
pub fn subnet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_id(inp);
self
}
/// <p>The ID of the subnet.</p>
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_subnet_id(input);
self
}
/// <p>The IPv4 or IPV6 CIDR range to reserve.</p>
pub fn cidr(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr(inp);
self
}
/// <p>The IPv4 or IPV6 CIDR range to reserve.</p>
pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr(input);
self
}
/// <p>The type of reservation.</p>
/// <p>The following are valid values:</p>
/// <ul>
/// <li>
/// <p>
/// <code>prefix</code>: The Amazon EC2
/// Prefix
/// Delegation feature assigns the IP addresses to network interfaces that are
/// associated with an instance. For information about Prefix
/// Delegation,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-delegation.html">Prefix Delegation
/// for Amazon EC2 network interfaces</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// </li>
/// <li>
/// <p>
/// <code>explicit</code>: You manually assign the IP addresses to resources that
/// reside in your subnet. </p>
/// </li>
/// </ul>
pub fn reservation_type(mut self, inp: crate::model::SubnetCidrReservationType) -> Self {
self.inner = self.inner.reservation_type(inp);
self
}
/// <p>The type of reservation.</p>
/// <p>The following are valid values:</p>
/// <ul>
/// <li>
/// <p>
/// <code>prefix</code>: The Amazon EC2
/// Prefix
/// Delegation feature assigns the IP addresses to network interfaces that are
/// associated with an instance. For information about Prefix
/// Delegation,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-delegation.html">Prefix Delegation
/// for Amazon EC2 network interfaces</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// </li>
/// <li>
/// <p>
/// <code>explicit</code>: You manually assign the IP addresses to resources that
/// reside in your subnet. </p>
/// </li>
/// </ul>
pub fn set_reservation_type(
mut self,
input: std::option::Option<crate::model::SubnetCidrReservationType>,
) -> Self {
self.inner = self.inner.set_reservation_type(input);
self
}
/// <p>The
/// description
/// to assign to the subnet CIDR reservation.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>The
/// description
/// to assign to the subnet CIDR reservation.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateTags`.
///
/// <p>Adds or overwrites only the specified tags for the specified Amazon EC2 resource or
/// resources. When you specify an existing tag key, the value is overwritten with
/// the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and
/// optional value. Tag keys must be unique per resource.</p>
///
/// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging Your Resources</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about
/// creating IAM policies that control users' access to resources based on tags, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html">Supported
/// Resource-Level Permissions for Amazon EC2 API Actions</a> in the <i>Amazon
/// Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTags<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_tags_input::Builder,
}
impl<C, M, R> CreateTags<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTags`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTagsOutput,
aws_smithy_http::result::SdkError<crate::error::CreateTagsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTagsInputOperationOutputAlias,
crate::output::CreateTagsOutput,
crate::error::CreateTagsError,
crate::input::CreateTagsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Resources`.
///
/// To override the contents of this collection use [`set_resources`](Self::set_resources).
///
/// <p>The IDs of the resources, separated by spaces.</p>
/// <p>Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.</p>
pub fn resources(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resources(inp);
self
}
/// <p>The IDs of the resources, separated by spaces.</p>
/// <p>Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.</p>
pub fn set_resources(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resources(input);
self
}
/// Appends an item to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags. The <code>value</code> parameter is required, but if you don't want the tag to have a value,
/// specify the parameter with no value, and we set the value to an empty string.</p>
pub fn tags(mut self, inp: impl Into<crate::model::Tag>) -> Self {
self.inner = self.inner.tags(inp);
self
}
/// <p>The tags. The <code>value</code> parameter is required, but if you don't want the tag to have a value,
/// specify the parameter with no value, and we set the value to an empty string.</p>
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.inner = self.inner.set_tags(input);
self
}
}
/// Fluent builder constructing a request to `CreateTrafficMirrorFilter`.
///
/// <p>Creates a Traffic Mirror filter.</p>
/// <p>A Traffic Mirror filter is a set of rules that defines the traffic to mirror.</p>
/// <p>By default, no traffic is mirrored. To mirror traffic, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorFilterRule.htm">CreateTrafficMirrorFilterRule</a> to add Traffic Mirror rules to the filter. The rules you
/// add define what traffic gets mirrored. You can also use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyTrafficMirrorFilterNetworkServices.html">ModifyTrafficMirrorFilterNetworkServices</a> to mirror supported network services.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTrafficMirrorFilter<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_traffic_mirror_filter_input::Builder,
}
impl<C, M, R> CreateTrafficMirrorFilter<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTrafficMirrorFilter`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTrafficMirrorFilterOutput,
aws_smithy_http::result::SdkError<crate::error::CreateTrafficMirrorFilterError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTrafficMirrorFilterInputOperationOutputAlias,
crate::output::CreateTrafficMirrorFilterOutput,
crate::error::CreateTrafficMirrorFilterError,
crate::input::CreateTrafficMirrorFilterInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The description of the Traffic Mirror filter.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>The description of the Traffic Mirror filter.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to a Traffic Mirror filter.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to a Traffic Mirror filter.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `CreateTrafficMirrorFilterRule`.
///
/// <p>Creates a Traffic Mirror filter rule.</p>
/// <p>A Traffic Mirror rule defines the Traffic Mirror source traffic to mirror.</p>
/// <p>You need the Traffic Mirror filter ID when you create the rule.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTrafficMirrorFilterRule<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_traffic_mirror_filter_rule_input::Builder,
}
impl<C, M, R> CreateTrafficMirrorFilterRule<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTrafficMirrorFilterRule`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTrafficMirrorFilterRuleOutput,
aws_smithy_http::result::SdkError<crate::error::CreateTrafficMirrorFilterRuleError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTrafficMirrorFilterRuleInputOperationOutputAlias,
crate::output::CreateTrafficMirrorFilterRuleOutput,
crate::error::CreateTrafficMirrorFilterRuleError,
crate::input::CreateTrafficMirrorFilterRuleInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the filter that this rule is associated with.</p>
pub fn traffic_mirror_filter_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_filter_id(inp);
self
}
/// <p>The ID of the filter that this rule is associated with.</p>
pub fn set_traffic_mirror_filter_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_filter_id(input);
self
}
/// <p>The type of traffic.</p>
pub fn traffic_direction(mut self, inp: crate::model::TrafficDirection) -> Self {
self.inner = self.inner.traffic_direction(inp);
self
}
/// <p>The type of traffic.</p>
pub fn set_traffic_direction(
mut self,
input: std::option::Option<crate::model::TrafficDirection>,
) -> Self {
self.inner = self.inner.set_traffic_direction(input);
self
}
/// <p>The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given
/// direction. The rules are processed in ascending order by rule number.</p>
pub fn rule_number(mut self, inp: i32) -> Self {
self.inner = self.inner.rule_number(inp);
self
}
/// <p>The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given
/// direction. The rules are processed in ascending order by rule number.</p>
pub fn set_rule_number(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_rule_number(input);
self
}
/// <p>The action to take on the filtered traffic.</p>
pub fn rule_action(mut self, inp: crate::model::TrafficMirrorRuleAction) -> Self {
self.inner = self.inner.rule_action(inp);
self
}
/// <p>The action to take on the filtered traffic.</p>
pub fn set_rule_action(
mut self,
input: std::option::Option<crate::model::TrafficMirrorRuleAction>,
) -> Self {
self.inner = self.inner.set_rule_action(input);
self
}
/// <p>The destination port range.</p>
pub fn destination_port_range(
mut self,
inp: crate::model::TrafficMirrorPortRangeRequest,
) -> Self {
self.inner = self.inner.destination_port_range(inp);
self
}
/// <p>The destination port range.</p>
pub fn set_destination_port_range(
mut self,
input: std::option::Option<crate::model::TrafficMirrorPortRangeRequest>,
) -> Self {
self.inner = self.inner.set_destination_port_range(input);
self
}
/// <p>The source port range.</p>
pub fn source_port_range(
mut self,
inp: crate::model::TrafficMirrorPortRangeRequest,
) -> Self {
self.inner = self.inner.source_port_range(inp);
self
}
/// <p>The source port range.</p>
pub fn set_source_port_range(
mut self,
input: std::option::Option<crate::model::TrafficMirrorPortRangeRequest>,
) -> Self {
self.inner = self.inner.set_source_port_range(input);
self
}
/// <p>The protocol, for example UDP, to assign to the Traffic Mirror rule.</p>
/// <p>For information about the protocol value, see <a href="https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a> on the Internet Assigned Numbers Authority (IANA) website.</p>
pub fn protocol(mut self, inp: i32) -> Self {
self.inner = self.inner.protocol(inp);
self
}
/// <p>The protocol, for example UDP, to assign to the Traffic Mirror rule.</p>
/// <p>For information about the protocol value, see <a href="https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a> on the Internet Assigned Numbers Authority (IANA) website.</p>
pub fn set_protocol(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_protocol(input);
self
}
/// <p>The destination CIDR block to assign to the Traffic Mirror rule.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The destination CIDR block to assign to the Traffic Mirror rule.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <p>The source CIDR block to assign to the Traffic Mirror rule.</p>
pub fn source_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_cidr_block(inp);
self
}
/// <p>The source CIDR block to assign to the Traffic Mirror rule.</p>
pub fn set_source_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_cidr_block(input);
self
}
/// <p>The description of the Traffic Mirror rule.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>The description of the Traffic Mirror rule.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `CreateTrafficMirrorSession`.
///
/// <p>Creates a Traffic Mirror session.</p>
/// <p>A Traffic Mirror session actively copies packets from a Traffic Mirror source to a Traffic Mirror target. Create a filter, and then assign it
/// to the session to define a subset of the traffic to mirror, for example all TCP
/// traffic.</p>
/// <p>The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in a different VPC connected via VPC peering or a transit gateway. </p>
/// <p>By default, no traffic is mirrored. Use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorFilter.htm">CreateTrafficMirrorFilter</a> to
/// create filter rules that specify the traffic to mirror.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTrafficMirrorSession<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_traffic_mirror_session_input::Builder,
}
impl<C, M, R> CreateTrafficMirrorSession<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTrafficMirrorSession`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTrafficMirrorSessionOutput,
aws_smithy_http::result::SdkError<crate::error::CreateTrafficMirrorSessionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTrafficMirrorSessionInputOperationOutputAlias,
crate::output::CreateTrafficMirrorSessionOutput,
crate::error::CreateTrafficMirrorSessionError,
crate::input::CreateTrafficMirrorSessionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the source network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of the source network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
/// <p>The ID of the Traffic Mirror target.</p>
pub fn traffic_mirror_target_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_target_id(inp);
self
}
/// <p>The ID of the Traffic Mirror target.</p>
pub fn set_traffic_mirror_target_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_target_id(input);
self
}
/// <p>The ID of the Traffic Mirror filter.</p>
pub fn traffic_mirror_filter_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_filter_id(inp);
self
}
/// <p>The ID of the Traffic Mirror filter.</p>
pub fn set_traffic_mirror_filter_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_filter_id(input);
self
}
/// <p>The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do
/// not specify this parameter when you want to mirror the entire packet. To mirror a subset of
/// the packet, set this to the length (in bytes) that you want to mirror. For example, if you
/// set this value to 100, then the first 100 bytes that meet the filter criteria are copied to
/// the target.</p>
/// <p>If you do not want to mirror the entire packet, use the <code>PacketLength</code> parameter to specify the number of bytes in each packet to mirror.</p>
pub fn packet_length(mut self, inp: i32) -> Self {
self.inner = self.inner.packet_length(inp);
self
}
/// <p>The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do
/// not specify this parameter when you want to mirror the entire packet. To mirror a subset of
/// the packet, set this to the length (in bytes) that you want to mirror. For example, if you
/// set this value to 100, then the first 100 bytes that meet the filter criteria are copied to
/// the target.</p>
/// <p>If you do not want to mirror the entire packet, use the <code>PacketLength</code> parameter to specify the number of bytes in each packet to mirror.</p>
pub fn set_packet_length(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_packet_length(input);
self
}
/// <p>The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.</p>
/// <p>Valid values are 1-32766.</p>
pub fn session_number(mut self, inp: i32) -> Self {
self.inner = self.inner.session_number(inp);
self
}
/// <p>The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.</p>
/// <p>Valid values are 1-32766.</p>
pub fn set_session_number(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_session_number(input);
self
}
/// <p>The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN
/// protocol, see <a href="https://tools.ietf.org/html/rfc7348">RFC 7348</a>. If you do
/// not specify a <code>VirtualNetworkId</code>, an account-wide unique id is chosen at
/// random.</p>
pub fn virtual_network_id(mut self, inp: i32) -> Self {
self.inner = self.inner.virtual_network_id(inp);
self
}
/// <p>The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN
/// protocol, see <a href="https://tools.ietf.org/html/rfc7348">RFC 7348</a>. If you do
/// not specify a <code>VirtualNetworkId</code>, an account-wide unique id is chosen at
/// random.</p>
pub fn set_virtual_network_id(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_virtual_network_id(input);
self
}
/// <p>The description of the Traffic Mirror session.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>The description of the Traffic Mirror session.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to a Traffic Mirror session.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to a Traffic Mirror session.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `CreateTrafficMirrorTarget`.
///
/// <p>Creates a target for your Traffic Mirror session.</p>
/// <p>A Traffic Mirror target is the destination for mirrored traffic. The Traffic Mirror source and
/// the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in
/// different VPCs connected via VPC peering or a transit gateway.</p>
/// <p>A Traffic Mirror target can be a network interface, or a Network Load Balancer.</p>
/// <p>To use the target in a Traffic Mirror session, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorSession.htm">CreateTrafficMirrorSession</a>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTrafficMirrorTarget<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_traffic_mirror_target_input::Builder,
}
impl<C, M, R> CreateTrafficMirrorTarget<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTrafficMirrorTarget`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTrafficMirrorTargetOutput,
aws_smithy_http::result::SdkError<crate::error::CreateTrafficMirrorTargetError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTrafficMirrorTargetInputOperationOutputAlias,
crate::output::CreateTrafficMirrorTargetOutput,
crate::error::CreateTrafficMirrorTargetError,
crate::input::CreateTrafficMirrorTargetInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The network interface ID that is associated with the target.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The network interface ID that is associated with the target.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
/// <p>The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.</p>
pub fn network_load_balancer_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_load_balancer_arn(inp);
self
}
/// <p>The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.</p>
pub fn set_network_load_balancer_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_load_balancer_arn(input);
self
}
/// <p>The description of the Traffic Mirror target.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>The description of the Traffic Mirror target.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the Traffic Mirror target.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the Traffic Mirror target.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `CreateTransitGateway`.
///
/// <p>Creates a transit gateway.</p>
/// <p>You can use a transit gateway to interconnect your virtual private clouds (VPC) and on-premises networks.
/// After the transit gateway enters the <code>available</code> state, you can attach your VPCs and VPN
/// connections to the transit gateway.</p>
/// <p>To attach your VPCs, use <a>CreateTransitGatewayVpcAttachment</a>.</p>
/// <p>To attach a VPN connection, use <a>CreateCustomerGateway</a> to create a customer
/// gateway and specify the ID of the customer gateway and the ID of the transit gateway in a call to
/// <a>CreateVpnConnection</a>.</p>
/// <p>When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table
/// and the default propagation route table. You can use <a>CreateTransitGatewayRouteTable</a> to create
/// additional transit gateway route tables. If you disable automatic route propagation, we do not create a default transit gateway route table.
/// You can use <a>EnableTransitGatewayRouteTablePropagation</a> to propagate routes from a resource
/// attachment to a transit gateway route table. If you disable automatic associations, you can use <a>AssociateTransitGatewayRouteTable</a> to associate a resource attachment with a transit gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTransitGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_transit_gateway_input::Builder,
}
impl<C, M, R> CreateTransitGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTransitGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTransitGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::CreateTransitGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTransitGatewayInputOperationOutputAlias,
crate::output::CreateTransitGatewayOutput,
crate::error::CreateTransitGatewayError,
crate::input::CreateTransitGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>A description of the transit gateway.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description of the transit gateway.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>The transit gateway options.</p>
pub fn options(mut self, inp: crate::model::TransitGatewayRequestOptions) -> Self {
self.inner = self.inner.options(inp);
self
}
/// <p>The transit gateway options.</p>
pub fn set_options(
mut self,
input: std::option::Option<crate::model::TransitGatewayRequestOptions>,
) -> Self {
self.inner = self.inner.set_options(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the transit gateway.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the transit gateway.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateTransitGatewayConnect`.
///
/// <p>Creates a Connect attachment from a specified transit gateway attachment. A Connect attachment is a GRE-based tunnel attachment that you can use to establish a connection between a transit gateway and an appliance.</p>
/// <p>A Connect attachment uses an existing VPC or Amazon Web Services Direct Connect attachment as the underlying transport mechanism.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTransitGatewayConnect<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_transit_gateway_connect_input::Builder,
}
impl<C, M, R> CreateTransitGatewayConnect<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTransitGatewayConnect`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTransitGatewayConnectOutput,
aws_smithy_http::result::SdkError<crate::error::CreateTransitGatewayConnectError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTransitGatewayConnectInputOperationOutputAlias,
crate::output::CreateTransitGatewayConnectOutput,
crate::error::CreateTransitGatewayConnectError,
crate::input::CreateTransitGatewayConnectInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway attachment. You can specify a VPC attachment or Amazon Web Services Direct Connect attachment.</p>
pub fn transport_transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transport_transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the transit gateway attachment. You can specify a VPC attachment or Amazon Web Services Direct Connect attachment.</p>
pub fn set_transport_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self
.inner
.set_transport_transit_gateway_attachment_id(input);
self
}
/// <p>The Connect attachment options.</p>
pub fn options(
mut self,
inp: crate::model::CreateTransitGatewayConnectRequestOptions,
) -> Self {
self.inner = self.inner.options(inp);
self
}
/// <p>The Connect attachment options.</p>
pub fn set_options(
mut self,
input: std::option::Option<crate::model::CreateTransitGatewayConnectRequestOptions>,
) -> Self {
self.inner = self.inner.set_options(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the Connect attachment.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the Connect attachment.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateTransitGatewayConnectPeer`.
///
/// <p>Creates a Connect peer for a specified transit gateway Connect attachment between a
/// transit gateway and an appliance.</p>
/// <p>The peer address and transit gateway address must be the same IP address family (IPv4 or IPv6).</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/tgw/tgw-connect.html#tgw-connect-peer">Connect peers</a> in the <i>Transit Gateways Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTransitGatewayConnectPeer<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_transit_gateway_connect_peer_input::Builder,
}
impl<C, M, R> CreateTransitGatewayConnectPeer<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTransitGatewayConnectPeer`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTransitGatewayConnectPeerOutput,
aws_smithy_http::result::SdkError<crate::error::CreateTransitGatewayConnectPeerError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTransitGatewayConnectPeerInputOperationOutputAlias,
crate::output::CreateTransitGatewayConnectPeerOutput,
crate::error::CreateTransitGatewayConnectPeerError,
crate::input::CreateTransitGatewayConnectPeerInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Connect attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the Connect attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <p>The peer IP address (GRE outer IP address) on the transit gateway side of the Connect peer, which must be
/// specified from a transit gateway CIDR block. If not specified, Amazon automatically assigns
/// the first available IP address from the transit gateway CIDR block.</p>
pub fn transit_gateway_address(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.transit_gateway_address(inp);
self
}
/// <p>The peer IP address (GRE outer IP address) on the transit gateway side of the Connect peer, which must be
/// specified from a transit gateway CIDR block. If not specified, Amazon automatically assigns
/// the first available IP address from the transit gateway CIDR block.</p>
pub fn set_transit_gateway_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_address(input);
self
}
/// <p>The peer IP address (GRE outer IP address) on the appliance side of the Connect peer.</p>
pub fn peer_address(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.peer_address(inp);
self
}
/// <p>The peer IP address (GRE outer IP address) on the appliance side of the Connect peer.</p>
pub fn set_peer_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_peer_address(input);
self
}
/// <p>The BGP options for the Connect peer.</p>
pub fn bgp_options(
mut self,
inp: crate::model::TransitGatewayConnectRequestBgpOptions,
) -> Self {
self.inner = self.inner.bgp_options(inp);
self
}
/// <p>The BGP options for the Connect peer.</p>
pub fn set_bgp_options(
mut self,
input: std::option::Option<crate::model::TransitGatewayConnectRequestBgpOptions>,
) -> Self {
self.inner = self.inner.set_bgp_options(input);
self
}
/// Appends an item to `InsideCidrBlocks`.
///
/// To override the contents of this collection use [`set_inside_cidr_blocks`](Self::set_inside_cidr_blocks).
///
/// <p>The range of inside IP addresses that are used for BGP peering. You must specify a
/// size /29 IPv4 CIDR block from the <code>169.254.0.0/16</code> range. The first address
/// from the range must be configured on the appliance as the BGP IP address. You can also
/// optionally specify a size /125 IPv6 CIDR block from the <code>fd00::/8</code>
/// range.</p>
pub fn inside_cidr_blocks(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.inside_cidr_blocks(inp);
self
}
/// <p>The range of inside IP addresses that are used for BGP peering. You must specify a
/// size /29 IPv4 CIDR block from the <code>169.254.0.0/16</code> range. The first address
/// from the range must be configured on the appliance as the BGP IP address. You can also
/// optionally specify a size /125 IPv6 CIDR block from the <code>fd00::/8</code>
/// range.</p>
pub fn set_inside_cidr_blocks(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_inside_cidr_blocks(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the Connect peer.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the Connect peer.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateTransitGatewayMulticastDomain`.
///
/// <p>Creates a multicast domain using the specified transit gateway.</p>
/// <p>The transit gateway must be in the available state before you create a domain. Use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTransitGateways.html">DescribeTransitGateways</a> to see the state of transit gateway.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTransitGatewayMulticastDomain<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_transit_gateway_multicast_domain_input::Builder,
}
impl<C, M, R> CreateTransitGatewayMulticastDomain<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTransitGatewayMulticastDomain`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTransitGatewayMulticastDomainOutput,
aws_smithy_http::result::SdkError<
crate::error::CreateTransitGatewayMulticastDomainError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTransitGatewayMulticastDomainInputOperationOutputAlias,
crate::output::CreateTransitGatewayMulticastDomainOutput,
crate::error::CreateTransitGatewayMulticastDomainError,
crate::input::CreateTransitGatewayMulticastDomainInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway.</p>
pub fn transit_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.transit_gateway_id(inp);
self
}
/// <p>The ID of the transit gateway.</p>
pub fn set_transit_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_id(input);
self
}
/// <p>The options for the transit gateway multicast domain.</p>
pub fn options(
mut self,
inp: crate::model::CreateTransitGatewayMulticastDomainRequestOptions,
) -> Self {
self.inner = self.inner.options(inp);
self
}
/// <p>The options for the transit gateway multicast domain.</p>
pub fn set_options(
mut self,
input: std::option::Option<
crate::model::CreateTransitGatewayMulticastDomainRequestOptions,
>,
) -> Self {
self.inner = self.inner.set_options(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags for the transit gateway multicast domain.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags for the transit gateway multicast domain.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateTransitGatewayPeeringAttachment`.
///
/// <p>Requests a transit gateway peering attachment between the specified transit gateway
/// (requester) and a peer transit gateway (accepter). The transit gateways must be in
/// different Regions. The peer transit gateway can be in your account or a different
/// Amazon Web Services account.</p>
/// <p>After you create the peering attachment, the owner of the accepter transit gateway
/// must accept the attachment request.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTransitGatewayPeeringAttachment<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_transit_gateway_peering_attachment_input::Builder,
}
impl<C, M, R> CreateTransitGatewayPeeringAttachment<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTransitGatewayPeeringAttachment`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTransitGatewayPeeringAttachmentOutput,
aws_smithy_http::result::SdkError<
crate::error::CreateTransitGatewayPeeringAttachmentError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTransitGatewayPeeringAttachmentInputOperationOutputAlias,
crate::output::CreateTransitGatewayPeeringAttachmentOutput,
crate::error::CreateTransitGatewayPeeringAttachmentError,
crate::input::CreateTransitGatewayPeeringAttachmentInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway.</p>
pub fn transit_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.transit_gateway_id(inp);
self
}
/// <p>The ID of the transit gateway.</p>
pub fn set_transit_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_id(input);
self
}
/// <p>The ID of the peer transit gateway with which to create the peering attachment.</p>
pub fn peer_transit_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.peer_transit_gateway_id(inp);
self
}
/// <p>The ID of the peer transit gateway with which to create the peering attachment.</p>
pub fn set_peer_transit_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_peer_transit_gateway_id(input);
self
}
/// <p>The ID of the Amazon Web Services account that owns the peer transit gateway.</p>
pub fn peer_account_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.peer_account_id(inp);
self
}
/// <p>The ID of the Amazon Web Services account that owns the peer transit gateway.</p>
pub fn set_peer_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_peer_account_id(input);
self
}
/// <p>The Region where the peer transit gateway is located.</p>
pub fn peer_region(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.peer_region(inp);
self
}
/// <p>The Region where the peer transit gateway is located.</p>
pub fn set_peer_region(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_peer_region(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the transit gateway peering attachment.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the transit gateway peering attachment.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateTransitGatewayPrefixListReference`.
///
/// <p>Creates a reference (route) to a prefix list in a specified transit gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTransitGatewayPrefixListReference<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_transit_gateway_prefix_list_reference_input::Builder,
}
impl<C, M, R> CreateTransitGatewayPrefixListReference<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTransitGatewayPrefixListReference`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTransitGatewayPrefixListReferenceOutput,
aws_smithy_http::result::SdkError<
crate::error::CreateTransitGatewayPrefixListReferenceError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTransitGatewayPrefixListReferenceInputOperationOutputAlias,
crate::output::CreateTransitGatewayPrefixListReferenceOutput,
crate::error::CreateTransitGatewayPrefixListReferenceError,
crate::input::CreateTransitGatewayPrefixListReferenceInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the transit gateway route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// <p>The ID of the prefix list that is used for destination matches.</p>
pub fn prefix_list_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix_list_id(inp);
self
}
/// <p>The ID of the prefix list that is used for destination matches.</p>
pub fn set_prefix_list_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_prefix_list_id(input);
self
}
/// <p>The ID of the attachment to which traffic is routed.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment to which traffic is routed.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <p>Indicates whether to drop traffic that matches this route.</p>
pub fn blackhole(mut self, inp: bool) -> Self {
self.inner = self.inner.blackhole(inp);
self
}
/// <p>Indicates whether to drop traffic that matches this route.</p>
pub fn set_blackhole(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_blackhole(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateTransitGatewayRoute`.
///
/// <p>Creates a static route for the specified transit gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTransitGatewayRoute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_transit_gateway_route_input::Builder,
}
impl<C, M, R> CreateTransitGatewayRoute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTransitGatewayRoute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTransitGatewayRouteOutput,
aws_smithy_http::result::SdkError<crate::error::CreateTransitGatewayRouteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTransitGatewayRouteInputOperationOutputAlias,
crate::output::CreateTransitGatewayRouteOutput,
crate::error::CreateTransitGatewayRouteError,
crate::input::CreateTransitGatewayRouteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The CIDR range used for destination matches. Routing decisions are based on the
/// most specific match.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The CIDR range used for destination matches. Routing decisions are based on the
/// most specific match.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <p>The ID of the transit gateway route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the transit gateway route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// <p>The ID of the attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <p>Indicates whether to drop traffic that matches this route.</p>
pub fn blackhole(mut self, inp: bool) -> Self {
self.inner = self.inner.blackhole(inp);
self
}
/// <p>Indicates whether to drop traffic that matches this route.</p>
pub fn set_blackhole(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_blackhole(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateTransitGatewayRouteTable`.
///
/// <p>Creates a route table for the specified transit gateway.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTransitGatewayRouteTable<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_transit_gateway_route_table_input::Builder,
}
impl<C, M, R> CreateTransitGatewayRouteTable<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTransitGatewayRouteTable`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTransitGatewayRouteTableOutput,
aws_smithy_http::result::SdkError<crate::error::CreateTransitGatewayRouteTableError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTransitGatewayRouteTableInputOperationOutputAlias,
crate::output::CreateTransitGatewayRouteTableOutput,
crate::error::CreateTransitGatewayRouteTableError,
crate::input::CreateTransitGatewayRouteTableInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway.</p>
pub fn transit_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.transit_gateway_id(inp);
self
}
/// <p>The ID of the transit gateway.</p>
pub fn set_transit_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_id(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the transit gateway route table.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the transit gateway route table.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateTransitGatewayVpcAttachment`.
///
/// <p>Attaches the specified VPC to the specified transit gateway.</p>
/// <p>If you attach a VPC with a CIDR range that overlaps the CIDR range of a VPC that is already attached,
/// the new VPC CIDR range is not propagated to the default propagation route table.</p>
/// <p>To send VPC traffic to an attached transit gateway, add a route to the VPC route table using <a>CreateRoute</a>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateTransitGatewayVpcAttachment<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_transit_gateway_vpc_attachment_input::Builder,
}
impl<C, M, R> CreateTransitGatewayVpcAttachment<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateTransitGatewayVpcAttachment`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateTransitGatewayVpcAttachmentOutput,
aws_smithy_http::result::SdkError<crate::error::CreateTransitGatewayVpcAttachmentError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateTransitGatewayVpcAttachmentInputOperationOutputAlias,
crate::output::CreateTransitGatewayVpcAttachmentOutput,
crate::error::CreateTransitGatewayVpcAttachmentError,
crate::input::CreateTransitGatewayVpcAttachmentInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway.</p>
pub fn transit_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.transit_gateway_id(inp);
self
}
/// <p>The ID of the transit gateway.</p>
pub fn set_transit_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_id(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// Appends an item to `SubnetIds`.
///
/// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
///
/// <p>The IDs of one or more subnets. You can specify only one subnet per Availability Zone.
/// You must specify at least one subnet, but we recommend that you specify two subnets for better availability.
/// The transit gateway uses one IP address from each specified subnet.</p>
pub fn subnet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_ids(inp);
self
}
/// <p>The IDs of one or more subnets. You can specify only one subnet per Availability Zone.
/// You must specify at least one subnet, but we recommend that you specify two subnets for better availability.
/// The transit gateway uses one IP address from each specified subnet.</p>
pub fn set_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_subnet_ids(input);
self
}
/// <p>The VPC attachment options.</p>
pub fn options(
mut self,
inp: crate::model::CreateTransitGatewayVpcAttachmentRequestOptions,
) -> Self {
self.inner = self.inner.options(inp);
self
}
/// <p>The VPC attachment options.</p>
pub fn set_options(
mut self,
input: std::option::Option<
crate::model::CreateTransitGatewayVpcAttachmentRequestOptions,
>,
) -> Self {
self.inner = self.inner.set_options(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the VPC attachment.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the VPC attachment.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `CreateVolume`.
///
/// <p>Creates an EBS volume that can be attached to an instance in the same Availability Zone.</p>
/// <p>You can create a new empty volume or restore a volume from an EBS snapshot.
/// Any Amazon Web Services Marketplace product codes from the snapshot are propagated to the volume.</p>
/// <p>You can create encrypted volumes. Encrypted volumes must be attached to instances that
/// support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically
/// encrypted. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS encryption</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>You can tag your volumes during creation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tag your Amazon EC2
/// resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html">Create an Amazon EBS volume</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateVolume<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_volume_input::Builder,
}
impl<C, M, R> CreateVolume<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateVolume`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateVolumeOutput,
aws_smithy_http::result::SdkError<crate::error::CreateVolumeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateVolumeInputOperationOutputAlias,
crate::output::CreateVolumeOutput,
crate::error::CreateVolumeError,
crate::input::CreateVolumeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The Availability Zone in which to create the volume.</p>
pub fn availability_zone(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zone(inp);
self
}
/// <p>The Availability Zone in which to create the volume.</p>
pub fn set_availability_zone(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_availability_zone(input);
self
}
/// <p>Indicates whether the volume should be encrypted.
/// The effect of setting the encryption state to <code>true</code> depends on
/// the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default">Encryption by default</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances">Supported
/// instance types</a>.</p>
pub fn encrypted(mut self, inp: bool) -> Self {
self.inner = self.inner.encrypted(inp);
self
}
/// <p>Indicates whether the volume should be encrypted.
/// The effect of setting the encryption state to <code>true</code> depends on
/// the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default">Encryption by default</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances">Supported
/// instance types</a>.</p>
pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_encrypted(input);
self
}
/// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents
/// the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline
/// performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
/// <p>The following are the supported values for each volume type:</p>
/// <ul>
/// <li>
/// <p>
/// <code>gp3</code>: 3,000-16,000 IOPS</p>
/// </li>
/// <li>
/// <p>
/// <code>io1</code>: 100-64,000 IOPS</p>
/// </li>
/// <li>
/// <p>
/// <code>io2</code>: 100-64,000 IOPS</p>
/// </li>
/// </ul>
/// <p>
/// <code>io1</code> and <code>io2</code> volumes support up to 64,000 IOPS only on
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Instances built on the Nitro System</a>. Other instance families support performance
/// up to 32,000 IOPS.</p>
/// <p>This parameter is required for <code>io1</code> and <code>io2</code> volumes.
/// The default for <code>gp3</code> volumes is 3,000 IOPS.
/// This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
pub fn iops(mut self, inp: i32) -> Self {
self.inner = self.inner.iops(inp);
self
}
/// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents
/// the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline
/// performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
/// <p>The following are the supported values for each volume type:</p>
/// <ul>
/// <li>
/// <p>
/// <code>gp3</code>: 3,000-16,000 IOPS</p>
/// </li>
/// <li>
/// <p>
/// <code>io1</code>: 100-64,000 IOPS</p>
/// </li>
/// <li>
/// <p>
/// <code>io2</code>: 100-64,000 IOPS</p>
/// </li>
/// </ul>
/// <p>
/// <code>io1</code> and <code>io2</code> volumes support up to 64,000 IOPS only on
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Instances built on the Nitro System</a>. Other instance families support performance
/// up to 32,000 IOPS.</p>
/// <p>This parameter is required for <code>io1</code> and <code>io2</code> volumes.
/// The default for <code>gp3</code> volumes is 3,000 IOPS.
/// This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
pub fn set_iops(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_iops(input);
self
}
/// <p>The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption.
/// If this parameter is not specified, your KMS key for Amazon EBS is used. If <code>KmsKeyId</code> is
/// specified, the encrypted state must be <code>true</code>.</p>
/// <p>You can specify the KMS key using any of the following:</p>
/// <ul>
/// <li>
/// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Key alias. For example, alias/ExampleAlias.</p>
/// </li>
/// <li>
/// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p>
/// </li>
/// </ul>
/// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid,
/// the action can appear to complete, but eventually fails.</p>
pub fn kms_key_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.kms_key_id(inp);
self
}
/// <p>The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption.
/// If this parameter is not specified, your KMS key for Amazon EBS is used. If <code>KmsKeyId</code> is
/// specified, the encrypted state must be <code>true</code>.</p>
/// <p>You can specify the KMS key using any of the following:</p>
/// <ul>
/// <li>
/// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Key alias. For example, alias/ExampleAlias.</p>
/// </li>
/// <li>
/// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p>
/// </li>
/// </ul>
/// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid,
/// the action can appear to complete, but eventually fails.</p>
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_kms_key_id(input);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
pub fn outpost_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.outpost_arn(inp);
self
}
/// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_outpost_arn(input);
self
}
/// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size.
/// If you specify a snapshot, the default is the snapshot size. You can specify a volume
/// size that is equal to or larger than the snapshot size.</p>
/// <p>The following are the supported volumes sizes for each volume type:</p>
/// <ul>
/// <li>
/// <p>
/// <code>gp2</code> and <code>gp3</code>: 1-16,384</p>
/// </li>
/// <li>
/// <p>
/// <code>io1</code> and <code>io2</code>: 4-16,384</p>
/// </li>
/// <li>
/// <p>
/// <code>st1</code> and <code>sc1</code>: 125-16,384</p>
/// </li>
/// <li>
/// <p>
/// <code>standard</code>: 1-1,024</p>
/// </li>
/// </ul>
pub fn size(mut self, inp: i32) -> Self {
self.inner = self.inner.size(inp);
self
}
/// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size.
/// If you specify a snapshot, the default is the snapshot size. You can specify a volume
/// size that is equal to or larger than the snapshot size.</p>
/// <p>The following are the supported volumes sizes for each volume type:</p>
/// <ul>
/// <li>
/// <p>
/// <code>gp2</code> and <code>gp3</code>: 1-16,384</p>
/// </li>
/// <li>
/// <p>
/// <code>io1</code> and <code>io2</code>: 4-16,384</p>
/// </li>
/// <li>
/// <p>
/// <code>st1</code> and <code>sc1</code>: 125-16,384</p>
/// </li>
/// <li>
/// <p>
/// <code>standard</code>: 1-1,024</p>
/// </li>
/// </ul>
pub fn set_size(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_size(input);
self
}
/// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
pub fn snapshot_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.snapshot_id(inp);
self
}
/// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_snapshot_id(input);
self
}
/// <p>The volume type. This parameter can be one of the following values:</p>
/// <ul>
/// <li>
/// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code>
/// </p>
/// </li>
/// <li>
/// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code>
/// </p>
/// </li>
/// <li>
/// <p>Throughput Optimized HDD: <code>st1</code>
/// </p>
/// </li>
/// <li>
/// <p>Cold HDD: <code>sc1</code>
/// </p>
/// </li>
/// <li>
/// <p>Magnetic: <code>standard</code>
/// </p>
/// </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>Default: <code>gp2</code>
/// </p>
pub fn volume_type(mut self, inp: crate::model::VolumeType) -> Self {
self.inner = self.inner.volume_type(inp);
self
}
/// <p>The volume type. This parameter can be one of the following values:</p>
/// <ul>
/// <li>
/// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code>
/// </p>
/// </li>
/// <li>
/// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code>
/// </p>
/// </li>
/// <li>
/// <p>Throughput Optimized HDD: <code>st1</code>
/// </p>
/// </li>
/// <li>
/// <p>Cold HDD: <code>sc1</code>
/// </p>
/// </li>
/// <li>
/// <p>Magnetic: <code>standard</code>
/// </p>
/// </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>Default: <code>gp2</code>
/// </p>
pub fn set_volume_type(
mut self,
input: std::option::Option<crate::model::VolumeType>,
) -> Self {
self.inner = self.inner.set_volume_type(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the volume during creation.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the volume during creation.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>Indicates whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the
/// volume to up to 16 <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Instances built on the Nitro System</a> in the same Availability Zone. This parameter is
/// supported with <code>io1</code> and <code>io2</code> volumes only. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html">
/// Amazon EBS Multi-Attach</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn multi_attach_enabled(mut self, inp: bool) -> Self {
self.inner = self.inner.multi_attach_enabled(inp);
self
}
/// <p>Indicates whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the
/// volume to up to 16 <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Instances built on the Nitro System</a> in the same Availability Zone. This parameter is
/// supported with <code>io1</code> and <code>io2</code> volumes only. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html">
/// Amazon EBS Multi-Attach</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_multi_attach_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_multi_attach_enabled(input);
self
}
/// <p>The throughput to provision for a volume, with a maximum of 1,000 MiB/s.</p>
/// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
/// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
pub fn throughput(mut self, inp: i32) -> Self {
self.inner = self.inner.throughput(inp);
self
}
/// <p>The throughput to provision for a volume, with a maximum of 1,000 MiB/s.</p>
/// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
/// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
pub fn set_throughput(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_throughput(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency
/// of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensure
/// Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency
/// of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensure
/// Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `CreateVpc`.
///
/// <p>Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can create
/// uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4
/// addresses). For more information about how large to make your VPC, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html">Your VPC and
/// subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
/// <p>You can optionally request an IPv6 CIDR block for the VPC. You can request an Amazon-provided
/// IPv6 CIDR block from Amazon's pool of IPv6 addresses, or an IPv6 CIDR block from an IPv6 address
/// pool that you provisioned through bring your own IP addresses (<a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html">BYOIP</a>).</p>
/// <p>By default, each instance you launch in the VPC has the default DHCP options, which
/// include only a default DNS server that we provide (AmazonProvidedDNS). For more
/// information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html">DHCP options sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
/// <p>You can specify the instance tenancy value for the VPC when you create it. You can't change
/// this value for the VPC after you create it. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html">Dedicated Instances</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateVpc<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_vpc_input::Builder,
}
impl<C, M, R> CreateVpc<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateVpc`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateVpcOutput,
aws_smithy_http::result::SdkError<crate::error::CreateVpcError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateVpcInputOperationOutputAlias,
crate::output::CreateVpcOutput,
crate::error::CreateVpcError,
crate::input::CreateVpcInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The IPv4 network range for the VPC, in CIDR notation. For example,
/// <code>10.0.0.0/16</code>. We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
pub fn cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr_block(inp);
self
}
/// <p>The IPv4 network range for the VPC, in CIDR notation. For example,
/// <code>10.0.0.0/16</code>. We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr_block(input);
self
}
/// <p>Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.
/// You cannot specify the range of IP addresses, or the size of the CIDR block.</p>
pub fn amazon_provided_ipv6_cidr_block(mut self, inp: bool) -> Self {
self.inner = self.inner.amazon_provided_ipv6_cidr_block(inp);
self
}
/// <p>Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.
/// You cannot specify the range of IP addresses, or the size of the CIDR block.</p>
pub fn set_amazon_provided_ipv6_cidr_block(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.inner = self.inner.set_amazon_provided_ipv6_cidr_block(input);
self
}
/// <p>The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.</p>
pub fn ipv6_pool(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv6_pool(inp);
self
}
/// <p>The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.</p>
pub fn set_ipv6_pool(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_ipv6_pool(input);
self
}
/// <p>The IPv6 CIDR block from the IPv6 address pool. You must also specify <code>Ipv6Pool</code> in the request.</p>
/// <p>To let Amazon choose the IPv6 CIDR block for you, omit this parameter.</p>
pub fn ipv6_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv6_cidr_block(inp);
self
}
/// <p>The IPv6 CIDR block from the IPv6 address pool. You must also specify <code>Ipv6Pool</code> in the request.</p>
/// <p>To let Amazon choose the IPv6 CIDR block for you, omit this parameter.</p>
pub fn set_ipv6_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_ipv6_cidr_block(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The tenancy options for instances launched into the VPC. For <code>default</code>, instances
/// are launched with shared tenancy by default. You can launch instances with any tenancy into a
/// shared tenancy VPC. For <code>dedicated</code>, instances are launched as dedicated tenancy
/// instances by default. You can only launch instances with a tenancy of <code>dedicated</code>
/// or <code>host</code> into a dedicated tenancy VPC. </p>
/// <p>
/// <b>Important:</b> The <code>host</code> value cannot be used with this parameter. Use the <code>default</code> or <code>dedicated</code> values only.</p>
/// <p>Default: <code>default</code>
/// </p>
pub fn instance_tenancy(mut self, inp: crate::model::Tenancy) -> Self {
self.inner = self.inner.instance_tenancy(inp);
self
}
/// <p>The tenancy options for instances launched into the VPC. For <code>default</code>, instances
/// are launched with shared tenancy by default. You can launch instances with any tenancy into a
/// shared tenancy VPC. For <code>dedicated</code>, instances are launched as dedicated tenancy
/// instances by default. You can only launch instances with a tenancy of <code>dedicated</code>
/// or <code>host</code> into a dedicated tenancy VPC. </p>
/// <p>
/// <b>Important:</b> The <code>host</code> value cannot be used with this parameter. Use the <code>default</code> or <code>dedicated</code> values only.</p>
/// <p>Default: <code>default</code>
/// </p>
pub fn set_instance_tenancy(
mut self,
input: std::option::Option<crate::model::Tenancy>,
) -> Self {
self.inner = self.inner.set_instance_tenancy(input);
self
}
/// <p>The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the address to this location.</p>
/// <p> You must set <code>AmazonProvidedIpv6CidrBlock</code> to <code>true</code> to use this parameter.</p>
pub fn ipv6_cidr_block_network_border_group(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.ipv6_cidr_block_network_border_group(inp);
self
}
/// <p>The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the address to this location.</p>
/// <p> You must set <code>AmazonProvidedIpv6CidrBlock</code> to <code>true</code> to use this parameter.</p>
pub fn set_ipv6_cidr_block_network_border_group(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_ipv6_cidr_block_network_border_group(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the VPC.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the VPC.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateVpcEndpoint`.
///
/// <p>Creates a VPC endpoint for a specified service. An endpoint enables you to create a
/// private connection between your VPC and the service. The service may be provided by Amazon Web Services,
/// an Amazon Web Services Marketplace Partner, or another Amazon Web Services account. For more information,
/// see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html">VPC Endpoints</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
/// <p>A <code>gateway</code> endpoint serves as a target for a route in your route table for
/// traffic destined for the Amazon Web Service. You can specify an endpoint policy to attach
/// to the endpoint, which will control access to the service from your VPC. You can also
/// specify the VPC route tables that use the endpoint.</p>
/// <p>An <code>interface</code> endpoint is a network interface in your subnet that
/// serves as an endpoint for communicating with the specified service. You can specify the
/// subnets in which to create an endpoint, and the security groups to associate with the
/// endpoint network interface.</p>
/// <p>A <code>GatewayLoadBalancer</code> endpoint is a network interface in your subnet that serves an endpoint for communicating with a Gateway Load Balancer that you've configured as a VPC endpoint service.</p>
/// <p>Use <a>DescribeVpcEndpointServices</a> to get a list of supported
/// services.</p>
#[derive(std::fmt::Debug)]
pub struct CreateVpcEndpoint<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_vpc_endpoint_input::Builder,
}
impl<C, M, R> CreateVpcEndpoint<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateVpcEndpoint`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateVpcEndpointOutput,
aws_smithy_http::result::SdkError<crate::error::CreateVpcEndpointError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateVpcEndpointInputOperationOutputAlias,
crate::output::CreateVpcEndpointOutput,
crate::error::CreateVpcEndpointError,
crate::input::CreateVpcEndpointInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The type of endpoint.</p>
/// <p>Default: Gateway</p>
pub fn vpc_endpoint_type(mut self, inp: crate::model::VpcEndpointType) -> Self {
self.inner = self.inner.vpc_endpoint_type(inp);
self
}
/// <p>The type of endpoint.</p>
/// <p>Default: Gateway</p>
pub fn set_vpc_endpoint_type(
mut self,
input: std::option::Option<crate::model::VpcEndpointType>,
) -> Self {
self.inner = self.inner.set_vpc_endpoint_type(input);
self
}
/// <p>The ID of the VPC in which the endpoint will be used.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC in which the endpoint will be used.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// <p>The service name. To get a list of available services, use the <a>DescribeVpcEndpointServices</a> request, or get the name from the service
/// provider.</p>
pub fn service_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_name(inp);
self
}
/// <p>The service name. To get a list of available services, use the <a>DescribeVpcEndpointServices</a> request, or get the name from the service
/// provider.</p>
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_name(input);
self
}
/// <p>(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the
/// service. The policy must be in valid JSON format. If this parameter is not specified, we
/// attach a default policy that allows full access to the service.</p>
pub fn policy_document(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.policy_document(inp);
self
}
/// <p>(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the
/// service. The policy must be in valid JSON format. If this parameter is not specified, we
/// attach a default policy that allows full access to the service.</p>
pub fn set_policy_document(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_policy_document(input);
self
}
/// Appends an item to `RouteTableIds`.
///
/// To override the contents of this collection use [`set_route_table_ids`](Self::set_route_table_ids).
///
/// <p>(Gateway endpoint) One or more route table IDs.</p>
pub fn route_table_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.route_table_ids(inp);
self
}
/// <p>(Gateway endpoint) One or more route table IDs.</p>
pub fn set_route_table_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_route_table_ids(input);
self
}
/// Appends an item to `SubnetIds`.
///
/// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
///
/// <p>(Interface and Gateway Load Balancer endpoints) The ID of one or more subnets in which to create an endpoint
/// network interface. For a Gateway Load Balancer endpoint, you can specify one subnet only.</p>
pub fn subnet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_ids(inp);
self
}
/// <p>(Interface and Gateway Load Balancer endpoints) The ID of one or more subnets in which to create an endpoint
/// network interface. For a Gateway Load Balancer endpoint, you can specify one subnet only.</p>
pub fn set_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_subnet_ids(input);
self
}
/// Appends an item to `SecurityGroupIds`.
///
/// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
///
/// <p>(Interface endpoint) The ID of one or more security groups to associate with the
/// endpoint network interface.</p>
pub fn security_group_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.security_group_ids(inp);
self
}
/// <p>(Interface endpoint) The ID of one or more security groups to associate with the
/// endpoint network interface.</p>
pub fn set_security_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_security_group_ids(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>(Interface endpoint) Indicates whether to associate a private hosted zone with the
/// specified VPC. The private hosted zone contains a record set for the default public DNS
/// name for the service for the Region (for example,
/// <code>kinesis.us-east-1.amazonaws.com</code>), which resolves to the private IP
/// addresses of the endpoint network interfaces in the VPC. This enables you to make
/// requests to the default public DNS name for the service instead of the public DNS names
/// that are automatically generated by the VPC endpoint service.</p>
/// <p>To use a private hosted zone, you must set the following VPC attributes to
/// <code>true</code>: <code>enableDnsHostnames</code> and
/// <code>enableDnsSupport</code>. Use <a>ModifyVpcAttribute</a> to set the VPC
/// attributes.</p>
/// <p>Default: <code>true</code>
/// </p>
pub fn private_dns_enabled(mut self, inp: bool) -> Self {
self.inner = self.inner.private_dns_enabled(inp);
self
}
/// <p>(Interface endpoint) Indicates whether to associate a private hosted zone with the
/// specified VPC. The private hosted zone contains a record set for the default public DNS
/// name for the service for the Region (for example,
/// <code>kinesis.us-east-1.amazonaws.com</code>), which resolves to the private IP
/// addresses of the endpoint network interfaces in the VPC. This enables you to make
/// requests to the default public DNS name for the service instead of the public DNS names
/// that are automatically generated by the VPC endpoint service.</p>
/// <p>To use a private hosted zone, you must set the following VPC attributes to
/// <code>true</code>: <code>enableDnsHostnames</code> and
/// <code>enableDnsSupport</code>. Use <a>ModifyVpcAttribute</a> to set the VPC
/// attributes.</p>
/// <p>Default: <code>true</code>
/// </p>
pub fn set_private_dns_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_private_dns_enabled(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to associate with the endpoint.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to associate with the endpoint.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateVpcEndpointConnectionNotification`.
///
/// <p>Creates a connection notification for a specified VPC endpoint or VPC endpoint
/// service. A connection notification notifies you of specific endpoint events. You must
/// create an SNS topic to receive notifications. For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Create a Topic</a> in
/// the <i>Amazon Simple Notification Service Developer Guide</i>.</p>
/// <p>You can create a connection notification for interface endpoints only.</p>
#[derive(std::fmt::Debug)]
pub struct CreateVpcEndpointConnectionNotification<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_vpc_endpoint_connection_notification_input::Builder,
}
impl<C, M, R> CreateVpcEndpointConnectionNotification<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateVpcEndpointConnectionNotification`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateVpcEndpointConnectionNotificationOutput,
aws_smithy_http::result::SdkError<
crate::error::CreateVpcEndpointConnectionNotificationError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateVpcEndpointConnectionNotificationInputOperationOutputAlias,
crate::output::CreateVpcEndpointConnectionNotificationOutput,
crate::error::CreateVpcEndpointConnectionNotificationError,
crate::input::CreateVpcEndpointConnectionNotificationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the endpoint service.</p>
pub fn service_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(inp);
self
}
/// <p>The ID of the endpoint service.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
/// <p>The ID of the endpoint.</p>
pub fn vpc_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_endpoint_id(inp);
self
}
/// <p>The ID of the endpoint.</p>
pub fn set_vpc_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpc_endpoint_id(input);
self
}
/// <p>The ARN of the SNS topic for the notifications.</p>
pub fn connection_notification_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connection_notification_arn(inp);
self
}
/// <p>The ARN of the SNS topic for the notifications.</p>
pub fn set_connection_notification_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connection_notification_arn(input);
self
}
/// Appends an item to `ConnectionEvents`.
///
/// To override the contents of this collection use [`set_connection_events`](Self::set_connection_events).
///
/// <p>One or more endpoint events for which to receive notifications. Valid values are
/// <code>Accept</code>, <code>Connect</code>, <code>Delete</code>, and
/// <code>Reject</code>.</p>
pub fn connection_events(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connection_events(inp);
self
}
/// <p>One or more endpoint events for which to receive notifications. Valid values are
/// <code>Accept</code>, <code>Connect</code>, <code>Delete</code>, and
/// <code>Reject</code>.</p>
pub fn set_connection_events(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_connection_events(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `CreateVpcEndpointServiceConfiguration`.
///
/// <p>Creates a VPC endpoint service configuration to which service consumers (Amazon Web Services accounts,
/// IAM users, and IAM roles) can connect.</p>
/// <p>To create an endpoint service configuration, you must first create one of the
/// following for your service:</p>
/// <ul>
/// <li>
/// <p>A <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html">Network Load Balancer</a>. Service consumers connect to your service using an
/// interface endpoint.</p>
/// </li>
/// <li>
/// <p>A <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/introduction.html">Gateway Load Balancer</a>. Service consumers connect to your service using a
/// Gateway Load Balancer endpoint.</p>
/// </li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html">VPC Endpoint Services</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>. </p>
/// <p>If you set the private DNS name, you must prove that you own the private DNS domain
/// name. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-services-dns-validation.html">VPC Endpoint Service
/// Private DNS Name Verification</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateVpcEndpointServiceConfiguration<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_vpc_endpoint_service_configuration_input::Builder,
}
impl<C, M, R> CreateVpcEndpointServiceConfiguration<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateVpcEndpointServiceConfiguration`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateVpcEndpointServiceConfigurationOutput,
aws_smithy_http::result::SdkError<
crate::error::CreateVpcEndpointServiceConfigurationError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateVpcEndpointServiceConfigurationInputOperationOutputAlias,
crate::output::CreateVpcEndpointServiceConfigurationOutput,
crate::error::CreateVpcEndpointServiceConfigurationError,
crate::input::CreateVpcEndpointServiceConfigurationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Indicates whether requests from service consumers to create an endpoint to your service must
/// be accepted. To accept a request, use <a>AcceptVpcEndpointConnections</a>.</p>
pub fn acceptance_required(mut self, inp: bool) -> Self {
self.inner = self.inner.acceptance_required(inp);
self
}
/// <p>Indicates whether requests from service consumers to create an endpoint to your service must
/// be accepted. To accept a request, use <a>AcceptVpcEndpointConnections</a>.</p>
pub fn set_acceptance_required(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_acceptance_required(input);
self
}
/// <p>(Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.</p>
pub fn private_dns_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.private_dns_name(inp);
self
}
/// <p>(Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.</p>
pub fn set_private_dns_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_private_dns_name(input);
self
}
/// Appends an item to `NetworkLoadBalancerArns`.
///
/// To override the contents of this collection use [`set_network_load_balancer_arns`](Self::set_network_load_balancer_arns).
///
/// <p>The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your
/// service.</p>
pub fn network_load_balancer_arns(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_load_balancer_arns(inp);
self
}
/// <p>The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your
/// service.</p>
pub fn set_network_load_balancer_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_network_load_balancer_arns(input);
self
}
/// Appends an item to `GatewayLoadBalancerArns`.
///
/// To override the contents of this collection use [`set_gateway_load_balancer_arns`](Self::set_gateway_load_balancer_arns).
///
/// <p>The Amazon Resource Names (ARNs) of one or more Gateway Load Balancers.</p>
pub fn gateway_load_balancer_arns(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.gateway_load_balancer_arns(inp);
self
}
/// <p>The Amazon Resource Names (ARNs) of one or more Gateway Load Balancers.</p>
pub fn set_gateway_load_balancer_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_gateway_load_balancer_arns(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to ensure
/// idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to associate with the service.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to associate with the service.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateVpcPeeringConnection`.
///
/// <p>Requests a VPC peering connection between two VPCs: a requester VPC that you own and
/// an accepter VPC with which to create the connection. The accepter VPC can belong to
/// another Amazon Web Services account and can be in a different Region to the requester VPC.
/// The requester VPC and accepter VPC cannot have overlapping CIDR blocks.</p>
/// <note>
/// <p>Limitations and rules apply to a VPC peering connection. For more information, see
/// the <a href="https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-basics.html#vpc-peering-limitations">limitations</a> section in the <i>VPC Peering Guide</i>.</p>
/// </note>
/// <p>The owner of the accepter VPC must accept the peering request to activate the peering
/// connection. The VPC peering connection request expires after 7 days, after which it
/// cannot be accepted or rejected.</p>
/// <p>If you create a VPC peering connection request between VPCs with overlapping CIDR
/// blocks, the VPC peering connection has a status of <code>failed</code>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateVpcPeeringConnection<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_vpc_peering_connection_input::Builder,
}
impl<C, M, R> CreateVpcPeeringConnection<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateVpcPeeringConnection`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateVpcPeeringConnectionOutput,
aws_smithy_http::result::SdkError<crate::error::CreateVpcPeeringConnectionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateVpcPeeringConnectionInputOperationOutputAlias,
crate::output::CreateVpcPeeringConnectionOutput,
crate::error::CreateVpcPeeringConnectionError,
crate::input::CreateVpcPeeringConnectionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The Amazon Web Services account ID of the owner of the accepter VPC.</p>
/// <p>Default: Your Amazon Web Services account ID</p>
pub fn peer_owner_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.peer_owner_id(inp);
self
}
/// <p>The Amazon Web Services account ID of the owner of the accepter VPC.</p>
/// <p>Default: Your Amazon Web Services account ID</p>
pub fn set_peer_owner_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_peer_owner_id(input);
self
}
/// <p>The ID of the VPC with which you are creating the VPC peering connection. You must
/// specify this parameter in the request.</p>
pub fn peer_vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.peer_vpc_id(inp);
self
}
/// <p>The ID of the VPC with which you are creating the VPC peering connection. You must
/// specify this parameter in the request.</p>
pub fn set_peer_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_peer_vpc_id(input);
self
}
/// <p>The ID of the requester VPC. You must specify this parameter in the
/// request.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the requester VPC. You must specify this parameter in the
/// request.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// <p>The Region code for the accepter VPC, if the accepter VPC is located in a Region
/// other than the Region in which you make the request.</p>
/// <p>Default: The Region in which you make the request.</p>
pub fn peer_region(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.peer_region(inp);
self
}
/// <p>The Region code for the accepter VPC, if the accepter VPC is located in a Region
/// other than the Region in which you make the request.</p>
/// <p>Default: The Region in which you make the request.</p>
pub fn set_peer_region(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_peer_region(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to assign to the peering connection.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to assign to the peering connection.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateVpnConnection`.
///
/// <p>Creates a VPN connection between an existing virtual private gateway or transit
/// gateway and a customer gateway. The supported connection type is
/// <code>ipsec.1</code>.</p>
/// <p>The response includes information that you need to give to your network administrator
/// to configure your customer gateway.</p>
/// <important>
/// <p>We strongly recommend that you use HTTPS when calling this operation because the
/// response contains sensitive cryptographic information for configuring your customer
/// gateway device.</p>
/// </important>
/// <p>If you decide to shut down your VPN connection for any reason and later create a new
/// VPN connection, you must reconfigure your customer gateway with the new information
/// returned from this call.</p>
/// <p>This is an idempotent operation. If you perform the operation more than once, Amazon
/// EC2 doesn't return an error.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">Amazon Web Services Site-to-Site VPN</a> in the <i>Amazon Web Services Site-to-Site VPN
/// User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateVpnConnection<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_vpn_connection_input::Builder,
}
impl<C, M, R> CreateVpnConnection<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateVpnConnection`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateVpnConnectionOutput,
aws_smithy_http::result::SdkError<crate::error::CreateVpnConnectionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateVpnConnectionInputOperationOutputAlias,
crate::output::CreateVpnConnectionOutput,
crate::error::CreateVpnConnectionError,
crate::input::CreateVpnConnectionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the customer gateway.</p>
pub fn customer_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.customer_gateway_id(inp);
self
}
/// <p>The ID of the customer gateway.</p>
pub fn set_customer_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_customer_gateway_id(input);
self
}
/// <p>The type of VPN connection (<code>ipsec.1</code>).</p>
pub fn r#type(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.r#type(inp);
self
}
/// <p>The type of VPN connection (<code>ipsec.1</code>).</p>
pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_type(input);
self
}
/// <p>The ID of the virtual private gateway. If you specify a virtual private gateway, you
/// cannot specify a transit gateway.</p>
pub fn vpn_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_gateway_id(inp);
self
}
/// <p>The ID of the virtual private gateway. If you specify a virtual private gateway, you
/// cannot specify a transit gateway.</p>
pub fn set_vpn_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_gateway_id(input);
self
}
/// <p>The ID of the transit gateway. If you specify a transit gateway, you cannot specify a virtual private
/// gateway.</p>
pub fn transit_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.transit_gateway_id(inp);
self
}
/// <p>The ID of the transit gateway. If you specify a transit gateway, you cannot specify a virtual private
/// gateway.</p>
pub fn set_transit_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The options for the VPN connection.</p>
pub fn options(mut self, inp: crate::model::VpnConnectionOptionsSpecification) -> Self {
self.inner = self.inner.options(inp);
self
}
/// <p>The options for the VPN connection.</p>
pub fn set_options(
mut self,
input: std::option::Option<crate::model::VpnConnectionOptionsSpecification>,
) -> Self {
self.inner = self.inner.set_options(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the VPN connection.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the VPN connection.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `CreateVpnConnectionRoute`.
///
/// <p>Creates a static route associated with a VPN connection between an existing virtual
/// private gateway and a VPN customer gateway. The static route allows traffic to be routed
/// from the virtual private gateway to the VPN customer gateway.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">Amazon Web Services Site-to-Site VPN</a> in the <i>Amazon Web Services Site-to-Site VPN
/// User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateVpnConnectionRoute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_vpn_connection_route_input::Builder,
}
impl<C, M, R> CreateVpnConnectionRoute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateVpnConnectionRoute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateVpnConnectionRouteOutput,
aws_smithy_http::result::SdkError<crate::error::CreateVpnConnectionRouteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateVpnConnectionRouteInputOperationOutputAlias,
crate::output::CreateVpnConnectionRouteOutput,
crate::error::CreateVpnConnectionRouteError,
crate::input::CreateVpnConnectionRouteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The CIDR block associated with the local subnet of the customer network.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The CIDR block associated with the local subnet of the customer network.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <p>The ID of the VPN connection.</p>
pub fn vpn_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_connection_id(inp);
self
}
/// <p>The ID of the VPN connection.</p>
pub fn set_vpn_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_connection_id(input);
self
}
}
/// Fluent builder constructing a request to `CreateVpnGateway`.
///
/// <p>Creates a virtual private gateway. A virtual private gateway is the endpoint on the
/// VPC side of your VPN connection. You can create a virtual private gateway before
/// creating the VPC itself.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">Amazon Web Services Site-to-Site VPN</a> in the <i>Amazon Web Services Site-to-Site VPN
/// User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct CreateVpnGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_vpn_gateway_input::Builder,
}
impl<C, M, R> CreateVpnGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateVpnGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateVpnGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::CreateVpnGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateVpnGatewayInputOperationOutputAlias,
crate::output::CreateVpnGatewayOutput,
crate::error::CreateVpnGatewayError,
crate::input::CreateVpnGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The Availability Zone for the virtual private gateway.</p>
pub fn availability_zone(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zone(inp);
self
}
/// <p>The Availability Zone for the virtual private gateway.</p>
pub fn set_availability_zone(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_availability_zone(input);
self
}
/// <p>The type of VPN connection this virtual private gateway supports.</p>
pub fn r#type(mut self, inp: crate::model::GatewayType) -> Self {
self.inner = self.inner.r#type(inp);
self
}
/// <p>The type of VPN connection this virtual private gateway supports.</p>
pub fn set_type(mut self, input: std::option::Option<crate::model::GatewayType>) -> Self {
self.inner = self.inner.set_type(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the virtual private gateway.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the virtual private gateway.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. If
/// you're using a 16-bit ASN, it must be in the 64512 to 65534 range. If you're using a
/// 32-bit ASN, it must be in the 4200000000 to 4294967294 range.</p>
/// <p>Default: 64512</p>
pub fn amazon_side_asn(mut self, inp: i64) -> Self {
self.inner = self.inner.amazon_side_asn(inp);
self
}
/// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. If
/// you're using a 16-bit ASN, it must be in the 64512 to 65534 range. If you're using a
/// 32-bit ASN, it must be in the 4200000000 to 4294967294 range.</p>
/// <p>Default: 64512</p>
pub fn set_amazon_side_asn(mut self, input: std::option::Option<i64>) -> Self {
self.inner = self.inner.set_amazon_side_asn(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteCarrierGateway`.
///
/// <p>Deletes a carrier gateway.</p>
/// <important>
/// <p>If you do not delete the route that contains the carrier gateway as the
/// Target, the route is a blackhole route. For information about how to delete a route, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteRoute.html">DeleteRoute</a>.</p>
/// </important>
#[derive(std::fmt::Debug)]
pub struct DeleteCarrierGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_carrier_gateway_input::Builder,
}
impl<C, M, R> DeleteCarrierGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteCarrierGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteCarrierGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteCarrierGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteCarrierGatewayInputOperationOutputAlias,
crate::output::DeleteCarrierGatewayOutput,
crate::error::DeleteCarrierGatewayError,
crate::input::DeleteCarrierGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the carrier gateway.</p>
pub fn carrier_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.carrier_gateway_id(inp);
self
}
/// <p>The ID of the carrier gateway.</p>
pub fn set_carrier_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_carrier_gateway_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteClientVpnEndpoint`.
///
/// <p>Deletes the specified Client VPN endpoint. You must disassociate all target networks before you
/// can delete a Client VPN endpoint.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteClientVpnEndpoint<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_client_vpn_endpoint_input::Builder,
}
impl<C, M, R> DeleteClientVpnEndpoint<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteClientVpnEndpoint`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteClientVpnEndpointOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteClientVpnEndpointError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteClientVpnEndpointInputOperationOutputAlias,
crate::output::DeleteClientVpnEndpointOutput,
crate::error::DeleteClientVpnEndpointError,
crate::input::DeleteClientVpnEndpointInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN to be deleted.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN to be deleted.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteClientVpnRoute`.
///
/// <p>Deletes a route from a Client VPN endpoint. You can only delete routes that you manually added using
/// the <b>CreateClientVpnRoute</b> action. You cannot delete routes that were
/// automatically added when associating a subnet. To remove routes that have been automatically added,
/// disassociate the target subnet from the Client VPN endpoint.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteClientVpnRoute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_client_vpn_route_input::Builder,
}
impl<C, M, R> DeleteClientVpnRoute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteClientVpnRoute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteClientVpnRouteOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteClientVpnRouteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteClientVpnRouteInputOperationOutputAlias,
crate::output::DeleteClientVpnRouteOutput,
crate::error::DeleteClientVpnRouteError,
crate::input::DeleteClientVpnRouteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint from which the route is to be deleted.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint from which the route is to be deleted.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <p>The ID of the target subnet used by the route.</p>
pub fn target_vpc_subnet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.target_vpc_subnet_id(inp);
self
}
/// <p>The ID of the target subnet used by the route.</p>
pub fn set_target_vpc_subnet_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_target_vpc_subnet_id(input);
self
}
/// <p>The IPv4 address range, in CIDR notation, of the route to be deleted.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The IPv4 address range, in CIDR notation, of the route to be deleted.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteCustomerGateway`.
///
/// <p>Deletes the specified customer gateway. You must delete the VPN connection before you
/// can delete the customer gateway.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteCustomerGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_customer_gateway_input::Builder,
}
impl<C, M, R> DeleteCustomerGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteCustomerGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteCustomerGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteCustomerGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteCustomerGatewayInputOperationOutputAlias,
crate::output::DeleteCustomerGatewayOutput,
crate::error::DeleteCustomerGatewayError,
crate::input::DeleteCustomerGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the customer gateway.</p>
pub fn customer_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.customer_gateway_id(inp);
self
}
/// <p>The ID of the customer gateway.</p>
pub fn set_customer_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_customer_gateway_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteDhcpOptions`.
///
/// <p>Deletes the specified set of DHCP options. You must disassociate the set of DHCP options before you can delete it. You can disassociate the set of DHCP options by associating either a new set of options or the default set of options with the VPC.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteDhcpOptions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_dhcp_options_input::Builder,
}
impl<C, M, R> DeleteDhcpOptions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteDhcpOptions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteDhcpOptionsOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteDhcpOptionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteDhcpOptionsInputOperationOutputAlias,
crate::output::DeleteDhcpOptionsOutput,
crate::error::DeleteDhcpOptionsError,
crate::input::DeleteDhcpOptionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the DHCP options set.</p>
pub fn dhcp_options_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.dhcp_options_id(inp);
self
}
/// <p>The ID of the DHCP options set.</p>
pub fn set_dhcp_options_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_dhcp_options_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteEgressOnlyInternetGateway`.
///
/// <p>Deletes an egress-only internet gateway.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteEgressOnlyInternetGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_egress_only_internet_gateway_input::Builder,
}
impl<C, M, R> DeleteEgressOnlyInternetGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteEgressOnlyInternetGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteEgressOnlyInternetGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteEgressOnlyInternetGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteEgressOnlyInternetGatewayInputOperationOutputAlias,
crate::output::DeleteEgressOnlyInternetGatewayOutput,
crate::error::DeleteEgressOnlyInternetGatewayError,
crate::input::DeleteEgressOnlyInternetGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the egress-only internet gateway.</p>
pub fn egress_only_internet_gateway_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.egress_only_internet_gateway_id(inp);
self
}
/// <p>The ID of the egress-only internet gateway.</p>
pub fn set_egress_only_internet_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_egress_only_internet_gateway_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteFleets`.
///
/// <p>Deletes the specified EC2 Fleet.</p>
/// <p>After you delete an EC2 Fleet, it launches no new instances.</p>
/// <p>You must specify whether a deleted EC2 Fleet should also terminate its instances. If you
/// choose to terminate the instances, the EC2 Fleet enters the <code>deleted_terminating</code>
/// state. Otherwise, the EC2 Fleet enters the <code>deleted_running</code> state, and the instances
/// continue to run until they are interrupted or you terminate them manually.</p>
/// <p>For <code>instant</code> fleets, EC2 Fleet must terminate the instances when the fleet is
/// deleted. A deleted <code>instant</code> fleet with running instances is not
/// supported.</p>
/// <p class="title">
/// <b>Restrictions</b>
/// </p>
/// <ul>
/// <li>
/// <p>You can delete up to 25 <code>instant</code> fleets in a single request. If you exceed this
/// number, no <code>instant</code> fleets are deleted and an error is returned. There is no
/// restriction on the number of fleets of type <code>maintain</code> or <code>request</code> that can be deleted
/// in a single request.</p>
/// </li>
/// <li>
/// <p>Up to 1000 instances can be terminated in a single request to delete
/// <code>instant</code> fleets.</p>
/// </li>
/// </ul>
///
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#delete-fleet">Deleting an EC2
/// Fleet</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteFleets<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_fleets_input::Builder,
}
impl<C, M, R> DeleteFleets<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteFleets`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteFleetsOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteFleetsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteFleetsInputOperationOutputAlias,
crate::output::DeleteFleetsOutput,
crate::error::DeleteFleetsError,
crate::input::DeleteFleetsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `FleetIds`.
///
/// To override the contents of this collection use [`set_fleet_ids`](Self::set_fleet_ids).
///
/// <p>The IDs of the EC2 Fleets.</p>
pub fn fleet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.fleet_ids(inp);
self
}
/// <p>The IDs of the EC2 Fleets.</p>
pub fn set_fleet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_fleet_ids(input);
self
}
/// <p>Indicates whether to terminate the instances when the EC2 Fleet is deleted. The default is to
/// terminate the instances.</p>
/// <p>To let the instances continue to run after the EC2 Fleet is deleted, specify
/// <code>NoTerminateInstances</code>. Supported only for fleets of type
/// <code>maintain</code> and <code>request</code>.</p>
/// <p>For <code>instant</code> fleets, you cannot specify <code>NoTerminateInstances</code>. A
/// deleted <code>instant</code> fleet with running instances is not supported.</p>
pub fn terminate_instances(mut self, inp: bool) -> Self {
self.inner = self.inner.terminate_instances(inp);
self
}
/// <p>Indicates whether to terminate the instances when the EC2 Fleet is deleted. The default is to
/// terminate the instances.</p>
/// <p>To let the instances continue to run after the EC2 Fleet is deleted, specify
/// <code>NoTerminateInstances</code>. Supported only for fleets of type
/// <code>maintain</code> and <code>request</code>.</p>
/// <p>For <code>instant</code> fleets, you cannot specify <code>NoTerminateInstances</code>. A
/// deleted <code>instant</code> fleet with running instances is not supported.</p>
pub fn set_terminate_instances(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_terminate_instances(input);
self
}
}
/// Fluent builder constructing a request to `DeleteFlowLogs`.
///
/// <p>Deletes one or more flow logs.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteFlowLogs<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_flow_logs_input::Builder,
}
impl<C, M, R> DeleteFlowLogs<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteFlowLogs`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteFlowLogsOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteFlowLogsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteFlowLogsInputOperationOutputAlias,
crate::output::DeleteFlowLogsOutput,
crate::error::DeleteFlowLogsError,
crate::input::DeleteFlowLogsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `FlowLogIds`.
///
/// To override the contents of this collection use [`set_flow_log_ids`](Self::set_flow_log_ids).
///
/// <p>One or more flow log IDs.</p>
/// <p>Constraint: Maximum of 1000 flow log IDs.</p>
pub fn flow_log_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.flow_log_ids(inp);
self
}
/// <p>One or more flow log IDs.</p>
/// <p>Constraint: Maximum of 1000 flow log IDs.</p>
pub fn set_flow_log_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_flow_log_ids(input);
self
}
}
/// Fluent builder constructing a request to `DeleteFpgaImage`.
///
/// <p>Deletes the specified Amazon FPGA Image (AFI).</p>
#[derive(std::fmt::Debug)]
pub struct DeleteFpgaImage<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_fpga_image_input::Builder,
}
impl<C, M, R> DeleteFpgaImage<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteFpgaImage`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteFpgaImageOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteFpgaImageError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteFpgaImageInputOperationOutputAlias,
crate::output::DeleteFpgaImageOutput,
crate::error::DeleteFpgaImageError,
crate::input::DeleteFpgaImageInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the AFI.</p>
pub fn fpga_image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.fpga_image_id(inp);
self
}
/// <p>The ID of the AFI.</p>
pub fn set_fpga_image_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_fpga_image_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteInstanceEventWindow`.
///
/// <p>Deletes the specified event window.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html">Define event windows for scheduled
/// events</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteInstanceEventWindow<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_instance_event_window_input::Builder,
}
impl<C, M, R> DeleteInstanceEventWindow<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteInstanceEventWindow`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteInstanceEventWindowOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteInstanceEventWindowError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteInstanceEventWindowInputOperationOutputAlias,
crate::output::DeleteInstanceEventWindowOutput,
crate::error::DeleteInstanceEventWindowError,
crate::input::DeleteInstanceEventWindowInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Specify <code>true</code> to force delete the event window. Use the force delete parameter
/// if the event window is currently associated with targets.</p>
pub fn force_delete(mut self, inp: bool) -> Self {
self.inner = self.inner.force_delete(inp);
self
}
/// <p>Specify <code>true</code> to force delete the event window. Use the force delete parameter
/// if the event window is currently associated with targets.</p>
pub fn set_force_delete(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_force_delete(input);
self
}
/// <p>The ID of the event window.</p>
pub fn instance_event_window_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_event_window_id(inp);
self
}
/// <p>The ID of the event window.</p>
pub fn set_instance_event_window_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_instance_event_window_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteInternetGateway`.
///
/// <p>Deletes the specified internet gateway. You must detach the internet gateway from the
/// VPC before you can delete it.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteInternetGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_internet_gateway_input::Builder,
}
impl<C, M, R> DeleteInternetGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteInternetGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteInternetGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteInternetGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteInternetGatewayInputOperationOutputAlias,
crate::output::DeleteInternetGatewayOutput,
crate::error::DeleteInternetGatewayError,
crate::input::DeleteInternetGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the internet gateway.</p>
pub fn internet_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.internet_gateway_id(inp);
self
}
/// <p>The ID of the internet gateway.</p>
pub fn set_internet_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_internet_gateway_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteKeyPair`.
///
/// <p>Deletes the specified key pair, by removing the public key from Amazon EC2.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteKeyPair<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_key_pair_input::Builder,
}
impl<C, M, R> DeleteKeyPair<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteKeyPair`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteKeyPairOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteKeyPairError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteKeyPairInputOperationOutputAlias,
crate::output::DeleteKeyPairOutput,
crate::error::DeleteKeyPairError,
crate::input::DeleteKeyPairInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the key pair.</p>
pub fn key_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.key_name(inp);
self
}
/// <p>The name of the key pair.</p>
pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_key_name(input);
self
}
/// <p>The ID of the key pair.</p>
pub fn key_pair_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.key_pair_id(inp);
self
}
/// <p>The ID of the key pair.</p>
pub fn set_key_pair_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_key_pair_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteLaunchTemplate`.
///
/// <p>Deletes a launch template. Deleting a launch template deletes all of its versions.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteLaunchTemplate<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_launch_template_input::Builder,
}
impl<C, M, R> DeleteLaunchTemplate<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteLaunchTemplate`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteLaunchTemplateOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteLaunchTemplateError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteLaunchTemplateInputOperationOutputAlias,
crate::output::DeleteLaunchTemplateOutput,
crate::error::DeleteLaunchTemplateError,
crate::input::DeleteLaunchTemplateInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn launch_template_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_id(inp);
self
}
/// <p>The ID of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn set_launch_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_launch_template_id(input);
self
}
/// <p>The name of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn launch_template_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_name(inp);
self
}
/// <p>The name of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn set_launch_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_launch_template_name(input);
self
}
}
/// Fluent builder constructing a request to `DeleteLaunchTemplateVersions`.
///
/// <p>Deletes one or more versions of a launch template. You cannot delete the default
/// version of a launch template; you must first assign a different version as the default.
/// If the default version is the only version for the launch template, you must delete the
/// entire launch template using <a>DeleteLaunchTemplate</a>.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteLaunchTemplateVersions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_launch_template_versions_input::Builder,
}
impl<C, M, R> DeleteLaunchTemplateVersions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteLaunchTemplateVersions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteLaunchTemplateVersionsOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteLaunchTemplateVersionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteLaunchTemplateVersionsInputOperationOutputAlias,
crate::output::DeleteLaunchTemplateVersionsOutput,
crate::error::DeleteLaunchTemplateVersionsError,
crate::input::DeleteLaunchTemplateVersionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn launch_template_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_id(inp);
self
}
/// <p>The ID of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn set_launch_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_launch_template_id(input);
self
}
/// <p>The name of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn launch_template_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_name(inp);
self
}
/// <p>The name of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn set_launch_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_launch_template_name(input);
self
}
/// Appends an item to `Versions`.
///
/// To override the contents of this collection use [`set_versions`](Self::set_versions).
///
/// <p>The version numbers of one or more launch template versions to delete.</p>
pub fn versions(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.versions(inp);
self
}
/// <p>The version numbers of one or more launch template versions to delete.</p>
pub fn set_versions(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_versions(input);
self
}
}
/// Fluent builder constructing a request to `DeleteLocalGatewayRoute`.
///
/// <p>Deletes the specified route from the specified local gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteLocalGatewayRoute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_local_gateway_route_input::Builder,
}
impl<C, M, R> DeleteLocalGatewayRoute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteLocalGatewayRoute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteLocalGatewayRouteOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteLocalGatewayRouteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteLocalGatewayRouteInputOperationOutputAlias,
crate::output::DeleteLocalGatewayRouteOutput,
crate::error::DeleteLocalGatewayRouteError,
crate::input::DeleteLocalGatewayRouteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The CIDR range for the route. This must match the CIDR for the route exactly.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The CIDR range for the route. This must match the CIDR for the route exactly.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <p>The ID of the local gateway route table.</p>
pub fn local_gateway_route_table_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.local_gateway_route_table_id(inp);
self
}
/// <p>The ID of the local gateway route table.</p>
pub fn set_local_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_local_gateway_route_table_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteLocalGatewayRouteTableVpcAssociation`.
///
/// <p>Deletes the specified association between a VPC and local gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteLocalGatewayRouteTableVpcAssociation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_local_gateway_route_table_vpc_association_input::Builder,
}
impl<C, M, R> DeleteLocalGatewayRouteTableVpcAssociation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteLocalGatewayRouteTableVpcAssociation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteLocalGatewayRouteTableVpcAssociationOutput,
aws_smithy_http::result::SdkError<
crate::error::DeleteLocalGatewayRouteTableVpcAssociationError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteLocalGatewayRouteTableVpcAssociationInputOperationOutputAlias,
crate::output::DeleteLocalGatewayRouteTableVpcAssociationOutput,
crate::error::DeleteLocalGatewayRouteTableVpcAssociationError,
crate::input::DeleteLocalGatewayRouteTableVpcAssociationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the association.</p>
pub fn local_gateway_route_table_vpc_association_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.local_gateway_route_table_vpc_association_id(inp);
self
}
/// <p>The ID of the association.</p>
pub fn set_local_gateway_route_table_vpc_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self
.inner
.set_local_gateway_route_table_vpc_association_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteManagedPrefixList`.
///
/// <p>Deletes the specified managed prefix list. You must first remove all references to the prefix list in your resources.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteManagedPrefixList<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_managed_prefix_list_input::Builder,
}
impl<C, M, R> DeleteManagedPrefixList<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteManagedPrefixList`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteManagedPrefixListOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteManagedPrefixListError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteManagedPrefixListInputOperationOutputAlias,
crate::output::DeleteManagedPrefixListOutput,
crate::error::DeleteManagedPrefixListError,
crate::input::DeleteManagedPrefixListInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the prefix list.</p>
pub fn prefix_list_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix_list_id(inp);
self
}
/// <p>The ID of the prefix list.</p>
pub fn set_prefix_list_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_prefix_list_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteNatGateway`.
///
/// <p>Deletes the specified NAT gateway. Deleting a public NAT gateway disassociates its Elastic IP address,
/// but does not release the address from your account. Deleting a NAT gateway does not delete any NAT gateway
/// routes in your route tables.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteNatGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_nat_gateway_input::Builder,
}
impl<C, M, R> DeleteNatGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteNatGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteNatGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteNatGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteNatGatewayInputOperationOutputAlias,
crate::output::DeleteNatGatewayOutput,
crate::error::DeleteNatGatewayError,
crate::input::DeleteNatGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the NAT gateway.</p>
pub fn nat_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.nat_gateway_id(inp);
self
}
/// <p>The ID of the NAT gateway.</p>
pub fn set_nat_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_nat_gateway_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteNetworkAcl`.
///
/// <p>Deletes the specified network ACL. You can't delete the ACL if it's associated with any subnets. You can't delete the default network ACL.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteNetworkAcl<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_network_acl_input::Builder,
}
impl<C, M, R> DeleteNetworkAcl<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteNetworkAcl`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteNetworkAclOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteNetworkAclError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteNetworkAclInputOperationOutputAlias,
crate::output::DeleteNetworkAclOutput,
crate::error::DeleteNetworkAclError,
crate::input::DeleteNetworkAclInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the network ACL.</p>
pub fn network_acl_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_acl_id(inp);
self
}
/// <p>The ID of the network ACL.</p>
pub fn set_network_acl_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_acl_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteNetworkAclEntry`.
///
/// <p>Deletes the specified ingress or egress entry (rule) from the specified network ACL.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteNetworkAclEntry<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_network_acl_entry_input::Builder,
}
impl<C, M, R> DeleteNetworkAclEntry<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteNetworkAclEntry`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteNetworkAclEntryOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteNetworkAclEntryError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteNetworkAclEntryInputOperationOutputAlias,
crate::output::DeleteNetworkAclEntryOutput,
crate::error::DeleteNetworkAclEntryError,
crate::input::DeleteNetworkAclEntryInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Indicates whether the rule is an egress rule.</p>
pub fn egress(mut self, inp: bool) -> Self {
self.inner = self.inner.egress(inp);
self
}
/// <p>Indicates whether the rule is an egress rule.</p>
pub fn set_egress(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_egress(input);
self
}
/// <p>The ID of the network ACL.</p>
pub fn network_acl_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_acl_id(inp);
self
}
/// <p>The ID of the network ACL.</p>
pub fn set_network_acl_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_acl_id(input);
self
}
/// <p>The rule number of the entry to delete.</p>
pub fn rule_number(mut self, inp: i32) -> Self {
self.inner = self.inner.rule_number(inp);
self
}
/// <p>The rule number of the entry to delete.</p>
pub fn set_rule_number(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_rule_number(input);
self
}
}
/// Fluent builder constructing a request to `DeleteNetworkInsightsAnalysis`.
///
/// <p>Deletes the specified network insights analysis.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteNetworkInsightsAnalysis<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_network_insights_analysis_input::Builder,
}
impl<C, M, R> DeleteNetworkInsightsAnalysis<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteNetworkInsightsAnalysis`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteNetworkInsightsAnalysisOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteNetworkInsightsAnalysisError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteNetworkInsightsAnalysisInputOperationOutputAlias,
crate::output::DeleteNetworkInsightsAnalysisOutput,
crate::error::DeleteNetworkInsightsAnalysisError,
crate::input::DeleteNetworkInsightsAnalysisInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the network insights analysis.</p>
pub fn network_insights_analysis_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_insights_analysis_id(inp);
self
}
/// <p>The ID of the network insights analysis.</p>
pub fn set_network_insights_analysis_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_insights_analysis_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteNetworkInsightsPath`.
///
/// <p>Deletes the specified path.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteNetworkInsightsPath<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_network_insights_path_input::Builder,
}
impl<C, M, R> DeleteNetworkInsightsPath<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteNetworkInsightsPath`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteNetworkInsightsPathOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteNetworkInsightsPathError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteNetworkInsightsPathInputOperationOutputAlias,
crate::output::DeleteNetworkInsightsPathOutput,
crate::error::DeleteNetworkInsightsPathError,
crate::input::DeleteNetworkInsightsPathInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the path.</p>
pub fn network_insights_path_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_insights_path_id(inp);
self
}
/// <p>The ID of the path.</p>
pub fn set_network_insights_path_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_insights_path_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteNetworkInterface`.
///
/// <p>Deletes the specified network interface. You must detach the network interface before you can delete it.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteNetworkInterface<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_network_interface_input::Builder,
}
impl<C, M, R> DeleteNetworkInterface<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteNetworkInterface`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteNetworkInterfaceOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteNetworkInterfaceError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteNetworkInterfaceInputOperationOutputAlias,
crate::output::DeleteNetworkInterfaceOutput,
crate::error::DeleteNetworkInterfaceError,
crate::input::DeleteNetworkInterfaceInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of the network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteNetworkInterfacePermission`.
///
/// <p>Deletes a permission for a network interface. By default, you cannot delete the
/// permission if the account for which you're removing the permission has attached the
/// network interface to an instance. However, you can force delete the permission,
/// regardless of any attachment.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteNetworkInterfacePermission<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_network_interface_permission_input::Builder,
}
impl<C, M, R> DeleteNetworkInterfacePermission<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteNetworkInterfacePermission`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteNetworkInterfacePermissionOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteNetworkInterfacePermissionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteNetworkInterfacePermissionInputOperationOutputAlias,
crate::output::DeleteNetworkInterfacePermissionOutput,
crate::error::DeleteNetworkInterfacePermissionError,
crate::input::DeleteNetworkInterfacePermissionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the network interface permission.</p>
pub fn network_interface_permission_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.network_interface_permission_id(inp);
self
}
/// <p>The ID of the network interface permission.</p>
pub fn set_network_interface_permission_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_permission_id(input);
self
}
/// <p>Specify <code>true</code> to remove the permission even if the network interface is
/// attached to an instance.</p>
pub fn force(mut self, inp: bool) -> Self {
self.inner = self.inner.force(inp);
self
}
/// <p>Specify <code>true</code> to remove the permission even if the network interface is
/// attached to an instance.</p>
pub fn set_force(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_force(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeletePlacementGroup`.
///
/// <p>Deletes the specified placement group. You must terminate all instances in the
/// placement group before you can delete the placement group. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">Placement groups</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DeletePlacementGroup<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_placement_group_input::Builder,
}
impl<C, M, R> DeletePlacementGroup<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeletePlacementGroup`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeletePlacementGroupOutput,
aws_smithy_http::result::SdkError<crate::error::DeletePlacementGroupError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeletePlacementGroupInputOperationOutputAlias,
crate::output::DeletePlacementGroupOutput,
crate::error::DeletePlacementGroupError,
crate::input::DeletePlacementGroupInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The name of the placement group.</p>
pub fn group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_name(inp);
self
}
/// <p>The name of the placement group.</p>
pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_name(input);
self
}
}
/// Fluent builder constructing a request to `DeleteQueuedReservedInstances`.
///
/// <p>Deletes the queued purchases for the specified Reserved Instances.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteQueuedReservedInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_queued_reserved_instances_input::Builder,
}
impl<C, M, R> DeleteQueuedReservedInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteQueuedReservedInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteQueuedReservedInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteQueuedReservedInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteQueuedReservedInstancesInputOperationOutputAlias,
crate::output::DeleteQueuedReservedInstancesOutput,
crate::error::DeleteQueuedReservedInstancesError,
crate::input::DeleteQueuedReservedInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `ReservedInstancesIds`.
///
/// To override the contents of this collection use [`set_reserved_instances_ids`](Self::set_reserved_instances_ids).
///
/// <p>The IDs of the Reserved Instances.</p>
pub fn reserved_instances_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.reserved_instances_ids(inp);
self
}
/// <p>The IDs of the Reserved Instances.</p>
pub fn set_reserved_instances_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_reserved_instances_ids(input);
self
}
}
/// Fluent builder constructing a request to `DeleteRoute`.
///
/// <p>Deletes the specified route from the specified route table.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteRoute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_route_input::Builder,
}
impl<C, M, R> DeleteRoute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteRoute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteRouteOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteRouteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteRouteInputOperationOutputAlias,
crate::output::DeleteRouteOutput,
crate::error::DeleteRouteError,
crate::input::DeleteRouteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The IPv4 CIDR range for the route. The value you specify must match the CIDR for the route exactly.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The IPv4 CIDR range for the route. The value you specify must match the CIDR for the route exactly.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <p>The IPv6 CIDR range for the route. The value you specify must match the CIDR for the route exactly.</p>
pub fn destination_ipv6_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_ipv6_cidr_block(inp);
self
}
/// <p>The IPv6 CIDR range for the route. The value you specify must match the CIDR for the route exactly.</p>
pub fn set_destination_ipv6_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_ipv6_cidr_block(input);
self
}
/// <p>The ID of the prefix list for the route.</p>
pub fn destination_prefix_list_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_prefix_list_id(inp);
self
}
/// <p>The ID of the prefix list for the route.</p>
pub fn set_destination_prefix_list_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_prefix_list_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the route table.</p>
pub fn route_table_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.route_table_id(inp);
self
}
/// <p>The ID of the route table.</p>
pub fn set_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_route_table_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteRouteTable`.
///
/// <p>Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can't delete the main route table.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteRouteTable<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_route_table_input::Builder,
}
impl<C, M, R> DeleteRouteTable<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteRouteTable`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteRouteTableOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteRouteTableError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteRouteTableInputOperationOutputAlias,
crate::output::DeleteRouteTableOutput,
crate::error::DeleteRouteTableError,
crate::input::DeleteRouteTableInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the route table.</p>
pub fn route_table_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.route_table_id(inp);
self
}
/// <p>The ID of the route table.</p>
pub fn set_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_route_table_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteSecurityGroup`.
///
/// <p>Deletes a security group.</p>
/// <p>If you attempt to delete a security group that is associated with an instance, or is
/// referenced by another security group, the operation fails with
/// <code>InvalidGroup.InUse</code> in EC2-Classic or
/// <code>DependencyViolation</code> in EC2-VPC.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteSecurityGroup<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_security_group_input::Builder,
}
impl<C, M, R> DeleteSecurityGroup<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteSecurityGroup`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteSecurityGroupOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteSecurityGroupError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteSecurityGroupInputOperationOutputAlias,
crate::output::DeleteSecurityGroupOutput,
crate::error::DeleteSecurityGroupError,
crate::input::DeleteSecurityGroupInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the security group. Required for a nondefault VPC.</p>
pub fn group_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_id(inp);
self
}
/// <p>The ID of the security group. Required for a nondefault VPC.</p>
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_id(input);
self
}
/// <p>[EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID.</p>
pub fn group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_name(inp);
self
}
/// <p>[EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID.</p>
pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_name(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteSnapshot`.
///
/// <p>Deletes the specified snapshot.</p>
/// <p>When you make periodic snapshots of a volume, the snapshots are incremental, and only the
/// blocks on the device that have changed since your last snapshot are saved in the new snapshot.
/// When you delete a snapshot, only the data not needed for any other snapshot is removed. So
/// regardless of which prior snapshots have been deleted, all active snapshots will have access
/// to all the information needed to restore the volume.</p>
/// <p>You cannot delete a snapshot of the root device of an EBS volume used by a registered AMI.
/// You must first de-register the AMI before you can delete the snapshot.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html">Delete an Amazon EBS snapshot</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteSnapshot<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_snapshot_input::Builder,
}
impl<C, M, R> DeleteSnapshot<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteSnapshot`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteSnapshotOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteSnapshotError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteSnapshotInputOperationOutputAlias,
crate::output::DeleteSnapshotOutput,
crate::error::DeleteSnapshotError,
crate::input::DeleteSnapshotInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the EBS snapshot.</p>
pub fn snapshot_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.snapshot_id(inp);
self
}
/// <p>The ID of the EBS snapshot.</p>
pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_snapshot_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteSpotDatafeedSubscription`.
///
/// <p>Deletes the data feed for Spot Instances.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteSpotDatafeedSubscription<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_spot_datafeed_subscription_input::Builder,
}
impl<C, M, R> DeleteSpotDatafeedSubscription<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteSpotDatafeedSubscription`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteSpotDatafeedSubscriptionOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteSpotDatafeedSubscriptionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteSpotDatafeedSubscriptionInputOperationOutputAlias,
crate::output::DeleteSpotDatafeedSubscriptionOutput,
crate::error::DeleteSpotDatafeedSubscriptionError,
crate::input::DeleteSpotDatafeedSubscriptionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteSubnet`.
///
/// <p>Deletes the specified subnet. You must terminate all running instances in the subnet before you can delete the subnet.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteSubnet<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_subnet_input::Builder,
}
impl<C, M, R> DeleteSubnet<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteSubnet`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteSubnetOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteSubnetError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteSubnetInputOperationOutputAlias,
crate::output::DeleteSubnetOutput,
crate::error::DeleteSubnetError,
crate::input::DeleteSubnetInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the subnet.</p>
pub fn subnet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_id(inp);
self
}
/// <p>The ID of the subnet.</p>
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_subnet_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteSubnetCidrReservation`.
///
/// <p>Deletes a subnet CIDR reservation.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteSubnetCidrReservation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_subnet_cidr_reservation_input::Builder,
}
impl<C, M, R> DeleteSubnetCidrReservation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteSubnetCidrReservation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteSubnetCidrReservationOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteSubnetCidrReservationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteSubnetCidrReservationInputOperationOutputAlias,
crate::output::DeleteSubnetCidrReservationOutput,
crate::error::DeleteSubnetCidrReservationError,
crate::input::DeleteSubnetCidrReservationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the subnet CIDR reservation.</p>
pub fn subnet_cidr_reservation_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_cidr_reservation_id(inp);
self
}
/// <p>The ID of the subnet CIDR reservation.</p>
pub fn set_subnet_cidr_reservation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_subnet_cidr_reservation_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTags`.
///
/// <p>Deletes the specified set of tags from the specified set of resources.</p>
/// <p>To list the current tags, use <a>DescribeTags</a>. For more information about tags, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging Your Resources</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTags<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_tags_input::Builder,
}
impl<C, M, R> DeleteTags<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTags`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTagsOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteTagsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTagsInputOperationOutputAlias,
crate::output::DeleteTagsOutput,
crate::error::DeleteTagsError,
crate::input::DeleteTagsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Resources`.
///
/// To override the contents of this collection use [`set_resources`](Self::set_resources).
///
/// <p>The IDs of the resources, separated by spaces.</p>
/// <p>Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.</p>
pub fn resources(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resources(inp);
self
}
/// <p>The IDs of the resources, separated by spaces.</p>
/// <p>Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.</p>
pub fn set_resources(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resources(input);
self
}
/// Appends an item to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags to delete. Specify a tag key and an optional tag value to delete
/// specific tags. If you specify a tag key without a tag value, we delete any tag with this
/// key regardless of its value. If you specify a tag key with an empty string as the tag
/// value, we delete the tag only if its value is an empty string.</p>
/// <p>If you omit this parameter, we delete all user-defined tags for the specified
/// resources. We do not delete Amazon Web Services-generated tags (tags that have the <code>aws:</code>
/// prefix).</p>
pub fn tags(mut self, inp: impl Into<crate::model::Tag>) -> Self {
self.inner = self.inner.tags(inp);
self
}
/// <p>The tags to delete. Specify a tag key and an optional tag value to delete
/// specific tags. If you specify a tag key without a tag value, we delete any tag with this
/// key regardless of its value. If you specify a tag key with an empty string as the tag
/// value, we delete the tag only if its value is an empty string.</p>
/// <p>If you omit this parameter, we delete all user-defined tags for the specified
/// resources. We do not delete Amazon Web Services-generated tags (tags that have the <code>aws:</code>
/// prefix).</p>
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.inner = self.inner.set_tags(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTrafficMirrorFilter`.
///
/// <p>Deletes the specified Traffic Mirror filter.</p>
/// <p>You cannot delete a Traffic Mirror filter that is in use by a Traffic Mirror session.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTrafficMirrorFilter<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_traffic_mirror_filter_input::Builder,
}
impl<C, M, R> DeleteTrafficMirrorFilter<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTrafficMirrorFilter`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTrafficMirrorFilterOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteTrafficMirrorFilterError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTrafficMirrorFilterInputOperationOutputAlias,
crate::output::DeleteTrafficMirrorFilterOutput,
crate::error::DeleteTrafficMirrorFilterError,
crate::input::DeleteTrafficMirrorFilterInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Traffic Mirror filter.</p>
pub fn traffic_mirror_filter_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_filter_id(inp);
self
}
/// <p>The ID of the Traffic Mirror filter.</p>
pub fn set_traffic_mirror_filter_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_filter_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTrafficMirrorFilterRule`.
///
/// <p>Deletes the specified Traffic Mirror rule.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTrafficMirrorFilterRule<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_traffic_mirror_filter_rule_input::Builder,
}
impl<C, M, R> DeleteTrafficMirrorFilterRule<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTrafficMirrorFilterRule`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTrafficMirrorFilterRuleOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteTrafficMirrorFilterRuleError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTrafficMirrorFilterRuleInputOperationOutputAlias,
crate::output::DeleteTrafficMirrorFilterRuleOutput,
crate::error::DeleteTrafficMirrorFilterRuleError,
crate::input::DeleteTrafficMirrorFilterRuleInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Traffic Mirror rule.</p>
pub fn traffic_mirror_filter_rule_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.traffic_mirror_filter_rule_id(inp);
self
}
/// <p>The ID of the Traffic Mirror rule.</p>
pub fn set_traffic_mirror_filter_rule_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_filter_rule_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTrafficMirrorSession`.
///
/// <p>Deletes the specified Traffic Mirror session.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTrafficMirrorSession<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_traffic_mirror_session_input::Builder,
}
impl<C, M, R> DeleteTrafficMirrorSession<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTrafficMirrorSession`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTrafficMirrorSessionOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteTrafficMirrorSessionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTrafficMirrorSessionInputOperationOutputAlias,
crate::output::DeleteTrafficMirrorSessionOutput,
crate::error::DeleteTrafficMirrorSessionError,
crate::input::DeleteTrafficMirrorSessionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Traffic Mirror session.</p>
pub fn traffic_mirror_session_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_session_id(inp);
self
}
/// <p>The ID of the Traffic Mirror session.</p>
pub fn set_traffic_mirror_session_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_session_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTrafficMirrorTarget`.
///
/// <p>Deletes the specified Traffic Mirror target.</p>
/// <p>You cannot delete a Traffic Mirror target that is in use by a Traffic Mirror session.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTrafficMirrorTarget<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_traffic_mirror_target_input::Builder,
}
impl<C, M, R> DeleteTrafficMirrorTarget<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTrafficMirrorTarget`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTrafficMirrorTargetOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteTrafficMirrorTargetError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTrafficMirrorTargetInputOperationOutputAlias,
crate::output::DeleteTrafficMirrorTargetOutput,
crate::error::DeleteTrafficMirrorTargetError,
crate::input::DeleteTrafficMirrorTargetInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Traffic Mirror target.</p>
pub fn traffic_mirror_target_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_target_id(inp);
self
}
/// <p>The ID of the Traffic Mirror target.</p>
pub fn set_traffic_mirror_target_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_target_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTransitGateway`.
///
/// <p>Deletes the specified transit gateway.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTransitGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_transit_gateway_input::Builder,
}
impl<C, M, R> DeleteTransitGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTransitGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTransitGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteTransitGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTransitGatewayInputOperationOutputAlias,
crate::output::DeleteTransitGatewayOutput,
crate::error::DeleteTransitGatewayError,
crate::input::DeleteTransitGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway.</p>
pub fn transit_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.transit_gateway_id(inp);
self
}
/// <p>The ID of the transit gateway.</p>
pub fn set_transit_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTransitGatewayConnect`.
///
/// <p>Deletes the specified Connect attachment. You must first delete any Connect peers for
/// the attachment.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTransitGatewayConnect<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_transit_gateway_connect_input::Builder,
}
impl<C, M, R> DeleteTransitGatewayConnect<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTransitGatewayConnect`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTransitGatewayConnectOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteTransitGatewayConnectError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTransitGatewayConnectInputOperationOutputAlias,
crate::output::DeleteTransitGatewayConnectOutput,
crate::error::DeleteTransitGatewayConnectError,
crate::input::DeleteTransitGatewayConnectInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Connect attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the Connect attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTransitGatewayConnectPeer`.
///
/// <p>Deletes the specified Connect peer.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTransitGatewayConnectPeer<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_transit_gateway_connect_peer_input::Builder,
}
impl<C, M, R> DeleteTransitGatewayConnectPeer<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTransitGatewayConnectPeer`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTransitGatewayConnectPeerOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteTransitGatewayConnectPeerError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTransitGatewayConnectPeerInputOperationOutputAlias,
crate::output::DeleteTransitGatewayConnectPeerOutput,
crate::error::DeleteTransitGatewayConnectPeerError,
crate::input::DeleteTransitGatewayConnectPeerInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Connect peer.</p>
pub fn transit_gateway_connect_peer_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_connect_peer_id(inp);
self
}
/// <p>The ID of the Connect peer.</p>
pub fn set_transit_gateway_connect_peer_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_connect_peer_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTransitGatewayMulticastDomain`.
///
/// <p>Deletes the specified transit gateway multicast domain.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTransitGatewayMulticastDomain<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_transit_gateway_multicast_domain_input::Builder,
}
impl<C, M, R> DeleteTransitGatewayMulticastDomain<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTransitGatewayMulticastDomain`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTransitGatewayMulticastDomainOutput,
aws_smithy_http::result::SdkError<
crate::error::DeleteTransitGatewayMulticastDomainError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTransitGatewayMulticastDomainInputOperationOutputAlias,
crate::output::DeleteTransitGatewayMulticastDomainOutput,
crate::error::DeleteTransitGatewayMulticastDomainError,
crate::input::DeleteTransitGatewayMulticastDomainInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn transit_gateway_multicast_domain_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_multicast_domain_id(inp);
self
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn set_transit_gateway_multicast_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_multicast_domain_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTransitGatewayPeeringAttachment`.
///
/// <p>Deletes a transit gateway peering attachment.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTransitGatewayPeeringAttachment<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_transit_gateway_peering_attachment_input::Builder,
}
impl<C, M, R> DeleteTransitGatewayPeeringAttachment<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTransitGatewayPeeringAttachment`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTransitGatewayPeeringAttachmentOutput,
aws_smithy_http::result::SdkError<
crate::error::DeleteTransitGatewayPeeringAttachmentError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTransitGatewayPeeringAttachmentInputOperationOutputAlias,
crate::output::DeleteTransitGatewayPeeringAttachmentOutput,
crate::error::DeleteTransitGatewayPeeringAttachmentError,
crate::input::DeleteTransitGatewayPeeringAttachmentInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway peering attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the transit gateway peering attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTransitGatewayPrefixListReference`.
///
/// <p>Deletes a reference (route) to a prefix list in a specified transit gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTransitGatewayPrefixListReference<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_transit_gateway_prefix_list_reference_input::Builder,
}
impl<C, M, R> DeleteTransitGatewayPrefixListReference<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTransitGatewayPrefixListReference`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTransitGatewayPrefixListReferenceOutput,
aws_smithy_http::result::SdkError<
crate::error::DeleteTransitGatewayPrefixListReferenceError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTransitGatewayPrefixListReferenceInputOperationOutputAlias,
crate::output::DeleteTransitGatewayPrefixListReferenceOutput,
crate::error::DeleteTransitGatewayPrefixListReferenceError,
crate::input::DeleteTransitGatewayPrefixListReferenceInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// <p>The ID of the prefix list.</p>
pub fn prefix_list_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix_list_id(inp);
self
}
/// <p>The ID of the prefix list.</p>
pub fn set_prefix_list_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_prefix_list_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTransitGatewayRoute`.
///
/// <p>Deletes the specified route from the specified transit gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTransitGatewayRoute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_transit_gateway_route_input::Builder,
}
impl<C, M, R> DeleteTransitGatewayRoute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTransitGatewayRoute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTransitGatewayRouteOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteTransitGatewayRouteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTransitGatewayRouteInputOperationOutputAlias,
crate::output::DeleteTransitGatewayRouteOutput,
crate::error::DeleteTransitGatewayRouteError,
crate::input::DeleteTransitGatewayRouteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the transit gateway route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// <p>The CIDR range for the route. This must match the CIDR for the route exactly.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The CIDR range for the route. This must match the CIDR for the route exactly.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTransitGatewayRouteTable`.
///
/// <p>Deletes the specified transit gateway route table. You must disassociate the route table from any
/// transit gateway route tables before you can delete it.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTransitGatewayRouteTable<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_transit_gateway_route_table_input::Builder,
}
impl<C, M, R> DeleteTransitGatewayRouteTable<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTransitGatewayRouteTable`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTransitGatewayRouteTableOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteTransitGatewayRouteTableError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTransitGatewayRouteTableInputOperationOutputAlias,
crate::output::DeleteTransitGatewayRouteTableOutput,
crate::error::DeleteTransitGatewayRouteTableError,
crate::input::DeleteTransitGatewayRouteTableInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the transit gateway route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteTransitGatewayVpcAttachment`.
///
/// <p>Deletes the specified VPC attachment.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteTransitGatewayVpcAttachment<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_transit_gateway_vpc_attachment_input::Builder,
}
impl<C, M, R> DeleteTransitGatewayVpcAttachment<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteTransitGatewayVpcAttachment`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteTransitGatewayVpcAttachmentOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteTransitGatewayVpcAttachmentError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteTransitGatewayVpcAttachmentInputOperationOutputAlias,
crate::output::DeleteTransitGatewayVpcAttachmentOutput,
crate::error::DeleteTransitGatewayVpcAttachmentError,
crate::input::DeleteTransitGatewayVpcAttachmentInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteVolume`.
///
/// <p>Deletes the specified EBS volume. The volume must be in the <code>available</code> state
/// (not attached to an instance).</p>
/// <p>The volume can remain in the <code>deleting</code> state for several minutes.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html">Delete an Amazon EBS volume</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteVolume<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_volume_input::Builder,
}
impl<C, M, R> DeleteVolume<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteVolume`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteVolumeOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteVolumeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteVolumeInputOperationOutputAlias,
crate::output::DeleteVolumeOutput,
crate::error::DeleteVolumeError,
crate::input::DeleteVolumeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the volume.</p>
pub fn volume_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.volume_id(inp);
self
}
/// <p>The ID of the volume.</p>
pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_volume_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteVpc`.
///
/// <p>Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated with the VPC (except the default one), and so on.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteVpc<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_vpc_input::Builder,
}
impl<C, M, R> DeleteVpc<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteVpc`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteVpcOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteVpcError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteVpcInputOperationOutputAlias,
crate::output::DeleteVpcOutput,
crate::error::DeleteVpcError,
crate::input::DeleteVpcInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteVpcEndpointConnectionNotifications`.
///
/// <p>Deletes one or more VPC endpoint connection notifications.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteVpcEndpointConnectionNotifications<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_vpc_endpoint_connection_notifications_input::Builder,
}
impl<C, M, R> DeleteVpcEndpointConnectionNotifications<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteVpcEndpointConnectionNotifications`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteVpcEndpointConnectionNotificationsOutput,
aws_smithy_http::result::SdkError<
crate::error::DeleteVpcEndpointConnectionNotificationsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteVpcEndpointConnectionNotificationsInputOperationOutputAlias,
crate::output::DeleteVpcEndpointConnectionNotificationsOutput,
crate::error::DeleteVpcEndpointConnectionNotificationsError,
crate::input::DeleteVpcEndpointConnectionNotificationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `ConnectionNotificationIds`.
///
/// To override the contents of this collection use [`set_connection_notification_ids`](Self::set_connection_notification_ids).
///
/// <p>One or more notification IDs.</p>
pub fn connection_notification_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connection_notification_ids(inp);
self
}
/// <p>One or more notification IDs.</p>
pub fn set_connection_notification_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_connection_notification_ids(input);
self
}
}
/// Fluent builder constructing a request to `DeleteVpcEndpoints`.
///
/// <p>Deletes one or more specified VPC endpoints. You can delete any of the following types of VPC endpoints. </p>
/// <ul>
/// <li>
/// <p>Gateway endpoint,</p>
/// </li>
/// <li>
/// <p>Gateway Load Balancer endpoint,</p>
/// </li>
/// <li>
/// <p>Interface endpoint</p>
/// </li>
/// </ul>
/// <p>The following rules apply when you delete a VPC endpoint:</p>
/// <ul>
/// <li>
/// <p>When you delete a gateway endpoint, we delete the endpoint routes in the route tables that are associated with the endpoint.</p>
/// </li>
/// <li>
/// <p>When you delete a Gateway Load Balancer endpoint, we delete the endpoint network interfaces. </p>
/// <p>You can only delete Gateway Load Balancer endpoints when the routes that are associated with the endpoint are deleted.</p>
/// </li>
/// <li>
/// <p>When you delete an interface endpoint, we delete the endpoint network interfaces.</p>
/// </li>
/// </ul>
#[derive(std::fmt::Debug)]
pub struct DeleteVpcEndpoints<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_vpc_endpoints_input::Builder,
}
impl<C, M, R> DeleteVpcEndpoints<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteVpcEndpoints`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteVpcEndpointsOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteVpcEndpointsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteVpcEndpointsInputOperationOutputAlias,
crate::output::DeleteVpcEndpointsOutput,
crate::error::DeleteVpcEndpointsError,
crate::input::DeleteVpcEndpointsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `VpcEndpointIds`.
///
/// To override the contents of this collection use [`set_vpc_endpoint_ids`](Self::set_vpc_endpoint_ids).
///
/// <p>One or more VPC endpoint IDs.</p>
pub fn vpc_endpoint_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_endpoint_ids(inp);
self
}
/// <p>One or more VPC endpoint IDs.</p>
pub fn set_vpc_endpoint_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_vpc_endpoint_ids(input);
self
}
}
/// Fluent builder constructing a request to `DeleteVpcEndpointServiceConfigurations`.
///
/// <p>Deletes one or more VPC endpoint service configurations in your account. Before you
/// delete the endpoint service configuration, you must reject any <code>Available</code> or
/// <code>PendingAcceptance</code> interface endpoint connections that are attached to
/// the service.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteVpcEndpointServiceConfigurations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_vpc_endpoint_service_configurations_input::Builder,
}
impl<C, M, R> DeleteVpcEndpointServiceConfigurations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteVpcEndpointServiceConfigurations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteVpcEndpointServiceConfigurationsOutput,
aws_smithy_http::result::SdkError<
crate::error::DeleteVpcEndpointServiceConfigurationsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteVpcEndpointServiceConfigurationsInputOperationOutputAlias,
crate::output::DeleteVpcEndpointServiceConfigurationsOutput,
crate::error::DeleteVpcEndpointServiceConfigurationsError,
crate::input::DeleteVpcEndpointServiceConfigurationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `ServiceIds`.
///
/// To override the contents of this collection use [`set_service_ids`](Self::set_service_ids).
///
/// <p>The IDs of one or more services.</p>
pub fn service_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_ids(inp);
self
}
/// <p>The IDs of one or more services.</p>
pub fn set_service_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_service_ids(input);
self
}
}
/// Fluent builder constructing a request to `DeleteVpcPeeringConnection`.
///
/// <p>Deletes a VPC peering connection. Either the owner of the requester VPC or the owner
/// of the accepter VPC can delete the VPC peering connection if it's in the
/// <code>active</code> state. The owner of the requester VPC can delete a VPC peering
/// connection in the <code>pending-acceptance</code> state. You cannot delete a VPC peering
/// connection that's in the <code>failed</code> state.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteVpcPeeringConnection<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_vpc_peering_connection_input::Builder,
}
impl<C, M, R> DeleteVpcPeeringConnection<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteVpcPeeringConnection`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteVpcPeeringConnectionOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteVpcPeeringConnectionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteVpcPeeringConnectionInputOperationOutputAlias,
crate::output::DeleteVpcPeeringConnectionOutput,
crate::error::DeleteVpcPeeringConnectionError,
crate::input::DeleteVpcPeeringConnectionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the VPC peering connection.</p>
pub fn vpc_peering_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_peering_connection_id(inp);
self
}
/// <p>The ID of the VPC peering connection.</p>
pub fn set_vpc_peering_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpc_peering_connection_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteVpnConnection`.
///
/// <p>Deletes the specified VPN connection.</p>
/// <p>If you're deleting the VPC and its associated components, we recommend that you detach
/// the virtual private gateway from the VPC and delete the VPC before deleting the VPN
/// connection. If you believe that the tunnel credentials for your VPN connection have been
/// compromised, you can delete the VPN connection and create a new one that has new keys,
/// without needing to delete the VPC or virtual private gateway. If you create a new VPN
/// connection, you must reconfigure the customer gateway device using the new configuration
/// information returned with the new VPN connection ID.</p>
/// <p>For certificate-based authentication, delete all Certificate Manager (ACM) private
/// certificates used for the Amazon Web Services-side tunnel endpoints for the VPN
/// connection before deleting the VPN connection.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteVpnConnection<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_vpn_connection_input::Builder,
}
impl<C, M, R> DeleteVpnConnection<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteVpnConnection`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteVpnConnectionOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteVpnConnectionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteVpnConnectionInputOperationOutputAlias,
crate::output::DeleteVpnConnectionOutput,
crate::error::DeleteVpnConnectionError,
crate::input::DeleteVpnConnectionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the VPN connection.</p>
pub fn vpn_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_connection_id(inp);
self
}
/// <p>The ID of the VPN connection.</p>
pub fn set_vpn_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_connection_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeleteVpnConnectionRoute`.
///
/// <p>Deletes the specified static route associated with a VPN connection between an
/// existing virtual private gateway and a VPN customer gateway. The static route allows
/// traffic to be routed from the virtual private gateway to the VPN customer
/// gateway.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteVpnConnectionRoute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_vpn_connection_route_input::Builder,
}
impl<C, M, R> DeleteVpnConnectionRoute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteVpnConnectionRoute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteVpnConnectionRouteOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteVpnConnectionRouteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteVpnConnectionRouteInputOperationOutputAlias,
crate::output::DeleteVpnConnectionRouteOutput,
crate::error::DeleteVpnConnectionRouteError,
crate::input::DeleteVpnConnectionRouteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The CIDR block associated with the local subnet of the customer network.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The CIDR block associated with the local subnet of the customer network.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <p>The ID of the VPN connection.</p>
pub fn vpn_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_connection_id(inp);
self
}
/// <p>The ID of the VPN connection.</p>
pub fn set_vpn_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_connection_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteVpnGateway`.
///
/// <p>Deletes the specified virtual private gateway. You must first detach the virtual
/// private gateway from the VPC. Note that you don't need to delete the virtual private
/// gateway if you plan to delete and recreate the VPN connection between your VPC and your
/// network.</p>
#[derive(std::fmt::Debug)]
pub struct DeleteVpnGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_vpn_gateway_input::Builder,
}
impl<C, M, R> DeleteVpnGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteVpnGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteVpnGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteVpnGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteVpnGatewayInputOperationOutputAlias,
crate::output::DeleteVpnGatewayOutput,
crate::error::DeleteVpnGatewayError,
crate::input::DeleteVpnGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the virtual private gateway.</p>
pub fn vpn_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_gateway_id(inp);
self
}
/// <p>The ID of the virtual private gateway.</p>
pub fn set_vpn_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_gateway_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeprovisionByoipCidr`.
///
/// <p>Releases the specified address range that you provisioned for use with your Amazon Web Services resources
/// through bring your own IP addresses (BYOIP) and deletes the corresponding address pool.</p>
/// <p>Before you can release an address range, you must stop advertising it using <a>WithdrawByoipCidr</a> and you must not have any IP addresses allocated from its
/// address range.</p>
#[derive(std::fmt::Debug)]
pub struct DeprovisionByoipCidr<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::deprovision_byoip_cidr_input::Builder,
}
impl<C, M, R> DeprovisionByoipCidr<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeprovisionByoipCidr`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeprovisionByoipCidrOutput,
aws_smithy_http::result::SdkError<crate::error::DeprovisionByoipCidrError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeprovisionByoipCidrInputOperationOutputAlias,
crate::output::DeprovisionByoipCidrOutput,
crate::error::DeprovisionByoipCidrError,
crate::input::DeprovisionByoipCidrInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The address range, in CIDR notation. The prefix must be the same prefix
/// that you specified when you provisioned the address range.</p>
pub fn cidr(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr(inp);
self
}
/// <p>The address range, in CIDR notation. The prefix must be the same prefix
/// that you specified when you provisioned the address range.</p>
pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeregisterImage`.
///
/// <p>Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch
/// new instances; however, it doesn't affect any instances that you've already launched
/// from the AMI. You'll continue to incur usage costs for those instances until you
/// terminate them.</p>
/// <p>When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was
/// created for the root volume of the instance during the AMI creation process. When you
/// deregister an instance store-backed AMI, it doesn't affect the files that you uploaded
/// to Amazon S3 when you created the AMI.</p>
#[derive(std::fmt::Debug)]
pub struct DeregisterImage<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::deregister_image_input::Builder,
}
impl<C, M, R> DeregisterImage<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeregisterImage`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeregisterImageOutput,
aws_smithy_http::result::SdkError<crate::error::DeregisterImageError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeregisterImageInputOperationOutputAlias,
crate::output::DeregisterImageOutput,
crate::error::DeregisterImageError,
crate::input::DeregisterImageInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the AMI.</p>
pub fn image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.image_id(inp);
self
}
/// <p>The ID of the AMI.</p>
pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_image_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeregisterInstanceEventNotificationAttributes`.
///
/// <p>c</p>
/// <p>Deregisters tag keys to prevent tags that have the specified tag keys from being included
/// in scheduled event notifications for resources in the Region.</p>
#[derive(std::fmt::Debug)]
pub struct DeregisterInstanceEventNotificationAttributes<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::deregister_instance_event_notification_attributes_input::Builder,
}
impl<C, M, R> DeregisterInstanceEventNotificationAttributes<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeregisterInstanceEventNotificationAttributes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(self) -> std::result::Result<crate::output::DeregisterInstanceEventNotificationAttributesOutput, aws_smithy_http::result::SdkError<crate::error::DeregisterInstanceEventNotificationAttributesError>>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<crate::input::DeregisterInstanceEventNotificationAttributesInputOperationOutputAlias,
crate::output::DeregisterInstanceEventNotificationAttributesOutput,
crate::error::DeregisterInstanceEventNotificationAttributesError,
crate::input::DeregisterInstanceEventNotificationAttributesInputOperationRetryAlias>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Information about the tag keys to deregister.</p>
pub fn instance_tag_attribute(
mut self,
inp: crate::model::DeregisterInstanceTagAttributeRequest,
) -> Self {
self.inner = self.inner.instance_tag_attribute(inp);
self
}
/// <p>Information about the tag keys to deregister.</p>
pub fn set_instance_tag_attribute(
mut self,
input: std::option::Option<crate::model::DeregisterInstanceTagAttributeRequest>,
) -> Self {
self.inner = self.inner.set_instance_tag_attribute(input);
self
}
}
/// Fluent builder constructing a request to `DeregisterTransitGatewayMulticastGroupMembers`.
///
/// <p>Deregisters the specified members (network interfaces) from the transit gateway multicast group.</p>
#[derive(std::fmt::Debug)]
pub struct DeregisterTransitGatewayMulticastGroupMembers<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::deregister_transit_gateway_multicast_group_members_input::Builder,
}
impl<C, M, R> DeregisterTransitGatewayMulticastGroupMembers<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeregisterTransitGatewayMulticastGroupMembers`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(self) -> std::result::Result<crate::output::DeregisterTransitGatewayMulticastGroupMembersOutput, aws_smithy_http::result::SdkError<crate::error::DeregisterTransitGatewayMulticastGroupMembersError>>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<crate::input::DeregisterTransitGatewayMulticastGroupMembersInputOperationOutputAlias,
crate::output::DeregisterTransitGatewayMulticastGroupMembersOutput,
crate::error::DeregisterTransitGatewayMulticastGroupMembersError,
crate::input::DeregisterTransitGatewayMulticastGroupMembersInputOperationRetryAlias>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn transit_gateway_multicast_domain_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_multicast_domain_id(inp);
self
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn set_transit_gateway_multicast_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_multicast_domain_id(input);
self
}
/// <p>The IP address assigned to the transit gateway multicast group.</p>
pub fn group_ip_address(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_ip_address(inp);
self
}
/// <p>The IP address assigned to the transit gateway multicast group.</p>
pub fn set_group_ip_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_group_ip_address(input);
self
}
/// Appends an item to `NetworkInterfaceIds`.
///
/// To override the contents of this collection use [`set_network_interface_ids`](Self::set_network_interface_ids).
///
/// <p>The IDs of the group members' network interfaces.</p>
pub fn network_interface_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_ids(inp);
self
}
/// <p>The IDs of the group members' network interfaces.</p>
pub fn set_network_interface_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_network_interface_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DeregisterTransitGatewayMulticastGroupSources`.
///
/// <p>Deregisters the specified sources (network interfaces) from the transit gateway multicast group.</p>
#[derive(std::fmt::Debug)]
pub struct DeregisterTransitGatewayMulticastGroupSources<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::deregister_transit_gateway_multicast_group_sources_input::Builder,
}
impl<C, M, R> DeregisterTransitGatewayMulticastGroupSources<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeregisterTransitGatewayMulticastGroupSources`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(self) -> std::result::Result<crate::output::DeregisterTransitGatewayMulticastGroupSourcesOutput, aws_smithy_http::result::SdkError<crate::error::DeregisterTransitGatewayMulticastGroupSourcesError>>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<crate::input::DeregisterTransitGatewayMulticastGroupSourcesInputOperationOutputAlias,
crate::output::DeregisterTransitGatewayMulticastGroupSourcesOutput,
crate::error::DeregisterTransitGatewayMulticastGroupSourcesError,
crate::input::DeregisterTransitGatewayMulticastGroupSourcesInputOperationRetryAlias>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn transit_gateway_multicast_domain_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_multicast_domain_id(inp);
self
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn set_transit_gateway_multicast_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_multicast_domain_id(input);
self
}
/// <p>The IP address assigned to the transit gateway multicast group.</p>
pub fn group_ip_address(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_ip_address(inp);
self
}
/// <p>The IP address assigned to the transit gateway multicast group.</p>
pub fn set_group_ip_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_group_ip_address(input);
self
}
/// Appends an item to `NetworkInterfaceIds`.
///
/// To override the contents of this collection use [`set_network_interface_ids`](Self::set_network_interface_ids).
///
/// <p>The IDs of the group sources' network interfaces.</p>
pub fn network_interface_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_ids(inp);
self
}
/// <p>The IDs of the group sources' network interfaces.</p>
pub fn set_network_interface_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_network_interface_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeAccountAttributes`.
///
/// <p>Describes attributes of your AWS account. The following are the supported account attributes:</p>
/// <ul>
/// <li>
/// <p>
/// <code>supported-platforms</code>: Indicates whether your account can launch instances
/// into EC2-Classic and EC2-VPC, or only into EC2-VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>default-vpc</code>: The ID of the default VPC for your account, or
/// <code>none</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>max-instances</code>: This attribute is no longer supported. The returned
/// value does not reflect your actual vCPU limit for running On-Demand Instances.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-on-demand-instances.html#ec2-on-demand-instances-limits">On-Demand Instance Limits</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-max-security-groups-per-interface</code>: The maximum number of security groups
/// that you can assign to a network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>max-elastic-ips</code>: The maximum number of Elastic IP addresses that you can
/// allocate for use with EC2-Classic. </p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-max-elastic-ips</code>: The maximum number of Elastic IP addresses that you can
/// allocate for use with EC2-VPC.</p>
/// </li>
/// </ul>
#[derive(std::fmt::Debug)]
pub struct DescribeAccountAttributes<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_account_attributes_input::Builder,
}
impl<C, M, R> DescribeAccountAttributes<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeAccountAttributes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeAccountAttributesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeAccountAttributesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeAccountAttributesInputOperationOutputAlias,
crate::output::DescribeAccountAttributesOutput,
crate::error::DescribeAccountAttributesError,
crate::input::DescribeAccountAttributesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `AttributeNames`.
///
/// To override the contents of this collection use [`set_attribute_names`](Self::set_attribute_names).
///
/// <p>The account attribute names.</p>
pub fn attribute_names(
mut self,
inp: impl Into<crate::model::AccountAttributeName>,
) -> Self {
self.inner = self.inner.attribute_names(inp);
self
}
/// <p>The account attribute names.</p>
pub fn set_attribute_names(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AccountAttributeName>>,
) -> Self {
self.inner = self.inner.set_attribute_names(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeAddresses`.
///
/// <p>Describes the specified Elastic IP addresses or all of your Elastic IP addresses.</p>
/// <p>An Elastic IP address is for use in either the EC2-Classic platform or in a VPC.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeAddresses<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_addresses_input::Builder,
}
impl<C, M, R> DescribeAddresses<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeAddresses`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeAddressesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeAddressesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeAddressesInputOperationOutputAlias,
crate::output::DescribeAddressesOutput,
crate::error::DescribeAddressesError,
crate::input::DescribeAddressesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>allocation-id</code> - [EC2-VPC] The allocation ID for the address.</p>
/// </li>
/// <li>
/// <p>
/// <code>association-id</code> - [EC2-VPC] The association ID for the address.</p>
/// </li>
/// <li>
/// <p>
/// <code>domain</code> - Indicates whether the address is for use in EC2-Classic (<code>standard</code>)
/// or in a VPC (<code>vpc</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance the address is associated with, if any.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-border-group</code> - A unique set of Availability Zones, Local Zones,
/// or Wavelength Zones from where Amazon Web Services advertises IP addresses. </p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-id</code> - [EC2-VPC] The ID of the network interface that the address is associated with, if any.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-owner-id</code> - The Amazon Web Services account ID of the owner.</p>
/// </li>
/// <li>
/// <p>
/// <code>private-ip-address</code> - [EC2-VPC] The private IP address associated with the Elastic IP address.</p>
/// </li>
/// <li>
/// <p>
/// <code>public-ip</code> - The Elastic IP address, or the carrier IP address.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>allocation-id</code> - [EC2-VPC] The allocation ID for the address.</p>
/// </li>
/// <li>
/// <p>
/// <code>association-id</code> - [EC2-VPC] The association ID for the address.</p>
/// </li>
/// <li>
/// <p>
/// <code>domain</code> - Indicates whether the address is for use in EC2-Classic (<code>standard</code>)
/// or in a VPC (<code>vpc</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance the address is associated with, if any.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-border-group</code> - A unique set of Availability Zones, Local Zones,
/// or Wavelength Zones from where Amazon Web Services advertises IP addresses. </p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-id</code> - [EC2-VPC] The ID of the network interface that the address is associated with, if any.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-owner-id</code> - The Amazon Web Services account ID of the owner.</p>
/// </li>
/// <li>
/// <p>
/// <code>private-ip-address</code> - [EC2-VPC] The private IP address associated with the Elastic IP address.</p>
/// </li>
/// <li>
/// <p>
/// <code>public-ip</code> - The Elastic IP address, or the carrier IP address.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `PublicIps`.
///
/// To override the contents of this collection use [`set_public_ips`](Self::set_public_ips).
///
/// <p>One or more Elastic IP addresses.</p>
/// <p>Default: Describes all your Elastic IP addresses.</p>
pub fn public_ips(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.public_ips(inp);
self
}
/// <p>One or more Elastic IP addresses.</p>
/// <p>Default: Describes all your Elastic IP addresses.</p>
pub fn set_public_ips(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_public_ips(input);
self
}
/// Appends an item to `AllocationIds`.
///
/// To override the contents of this collection use [`set_allocation_ids`](Self::set_allocation_ids).
///
/// <p>[EC2-VPC] Information about the allocation IDs.</p>
pub fn allocation_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.allocation_ids(inp);
self
}
/// <p>[EC2-VPC] Information about the allocation IDs.</p>
pub fn set_allocation_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_allocation_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeAddressesAttribute`.
///
/// <p>Describes the attributes of the specified Elastic IP addresses. For requirements, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#Using_Elastic_Addressing_Reverse_DNS">Using reverse DNS for email applications</a>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeAddressesAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_addresses_attribute_input::Builder,
}
impl<C, M, R> DescribeAddressesAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeAddressesAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeAddressesAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeAddressesAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeAddressesAttributeInputOperationOutputAlias,
crate::output::DescribeAddressesAttributeOutput,
crate::error::DescribeAddressesAttributeError,
crate::input::DescribeAddressesAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `AllocationIds`.
///
/// To override the contents of this collection use [`set_allocation_ids`](Self::set_allocation_ids).
///
/// <p>[EC2-VPC] The allocation IDs.</p>
pub fn allocation_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.allocation_ids(inp);
self
}
/// <p>[EC2-VPC] The allocation IDs.</p>
pub fn set_allocation_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_allocation_ids(input);
self
}
/// <p>The attribute of the IP address.</p>
pub fn attribute(mut self, inp: crate::model::AddressAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The attribute of the IP address.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::AddressAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeAggregateIdFormat`.
///
/// <p>Describes the longer ID format settings for all resource types in a specific
/// Region. This request is useful for performing a quick audit to determine whether a
/// specific Region is fully opted in for longer IDs (17-character IDs).</p>
///
/// <p>This request only returns information about resource types that support longer IDs.</p>
/// <p>The following resource types support longer IDs: <code>bundle</code> |
/// <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code> |
/// <code>network-acl</code> | <code>network-acl-association</code> |
/// <code>network-interface</code> | <code>network-interface-attachment</code> |
/// <code>prefix-list</code> | <code>reservation</code> | <code>route-table</code> |
/// <code>route-table-association</code> | <code>security-group</code> |
/// <code>snapshot</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>volume</code> | <code>vpc</code> |
/// <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> |
/// <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeAggregateIdFormat<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_aggregate_id_format_input::Builder,
}
impl<C, M, R> DescribeAggregateIdFormat<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeAggregateIdFormat`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeAggregateIdFormatOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeAggregateIdFormatError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeAggregateIdFormatInputOperationOutputAlias,
crate::output::DescribeAggregateIdFormatOutput,
crate::error::DescribeAggregateIdFormatError,
crate::input::DescribeAggregateIdFormatInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeAvailabilityZones`.
///
/// <p>Describes the Availability Zones, Local Zones, and Wavelength Zones that are available to
/// you. If there is an event impacting a zone, you can use this request to view the state and any
/// provided messages for that zone.</p>
/// <p>For more information about Availability Zones, Local Zones, and Wavelength Zones, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html">Regions and zones</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeAvailabilityZones<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_availability_zones_input::Builder,
}
impl<C, M, R> DescribeAvailabilityZones<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeAvailabilityZones`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeAvailabilityZonesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeAvailabilityZonesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeAvailabilityZonesInputOperationOutputAlias,
crate::output::DescribeAvailabilityZonesOutput,
crate::error::DescribeAvailabilityZonesError,
crate::input::DescribeAvailabilityZonesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>group-name</code> - For Availability Zones, use the Region name. For Local
/// Zones, use the name of the group associated with the Local Zone (for example,
/// <code>us-west-2-lax-1</code>) For Wavelength Zones, use the name of the group associated
/// with the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>message</code> - The Zone message.</p>
/// </li>
/// <li>
/// <p>
/// <code>opt-in-status</code> - The opt-in status (<code>opted-in</code>, and
/// <code>not-opted-in</code> | <code>opt-in-not-required</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>parent-zoneID</code> - The ID of the zone that handles some of the Local Zone
/// and Wavelength Zone control plane operations, such as API calls.</p>
/// </li>
/// <li>
/// <p>
/// <code>parent-zoneName</code> - The ID of the zone that handles some of the Local Zone
/// and Wavelength Zone control plane operations, such as API calls.</p>
/// </li>
/// <li>
/// <p>
/// <code>region-name</code> - The name of the Region for the Zone (for example,
/// <code>us-east-1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the Availability Zone, the Local Zone, or the
/// Wavelength Zone (<code>available</code> | <code>information</code> | <code>impaired</code>
/// | <code>unavailable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>zone-id</code> - The ID of the Availability Zone (for example,
/// <code>use1-az1</code>), the Local Zone (for example, <code>usw2-lax1-az1</code>), or the
/// Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>zone-type</code> - The type of zone, for example, <code>local-zone</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>zone-name</code> - The name of the Availability Zone (for example,
/// <code>us-east-1a</code>), the Local Zone (for example, <code>us-west-2-lax-1a</code>), or
/// the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>zone-type</code> - The type of zone, for example, <code>local-zone</code>.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>group-name</code> - For Availability Zones, use the Region name. For Local
/// Zones, use the name of the group associated with the Local Zone (for example,
/// <code>us-west-2-lax-1</code>) For Wavelength Zones, use the name of the group associated
/// with the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>message</code> - The Zone message.</p>
/// </li>
/// <li>
/// <p>
/// <code>opt-in-status</code> - The opt-in status (<code>opted-in</code>, and
/// <code>not-opted-in</code> | <code>opt-in-not-required</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>parent-zoneID</code> - The ID of the zone that handles some of the Local Zone
/// and Wavelength Zone control plane operations, such as API calls.</p>
/// </li>
/// <li>
/// <p>
/// <code>parent-zoneName</code> - The ID of the zone that handles some of the Local Zone
/// and Wavelength Zone control plane operations, such as API calls.</p>
/// </li>
/// <li>
/// <p>
/// <code>region-name</code> - The name of the Region for the Zone (for example,
/// <code>us-east-1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the Availability Zone, the Local Zone, or the
/// Wavelength Zone (<code>available</code> | <code>information</code> | <code>impaired</code>
/// | <code>unavailable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>zone-id</code> - The ID of the Availability Zone (for example,
/// <code>use1-az1</code>), the Local Zone (for example, <code>usw2-lax1-az1</code>), or the
/// Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>zone-type</code> - The type of zone, for example, <code>local-zone</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>zone-name</code> - The name of the Availability Zone (for example,
/// <code>us-east-1a</code>), the Local Zone (for example, <code>us-west-2-lax-1a</code>), or
/// the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>zone-type</code> - The type of zone, for example, <code>local-zone</code>.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `ZoneNames`.
///
/// To override the contents of this collection use [`set_zone_names`](Self::set_zone_names).
///
/// <p>The names of the Availability Zones, Local Zones, and Wavelength Zones.</p>
pub fn zone_names(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.zone_names(inp);
self
}
/// <p>The names of the Availability Zones, Local Zones, and Wavelength Zones.</p>
pub fn set_zone_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_zone_names(input);
self
}
/// Appends an item to `ZoneIds`.
///
/// To override the contents of this collection use [`set_zone_ids`](Self::set_zone_ids).
///
/// <p>The IDs of the Availability Zones, Local Zones, and Wavelength Zones.</p>
pub fn zone_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.zone_ids(inp);
self
}
/// <p>The IDs of the Availability Zones, Local Zones, and Wavelength Zones.</p>
pub fn set_zone_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_zone_ids(input);
self
}
/// <p>Include all Availability Zones, Local Zones, and Wavelength Zones regardless of your
/// opt-in status.</p>
/// <p>If you do not use this parameter, the results include only the zones for the Regions where you have chosen the option to opt in.</p>
pub fn all_availability_zones(mut self, inp: bool) -> Self {
self.inner = self.inner.all_availability_zones(inp);
self
}
/// <p>Include all Availability Zones, Local Zones, and Wavelength Zones regardless of your
/// opt-in status.</p>
/// <p>If you do not use this parameter, the results include only the zones for the Regions where you have chosen the option to opt in.</p>
pub fn set_all_availability_zones(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_all_availability_zones(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeBundleTasks`.
///
/// <p>Describes the specified bundle tasks or all of your bundle tasks.</p>
/// <note>
/// <p>Completed bundle tasks are listed for only a limited time. If your bundle task is no longer in the list, you can still register an AMI from it. Just use <code>RegisterImage</code> with the Amazon S3 bucket name and image manifest name you provided to the bundle task.</p>
/// </note>
#[derive(std::fmt::Debug)]
pub struct DescribeBundleTasks<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_bundle_tasks_input::Builder,
}
impl<C, M, R> DescribeBundleTasks<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeBundleTasks`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeBundleTasksOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeBundleTasksError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeBundleTasksInputOperationOutputAlias,
crate::output::DescribeBundleTasksOutput,
crate::error::DescribeBundleTasksError,
crate::input::DescribeBundleTasksInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `BundleIds`.
///
/// To override the contents of this collection use [`set_bundle_ids`](Self::set_bundle_ids).
///
/// <p>The bundle task IDs.</p>
/// <p>Default: Describes all your bundle tasks.</p>
pub fn bundle_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.bundle_ids(inp);
self
}
/// <p>The bundle task IDs.</p>
/// <p>Default: Describes all your bundle tasks.</p>
pub fn set_bundle_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_bundle_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>bundle-id</code> - The ID of the bundle task.</p>
/// </li>
/// <li>
/// <p>
/// <code>error-code</code> - If the task failed, the error code returned.</p>
/// </li>
/// <li>
/// <p>
/// <code>error-message</code> - If the task failed, the error message returned.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>progress</code> - The level of task completion, as a percentage (for example, 20%).</p>
/// </li>
/// <li>
/// <p>
/// <code>s3-bucket</code> - The Amazon S3 bucket to store the AMI.</p>
/// </li>
/// <li>
/// <p>
/// <code>s3-prefix</code> - The beginning of the AMI name.</p>
/// </li>
/// <li>
/// <p>
/// <code>start-time</code> - The time the task started (for example, 2013-09-15T17:15:20.000Z).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the task (<code>pending</code> | <code>waiting-for-shutdown</code> | <code>bundling</code> |
/// <code>storing</code> | <code>cancelling</code> | <code>complete</code> | <code>failed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>update-time</code> - The time of the most recent update for the task.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>bundle-id</code> - The ID of the bundle task.</p>
/// </li>
/// <li>
/// <p>
/// <code>error-code</code> - If the task failed, the error code returned.</p>
/// </li>
/// <li>
/// <p>
/// <code>error-message</code> - If the task failed, the error message returned.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>progress</code> - The level of task completion, as a percentage (for example, 20%).</p>
/// </li>
/// <li>
/// <p>
/// <code>s3-bucket</code> - The Amazon S3 bucket to store the AMI.</p>
/// </li>
/// <li>
/// <p>
/// <code>s3-prefix</code> - The beginning of the AMI name.</p>
/// </li>
/// <li>
/// <p>
/// <code>start-time</code> - The time the task started (for example, 2013-09-15T17:15:20.000Z).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the task (<code>pending</code> | <code>waiting-for-shutdown</code> | <code>bundling</code> |
/// <code>storing</code> | <code>cancelling</code> | <code>complete</code> | <code>failed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>update-time</code> - The time of the most recent update for the task.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeByoipCidrs`.
///
/// <p>Describes the IP address ranges that were specified in calls to <a>ProvisionByoipCidr</a>.</p>
/// <p>To describe the address pools that were created when you provisioned the address
/// ranges, use <a>DescribePublicIpv4Pools</a> or <a>DescribeIpv6Pools</a>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeByoipCidrs<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_byoip_cidrs_input::Builder,
}
impl<C, M, R> DescribeByoipCidrs<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeByoipCidrs`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeByoipCidrsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeByoipCidrsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeByoipCidrsInputOperationOutputAlias,
crate::output::DescribeByoipCidrsOutput,
crate::error::DescribeByoipCidrsError,
crate::input::DescribeByoipCidrsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeCapacityReservationFleets`.
///
/// <p>Describes one or more Capacity Reservation Fleets.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeCapacityReservationFleets<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_capacity_reservation_fleets_input::Builder,
}
impl<C, M, R> DescribeCapacityReservationFleets<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeCapacityReservationFleets`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeCapacityReservationFleetsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeCapacityReservationFleetsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeCapacityReservationFleetsInputOperationOutputAlias,
crate::output::DescribeCapacityReservationFleetsOutput,
crate::error::DescribeCapacityReservationFleetsError,
crate::input::DescribeCapacityReservationFleetsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `CapacityReservationFleetIds`.
///
/// To override the contents of this collection use [`set_capacity_reservation_fleet_ids`](Self::set_capacity_reservation_fleet_ids).
///
/// <p>The IDs of the Capacity Reservation Fleets to describe.</p>
pub fn capacity_reservation_fleet_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.capacity_reservation_fleet_ids(inp);
self
}
/// <p>The IDs of the Capacity Reservation Fleets to describe.</p>
pub fn set_capacity_reservation_fleet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_capacity_reservation_fleet_ids(input);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>state</code> - The state of the Fleet (<code>submitted</code> | <code>modifying</code> | <code>active</code> |
/// <code>partially_fulfilled</code> | <code>expiring</code> | <code>expired</code> | <code>cancelling</code> |
/// <code>cancelled</code> | <code>failed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-match-criteria</code> - The instance matching criteria for the Fleet. Only <code>open</code> is supported.</p>
/// </li>
/// <li>
/// <p>
/// <code>tenancy</code> - The tenancy of the Fleet (<code>default</code> | <code>dedicated</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>allocation-strategy</code> - The allocation strategy used by the Fleet. Only <code>prioritized</code> is supported.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>state</code> - The state of the Fleet (<code>submitted</code> | <code>modifying</code> | <code>active</code> |
/// <code>partially_fulfilled</code> | <code>expiring</code> | <code>expired</code> | <code>cancelling</code> |
/// <code>cancelled</code> | <code>failed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-match-criteria</code> - The instance matching criteria for the Fleet. Only <code>open</code> is supported.</p>
/// </li>
/// <li>
/// <p>
/// <code>tenancy</code> - The tenancy of the Fleet (<code>default</code> | <code>dedicated</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>allocation-strategy</code> - The allocation strategy used by the Fleet. Only <code>prioritized</code> is supported.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeCapacityReservations`.
///
/// <p>Describes one or more of your Capacity Reservations. The results describe only the Capacity Reservations in the
/// Amazon Web Services Region that you're currently using.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeCapacityReservations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_capacity_reservations_input::Builder,
}
impl<C, M, R> DescribeCapacityReservations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeCapacityReservations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeCapacityReservationsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeCapacityReservationsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeCapacityReservationsInputOperationOutputAlias,
crate::output::DescribeCapacityReservationsOutput,
crate::error::DescribeCapacityReservationsError,
crate::input::DescribeCapacityReservationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `CapacityReservationIds`.
///
/// To override the contents of this collection use [`set_capacity_reservation_ids`](Self::set_capacity_reservation_ids).
///
/// <p>The ID of the Capacity Reservation.</p>
pub fn capacity_reservation_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.capacity_reservation_ids(inp);
self
}
/// <p>The ID of the Capacity Reservation.</p>
pub fn set_capacity_reservation_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_capacity_reservation_ids(input);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-type</code> - The type of instance for which the Capacity Reservation reserves capacity.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the Capacity Reservation.</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone-id</code> - The Availability Zone ID of the Capacity Reservation.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-platform</code> - The type of operating system for which the Capacity Reservation reserves capacity.</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone ID of the Capacity Reservation.</p>
/// </li>
/// <li>
/// <p>
/// <code>tenancy</code> - Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the
/// following tenancy settings:</p>
/// <ul>
/// <li>
/// <p>
/// <code>default</code> - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.</p>
/// </li>
/// <li>
/// <p>
/// <code>dedicated</code> - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p>
/// </li>
/// </ul>
/// </li>
/// <li>
/// <p>
/// <code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:</p>
/// <ul>
/// <li>
/// <p>
/// <code>active</code>- The Capacity Reservation is active and the capacity is available for your use.</p>
/// </li>
/// <li>
/// <p>
/// <code>expired</code> - The Capacity Reservation expired automatically at the date and time specified in your request.
/// The reserved capacity is no longer available for your use.</p>
/// </li>
/// <li>
/// <p>
/// <code>cancelled</code> - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.</p>
/// </li>
/// <li>
/// <p>
/// <code>pending</code> - The Capacity Reservation request was successful but the capacity provisioning is still pending.</p>
/// </li>
/// <li>
/// <p>
/// <code>failed</code> - The Capacity Reservation request has failed. A request might fail due to invalid request parameters,
/// capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.</p>
/// </li>
/// </ul>
/// </li>
/// <li>
/// <p>
/// <code>start-date</code> - The date and time at which the Capacity Reservation was started.</p>
/// </li>
/// <li>
/// <p>
/// <code>end-date</code> - The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is
/// released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.</p>
/// </li>
/// <li>
/// <p>
/// <code>end-date-type</code> - Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:</p>
/// <ul>
/// <li>
/// <p>
/// <code>unlimited</code> - The Capacity Reservation remains active until you explicitly cancel it.</p>
/// </li>
/// <li>
/// <p>
/// <code>limited</code> - The Capacity Reservation expires automatically at a specified date and time.</p>
/// </li>
/// </ul>
/// </li>
/// <li>
/// <p>
/// <code>instance-match-criteria</code> - Indicates the type of instance launches that the Capacity Reservation accepts. The options include:</p>
/// <ul>
/// <li>
/// <p>
/// <code>open</code> - The Capacity Reservation accepts all instances that have matching
/// attributes (instance type, platform, and Availability Zone). Instances
/// that have matching attributes launch into the Capacity Reservation
/// automatically without specifying any additional parameters.</p>
/// </li>
/// <li>
/// <p>
/// <code>targeted</code> - The Capacity Reservation only accepts instances that have matching
/// attributes (instance type, platform, and Availability Zone), and
/// explicitly target the Capacity Reservation. This ensures that only
/// permitted instances can use the reserved capacity.</p>
/// </li>
/// </ul>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-type</code> - The type of instance for which the Capacity Reservation reserves capacity.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the Capacity Reservation.</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone-id</code> - The Availability Zone ID of the Capacity Reservation.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-platform</code> - The type of operating system for which the Capacity Reservation reserves capacity.</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone ID of the Capacity Reservation.</p>
/// </li>
/// <li>
/// <p>
/// <code>tenancy</code> - Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the
/// following tenancy settings:</p>
/// <ul>
/// <li>
/// <p>
/// <code>default</code> - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.</p>
/// </li>
/// <li>
/// <p>
/// <code>dedicated</code> - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p>
/// </li>
/// </ul>
/// </li>
/// <li>
/// <p>
/// <code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:</p>
/// <ul>
/// <li>
/// <p>
/// <code>active</code>- The Capacity Reservation is active and the capacity is available for your use.</p>
/// </li>
/// <li>
/// <p>
/// <code>expired</code> - The Capacity Reservation expired automatically at the date and time specified in your request.
/// The reserved capacity is no longer available for your use.</p>
/// </li>
/// <li>
/// <p>
/// <code>cancelled</code> - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.</p>
/// </li>
/// <li>
/// <p>
/// <code>pending</code> - The Capacity Reservation request was successful but the capacity provisioning is still pending.</p>
/// </li>
/// <li>
/// <p>
/// <code>failed</code> - The Capacity Reservation request has failed. A request might fail due to invalid request parameters,
/// capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.</p>
/// </li>
/// </ul>
/// </li>
/// <li>
/// <p>
/// <code>start-date</code> - The date and time at which the Capacity Reservation was started.</p>
/// </li>
/// <li>
/// <p>
/// <code>end-date</code> - The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is
/// released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.</p>
/// </li>
/// <li>
/// <p>
/// <code>end-date-type</code> - Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:</p>
/// <ul>
/// <li>
/// <p>
/// <code>unlimited</code> - The Capacity Reservation remains active until you explicitly cancel it.</p>
/// </li>
/// <li>
/// <p>
/// <code>limited</code> - The Capacity Reservation expires automatically at a specified date and time.</p>
/// </li>
/// </ul>
/// </li>
/// <li>
/// <p>
/// <code>instance-match-criteria</code> - Indicates the type of instance launches that the Capacity Reservation accepts. The options include:</p>
/// <ul>
/// <li>
/// <p>
/// <code>open</code> - The Capacity Reservation accepts all instances that have matching
/// attributes (instance type, platform, and Availability Zone). Instances
/// that have matching attributes launch into the Capacity Reservation
/// automatically without specifying any additional parameters.</p>
/// </li>
/// <li>
/// <p>
/// <code>targeted</code> - The Capacity Reservation only accepts instances that have matching
/// attributes (instance type, platform, and Availability Zone), and
/// explicitly target the Capacity Reservation. This ensures that only
/// permitted instances can use the reserved capacity.</p>
/// </li>
/// </ul>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeCarrierGateways`.
///
/// <p>Describes one or more of your carrier gateways.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeCarrierGateways<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_carrier_gateways_input::Builder,
}
impl<C, M, R> DescribeCarrierGateways<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeCarrierGateways`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeCarrierGatewaysOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeCarrierGatewaysError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeCarrierGatewaysInputOperationOutputAlias,
crate::output::DescribeCarrierGatewaysOutput,
crate::error::DescribeCarrierGatewaysError,
crate::input::DescribeCarrierGatewaysInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `CarrierGatewayIds`.
///
/// To override the contents of this collection use [`set_carrier_gateway_ids`](Self::set_carrier_gateway_ids).
///
/// <p>One or more carrier gateway IDs.</p>
pub fn carrier_gateway_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.carrier_gateway_ids(inp);
self
}
/// <p>One or more carrier gateway IDs.</p>
pub fn set_carrier_gateway_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_carrier_gateway_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>carrier-gateway-id</code> - The ID of the carrier gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the carrier gateway (<code>pending</code> |
/// <code>failed</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the owner of the carrier gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC associated with the carrier gateway.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>carrier-gateway-id</code> - The ID of the carrier gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the carrier gateway (<code>pending</code> |
/// <code>failed</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the owner of the carrier gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC associated with the carrier gateway.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeClassicLinkInstances`.
///
/// <p>Describes one or more of your linked EC2-Classic instances. This request only returns
/// information about EC2-Classic instances linked to a VPC through ClassicLink. You cannot
/// use this request to return information about other instances.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeClassicLinkInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_classic_link_instances_input::Builder,
}
impl<C, M, R> DescribeClassicLinkInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeClassicLinkInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeClassicLinkInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeClassicLinkInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeClassicLinkInstancesInputOperationOutputAlias,
crate::output::DescribeClassicLinkInstancesOutput,
crate::error::DescribeClassicLinkInstancesError,
crate::input::DescribeClassicLinkInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>group-id</code> - The ID of a VPC security group that's associated with the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
///
/// <p>
/// <code>vpc-id</code> - The ID of the VPC to which the instance is
/// linked.</p>
///
/// <p>
/// <code>vpc-id</code> - The ID of the VPC that the instance is linked to.</p>
///
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>group-id</code> - The ID of a VPC security group that's associated with the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
///
/// <p>
/// <code>vpc-id</code> - The ID of the VPC to which the instance is
/// linked.</p>
///
/// <p>
/// <code>vpc-id</code> - The ID of the VPC that the instance is linked to.</p>
///
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `InstanceIds`.
///
/// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
///
/// <p>One or more instance IDs. Must be instances linked to a VPC through ClassicLink.</p>
pub fn instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_ids(inp);
self
}
/// <p>One or more instance IDs. Must be instances linked to a VPC through ClassicLink.</p>
pub fn set_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instance_ids(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
/// <p>Constraint: If the value is greater than 1000, we return only 1000 items.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
/// <p>Constraint: If the value is greater than 1000, we return only 1000 items.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeClientVpnAuthorizationRules`.
///
/// <p>Describes the authorization rules for a specified Client VPN endpoint.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeClientVpnAuthorizationRules<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_client_vpn_authorization_rules_input::Builder,
}
impl<C, M, R> DescribeClientVpnAuthorizationRules<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeClientVpnAuthorizationRules`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeClientVpnAuthorizationRulesOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeClientVpnAuthorizationRulesError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeClientVpnAuthorizationRulesInputOperationOutputAlias,
crate::output::DescribeClientVpnAuthorizationRulesOutput,
crate::error::DescribeClientVpnAuthorizationRulesError,
crate::input::DescribeClientVpnAuthorizationRulesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>description</code> - The description of the authorization rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>destination-cidr</code> - The CIDR of the network to which the authorization rule
/// applies.</p>
/// </li>
/// <li>
/// <p>
/// <code>group-id</code> - The ID of the Active Directory group to which the authorization rule grants access.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>description</code> - The description of the authorization rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>destination-cidr</code> - The CIDR of the network to which the authorization rule
/// applies.</p>
/// </li>
/// <li>
/// <p>
/// <code>group-id</code> - The ID of the Active Directory group to which the authorization rule grants access.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeClientVpnConnections`.
///
/// <p>Describes active client connections and connections that have been terminated within the last 60
/// minutes for the specified Client VPN endpoint.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeClientVpnConnections<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_client_vpn_connections_input::Builder,
}
impl<C, M, R> DescribeClientVpnConnections<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeClientVpnConnections`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeClientVpnConnectionsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeClientVpnConnectionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeClientVpnConnectionsInputOperationOutputAlias,
crate::output::DescribeClientVpnConnectionsOutput,
crate::error::DescribeClientVpnConnectionsError,
crate::input::DescribeClientVpnConnectionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>connection-id</code> - The ID of the connection.</p>
/// </li>
/// <li>
/// <p>
/// <code>username</code> - For Active Directory client authentication, the user name of the
/// client who established the client connection.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>connection-id</code> - The ID of the connection.</p>
/// </li>
/// <li>
/// <p>
/// <code>username</code> - For Active Directory client authentication, the user name of the
/// client who established the client connection.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeClientVpnEndpoints`.
///
/// <p>Describes one or more Client VPN endpoints in the account.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeClientVpnEndpoints<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_client_vpn_endpoints_input::Builder,
}
impl<C, M, R> DescribeClientVpnEndpoints<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeClientVpnEndpoints`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeClientVpnEndpointsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeClientVpnEndpointsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeClientVpnEndpointsInputOperationOutputAlias,
crate::output::DescribeClientVpnEndpointsOutput,
crate::error::DescribeClientVpnEndpointsError,
crate::input::DescribeClientVpnEndpointsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `ClientVpnEndpointIds`.
///
/// To override the contents of this collection use [`set_client_vpn_endpoint_ids`](Self::set_client_vpn_endpoint_ids).
///
/// <p>The ID of the Client VPN endpoint.</p>
pub fn client_vpn_endpoint_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_ids(inp);
self
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn set_client_vpn_endpoint_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_ids(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>endpoint-id</code> - The ID of the Client VPN endpoint.</p>
/// </li>
/// <li>
/// <p>
/// <code>transport-protocol</code> - The transport protocol (<code>tcp</code> |
/// <code>udp</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>endpoint-id</code> - The ID of the Client VPN endpoint.</p>
/// </li>
/// <li>
/// <p>
/// <code>transport-protocol</code> - The transport protocol (<code>tcp</code> |
/// <code>udp</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeClientVpnRoutes`.
///
/// <p>Describes the routes for the specified Client VPN endpoint.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeClientVpnRoutes<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_client_vpn_routes_input::Builder,
}
impl<C, M, R> DescribeClientVpnRoutes<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeClientVpnRoutes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeClientVpnRoutesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeClientVpnRoutesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeClientVpnRoutesInputOperationOutputAlias,
crate::output::DescribeClientVpnRoutesOutput,
crate::error::DescribeClientVpnRoutesError,
crate::input::DescribeClientVpnRoutesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>destination-cidr</code> - The CIDR of the route destination.</p>
/// </li>
/// <li>
/// <p>
/// <code>origin</code> - How the route was associated with the Client VPN endpoint (<code>associate</code> | <code>add-route</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>target-subnet</code> - The ID of the subnet through which traffic is routed.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>destination-cidr</code> - The CIDR of the route destination.</p>
/// </li>
/// <li>
/// <p>
/// <code>origin</code> - How the route was associated with the Client VPN endpoint (<code>associate</code> | <code>add-route</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>target-subnet</code> - The ID of the subnet through which traffic is routed.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeClientVpnTargetNetworks`.
///
/// <p>Describes the target networks associated with the specified Client VPN endpoint.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeClientVpnTargetNetworks<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_client_vpn_target_networks_input::Builder,
}
impl<C, M, R> DescribeClientVpnTargetNetworks<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeClientVpnTargetNetworks`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeClientVpnTargetNetworksOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeClientVpnTargetNetworksError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeClientVpnTargetNetworksInputOperationOutputAlias,
crate::output::DescribeClientVpnTargetNetworksOutput,
crate::error::DescribeClientVpnTargetNetworksError,
crate::input::DescribeClientVpnTargetNetworksInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// Appends an item to `AssociationIds`.
///
/// To override the contents of this collection use [`set_association_ids`](Self::set_association_ids).
///
/// <p>The IDs of the target network associations.</p>
pub fn association_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_ids(inp);
self
}
/// <p>The IDs of the target network associations.</p>
pub fn set_association_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_association_ids(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>association-id</code> - The ID of the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>target-network-id</code> - The ID of the subnet specified as the target network.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC in which the target network is located.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>association-id</code> - The ID of the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>target-network-id</code> - The ID of the subnet specified as the target network.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC in which the target network is located.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeCoipPools`.
///
/// <p>Describes the specified customer-owned address pools or all of your customer-owned address pools.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeCoipPools<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_coip_pools_input::Builder,
}
impl<C, M, R> DescribeCoipPools<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeCoipPools`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeCoipPoolsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeCoipPoolsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeCoipPoolsInputOperationOutputAlias,
crate::output::DescribeCoipPoolsOutput,
crate::error::DescribeCoipPoolsError,
crate::input::DescribeCoipPoolsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `PoolIds`.
///
/// To override the contents of this collection use [`set_pool_ids`](Self::set_pool_ids).
///
/// <p>The IDs of the address pools.</p>
pub fn pool_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pool_ids(inp);
self
}
/// <p>The IDs of the address pools.</p>
pub fn set_pool_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_pool_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters. The following are the possible values:</p>
/// <ul>
/// <li>
/// <p>
/// <code>coip-pool.pool-id</code>
/// </p>
/// </li>
/// </ul>
/// <ul>
/// <li>
/// <p>
/// <code>coip-pool.local-gateway-route-table-id</code>
/// </p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters. The following are the possible values:</p>
/// <ul>
/// <li>
/// <p>
/// <code>coip-pool.pool-id</code>
/// </p>
/// </li>
/// </ul>
/// <ul>
/// <li>
/// <p>
/// <code>coip-pool.local-gateway-route-table-id</code>
/// </p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeConversionTasks`.
///
/// <p>Describes the specified conversion tasks or all your conversion tasks. For more information, see the
/// <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/">VM Import/Export User Guide</a>.</p>
/// <p>For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM Import Manifest</a>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeConversionTasks<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_conversion_tasks_input::Builder,
}
impl<C, M, R> DescribeConversionTasks<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeConversionTasks`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeConversionTasksOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeConversionTasksError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeConversionTasksInputOperationOutputAlias,
crate::output::DescribeConversionTasksOutput,
crate::error::DescribeConversionTasksError,
crate::input::DescribeConversionTasksInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `ConversionTaskIds`.
///
/// To override the contents of this collection use [`set_conversion_task_ids`](Self::set_conversion_task_ids).
///
/// <p>The conversion task IDs.</p>
pub fn conversion_task_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.conversion_task_ids(inp);
self
}
/// <p>The conversion task IDs.</p>
pub fn set_conversion_task_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_conversion_task_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeCustomerGateways`.
///
/// <p>Describes one or more of your VPN customer gateways.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">Amazon Web Services Site-to-Site VPN</a> in the <i>Amazon Web Services Site-to-Site VPN
/// User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeCustomerGateways<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_customer_gateways_input::Builder,
}
impl<C, M, R> DescribeCustomerGateways<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeCustomerGateways`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeCustomerGatewaysOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeCustomerGatewaysError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeCustomerGatewaysInputOperationOutputAlias,
crate::output::DescribeCustomerGatewaysOutput,
crate::error::DescribeCustomerGatewaysError,
crate::input::DescribeCustomerGatewaysInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `CustomerGatewayIds`.
///
/// To override the contents of this collection use [`set_customer_gateway_ids`](Self::set_customer_gateway_ids).
///
/// <p>One or more customer gateway IDs.</p>
/// <p>Default: Describes all your customer gateways.</p>
pub fn customer_gateway_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.customer_gateway_ids(inp);
self
}
/// <p>One or more customer gateway IDs.</p>
/// <p>Default: Describes all your customer gateways.</p>
pub fn set_customer_gateway_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_customer_gateway_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>bgp-asn</code> - The customer gateway's Border Gateway Protocol (BGP)
/// Autonomous System Number (ASN).</p>
/// </li>
/// <li>
/// <p>
/// <code>customer-gateway-id</code> - The ID of the customer gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-address</code> - The IP address of the customer gateway's
/// Internet-routable external interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the customer gateway (<code>pending</code> |
/// <code>available</code> | <code>deleting</code> |
/// <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of customer gateway. Currently, the only
/// supported type is <code>ipsec.1</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>bgp-asn</code> - The customer gateway's Border Gateway Protocol (BGP)
/// Autonomous System Number (ASN).</p>
/// </li>
/// <li>
/// <p>
/// <code>customer-gateway-id</code> - The ID of the customer gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-address</code> - The IP address of the customer gateway's
/// Internet-routable external interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the customer gateway (<code>pending</code> |
/// <code>available</code> | <code>deleting</code> |
/// <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of customer gateway. Currently, the only
/// supported type is <code>ipsec.1</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeDhcpOptions`.
///
/// <p>Describes one or more of your DHCP options sets.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html">DHCP options sets</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeDhcpOptions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_dhcp_options_input::Builder,
}
impl<C, M, R> DescribeDhcpOptions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeDhcpOptions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeDhcpOptionsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeDhcpOptionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeDhcpOptionsInputOperationOutputAlias,
crate::output::DescribeDhcpOptionsOutput,
crate::error::DescribeDhcpOptionsError,
crate::input::DescribeDhcpOptionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `DhcpOptionsIds`.
///
/// To override the contents of this collection use [`set_dhcp_options_ids`](Self::set_dhcp_options_ids).
///
/// <p>The IDs of one or more DHCP options sets.</p>
/// <p>Default: Describes all your DHCP options sets.</p>
pub fn dhcp_options_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.dhcp_options_ids(inp);
self
}
/// <p>The IDs of one or more DHCP options sets.</p>
/// <p>Default: Describes all your DHCP options sets.</p>
pub fn set_dhcp_options_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_dhcp_options_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>dhcp-options-id</code> - The ID of a DHCP options set.</p>
/// </li>
/// <li>
/// <p>
/// <code>key</code> - The key for one of the options (for example, <code>domain-name</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>value</code> - The value for one of the options.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the DHCP options set.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>dhcp-options-id</code> - The ID of a DHCP options set.</p>
/// </li>
/// <li>
/// <p>
/// <code>key</code> - The key for one of the options (for example, <code>domain-name</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>value</code> - The value for one of the options.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the DHCP options set.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeEgressOnlyInternetGateways`.
///
/// <p>Describes one or more of your egress-only internet gateways.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeEgressOnlyInternetGateways<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_egress_only_internet_gateways_input::Builder,
}
impl<C, M, R> DescribeEgressOnlyInternetGateways<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeEgressOnlyInternetGateways`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeEgressOnlyInternetGatewaysOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeEgressOnlyInternetGatewaysError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeEgressOnlyInternetGatewaysInputOperationOutputAlias,
crate::output::DescribeEgressOnlyInternetGatewaysOutput,
crate::error::DescribeEgressOnlyInternetGatewaysError,
crate::input::DescribeEgressOnlyInternetGatewaysInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `EgressOnlyInternetGatewayIds`.
///
/// To override the contents of this collection use [`set_egress_only_internet_gateway_ids`](Self::set_egress_only_internet_gateway_ids).
///
/// <p>One or more egress-only internet gateway IDs.</p>
pub fn egress_only_internet_gateway_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.egress_only_internet_gateway_ids(inp);
self
}
/// <p>One or more egress-only internet gateway IDs.</p>
pub fn set_egress_only_internet_gateway_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_egress_only_internet_gateway_ids(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
}
/// Fluent builder constructing a request to `DescribeElasticGpus`.
///
/// <p>Describes the Elastic Graphics accelerator associated with your instances. For more information
/// about Elastic Graphics, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html">Amazon Elastic Graphics</a>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeElasticGpus<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_elastic_gpus_input::Builder,
}
impl<C, M, R> DescribeElasticGpus<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeElasticGpus`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeElasticGpusOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeElasticGpusError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeElasticGpusInputOperationOutputAlias,
crate::output::DescribeElasticGpusOutput,
crate::error::DescribeElasticGpusError,
crate::input::DescribeElasticGpusInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `ElasticGpuIds`.
///
/// To override the contents of this collection use [`set_elastic_gpu_ids`](Self::set_elastic_gpu_ids).
///
/// <p>The Elastic Graphics accelerator IDs.</p>
pub fn elastic_gpu_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.elastic_gpu_ids(inp);
self
}
/// <p>The Elastic Graphics accelerator IDs.</p>
pub fn set_elastic_gpu_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_elastic_gpu_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone in which the
/// Elastic Graphics accelerator resides.</p>
/// </li>
/// <li>
/// <p>
/// <code>elastic-gpu-health</code> - The status of the Elastic Graphics accelerator
/// (<code>OK</code> | <code>IMPAIRED</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>elastic-gpu-state</code> - The state of the Elastic Graphics accelerator
/// (<code>ATTACHED</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>elastic-gpu-type</code> - The type of Elastic Graphics accelerator; for example,
/// <code>eg1.medium</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance to which the
/// Elastic Graphics accelerator is associated.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone in which the
/// Elastic Graphics accelerator resides.</p>
/// </li>
/// <li>
/// <p>
/// <code>elastic-gpu-health</code> - The status of the Elastic Graphics accelerator
/// (<code>OK</code> | <code>IMPAIRED</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>elastic-gpu-state</code> - The state of the Elastic Graphics accelerator
/// (<code>ATTACHED</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>elastic-gpu-type</code> - The type of Elastic Graphics accelerator; for example,
/// <code>eg1.medium</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance to which the
/// Elastic Graphics accelerator is associated.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value
/// can be between 5 and 1000.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value
/// can be between 5 and 1000.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to request the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeExportImageTasks`.
///
/// <p>Describes the specified export image tasks or all of your export image tasks.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeExportImageTasks<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_export_image_tasks_input::Builder,
}
impl<C, M, R> DescribeExportImageTasks<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeExportImageTasks`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeExportImageTasksOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeExportImageTasksError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeExportImageTasksInputOperationOutputAlias,
crate::output::DescribeExportImageTasksOutput,
crate::error::DescribeExportImageTasksError,
crate::input::DescribeExportImageTasksInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>Filter tasks using the <code>task-state</code> filter and one of the following values: <code>active</code>,
/// <code>completed</code>, <code>deleting</code>, or <code>deleted</code>.</p>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>Filter tasks using the <code>task-state</code> filter and one of the following values: <code>active</code>,
/// <code>completed</code>, <code>deleting</code>, or <code>deleted</code>.</p>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `ExportImageTaskIds`.
///
/// To override the contents of this collection use [`set_export_image_task_ids`](Self::set_export_image_task_ids).
///
/// <p>The IDs of the export image tasks.</p>
pub fn export_image_task_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.export_image_task_ids(inp);
self
}
/// <p>The IDs of the export image tasks.</p>
pub fn set_export_image_task_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_export_image_task_ids(input);
self
}
/// <p>The maximum number of results to return in a single call.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>A token that indicates the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>A token that indicates the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeExportTasks`.
///
/// <p>Describes the specified export instance tasks or all of your export instance tasks.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeExportTasks<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_export_tasks_input::Builder,
}
impl<C, M, R> DescribeExportTasks<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeExportTasks`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeExportTasksOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeExportTasksError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeExportTasksInputOperationOutputAlias,
crate::output::DescribeExportTasksOutput,
crate::error::DescribeExportTasksError,
crate::input::DescribeExportTasksInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `ExportTaskIds`.
///
/// To override the contents of this collection use [`set_export_task_ids`](Self::set_export_task_ids).
///
/// <p>The export task IDs.</p>
pub fn export_task_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.export_task_ids(inp);
self
}
/// <p>The export task IDs.</p>
pub fn set_export_task_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_export_task_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>the filters for the export tasks.</p>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>the filters for the export tasks.</p>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
}
/// Fluent builder constructing a request to `DescribeFastSnapshotRestores`.
///
/// <p>Describes the state of fast snapshot restores for your snapshots.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeFastSnapshotRestores<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_fast_snapshot_restores_input::Builder,
}
impl<C, M, R> DescribeFastSnapshotRestores<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeFastSnapshotRestores`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeFastSnapshotRestoresOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeFastSnapshotRestoresError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeFastSnapshotRestoresInputOperationOutputAlias,
crate::output::DescribeFastSnapshotRestoresOutput,
crate::error::DescribeFastSnapshotRestoresError,
crate::input::DescribeFastSnapshotRestoresInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code>: The Availability Zone of the snapshot.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code>: The ID of the Amazon Web Services account that enabled fast snapshot restore on the snapshot.</p>
/// </li>
/// <li>
/// <p>
/// <code>snapshot-id</code>: The ID of the snapshot.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code>: The state of fast snapshot restores for the snapshot
/// (<code>enabling</code> |
/// <code>optimizing</code> |
/// <code>enabled</code> |
/// <code>disabling</code> |
/// <code>disabled</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code>: The Availability Zone of the snapshot.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code>: The ID of the Amazon Web Services account that enabled fast snapshot restore on the snapshot.</p>
/// </li>
/// <li>
/// <p>
/// <code>snapshot-id</code>: The ID of the snapshot.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code>: The state of fast snapshot restores for the snapshot
/// (<code>enabling</code> |
/// <code>optimizing</code> |
/// <code>enabled</code> |
/// <code>disabling</code> |
/// <code>disabled</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeFleetHistory`.
///
/// <p>Describes the events for the specified EC2 Fleet during the specified time.</p>
/// <p>EC2 Fleet events are delayed by up to 30 seconds before they can be described. This ensures
/// that you can query by the last evaluated time and not miss a recorded event. EC2 Fleet events
/// are available for 48 hours.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/fleet-monitor.html">Monitor fleet events using Amazon EventBridge</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeFleetHistory<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_fleet_history_input::Builder,
}
impl<C, M, R> DescribeFleetHistory<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeFleetHistory`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeFleetHistoryOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeFleetHistoryError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeFleetHistoryInputOperationOutputAlias,
crate::output::DescribeFleetHistoryOutput,
crate::error::DescribeFleetHistoryError,
crate::input::DescribeFleetHistoryInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The type of events to describe. By default, all events are described.</p>
pub fn event_type(mut self, inp: crate::model::FleetEventType) -> Self {
self.inner = self.inner.event_type(inp);
self
}
/// <p>The type of events to describe. By default, all events are described.</p>
pub fn set_event_type(
mut self,
input: std::option::Option<crate::model::FleetEventType>,
) -> Self {
self.inner = self.inner.set_event_type(input);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1 and
/// 1000. The default value is 1000. To retrieve the remaining results, make another call with
/// the returned <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1 and
/// 1000. The default value is 1000. To retrieve the remaining results, make another call with
/// the returned <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next set of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next set of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The ID of the EC2 Fleet.</p>
pub fn fleet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.fleet_id(inp);
self
}
/// <p>The ID of the EC2 Fleet.</p>
pub fn set_fleet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_fleet_id(input);
self
}
/// <p>The start date and time for the events, in UTC format (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
pub fn start_time(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.start_time(inp);
self
}
/// <p>The start date and time for the events, in UTC format (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
pub fn set_start_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_start_time(input);
self
}
}
/// Fluent builder constructing a request to `DescribeFleetInstances`.
///
/// <p>Describes the running instances for the specified EC2 Fleet.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html#monitor-ec2-fleet">Monitoring your EC2 Fleet</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeFleetInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_fleet_instances_input::Builder,
}
impl<C, M, R> DescribeFleetInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeFleetInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeFleetInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeFleetInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeFleetInstancesInputOperationOutputAlias,
crate::output::DescribeFleetInstancesOutput,
crate::error::DescribeFleetInstancesError,
crate::input::DescribeFleetInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1 and
/// 1000. The default value is 1000. To retrieve the remaining results, make another call with
/// the returned <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1 and
/// 1000. The default value is 1000. To retrieve the remaining results, make another call with
/// the returned <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next set of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next set of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The ID of the EC2 Fleet.</p>
pub fn fleet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.fleet_id(inp);
self
}
/// <p>The ID of the EC2 Fleet.</p>
pub fn set_fleet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_fleet_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
}
/// Fluent builder constructing a request to `DescribeFleets`.
///
/// <p>Describes the specified EC2 Fleets or all of your EC2 Fleets.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html#monitor-ec2-fleet">Monitoring your EC2 Fleet</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeFleets<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_fleets_input::Builder,
}
impl<C, M, R> DescribeFleets<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeFleets`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeFleetsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeFleetsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeFleetsInputOperationOutputAlias,
crate::output::DescribeFleetsOutput,
crate::error::DescribeFleetsError,
crate::input::DescribeFleetsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1 and
/// 1000. The default value is 1000. To retrieve the remaining results, make another call with
/// the returned <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1 and
/// 1000. The default value is 1000. To retrieve the remaining results, make another call with
/// the returned <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next set of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next set of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `FleetIds`.
///
/// To override the contents of this collection use [`set_fleet_ids`](Self::set_fleet_ids).
///
/// <p>The ID of the EC2 Fleets.</p>
pub fn fleet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.fleet_ids(inp);
self
}
/// <p>The ID of the EC2 Fleets.</p>
pub fn set_fleet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_fleet_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>activity-status</code> - The progress of the EC2 Fleet ( <code>error</code> |
/// <code>pending-fulfillment</code> | <code>pending-termination</code> |
/// <code>fulfilled</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>excess-capacity-termination-policy</code> - Indicates whether to terminate
/// running instances if the target capacity is decreased below the current EC2 Fleet size
/// (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>fleet-state</code> - The state of the EC2 Fleet (<code>submitted</code> |
/// <code>active</code> | <code>deleted</code> | <code>failed</code> |
/// <code>deleted-running</code> | <code>deleted-terminating</code> |
/// <code>modifying</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>replace-unhealthy-instances</code> - Indicates whether EC2 Fleet should replace
/// unhealthy instances (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of request (<code>instant</code> |
/// <code>request</code> | <code>maintain</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>activity-status</code> - The progress of the EC2 Fleet ( <code>error</code> |
/// <code>pending-fulfillment</code> | <code>pending-termination</code> |
/// <code>fulfilled</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>excess-capacity-termination-policy</code> - Indicates whether to terminate
/// running instances if the target capacity is decreased below the current EC2 Fleet size
/// (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>fleet-state</code> - The state of the EC2 Fleet (<code>submitted</code> |
/// <code>active</code> | <code>deleted</code> | <code>failed</code> |
/// <code>deleted-running</code> | <code>deleted-terminating</code> |
/// <code>modifying</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>replace-unhealthy-instances</code> - Indicates whether EC2 Fleet should replace
/// unhealthy instances (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of request (<code>instant</code> |
/// <code>request</code> | <code>maintain</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
}
/// Fluent builder constructing a request to `DescribeFlowLogs`.
///
/// <p>Describes one or more flow logs. To view the information in your flow logs (the log
/// streams for the network interfaces), you must use the CloudWatch Logs console or the CloudWatch Logs
/// API.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeFlowLogs<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_flow_logs_input::Builder,
}
impl<C, M, R> DescribeFlowLogs<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeFlowLogs`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeFlowLogsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeFlowLogsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeFlowLogsInputOperationOutputAlias,
crate::output::DescribeFlowLogsOutput,
crate::error::DescribeFlowLogsError,
crate::input::DescribeFlowLogsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filter`.
///
/// To override the contents of this collection use [`set_filter`](Self::set_filter).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>deliver-log-status</code> - The status of the logs delivery (<code>SUCCESS</code> |
/// <code>FAILED</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>log-destination-type</code> - The type of destination to which the flow
/// log publishes data. Possible destination types include
/// <code>cloud-watch-logs</code> and <code>s3</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>flow-log-id</code> - The ID of the flow log.</p>
/// </li>
/// <li>
/// <p>
/// <code>log-group-name</code> - The name of the log group.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the VPC, subnet, or network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>traffic-type</code> - The type of traffic (<code>ACCEPT</code> |
/// <code>REJECT</code> | <code>ALL</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filter(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filter(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>deliver-log-status</code> - The status of the logs delivery (<code>SUCCESS</code> |
/// <code>FAILED</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>log-destination-type</code> - The type of destination to which the flow
/// log publishes data. Possible destination types include
/// <code>cloud-watch-logs</code> and <code>s3</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>flow-log-id</code> - The ID of the flow log.</p>
/// </li>
/// <li>
/// <p>
/// <code>log-group-name</code> - The name of the log group.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the VPC, subnet, or network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>traffic-type</code> - The type of traffic (<code>ACCEPT</code> |
/// <code>REJECT</code> | <code>ALL</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filter(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filter(input);
self
}
/// Appends an item to `FlowLogIds`.
///
/// To override the contents of this collection use [`set_flow_log_ids`](Self::set_flow_log_ids).
///
/// <p>One or more flow log IDs.</p>
/// <p>Constraint: Maximum of 1000 flow log IDs.</p>
pub fn flow_log_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.flow_log_ids(inp);
self
}
/// <p>One or more flow log IDs.</p>
/// <p>Constraint: Maximum of 1000 flow log IDs.</p>
pub fn set_flow_log_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_flow_log_ids(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeFpgaImageAttribute`.
///
/// <p>Describes the specified attribute of the specified Amazon FPGA Image (AFI).</p>
#[derive(std::fmt::Debug)]
pub struct DescribeFpgaImageAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_fpga_image_attribute_input::Builder,
}
impl<C, M, R> DescribeFpgaImageAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeFpgaImageAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeFpgaImageAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeFpgaImageAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeFpgaImageAttributeInputOperationOutputAlias,
crate::output::DescribeFpgaImageAttributeOutput,
crate::error::DescribeFpgaImageAttributeError,
crate::input::DescribeFpgaImageAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the AFI.</p>
pub fn fpga_image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.fpga_image_id(inp);
self
}
/// <p>The ID of the AFI.</p>
pub fn set_fpga_image_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_fpga_image_id(input);
self
}
/// <p>The AFI attribute.</p>
pub fn attribute(mut self, inp: crate::model::FpgaImageAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The AFI attribute.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::FpgaImageAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
}
/// Fluent builder constructing a request to `DescribeFpgaImages`.
///
/// <p>Describes the Amazon FPGA Images (AFIs) available to you. These include public AFIs,
/// private AFIs that you own, and AFIs owned by other Amazon Web Services accounts for which you have load
/// permissions.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeFpgaImages<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_fpga_images_input::Builder,
}
impl<C, M, R> DescribeFpgaImages<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeFpgaImages`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeFpgaImagesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeFpgaImagesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeFpgaImagesInputOperationOutputAlias,
crate::output::DescribeFpgaImagesOutput,
crate::error::DescribeFpgaImagesError,
crate::input::DescribeFpgaImagesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `FpgaImageIds`.
///
/// To override the contents of this collection use [`set_fpga_image_ids`](Self::set_fpga_image_ids).
///
/// <p>The AFI IDs.</p>
pub fn fpga_image_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.fpga_image_ids(inp);
self
}
/// <p>The AFI IDs.</p>
pub fn set_fpga_image_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_fpga_image_ids(input);
self
}
/// Appends an item to `Owners`.
///
/// To override the contents of this collection use [`set_owners`](Self::set_owners).
///
/// <p>Filters the AFI by owner. Specify an Amazon Web Services account ID, <code>self</code>
/// (owner is the sender of the request), or an Amazon Web Services owner alias (valid values are
/// <code>amazon</code> | <code>aws-marketplace</code>).</p>
pub fn owners(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.owners(inp);
self
}
/// <p>Filters the AFI by owner. Specify an Amazon Web Services account ID, <code>self</code>
/// (owner is the sender of the request), or an Amazon Web Services owner alias (valid values are
/// <code>amazon</code> | <code>aws-marketplace</code>).</p>
pub fn set_owners(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_owners(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>create-time</code> - The creation time of the AFI.</p>
/// </li>
/// <li>
/// <p>
/// <code>fpga-image-id</code> - The FPGA image identifier (AFI ID).</p>
/// </li>
/// <li>
/// <p>
/// <code>fpga-image-global-id</code> - The global FPGA image identifier (AGFI ID).</p>
/// </li>
/// <li>
/// <p>
/// <code>name</code> - The name of the AFI.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the AFI owner.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-code</code> - The product code.</p>
/// </li>
/// <li>
/// <p>
/// <code>shell-version</code> - The version of the Amazon Web Services Shell that was used to create the bitstream.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the AFI (<code>pending</code> | <code>failed</code> | <code>available</code> | <code>unavailable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>update-time</code> - The time of the most recent update.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>create-time</code> - The creation time of the AFI.</p>
/// </li>
/// <li>
/// <p>
/// <code>fpga-image-id</code> - The FPGA image identifier (AFI ID).</p>
/// </li>
/// <li>
/// <p>
/// <code>fpga-image-global-id</code> - The global FPGA image identifier (AGFI ID).</p>
/// </li>
/// <li>
/// <p>
/// <code>name</code> - The name of the AFI.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the AFI owner.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-code</code> - The product code.</p>
/// </li>
/// <li>
/// <p>
/// <code>shell-version</code> - The version of the Amazon Web Services Shell that was used to create the bitstream.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the AFI (<code>pending</code> | <code>failed</code> | <code>available</code> | <code>unavailable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>update-time</code> - The time of the most recent update.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return in a single call.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeHostReservationOfferings`.
///
/// <p>Describes the Dedicated Host reservations that are available to purchase.</p>
/// <p>The results describe all of the Dedicated Host reservation offerings, including
/// offerings that might not match the instance family and Region of your Dedicated Hosts.
/// When purchasing an offering, ensure that the instance family and Region of the offering
/// matches that of the Dedicated Hosts with which it is to be associated. For more
/// information about supported instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html">Dedicated Hosts</a>
/// in the <i>Amazon EC2 User Guide</i>. </p>
#[derive(std::fmt::Debug)]
pub struct DescribeHostReservationOfferings<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_host_reservation_offerings_input::Builder,
}
impl<C, M, R> DescribeHostReservationOfferings<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeHostReservationOfferings`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeHostReservationOfferingsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeHostReservationOfferingsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeHostReservationOfferingsInputOperationOutputAlias,
crate::output::DescribeHostReservationOfferingsOutput,
crate::error::DescribeHostReservationOfferingsError,
crate::input::DescribeHostReservationOfferingsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filter`.
///
/// To override the contents of this collection use [`set_filter`](Self::set_filter).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-family</code> - The instance family of the offering (for example,
/// <code>m4</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>payment-option</code> - The payment option (<code>NoUpfront</code> |
/// <code>PartialUpfront</code> | <code>AllUpfront</code>).</p>
/// </li>
/// </ul>
pub fn filter(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filter(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-family</code> - The instance family of the offering (for example,
/// <code>m4</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>payment-option</code> - The payment option (<code>NoUpfront</code> |
/// <code>PartialUpfront</code> | <code>AllUpfront</code>).</p>
/// </li>
/// </ul>
pub fn set_filter(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filter(input);
self
}
/// <p>This is the maximum duration of the reservation to purchase, specified in seconds.
/// Reservations are available in one-year and three-year terms. The number of seconds
/// specified must be the number of seconds in a year (365x24x60x60) times one of the
/// supported durations (1 or 3). For example, specify 94608000 for three years.</p>
pub fn max_duration(mut self, inp: i32) -> Self {
self.inner = self.inner.max_duration(inp);
self
}
/// <p>This is the maximum duration of the reservation to purchase, specified in seconds.
/// Reservations are available in one-year and three-year terms. The number of seconds
/// specified must be the number of seconds in a year (365x24x60x60) times one of the
/// supported durations (1 or 3). For example, specify 94608000 for three years.</p>
pub fn set_max_duration(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_duration(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>This is the minimum duration of the reservation you'd like to purchase, specified
/// in seconds. Reservations are available in one-year and three-year terms. The number of
/// seconds specified must be the number of seconds in a year (365x24x60x60) times one of
/// the supported durations (1 or 3). For example, specify 31536000 for one year.</p>
pub fn min_duration(mut self, inp: i32) -> Self {
self.inner = self.inner.min_duration(inp);
self
}
/// <p>This is the minimum duration of the reservation you'd like to purchase, specified
/// in seconds. Reservations are available in one-year and three-year terms. The number of
/// seconds specified must be the number of seconds in a year (365x24x60x60) times one of
/// the supported durations (1 or 3). For example, specify 31536000 for one year.</p>
pub fn set_min_duration(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_min_duration(input);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The ID of the reservation offering.</p>
pub fn offering_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.offering_id(inp);
self
}
/// <p>The ID of the reservation offering.</p>
pub fn set_offering_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_offering_id(input);
self
}
}
/// Fluent builder constructing a request to `DescribeHostReservations`.
///
/// <p>Describes reservations that are associated with Dedicated Hosts in your
/// account.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeHostReservations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_host_reservations_input::Builder,
}
impl<C, M, R> DescribeHostReservations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeHostReservations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeHostReservationsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeHostReservationsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeHostReservationsInputOperationOutputAlias,
crate::output::DescribeHostReservationsOutput,
crate::error::DescribeHostReservationsError,
crate::input::DescribeHostReservationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filter`.
///
/// To override the contents of this collection use [`set_filter`](Self::set_filter).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-family</code> - The instance family (for example,
/// <code>m4</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>payment-option</code> - The payment option (<code>NoUpfront</code> |
/// <code>PartialUpfront</code> | <code>AllUpfront</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the reservation (<code>payment-pending</code>
/// | <code>payment-failed</code> | <code>active</code> |
/// <code>retired</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag:<key></code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filter(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filter(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-family</code> - The instance family (for example,
/// <code>m4</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>payment-option</code> - The payment option (<code>NoUpfront</code> |
/// <code>PartialUpfront</code> | <code>AllUpfront</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the reservation (<code>payment-pending</code>
/// | <code>payment-failed</code> | <code>active</code> |
/// <code>retired</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag:<key></code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filter(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filter(input);
self
}
/// Appends an item to `HostReservationIdSet`.
///
/// To override the contents of this collection use [`set_host_reservation_id_set`](Self::set_host_reservation_id_set).
///
/// <p>The host reservation IDs.</p>
pub fn host_reservation_id_set(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.host_reservation_id_set(inp);
self
}
/// <p>The host reservation IDs.</p>
pub fn set_host_reservation_id_set(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_host_reservation_id_set(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeHosts`.
///
/// <p>Describes the specified Dedicated Hosts or all your Dedicated Hosts.</p>
/// <p>The results describe only the Dedicated Hosts in the Region you're currently using.
/// All listed instances consume capacity on your Dedicated Host. Dedicated Hosts that have
/// recently been released are listed with the state <code>released</code>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeHosts<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_hosts_input::Builder,
}
impl<C, M, R> DescribeHosts<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeHosts`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeHostsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeHostsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeHostsInputOperationOutputAlias,
crate::output::DescribeHostsOutput,
crate::error::DescribeHostsError,
crate::input::DescribeHostsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filter`.
///
/// To override the contents of this collection use [`set_filter`](Self::set_filter).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>auto-placement</code> - Whether auto-placement is enabled or disabled
/// (<code>on</code> | <code>off</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone of the
/// host.</p>
/// </li>
/// <li>
/// <p>
/// <code>client-token</code> - The idempotency token that you provided when you
/// allocated the host.</p>
/// </li>
/// <li>
/// <p>
/// <code>host-reservation-id</code> - The ID of the reservation assigned to
/// this host.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type size that the Dedicated Host
/// is configured to support.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The allocation state of the Dedicated Host
/// (<code>available</code> | <code>under-assessment</code> |
/// <code>permanent-failure</code> | <code>released</code> |
/// <code>released-permanent-failure</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filter(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filter(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>auto-placement</code> - Whether auto-placement is enabled or disabled
/// (<code>on</code> | <code>off</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone of the
/// host.</p>
/// </li>
/// <li>
/// <p>
/// <code>client-token</code> - The idempotency token that you provided when you
/// allocated the host.</p>
/// </li>
/// <li>
/// <p>
/// <code>host-reservation-id</code> - The ID of the reservation assigned to
/// this host.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type size that the Dedicated Host
/// is configured to support.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The allocation state of the Dedicated Host
/// (<code>available</code> | <code>under-assessment</code> |
/// <code>permanent-failure</code> | <code>released</code> |
/// <code>released-permanent-failure</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filter(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filter(input);
self
}
/// Appends an item to `HostIds`.
///
/// To override the contents of this collection use [`set_host_ids`](Self::set_host_ids).
///
/// <p>The IDs of the Dedicated Hosts. The IDs are used for targeted instance
/// launches.</p>
pub fn host_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.host_ids(inp);
self
}
/// <p>The IDs of the Dedicated Hosts. The IDs are used for targeted instance
/// launches.</p>
pub fn set_host_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_host_ids(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
/// <p>You cannot specify this parameter and the host IDs parameter in the same request.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
/// <p>You cannot specify this parameter and the host IDs parameter in the same request.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeIamInstanceProfileAssociations`.
///
/// <p>Describes your IAM instance profile associations.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeIamInstanceProfileAssociations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_iam_instance_profile_associations_input::Builder,
}
impl<C, M, R> DescribeIamInstanceProfileAssociations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeIamInstanceProfileAssociations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeIamInstanceProfileAssociationsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeIamInstanceProfileAssociationsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeIamInstanceProfileAssociationsInputOperationOutputAlias,
crate::output::DescribeIamInstanceProfileAssociationsOutput,
crate::error::DescribeIamInstanceProfileAssociationsError,
crate::input::DescribeIamInstanceProfileAssociationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `AssociationIds`.
///
/// To override the contents of this collection use [`set_association_ids`](Self::set_association_ids).
///
/// <p>The IAM instance profile associations.</p>
pub fn association_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_ids(inp);
self
}
/// <p>The IAM instance profile associations.</p>
pub fn set_association_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_association_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the association (<code>associating</code> |
/// <code>associated</code> | <code>disassociating</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the association (<code>associating</code> |
/// <code>associated</code> | <code>disassociating</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to request the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeIdentityIdFormat`.
///
/// <p>Describes the ID format settings for resources for the specified IAM user, IAM role, or root
/// user. For example, you can view the resource types that are enabled for longer IDs. This request only
/// returns information about resource types whose ID formats can be modified; it does not return
/// information about other resource types. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html">Resource IDs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. </p>
/// <p>The following resource types support longer IDs: <code>bundle</code> |
/// <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code> |
/// <code>network-acl</code> | <code>network-acl-association</code> |
/// <code>network-interface</code> | <code>network-interface-attachment</code> |
/// <code>prefix-list</code> | <code>reservation</code> | <code>route-table</code> |
/// <code>route-table-association</code> | <code>security-group</code> |
/// <code>snapshot</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>volume</code> | <code>vpc</code>
/// | <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> |
/// <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>. </p>
/// <p>These settings apply to the principal specified in the request. They do not apply to the
/// principal that makes the request.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeIdentityIdFormat<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_identity_id_format_input::Builder,
}
impl<C, M, R> DescribeIdentityIdFormat<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeIdentityIdFormat`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeIdentityIdFormatOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeIdentityIdFormatError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeIdentityIdFormatInputOperationOutputAlias,
crate::output::DescribeIdentityIdFormatOutput,
crate::error::DescribeIdentityIdFormatError,
crate::input::DescribeIdentityIdFormatInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ARN of the principal, which can be an IAM role, IAM user, or the root user.</p>
pub fn principal_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.principal_arn(inp);
self
}
/// <p>The ARN of the principal, which can be an IAM role, IAM user, or the root user.</p>
pub fn set_principal_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_principal_arn(input);
self
}
/// <p>The type of resource: <code>bundle</code> |
/// <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code> |
/// <code>network-acl</code> | <code>network-acl-association</code> |
/// <code>network-interface</code> | <code>network-interface-attachment</code> |
/// <code>prefix-list</code> | <code>reservation</code> | <code>route-table</code> |
/// <code>route-table-association</code> | <code>security-group</code> |
/// <code>snapshot</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>volume</code> | <code>vpc</code>
/// | <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> |
/// <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>
/// </p>
pub fn resource(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource(inp);
self
}
/// <p>The type of resource: <code>bundle</code> |
/// <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code> |
/// <code>network-acl</code> | <code>network-acl-association</code> |
/// <code>network-interface</code> | <code>network-interface-attachment</code> |
/// <code>prefix-list</code> | <code>reservation</code> | <code>route-table</code> |
/// <code>route-table-association</code> | <code>security-group</code> |
/// <code>snapshot</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>volume</code> | <code>vpc</code>
/// | <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> |
/// <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>
/// </p>
pub fn set_resource(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_resource(input);
self
}
}
/// Fluent builder constructing a request to `DescribeIdFormat`.
///
/// <p>Describes the ID format settings for your resources on a per-Region basis, for example, to view which resource types are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types.</p>
/// <p>The following resource types support longer IDs: <code>bundle</code> |
/// <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code> |
/// <code>network-acl</code> | <code>network-acl-association</code> |
/// <code>network-interface</code> | <code>network-interface-attachment</code> |
/// <code>prefix-list</code> | <code>reservation</code> | <code>route-table</code> |
/// <code>route-table-association</code> | <code>security-group</code> |
/// <code>snapshot</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>volume</code> | <code>vpc</code>
/// | <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> |
/// <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>. </p>
/// <p>These settings apply to the IAM user who makes the request; they do not apply to the entire
/// Amazon Web Services account. By default, an IAM user defaults to the same settings as the root user, unless
/// they explicitly override the settings by running the <a>ModifyIdFormat</a> command. Resources
/// created with longer IDs are visible to all IAM users, regardless of these settings and
/// provided that they have permission to use the relevant <code>Describe</code> command for the
/// resource type.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeIdFormat<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_id_format_input::Builder,
}
impl<C, M, R> DescribeIdFormat<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeIdFormat`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeIdFormatOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeIdFormatError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeIdFormatInputOperationOutputAlias,
crate::output::DescribeIdFormatOutput,
crate::error::DescribeIdFormatError,
crate::input::DescribeIdFormatInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The type of resource: <code>bundle</code> |
/// <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code> |
/// <code>network-acl</code> | <code>network-acl-association</code> |
/// <code>network-interface</code> | <code>network-interface-attachment</code> |
/// <code>prefix-list</code> | <code>reservation</code> | <code>route-table</code> |
/// <code>route-table-association</code> | <code>security-group</code> |
/// <code>snapshot</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>volume</code> | <code>vpc</code>
/// | <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> |
/// <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>
/// </p>
pub fn resource(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource(inp);
self
}
/// <p>The type of resource: <code>bundle</code> |
/// <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code> |
/// <code>network-acl</code> | <code>network-acl-association</code> |
/// <code>network-interface</code> | <code>network-interface-attachment</code> |
/// <code>prefix-list</code> | <code>reservation</code> | <code>route-table</code> |
/// <code>route-table-association</code> | <code>security-group</code> |
/// <code>snapshot</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>volume</code> | <code>vpc</code>
/// | <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> |
/// <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>
/// </p>
pub fn set_resource(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_resource(input);
self
}
}
/// Fluent builder constructing a request to `DescribeImageAttribute`.
///
/// <p>Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeImageAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_image_attribute_input::Builder,
}
impl<C, M, R> DescribeImageAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeImageAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeImageAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeImageAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeImageAttributeInputOperationOutputAlias,
crate::output::DescribeImageAttributeOutput,
crate::error::DescribeImageAttributeError,
crate::input::DescribeImageAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The AMI attribute.</p>
/// <p>
/// <b>Note</b>: The <code>blockDeviceMapping</code> attribute is deprecated.
/// Using this attribute returns the <code>Client.AuthFailure</code> error. To get information about
/// the block device mappings for an AMI, use the <a>DescribeImages</a> action.</p>
pub fn attribute(mut self, inp: crate::model::ImageAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The AMI attribute.</p>
/// <p>
/// <b>Note</b>: The <code>blockDeviceMapping</code> attribute is deprecated.
/// Using this attribute returns the <code>Client.AuthFailure</code> error. To get information about
/// the block device mappings for an AMI, use the <a>DescribeImages</a> action.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::ImageAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <p>The ID of the AMI.</p>
pub fn image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.image_id(inp);
self
}
/// <p>The ID of the AMI.</p>
pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_image_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeImages`.
///
/// <p>Describes the specified images (AMIs, AKIs, and ARIs) available to you or all of the images available to you.</p>
/// <p>The images available to you include public images, private images that you own, and private images owned by other
/// Amazon Web Services accounts for which you have explicit launch permissions.</p>
/// <p>Recently deregistered images appear in the returned results for a short interval and then
/// return empty results. After all instances that reference a deregistered AMI are terminated,
/// specifying the ID of the image will eventually return an error indicating that the AMI ID
/// cannot be found.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeImages<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_images_input::Builder,
}
impl<C, M, R> DescribeImages<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeImages`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeImagesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeImagesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeImagesInputOperationOutputAlias,
crate::output::DescribeImagesOutput,
crate::error::DescribeImagesError,
crate::input::DescribeImagesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `ExecutableUsers`.
///
/// To override the contents of this collection use [`set_executable_users`](Self::set_executable_users).
///
/// <p>Scopes the images by users with explicit launch permissions.
/// Specify an Amazon Web Services account ID, <code>self</code> (the sender of the request),
/// or <code>all</code> (public AMIs).</p>
pub fn executable_users(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.executable_users(inp);
self
}
/// <p>Scopes the images by users with explicit launch permissions.
/// Specify an Amazon Web Services account ID, <code>self</code> (the sender of the request),
/// or <code>all</code> (public AMIs).</p>
pub fn set_executable_users(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_executable_users(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>architecture</code> - The image architecture (<code>i386</code> |
/// <code>x86_64</code> | <code>arm64</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.delete-on-termination</code> - A Boolean value that indicates
/// whether the Amazon EBS volume is deleted on instance termination.</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.device-name</code> - The device name specified in the block device mapping (for
/// example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.snapshot-id</code> - The ID of the snapshot used for the Amazon EBS
/// volume.</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.volume-size</code> - The volume size of the Amazon EBS volume, in GiB.</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.volume-type</code> - The volume type of the Amazon EBS volume
/// (<code>io1</code> | <code>io2</code> | <code>gp2</code> | <code>gp3</code> | <code>sc1
/// </code>| <code>st1</code> | <code>standard</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.encrypted</code> - A Boolean that indicates whether the Amazon EBS volume is encrypted.</p>
/// </li>
/// <li>
/// <p>
/// <code>description</code> - The description of the image (provided during image
/// creation).</p>
/// </li>
/// <li>
/// <p>
/// <code>ena-support</code> - A Boolean that indicates whether enhanced networking
/// with ENA is enabled.</p>
/// </li>
/// <li>
/// <p>
/// <code>hypervisor</code> - The hypervisor type (<code>ovm</code> |
/// <code>xen</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>image-id</code> - The ID of the image.</p>
/// </li>
/// <li>
/// <p>
/// <code>image-type</code> - The image type (<code>machine</code> | <code>kernel</code> |
/// <code>ramdisk</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>is-public</code> - A Boolean that indicates whether the image is public.</p>
/// </li>
/// <li>
/// <p>
/// <code>kernel-id</code> - The kernel ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>manifest-location</code> - The location of the image manifest.</p>
/// </li>
/// <li>
/// <p>
/// <code>name</code> - The name of the AMI (provided during image creation).</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-alias</code> - The owner alias (<code>amazon</code> | <code>aws-marketplace</code>).
/// The valid aliases are defined in an Amazon-maintained list. This is not the Amazon Web Services account alias that can be
/// set using the IAM console. We recommend that you use the <b>Owner</b>
/// request parameter instead of this filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the owner. We recommend that you use the
/// <b>Owner</b> request parameter instead of this filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>platform</code> - The platform. To only list Windows-based AMIs, use
/// <code>windows</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-code</code> - The product code.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-code.type</code> - The type of the product code (<code>marketplace</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>ramdisk-id</code> - The RAM disk ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>root-device-name</code> - The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>root-device-type</code> - The type of the root device volume (<code>ebs</code> |
/// <code>instance-store</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the image (<code>available</code> | <code>pending</code>
/// | <code>failed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>state-reason-code</code> - The reason code for the state change.</p>
/// </li>
/// <li>
/// <p>
/// <code>state-reason-message</code> - The message for the state change.</p>
/// </li>
/// <li>
/// <p>
/// <code>sriov-net-support</code> - A value of <code>simple</code> indicates
/// that enhanced networking with the Intel 82599 VF interface is enabled.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>virtualization-type</code> - The virtualization type (<code>paravirtual</code> |
/// <code>hvm</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>architecture</code> - The image architecture (<code>i386</code> |
/// <code>x86_64</code> | <code>arm64</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.delete-on-termination</code> - A Boolean value that indicates
/// whether the Amazon EBS volume is deleted on instance termination.</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.device-name</code> - The device name specified in the block device mapping (for
/// example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.snapshot-id</code> - The ID of the snapshot used for the Amazon EBS
/// volume.</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.volume-size</code> - The volume size of the Amazon EBS volume, in GiB.</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.volume-type</code> - The volume type of the Amazon EBS volume
/// (<code>io1</code> | <code>io2</code> | <code>gp2</code> | <code>gp3</code> | <code>sc1
/// </code>| <code>st1</code> | <code>standard</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.encrypted</code> - A Boolean that indicates whether the Amazon EBS volume is encrypted.</p>
/// </li>
/// <li>
/// <p>
/// <code>description</code> - The description of the image (provided during image
/// creation).</p>
/// </li>
/// <li>
/// <p>
/// <code>ena-support</code> - A Boolean that indicates whether enhanced networking
/// with ENA is enabled.</p>
/// </li>
/// <li>
/// <p>
/// <code>hypervisor</code> - The hypervisor type (<code>ovm</code> |
/// <code>xen</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>image-id</code> - The ID of the image.</p>
/// </li>
/// <li>
/// <p>
/// <code>image-type</code> - The image type (<code>machine</code> | <code>kernel</code> |
/// <code>ramdisk</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>is-public</code> - A Boolean that indicates whether the image is public.</p>
/// </li>
/// <li>
/// <p>
/// <code>kernel-id</code> - The kernel ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>manifest-location</code> - The location of the image manifest.</p>
/// </li>
/// <li>
/// <p>
/// <code>name</code> - The name of the AMI (provided during image creation).</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-alias</code> - The owner alias (<code>amazon</code> | <code>aws-marketplace</code>).
/// The valid aliases are defined in an Amazon-maintained list. This is not the Amazon Web Services account alias that can be
/// set using the IAM console. We recommend that you use the <b>Owner</b>
/// request parameter instead of this filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the owner. We recommend that you use the
/// <b>Owner</b> request parameter instead of this filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>platform</code> - The platform. To only list Windows-based AMIs, use
/// <code>windows</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-code</code> - The product code.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-code.type</code> - The type of the product code (<code>marketplace</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>ramdisk-id</code> - The RAM disk ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>root-device-name</code> - The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>root-device-type</code> - The type of the root device volume (<code>ebs</code> |
/// <code>instance-store</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the image (<code>available</code> | <code>pending</code>
/// | <code>failed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>state-reason-code</code> - The reason code for the state change.</p>
/// </li>
/// <li>
/// <p>
/// <code>state-reason-message</code> - The message for the state change.</p>
/// </li>
/// <li>
/// <p>
/// <code>sriov-net-support</code> - A value of <code>simple</code> indicates
/// that enhanced networking with the Intel 82599 VF interface is enabled.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>virtualization-type</code> - The virtualization type (<code>paravirtual</code> |
/// <code>hvm</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `ImageIds`.
///
/// To override the contents of this collection use [`set_image_ids`](Self::set_image_ids).
///
/// <p>The image IDs.</p>
/// <p>Default: Describes all images available to you.</p>
pub fn image_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.image_ids(inp);
self
}
/// <p>The image IDs.</p>
/// <p>Default: Describes all images available to you.</p>
pub fn set_image_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_image_ids(input);
self
}
/// Appends an item to `Owners`.
///
/// To override the contents of this collection use [`set_owners`](Self::set_owners).
///
/// <p>Scopes the results to images with the specified owners. You can specify a combination of
/// Amazon Web Services account IDs, <code>self</code>, <code>amazon</code>, and <code>aws-marketplace</code>.
/// If you omit this parameter, the results include all images for which you have launch permissions,
/// regardless of ownership.</p>
pub fn owners(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.owners(inp);
self
}
/// <p>Scopes the results to images with the specified owners. You can specify a combination of
/// Amazon Web Services account IDs, <code>self</code>, <code>amazon</code>, and <code>aws-marketplace</code>.
/// If you omit this parameter, the results include all images for which you have launch permissions,
/// regardless of ownership.</p>
pub fn set_owners(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_owners(input);
self
}
/// <p>If <code>true</code>, all deprecated AMIs are included in the response. If
/// <code>false</code>, no deprecated AMIs are included in the response. If no value is
/// specified, the default value is <code>false</code>.</p>
/// <note>
/// <p>If you are the AMI owner, all deprecated AMIs appear in the response regardless of the value (<code>true</code> or <code>false</code>) that you set for this parameter.</p>
/// </note>
pub fn include_deprecated(mut self, inp: bool) -> Self {
self.inner = self.inner.include_deprecated(inp);
self
}
/// <p>If <code>true</code>, all deprecated AMIs are included in the response. If
/// <code>false</code>, no deprecated AMIs are included in the response. If no value is
/// specified, the default value is <code>false</code>.</p>
/// <note>
/// <p>If you are the AMI owner, all deprecated AMIs appear in the response regardless of the value (<code>true</code> or <code>false</code>) that you set for this parameter.</p>
/// </note>
pub fn set_include_deprecated(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_include_deprecated(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeImportImageTasks`.
///
/// <p>Displays details about an import virtual machine or import snapshot tasks that are already created.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeImportImageTasks<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_import_image_tasks_input::Builder,
}
impl<C, M, R> DescribeImportImageTasks<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeImportImageTasks`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeImportImageTasksOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeImportImageTasksError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeImportImageTasksInputOperationOutputAlias,
crate::output::DescribeImportImageTasksOutput,
crate::error::DescribeImportImageTasksError,
crate::input::DescribeImportImageTasksInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>Filter tasks using the <code>task-state</code> filter and one of the following values: <code>active</code>,
/// <code>completed</code>, <code>deleting</code>, or <code>deleted</code>.</p>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>Filter tasks using the <code>task-state</code> filter and one of the following values: <code>active</code>,
/// <code>completed</code>, <code>deleting</code>, or <code>deleted</code>.</p>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `ImportTaskIds`.
///
/// To override the contents of this collection use [`set_import_task_ids`](Self::set_import_task_ids).
///
/// <p>The IDs of the import image tasks.</p>
pub fn import_task_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.import_task_ids(inp);
self
}
/// <p>The IDs of the import image tasks.</p>
pub fn set_import_task_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_import_task_ids(input);
self
}
/// <p>The maximum number of results to return in a single call.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>A token that indicates the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>A token that indicates the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeImportSnapshotTasks`.
///
/// <p>Describes your import snapshot tasks.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeImportSnapshotTasks<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_import_snapshot_tasks_input::Builder,
}
impl<C, M, R> DescribeImportSnapshotTasks<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeImportSnapshotTasks`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeImportSnapshotTasksOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeImportSnapshotTasksError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeImportSnapshotTasksInputOperationOutputAlias,
crate::output::DescribeImportSnapshotTasksOutput,
crate::error::DescribeImportSnapshotTasksError,
crate::input::DescribeImportSnapshotTasksInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `ImportTaskIds`.
///
/// To override the contents of this collection use [`set_import_task_ids`](Self::set_import_task_ids).
///
/// <p>A list of import snapshot task IDs.</p>
pub fn import_task_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.import_task_ids(inp);
self
}
/// <p>A list of import snapshot task IDs.</p>
pub fn set_import_task_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_import_task_ids(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call
/// with the returned <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call
/// with the returned <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>A token that indicates the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>A token that indicates the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeInstanceAttribute`.
///
/// <p>Describes the specified attribute of the specified instance. You can specify only one
/// attribute at a time. Valid attribute values are: <code>instanceType</code> |
/// <code>kernel</code> | <code>ramdisk</code> | <code>userData</code> |
/// <code>disableApiTermination</code> | <code>instanceInitiatedShutdownBehavior</code>
/// | <code>rootDeviceName</code> | <code>blockDeviceMapping</code> |
/// <code>productCodes</code> | <code>sourceDestCheck</code> | <code>groupSet</code> |
/// <code>ebsOptimized</code> | <code>sriovNetSupport</code>
/// </p>
#[derive(std::fmt::Debug)]
pub struct DescribeInstanceAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_instance_attribute_input::Builder,
}
impl<C, M, R> DescribeInstanceAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeInstanceAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeInstanceAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeInstanceAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeInstanceAttributeInputOperationOutputAlias,
crate::output::DescribeInstanceAttributeOutput,
crate::error::DescribeInstanceAttributeError,
crate::input::DescribeInstanceAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The instance attribute.</p>
/// <p>Note: The <code>enaSupport</code> attribute is not supported at this time.</p>
pub fn attribute(mut self, inp: crate::model::InstanceAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The instance attribute.</p>
/// <p>Note: The <code>enaSupport</code> attribute is not supported at this time.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::InstanceAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
}
/// Fluent builder constructing a request to `DescribeInstanceCreditSpecifications`.
///
/// <p>Describes the credit option for CPU usage of the specified burstable performance
/// instances. The credit options are <code>standard</code> and
/// <code>unlimited</code>.</p>
/// <p>If you do not specify an instance ID, Amazon EC2 returns burstable performance
/// instances with the <code>unlimited</code> credit option, as well as instances that were
/// previously configured as T2, T3, and T3a with the <code>unlimited</code> credit option.
/// For example, if you resize a T2 instance, while it is configured as
/// <code>unlimited</code>, to an M4 instance, Amazon EC2 returns the M4
/// instance.</p>
/// <p>If you specify one or more instance IDs, Amazon EC2 returns the credit option
/// (<code>standard</code> or <code>unlimited</code>) of those instances. If you specify
/// an instance ID that is not valid, such as an instance that is not a burstable
/// performance instance, an error is returned.</p>
/// <p>Recently terminated instances might appear in the returned results. This interval is
/// usually less than one hour.</p>
/// <p>If an Availability Zone is experiencing a service disruption and you specify instance
/// IDs in the affected zone, or do not specify any instance IDs at all, the call fails. If
/// you specify only instance IDs in an unaffected zone, the call works normally.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable
/// performance instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeInstanceCreditSpecifications<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_instance_credit_specifications_input::Builder,
}
impl<C, M, R> DescribeInstanceCreditSpecifications<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeInstanceCreditSpecifications`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeInstanceCreditSpecificationsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeInstanceCreditSpecificationsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeInstanceCreditSpecificationsInputOperationOutputAlias,
crate::output::DescribeInstanceCreditSpecificationsOutput,
crate::error::DescribeInstanceCreditSpecificationsError,
crate::input::DescribeInstanceCreditSpecificationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `InstanceIds`.
///
/// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
///
/// <p>The instance IDs.</p>
/// <p>Default: Describes all your instances.</p>
/// <p>Constraints: Maximum 1000 explicitly specified instance IDs.</p>
pub fn instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_ids(inp);
self
}
/// <p>The instance IDs.</p>
/// <p>Default: Describes all your instances.</p>
/// <p>Constraints: Maximum 1000 explicitly specified instance IDs.</p>
pub fn set_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instance_ids(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value
/// can be between 5 and 1000. You cannot specify this parameter and the instance IDs
/// parameter in the same call.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value
/// can be between 5 and 1000. You cannot specify this parameter and the instance IDs
/// parameter in the same call.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeInstanceEventNotificationAttributes`.
///
/// <p>Describes the tag keys that are registered to appear in scheduled event notifications for
/// resources in the current Region.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeInstanceEventNotificationAttributes<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_instance_event_notification_attributes_input::Builder,
}
impl<C, M, R> DescribeInstanceEventNotificationAttributes<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeInstanceEventNotificationAttributes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeInstanceEventNotificationAttributesOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeInstanceEventNotificationAttributesError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeInstanceEventNotificationAttributesInputOperationOutputAlias,
crate::output::DescribeInstanceEventNotificationAttributesOutput,
crate::error::DescribeInstanceEventNotificationAttributesError,
crate::input::DescribeInstanceEventNotificationAttributesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeInstanceEventWindows`.
///
/// <p>Describes the specified event windows or all event windows.</p>
/// <p>If you specify event window IDs, the output includes information for only the specified
/// event windows. If you specify filters, the output includes information for only those event
/// windows that meet the filter criteria. If you do not specify event windows IDs or filters,
/// the output includes information for all event windows, which can affect performance. We
/// recommend that you use pagination to ensure that the operation returns quickly and
/// successfully. </p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html">Define event windows for scheduled
/// events</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeInstanceEventWindows<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_instance_event_windows_input::Builder,
}
impl<C, M, R> DescribeInstanceEventWindows<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeInstanceEventWindows`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeInstanceEventWindowsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeInstanceEventWindowsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeInstanceEventWindowsInputOperationOutputAlias,
crate::output::DescribeInstanceEventWindowsOutput,
crate::error::DescribeInstanceEventWindowsError,
crate::input::DescribeInstanceEventWindowsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `InstanceEventWindowIds`.
///
/// To override the contents of this collection use [`set_instance_event_window_ids`](Self::set_instance_event_window_ids).
///
/// <p>The IDs of the event windows.</p>
pub fn instance_event_window_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_event_window_ids(inp);
self
}
/// <p>The IDs of the event windows.</p>
pub fn set_instance_event_window_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instance_event_window_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>dedicated-host-id</code> - The event windows associated with the specified
/// Dedicated Host ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>event-window-name</code> - The event windows associated with the specified
/// names. </p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The event windows associated with the specified instance
/// ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-tag</code> - The event windows associated with the specified tag and
/// value.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-tag-key</code> - The event windows associated with the specified tag
/// key, regardless of the value.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-tag-value</code> - The event windows associated with the specified tag
/// value, regardless of the key.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag:<key></code> - The key/value combination of a tag assigned to the
/// event window. Use the tag key in the filter name and the tag value as the filter
/// value. For example, to find all resources that have a tag with the key
/// <code>Owner</code> and the value <code>CMX</code>, specify <code>tag:Owner</code>
/// for the filter name and <code>CMX</code> for the filter value. </p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the event window. Use this filter
/// to find all event windows that have a tag with a specific key, regardless of the tag
/// value. </p>
/// </li>
/// <li>
/// <p>
/// <code>tag-value</code> - The value of a tag assigned to the event window. Use this
/// filter to find all event windows that have a tag with a specific value, regardless of
/// the tag key. </p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>dedicated-host-id</code> - The event windows associated with the specified
/// Dedicated Host ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>event-window-name</code> - The event windows associated with the specified
/// names. </p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The event windows associated with the specified instance
/// ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-tag</code> - The event windows associated with the specified tag and
/// value.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-tag-key</code> - The event windows associated with the specified tag
/// key, regardless of the value.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-tag-value</code> - The event windows associated with the specified tag
/// value, regardless of the key.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag:<key></code> - The key/value combination of a tag assigned to the
/// event window. Use the tag key in the filter name and the tag value as the filter
/// value. For example, to find all resources that have a tag with the key
/// <code>Owner</code> and the value <code>CMX</code>, specify <code>tag:Owner</code>
/// for the filter name and <code>CMX</code> for the filter value. </p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the event window. Use this filter
/// to find all event windows that have a tag with a specific key, regardless of the tag
/// value. </p>
/// </li>
/// <li>
/// <p>
/// <code>tag-value</code> - The value of a tag assigned to the event window. Use this
/// filter to find all event windows that have a tag with a specific value, regardless of
/// the tag key. </p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value can
/// be between 20 and 500. You cannot specify this parameter and the event window IDs parameter
/// in the same call.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value can
/// be between 20 and 500. You cannot specify this parameter and the event window IDs parameter
/// in the same call.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to request the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeInstances`.
///
/// <p>Describes the specified instances or all instances.</p>
/// <p>If you specify instance IDs, the output includes information for only the specified instances.
/// If you specify filters, the output includes information for only those instances that meet the filter criteria.
/// If you do not specify instance IDs or filters, the output includes information for all instances,
/// which can affect performance. We recommend that you use pagination to ensure that the operation
/// returns quickly and successfully.</p>
/// <p>If you specify an instance ID that is not valid, an error is returned. If you
/// specify an instance that you do not own, it is not included in the output.</p>
/// <p>Recently terminated instances might appear in the returned results. This interval is
/// usually less than one hour.</p>
/// <p>If you describe instances in the rare case where an Availability Zone is experiencing
/// a service disruption and you specify instance IDs that are in the affected zone, or do
/// not specify any instance IDs at all, the call fails. If you describe instances and
/// specify only instance IDs that are in an unaffected zone, the call works
/// normally.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_instances_input::Builder,
}
impl<C, M, R> DescribeInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeInstancesInputOperationOutputAlias,
crate::output::DescribeInstancesOutput,
crate::error::DescribeInstancesError,
crate::input::DescribeInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>affinity</code> - The affinity setting for an instance running on a
/// Dedicated Host (<code>default</code> | <code>host</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>architecture</code> - The instance architecture (<code>i386</code> |
/// <code>x86_64</code> | <code>arm64</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.attach-time</code> - The attach time for an EBS
/// volume mapped to the instance, for example,
/// <code>2010-09-15T17:15:20.000Z</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.delete-on-termination</code> - A Boolean that
/// indicates whether the EBS volume is deleted on instance termination.</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.device-name</code> - The device name specified in the
/// block device mapping (for example, <code>/dev/sdh</code> or
/// <code>xvdh</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.status</code> - The status for the EBS volume
/// (<code>attaching</code> | <code>attached</code> | <code>detaching</code> |
/// <code>detached</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.volume-id</code> - The volume ID of the EBS
/// volume.</p>
/// </li>
/// <li>
/// <p>
/// <code>client-token</code> - The idempotency token you provided when you launched
/// the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>dns-name</code> - The public DNS name of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>group-id</code> - The ID of the security group for the instance.
/// EC2-Classic only.</p>
/// </li>
/// <li>
/// <p>
/// <code>group-name</code> - The name of the security group for the instance.
/// EC2-Classic only.</p>
/// </li>
/// <li>
/// <p>
/// <code>hibernation-options.configured</code> - A Boolean that indicates whether
/// the instance is enabled for hibernation. A value of <code>true</code> means that
/// the instance is enabled for hibernation. </p>
/// </li>
/// <li>
/// <p>
/// <code>host-id</code> - The ID of the Dedicated Host on which the instance is
/// running, if applicable.</p>
/// </li>
/// <li>
/// <p>
/// <code>hypervisor</code> - The hypervisor type of the instance
/// (<code>ovm</code> | <code>xen</code>). The value <code>xen</code>
/// is used for both Xen and Nitro hypervisors.</p>
/// </li>
/// <li>
/// <p>
/// <code>iam-instance-profile.arn</code> - The instance profile associated with
/// the instance. Specified as an ARN.</p>
/// </li>
/// <li>
/// <p>
/// <code>image-id</code> - The ID of the image used to launch the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-lifecycle</code> - Indicates whether this is a Spot Instance or
/// a Scheduled Instance (<code>spot</code> | <code>scheduled</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-state-code</code> - The state of the instance, as a 16-bit
/// unsigned integer. The high byte is used for internal purposes and should be
/// ignored. The low byte is set based on the state represented. The valid values
/// are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64
/// (stopping), and 80 (stopped).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-state-name</code> - The state of the instance
/// (<code>pending</code> | <code>running</code> | <code>shutting-down</code> |
/// <code>terminated</code> | <code>stopping</code> |
/// <code>stopped</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The type of instance (for example,
/// <code>t2.micro</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance.group-id</code> - The ID of the security group for the
/// instance. </p>
/// </li>
/// <li>
/// <p>
/// <code>instance.group-name</code> - The name of the security group for the
/// instance. </p>
/// </li>
/// <li>
/// <p>
/// <code>ip-address</code> - The public IPv4 address of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>kernel-id</code> - The kernel ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>key-name</code> - The name of the key pair used when the instance was
/// launched.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch-index</code> - When launching multiple instances, this is the
/// index for the instance in the launch group (for example, 0, 1, 2, and so on). </p>
/// </li>
/// <li>
/// <p>
/// <code>launch-time</code> - The time when the instance was launched.</p>
/// </li>
/// <li>
/// <p>
/// <code>metadata-options.http-tokens</code> - The metadata request authorization
/// state (<code>optional</code> | <code>required</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>metadata-options.http-put-response-hop-limit</code> - The http metadata
/// request put response hop limit (integer, possible values <code>1</code> to
/// <code>64</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>metadata-options.http-endpoint</code> - Enable or disable metadata
/// access on http endpoint (<code>enabled</code> | <code>disabled</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>monitoring-state</code> - Indicates whether detailed monitoring is
/// enabled (<code>disabled</code> | <code>enabled</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.addresses.private-ip-address</code> - The private IPv4
/// address associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.addresses.primary</code> - Specifies whether the IPv4
/// address of the network interface is the primary private IPv4 address.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.addresses.association.public-ip</code> - The ID of the
/// association of an Elastic IP address (IPv4) with a network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.addresses.association.ip-owner-id</code> - The owner
/// ID of the private IPv4 address associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.association.public-ip</code> - The address of the
/// Elastic IP address (IPv4) bound to the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.association.ip-owner-id</code> - The owner of the
/// Elastic IP address (IPv4) associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.association.allocation-id</code> - The allocation ID
/// returned when you allocated the Elastic IP address (IPv4) for your network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.association.association-id</code> - The association ID
/// returned when the network interface was associated with an IPv4 address.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.attachment-id</code> - The ID of the
/// interface attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.instance-id</code> - The ID of the instance
/// to which the network interface is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.instance-owner-id</code> - The owner ID of
/// the instance to which the network interface is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.device-index</code> - The device index to
/// which the network interface is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.status</code> - The status of the
/// attachment (<code>attaching</code> | <code>attached</code> |
/// <code>detaching</code> | <code>detached</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.attach-time</code> - The time that the
/// network interface was attached to an instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.delete-on-termination</code> - Specifies
/// whether the attachment is deleted when an instance is terminated.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.availability-zone</code> - The Availability Zone for
/// the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.description</code> - The description of the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.group-id</code> - The ID of a security group
/// associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.group-name</code> - The name of a security group
/// associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.ipv6-addresses.ipv6-address</code> - The IPv6 address
/// associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.mac-address</code> - The MAC address of the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.network-interface-id</code> - The ID of the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.owner-id</code> - The ID of the owner of the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.private-dns-name</code> - The private DNS name of the
/// network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.requester-id</code> - The requester ID for the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.requester-managed</code> - Indicates whether the
/// network interface is being managed by Amazon Web Services.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.status</code> - The status of the network interface
/// (<code>available</code>) | <code>in-use</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.source-dest-check</code> - Whether the network
/// interface performs source/destination checking. A value of <code>true</code>
/// means that checking is enabled, and <code>false</code> means that checking is
/// disabled. The value must be <code>false</code> for the network interface to
/// perform network address translation (NAT) in your VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.subnet-id</code> - The ID of the subnet for the
/// network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.vpc-id</code> - The ID of the VPC for the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the instance owner.</p>
/// </li>
/// <li>
/// <p>
/// <code>placement-group-name</code> - The name of the placement group for the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>placement-partition-number</code> - The partition in which the instance is
/// located.</p>
/// </li>
/// <li>
/// <p>
/// <code>platform</code> - The platform. To list only Windows instances, use
/// <code>windows</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>private-dns-name</code> - The private IPv4 DNS name of the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>private-ip-address</code> - The private IPv4 address of the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-code</code> - The product code associated with the AMI used to
/// launch the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-code.type</code> - The type of product code (<code>devpay</code> |
/// <code>marketplace</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>ramdisk-id</code> - The RAM disk ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>reason</code> - The reason for the current state of the instance (for
/// example, shows "User Initiated [date]" when you stop or terminate the instance).
/// Similar to the state-reason-code filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>requester-id</code> - The ID of the entity that launched the instance on
/// your behalf (for example, Amazon Web Services Management Console, Auto Scaling, and so
/// on).</p>
/// </li>
/// <li>
/// <p>
/// <code>reservation-id</code> - The ID of the instance's reservation. A
/// reservation ID is created any time you launch an instance. A reservation ID has
/// a one-to-one relationship with an instance launch request, but can be associated
/// with more than one instance if you launch multiple instances using the same
/// launch request. For example, if you launch one instance, you get one reservation
/// ID. If you launch ten instances using the same launch request, you also get one
/// reservation ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>root-device-name</code> - The device name of the root device volume (for
/// example, <code>/dev/sda1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>root-device-type</code> - The type of the root device volume
/// (<code>ebs</code> | <code>instance-store</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>source-dest-check</code> - Indicates whether the instance performs
/// source/destination checking. A value of <code>true</code> means that checking is
/// enabled, and <code>false</code> means that checking is disabled. The value must
/// be <code>false</code> for the instance to perform network address translation
/// (NAT) in your VPC. </p>
/// </li>
/// <li>
/// <p>
/// <code>spot-instance-request-id</code> - The ID of the Spot Instance
/// request.</p>
/// </li>
/// <li>
/// <p>
/// <code>state-reason-code</code> - The reason code for the state change.</p>
/// </li>
/// <li>
/// <p>
/// <code>state-reason-message</code> - A message that describes the state
/// change.</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet for the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag:<key></code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tenancy</code> - The tenancy of an instance (<code>dedicated</code> |
/// <code>default</code> | <code>host</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>virtualization-type</code> - The virtualization type of the instance
/// (<code>paravirtual</code> | <code>hvm</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC that the instance is running in.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>affinity</code> - The affinity setting for an instance running on a
/// Dedicated Host (<code>default</code> | <code>host</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>architecture</code> - The instance architecture (<code>i386</code> |
/// <code>x86_64</code> | <code>arm64</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.attach-time</code> - The attach time for an EBS
/// volume mapped to the instance, for example,
/// <code>2010-09-15T17:15:20.000Z</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.delete-on-termination</code> - A Boolean that
/// indicates whether the EBS volume is deleted on instance termination.</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.device-name</code> - The device name specified in the
/// block device mapping (for example, <code>/dev/sdh</code> or
/// <code>xvdh</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.status</code> - The status for the EBS volume
/// (<code>attaching</code> | <code>attached</code> | <code>detaching</code> |
/// <code>detached</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>block-device-mapping.volume-id</code> - The volume ID of the EBS
/// volume.</p>
/// </li>
/// <li>
/// <p>
/// <code>client-token</code> - The idempotency token you provided when you launched
/// the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>dns-name</code> - The public DNS name of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>group-id</code> - The ID of the security group for the instance.
/// EC2-Classic only.</p>
/// </li>
/// <li>
/// <p>
/// <code>group-name</code> - The name of the security group for the instance.
/// EC2-Classic only.</p>
/// </li>
/// <li>
/// <p>
/// <code>hibernation-options.configured</code> - A Boolean that indicates whether
/// the instance is enabled for hibernation. A value of <code>true</code> means that
/// the instance is enabled for hibernation. </p>
/// </li>
/// <li>
/// <p>
/// <code>host-id</code> - The ID of the Dedicated Host on which the instance is
/// running, if applicable.</p>
/// </li>
/// <li>
/// <p>
/// <code>hypervisor</code> - The hypervisor type of the instance
/// (<code>ovm</code> | <code>xen</code>). The value <code>xen</code>
/// is used for both Xen and Nitro hypervisors.</p>
/// </li>
/// <li>
/// <p>
/// <code>iam-instance-profile.arn</code> - The instance profile associated with
/// the instance. Specified as an ARN.</p>
/// </li>
/// <li>
/// <p>
/// <code>image-id</code> - The ID of the image used to launch the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-lifecycle</code> - Indicates whether this is a Spot Instance or
/// a Scheduled Instance (<code>spot</code> | <code>scheduled</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-state-code</code> - The state of the instance, as a 16-bit
/// unsigned integer. The high byte is used for internal purposes and should be
/// ignored. The low byte is set based on the state represented. The valid values
/// are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64
/// (stopping), and 80 (stopped).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-state-name</code> - The state of the instance
/// (<code>pending</code> | <code>running</code> | <code>shutting-down</code> |
/// <code>terminated</code> | <code>stopping</code> |
/// <code>stopped</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The type of instance (for example,
/// <code>t2.micro</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance.group-id</code> - The ID of the security group for the
/// instance. </p>
/// </li>
/// <li>
/// <p>
/// <code>instance.group-name</code> - The name of the security group for the
/// instance. </p>
/// </li>
/// <li>
/// <p>
/// <code>ip-address</code> - The public IPv4 address of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>kernel-id</code> - The kernel ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>key-name</code> - The name of the key pair used when the instance was
/// launched.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch-index</code> - When launching multiple instances, this is the
/// index for the instance in the launch group (for example, 0, 1, 2, and so on). </p>
/// </li>
/// <li>
/// <p>
/// <code>launch-time</code> - The time when the instance was launched.</p>
/// </li>
/// <li>
/// <p>
/// <code>metadata-options.http-tokens</code> - The metadata request authorization
/// state (<code>optional</code> | <code>required</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>metadata-options.http-put-response-hop-limit</code> - The http metadata
/// request put response hop limit (integer, possible values <code>1</code> to
/// <code>64</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>metadata-options.http-endpoint</code> - Enable or disable metadata
/// access on http endpoint (<code>enabled</code> | <code>disabled</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>monitoring-state</code> - Indicates whether detailed monitoring is
/// enabled (<code>disabled</code> | <code>enabled</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.addresses.private-ip-address</code> - The private IPv4
/// address associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.addresses.primary</code> - Specifies whether the IPv4
/// address of the network interface is the primary private IPv4 address.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.addresses.association.public-ip</code> - The ID of the
/// association of an Elastic IP address (IPv4) with a network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.addresses.association.ip-owner-id</code> - The owner
/// ID of the private IPv4 address associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.association.public-ip</code> - The address of the
/// Elastic IP address (IPv4) bound to the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.association.ip-owner-id</code> - The owner of the
/// Elastic IP address (IPv4) associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.association.allocation-id</code> - The allocation ID
/// returned when you allocated the Elastic IP address (IPv4) for your network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.association.association-id</code> - The association ID
/// returned when the network interface was associated with an IPv4 address.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.attachment-id</code> - The ID of the
/// interface attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.instance-id</code> - The ID of the instance
/// to which the network interface is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.instance-owner-id</code> - The owner ID of
/// the instance to which the network interface is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.device-index</code> - The device index to
/// which the network interface is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.status</code> - The status of the
/// attachment (<code>attaching</code> | <code>attached</code> |
/// <code>detaching</code> | <code>detached</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.attach-time</code> - The time that the
/// network interface was attached to an instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.attachment.delete-on-termination</code> - Specifies
/// whether the attachment is deleted when an instance is terminated.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.availability-zone</code> - The Availability Zone for
/// the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.description</code> - The description of the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.group-id</code> - The ID of a security group
/// associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.group-name</code> - The name of a security group
/// associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.ipv6-addresses.ipv6-address</code> - The IPv6 address
/// associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.mac-address</code> - The MAC address of the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.network-interface-id</code> - The ID of the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.owner-id</code> - The ID of the owner of the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.private-dns-name</code> - The private DNS name of the
/// network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.requester-id</code> - The requester ID for the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.requester-managed</code> - Indicates whether the
/// network interface is being managed by Amazon Web Services.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.status</code> - The status of the network interface
/// (<code>available</code>) | <code>in-use</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.source-dest-check</code> - Whether the network
/// interface performs source/destination checking. A value of <code>true</code>
/// means that checking is enabled, and <code>false</code> means that checking is
/// disabled. The value must be <code>false</code> for the network interface to
/// perform network address translation (NAT) in your VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.subnet-id</code> - The ID of the subnet for the
/// network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.vpc-id</code> - The ID of the VPC for the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the instance owner.</p>
/// </li>
/// <li>
/// <p>
/// <code>placement-group-name</code> - The name of the placement group for the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>placement-partition-number</code> - The partition in which the instance is
/// located.</p>
/// </li>
/// <li>
/// <p>
/// <code>platform</code> - The platform. To list only Windows instances, use
/// <code>windows</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>private-dns-name</code> - The private IPv4 DNS name of the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>private-ip-address</code> - The private IPv4 address of the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-code</code> - The product code associated with the AMI used to
/// launch the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-code.type</code> - The type of product code (<code>devpay</code> |
/// <code>marketplace</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>ramdisk-id</code> - The RAM disk ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>reason</code> - The reason for the current state of the instance (for
/// example, shows "User Initiated [date]" when you stop or terminate the instance).
/// Similar to the state-reason-code filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>requester-id</code> - The ID of the entity that launched the instance on
/// your behalf (for example, Amazon Web Services Management Console, Auto Scaling, and so
/// on).</p>
/// </li>
/// <li>
/// <p>
/// <code>reservation-id</code> - The ID of the instance's reservation. A
/// reservation ID is created any time you launch an instance. A reservation ID has
/// a one-to-one relationship with an instance launch request, but can be associated
/// with more than one instance if you launch multiple instances using the same
/// launch request. For example, if you launch one instance, you get one reservation
/// ID. If you launch ten instances using the same launch request, you also get one
/// reservation ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>root-device-name</code> - The device name of the root device volume (for
/// example, <code>/dev/sda1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>root-device-type</code> - The type of the root device volume
/// (<code>ebs</code> | <code>instance-store</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>source-dest-check</code> - Indicates whether the instance performs
/// source/destination checking. A value of <code>true</code> means that checking is
/// enabled, and <code>false</code> means that checking is disabled. The value must
/// be <code>false</code> for the instance to perform network address translation
/// (NAT) in your VPC. </p>
/// </li>
/// <li>
/// <p>
/// <code>spot-instance-request-id</code> - The ID of the Spot Instance
/// request.</p>
/// </li>
/// <li>
/// <p>
/// <code>state-reason-code</code> - The reason code for the state change.</p>
/// </li>
/// <li>
/// <p>
/// <code>state-reason-message</code> - A message that describes the state
/// change.</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet for the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag:<key></code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tenancy</code> - The tenancy of an instance (<code>dedicated</code> |
/// <code>default</code> | <code>host</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>virtualization-type</code> - The virtualization type of the instance
/// (<code>paravirtual</code> | <code>hvm</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC that the instance is running in.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `InstanceIds`.
///
/// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
///
/// <p>The instance IDs.</p>
/// <p>Default: Describes all your instances.</p>
pub fn instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_ids(inp);
self
}
/// <p>The instance IDs.</p>
/// <p>Default: Describes all your instances.</p>
pub fn set_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instance_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value
/// can be between 5 and 1000. You cannot specify this parameter and the instance IDs
/// parameter in the same call.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value
/// can be between 5 and 1000. You cannot specify this parameter and the instance IDs
/// parameter in the same call.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to request the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeInstanceStatus`.
///
/// <p>Describes the status of the specified instances or all of your instances. By default,
/// only running instances are described, unless you specifically indicate to return the
/// status of all instances.</p>
/// <p>Instance status includes the following components:</p>
/// <ul>
/// <li>
/// <p>
/// <b>Status checks</b> - Amazon EC2 performs status
/// checks on running EC2 instances to identify hardware and software issues. For
/// more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html">Status checks for your instances</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html">Troubleshooting
/// instances with failed status checks</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// </li>
/// <li>
/// <p>
/// <b>Scheduled events</b> - Amazon EC2 can schedule
/// events (such as reboot, stop, or terminate) for your instances related to
/// hardware issues, software updates, or system maintenance. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html">Scheduled events for your instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// </li>
/// <li>
/// <p>
/// <b>Instance state</b> - You can manage your instances
/// from the moment you launch them through their termination. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html">Instance
/// lifecycle</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// </li>
/// </ul>
#[derive(std::fmt::Debug)]
pub struct DescribeInstanceStatus<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_instance_status_input::Builder,
}
impl<C, M, R> DescribeInstanceStatus<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeInstanceStatus`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeInstanceStatusOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeInstanceStatusError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeInstanceStatusInputOperationOutputAlias,
crate::output::DescribeInstanceStatusOutput,
crate::error::DescribeInstanceStatusError,
crate::input::DescribeInstanceStatusInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.code</code> - The code for the scheduled event
/// (<code>instance-reboot</code> | <code>system-reboot</code> |
/// <code>system-maintenance</code> | <code>instance-retirement</code> |
/// <code>instance-stop</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>event.description</code> - A description of the event.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.instance-event-id</code> - The ID of the event whose date and time
/// you are modifying.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.not-after</code> - The latest end time for the scheduled event
/// (for example, <code>2014-09-15T17:15:20.000Z</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>event.not-before</code> - The earliest start time for the scheduled
/// event (for example, <code>2014-09-15T17:15:20.000Z</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>event.not-before-deadline</code> - The deadline for starting the event
/// (for example, <code>2014-09-15T17:15:20.000Z</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-state-code</code> - The code for the instance state, as a
/// 16-bit unsigned integer. The high byte is used for internal purposes and should
/// be ignored. The low byte is set based on the state represented. The valid values
/// are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64
/// (stopping), and 80 (stopped).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-state-name</code> - The state of the instance
/// (<code>pending</code> | <code>running</code> | <code>shutting-down</code> |
/// <code>terminated</code> | <code>stopping</code> |
/// <code>stopped</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-status.reachability</code> - Filters on instance status where
/// the name is <code>reachability</code> (<code>passed</code> | <code>failed</code>
/// | <code>initializing</code> | <code>insufficient-data</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-status.status</code> - The status of the instance
/// (<code>ok</code> | <code>impaired</code> | <code>initializing</code> |
/// <code>insufficient-data</code> | <code>not-applicable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>system-status.reachability</code> - Filters on system status where the
/// name is <code>reachability</code> (<code>passed</code> | <code>failed</code> |
/// <code>initializing</code> | <code>insufficient-data</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>system-status.status</code> - The system status of the instance
/// (<code>ok</code> | <code>impaired</code> | <code>initializing</code> |
/// <code>insufficient-data</code> | <code>not-applicable</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.code</code> - The code for the scheduled event
/// (<code>instance-reboot</code> | <code>system-reboot</code> |
/// <code>system-maintenance</code> | <code>instance-retirement</code> |
/// <code>instance-stop</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>event.description</code> - A description of the event.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.instance-event-id</code> - The ID of the event whose date and time
/// you are modifying.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.not-after</code> - The latest end time for the scheduled event
/// (for example, <code>2014-09-15T17:15:20.000Z</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>event.not-before</code> - The earliest start time for the scheduled
/// event (for example, <code>2014-09-15T17:15:20.000Z</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>event.not-before-deadline</code> - The deadline for starting the event
/// (for example, <code>2014-09-15T17:15:20.000Z</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-state-code</code> - The code for the instance state, as a
/// 16-bit unsigned integer. The high byte is used for internal purposes and should
/// be ignored. The low byte is set based on the state represented. The valid values
/// are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64
/// (stopping), and 80 (stopped).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-state-name</code> - The state of the instance
/// (<code>pending</code> | <code>running</code> | <code>shutting-down</code> |
/// <code>terminated</code> | <code>stopping</code> |
/// <code>stopped</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-status.reachability</code> - Filters on instance status where
/// the name is <code>reachability</code> (<code>passed</code> | <code>failed</code>
/// | <code>initializing</code> | <code>insufficient-data</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-status.status</code> - The status of the instance
/// (<code>ok</code> | <code>impaired</code> | <code>initializing</code> |
/// <code>insufficient-data</code> | <code>not-applicable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>system-status.reachability</code> - Filters on system status where the
/// name is <code>reachability</code> (<code>passed</code> | <code>failed</code> |
/// <code>initializing</code> | <code>insufficient-data</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>system-status.status</code> - The system status of the instance
/// (<code>ok</code> | <code>impaired</code> | <code>initializing</code> |
/// <code>insufficient-data</code> | <code>not-applicable</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `InstanceIds`.
///
/// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
///
/// <p>The instance IDs.</p>
/// <p>Default: Describes all your instances.</p>
/// <p>Constraints: Maximum 100 explicitly specified instance IDs.</p>
pub fn instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_ids(inp);
self
}
/// <p>The instance IDs.</p>
/// <p>Default: Describes all your instances.</p>
/// <p>Constraints: Maximum 100 explicitly specified instance IDs.</p>
pub fn set_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instance_ids(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value
/// can be between 5 and 1000. You cannot specify this parameter and the instance IDs
/// parameter in the same call.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value
/// can be between 5 and 1000. You cannot specify this parameter and the instance IDs
/// parameter in the same call.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>When <code>true</code>, includes the health status for all instances. When
/// <code>false</code>, includes the health status for running instances only.</p>
/// <p>Default: <code>false</code>
/// </p>
pub fn include_all_instances(mut self, inp: bool) -> Self {
self.inner = self.inner.include_all_instances(inp);
self
}
/// <p>When <code>true</code>, includes the health status for all instances. When
/// <code>false</code>, includes the health status for running instances only.</p>
/// <p>Default: <code>false</code>
/// </p>
pub fn set_include_all_instances(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_include_all_instances(input);
self
}
}
/// Fluent builder constructing a request to `DescribeInstanceTypeOfferings`.
///
/// <p>Returns a list of all instance types offered. The results can be filtered by location (Region or Availability
/// Zone). If no location is specified, the instance types offered in the current Region are returned.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeInstanceTypeOfferings<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_instance_type_offerings_input::Builder,
}
impl<C, M, R> DescribeInstanceTypeOfferings<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeInstanceTypeOfferings`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeInstanceTypeOfferingsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeInstanceTypeOfferingsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeInstanceTypeOfferingsInputOperationOutputAlias,
crate::output::DescribeInstanceTypeOfferingsOutput,
crate::error::DescribeInstanceTypeOfferingsError,
crate::input::DescribeInstanceTypeOfferingsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The location type.</p>
pub fn location_type(mut self, inp: crate::model::LocationType) -> Self {
self.inner = self.inner.location_type(inp);
self
}
/// <p>The location type.</p>
pub fn set_location_type(
mut self,
input: std::option::Option<crate::model::LocationType>,
) -> Self {
self.inner = self.inner.set_location_type(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>location</code> - This depends on the location type. For example, if the location type is
/// <code>region</code> (default), the location is the Region code (for example, <code>us-east-2</code>.)</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type. For example,
/// <code>c5.2xlarge</code>.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>location</code> - This depends on the location type. For example, if the location type is
/// <code>region</code> (default), the location is the Region code (for example, <code>us-east-2</code>.)</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type. For example,
/// <code>c5.2xlarge</code>.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results
/// can be seen by sending another request with the next token value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results
/// can be seen by sending another request with the next token value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeInstanceTypes`.
///
/// <p>Describes the details of the instance types that are offered in a location. The results can be filtered by the
/// attributes of the instance types.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeInstanceTypes<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_instance_types_input::Builder,
}
impl<C, M, R> DescribeInstanceTypes<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeInstanceTypes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeInstanceTypesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeInstanceTypesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeInstanceTypesInputOperationOutputAlias,
crate::output::DescribeInstanceTypesOutput,
crate::error::DescribeInstanceTypesError,
crate::input::DescribeInstanceTypesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `InstanceTypes`.
///
/// To override the contents of this collection use [`set_instance_types`](Self::set_instance_types).
///
/// <p>The instance types. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn instance_types(mut self, inp: impl Into<crate::model::InstanceType>) -> Self {
self.inner = self.inner.instance_types(inp);
self
}
/// <p>The instance types. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_instance_types(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InstanceType>>,
) -> Self {
self.inner = self.inner.set_instance_types(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>auto-recovery-supported</code> - Indicates whether auto recovery is supported (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>bare-metal</code> - Indicates whether it is a bare metal instance type (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>burstable-performance-supported</code> - Indicates whether it is a burstable
/// performance instance type (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>current-generation</code> - Indicates whether this instance type is the latest
/// generation instance type of an instance family (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps</code> - The baseline
/// bandwidth performance for an EBS-optimized instance type, in Mbps.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-info.baseline-iops</code> - The baseline input/output storage
/// operations per second for an EBS-optimized instance type.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-info.baseline-throughput-in-mbps</code> - The baseline
/// throughput performance for an EBS-optimized instance type, in MB/s.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps</code> - The maximum bandwidth
/// performance for an EBS-optimized instance type, in Mbps.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-info.maximum-iops</code> - The maximum input/output storage
/// operations per second for an EBS-optimized instance type.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-info.maximum-throughput-in-mbps</code> - The maximum
/// throughput performance for an EBS-optimized instance type, in MB/s.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-support</code> - Indicates whether the instance type is
/// EBS-optimized (<code>supported</code> | <code>unsupported</code> |
/// <code>default</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.encryption-support</code> - Indicates whether EBS encryption is supported
/// (<code>supported</code> | <code>unsupported</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.nvme-support</code> - Indicates whether non-volatile memory express (NVMe)
/// is supported for EBS volumes (<code>required</code> | <code>supported</code> | <code>unsupported</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>free-tier-eligible</code> - Indicates whether the instance type is eligible to use
/// in the free tier (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>hibernation-supported</code> - Indicates whether On-Demand hibernation is supported (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>hypervisor</code> - The hypervisor (<code>nitro</code> | <code>xen</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-info.disk.count</code> - The number of local disks.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-info.disk.size-in-gb</code> - The storage size of each instance storage disk, in
/// GB.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-info.disk.type</code> - The storage technology for the local
/// instance storage disks (<code>hdd</code> | <code>ssd</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-info.encryption-supported</code> - Indicates whether data is encrypted at rest
/// (<code>required</code> | <code>unsupported</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-info.nvme-support</code> - Indicates whether non-volatile memory
/// express (NVMe) is supported for instance store (<code>required</code> | <code>supported</code> |
/// <code>unsupported</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-info.total-size-in-gb</code> - The total amount of storage available from all local
/// instance storage, in GB.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-supported</code> - Indicates whether the instance type has local
/// instance storage (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type (for example <code>c5.2xlarge</code> or
/// c5*).</p>
/// </li>
/// <li>
/// <p>
/// <code>memory-info.size-in-mib</code> - The memory size.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.efa-info.maximum-efa-interfaces</code> - The maximum number of Elastic
/// Fabric Adapters (EFAs) per instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.efa-supported</code> - Indicates whether the instance type supports
/// Elastic Fabric Adapter (EFA) (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.ena-support</code> - Indicates whether Elastic Network Adapter (ENA) is
/// supported or required (<code>required</code> | <code>supported</code> |
/// <code>unsupported</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.encryption-in-transit-supported</code> - Indicates whether the instance type
/// automatically encrypts in-transit traffic between instances (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.ipv4-addresses-per-interface</code> - The maximum number of private IPv4 addresses per
/// network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.ipv6-addresses-per-interface</code> - The maximum number of private IPv6 addresses per
/// network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.ipv6-supported</code> - Indicates whether the instance type supports IPv6 (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.maximum-network-interfaces</code> - The maximum number of network interfaces per instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.network-performance</code> - The network performance (for example, "25
/// Gigabit").</p>
/// </li>
/// <li>
/// <p>
/// <code>processor-info.supported-architecture</code> - The CPU architecture
/// (<code>arm64</code> | <code>i386</code> | <code>x86_64</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>processor-info.sustained-clock-speed-in-ghz</code> - The CPU clock speed, in GHz.</p>
/// </li>
/// <li>
/// <p>
/// <code>supported-boot-mode</code> - The boot mode (<code>legacy-bios</code> |
/// <code>uefi</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>supported-root-device-type</code> - The root device type (<code>ebs</code> |
/// <code>instance-store</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>supported-usage-class</code> - The usage class (<code>on-demand</code> |
/// <code>spot</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>supported-virtualization-type</code> - The virtualization type (<code>hvm</code> |
/// <code>paravirtual</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>vcpu-info.default-cores</code> - The default number of cores for the instance type.</p>
/// </li>
/// <li>
/// <p>
/// <code>vcpu-info.default-threads-per-core</code> - The default number of threads per core for the instance
/// type.</p>
/// </li>
/// <li>
/// <p>
/// <code>vcpu-info.default-vcpus</code> - The default number of vCPUs for the instance type.</p>
/// </li>
/// <li>
/// <p>
/// <code>vcpu-info.valid-cores</code> - The number of cores that can be configured for the instance type.</p>
/// </li>
/// <li>
/// <p>
/// <code>vcpu-info.valid-threads-per-core</code> - The number of threads per core that can be configured for the instance type.
/// For example, "1" or "1,2".</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. Filter names and values are case-sensitive.</p>
/// <ul>
/// <li>
/// <p>
/// <code>auto-recovery-supported</code> - Indicates whether auto recovery is supported (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>bare-metal</code> - Indicates whether it is a bare metal instance type (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>burstable-performance-supported</code> - Indicates whether it is a burstable
/// performance instance type (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>current-generation</code> - Indicates whether this instance type is the latest
/// generation instance type of an instance family (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps</code> - The baseline
/// bandwidth performance for an EBS-optimized instance type, in Mbps.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-info.baseline-iops</code> - The baseline input/output storage
/// operations per second for an EBS-optimized instance type.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-info.baseline-throughput-in-mbps</code> - The baseline
/// throughput performance for an EBS-optimized instance type, in MB/s.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps</code> - The maximum bandwidth
/// performance for an EBS-optimized instance type, in Mbps.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-info.maximum-iops</code> - The maximum input/output storage
/// operations per second for an EBS-optimized instance type.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-info.maximum-throughput-in-mbps</code> - The maximum
/// throughput performance for an EBS-optimized instance type, in MB/s.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.ebs-optimized-support</code> - Indicates whether the instance type is
/// EBS-optimized (<code>supported</code> | <code>unsupported</code> |
/// <code>default</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.encryption-support</code> - Indicates whether EBS encryption is supported
/// (<code>supported</code> | <code>unsupported</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-info.nvme-support</code> - Indicates whether non-volatile memory express (NVMe)
/// is supported for EBS volumes (<code>required</code> | <code>supported</code> | <code>unsupported</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>free-tier-eligible</code> - Indicates whether the instance type is eligible to use
/// in the free tier (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>hibernation-supported</code> - Indicates whether On-Demand hibernation is supported (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>hypervisor</code> - The hypervisor (<code>nitro</code> | <code>xen</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-info.disk.count</code> - The number of local disks.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-info.disk.size-in-gb</code> - The storage size of each instance storage disk, in
/// GB.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-info.disk.type</code> - The storage technology for the local
/// instance storage disks (<code>hdd</code> | <code>ssd</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-info.encryption-supported</code> - Indicates whether data is encrypted at rest
/// (<code>required</code> | <code>unsupported</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-info.nvme-support</code> - Indicates whether non-volatile memory
/// express (NVMe) is supported for instance store (<code>required</code> | <code>supported</code> |
/// <code>unsupported</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-info.total-size-in-gb</code> - The total amount of storage available from all local
/// instance storage, in GB.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-storage-supported</code> - Indicates whether the instance type has local
/// instance storage (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type (for example <code>c5.2xlarge</code> or
/// c5*).</p>
/// </li>
/// <li>
/// <p>
/// <code>memory-info.size-in-mib</code> - The memory size.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.efa-info.maximum-efa-interfaces</code> - The maximum number of Elastic
/// Fabric Adapters (EFAs) per instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.efa-supported</code> - Indicates whether the instance type supports
/// Elastic Fabric Adapter (EFA) (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.ena-support</code> - Indicates whether Elastic Network Adapter (ENA) is
/// supported or required (<code>required</code> | <code>supported</code> |
/// <code>unsupported</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.encryption-in-transit-supported</code> - Indicates whether the instance type
/// automatically encrypts in-transit traffic between instances (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.ipv4-addresses-per-interface</code> - The maximum number of private IPv4 addresses per
/// network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.ipv6-addresses-per-interface</code> - The maximum number of private IPv6 addresses per
/// network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.ipv6-supported</code> - Indicates whether the instance type supports IPv6 (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.maximum-network-interfaces</code> - The maximum number of network interfaces per instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-info.network-performance</code> - The network performance (for example, "25
/// Gigabit").</p>
/// </li>
/// <li>
/// <p>
/// <code>processor-info.supported-architecture</code> - The CPU architecture
/// (<code>arm64</code> | <code>i386</code> | <code>x86_64</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>processor-info.sustained-clock-speed-in-ghz</code> - The CPU clock speed, in GHz.</p>
/// </li>
/// <li>
/// <p>
/// <code>supported-boot-mode</code> - The boot mode (<code>legacy-bios</code> |
/// <code>uefi</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>supported-root-device-type</code> - The root device type (<code>ebs</code> |
/// <code>instance-store</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>supported-usage-class</code> - The usage class (<code>on-demand</code> |
/// <code>spot</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>supported-virtualization-type</code> - The virtualization type (<code>hvm</code> |
/// <code>paravirtual</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>vcpu-info.default-cores</code> - The default number of cores for the instance type.</p>
/// </li>
/// <li>
/// <p>
/// <code>vcpu-info.default-threads-per-core</code> - The default number of threads per core for the instance
/// type.</p>
/// </li>
/// <li>
/// <p>
/// <code>vcpu-info.default-vcpus</code> - The default number of vCPUs for the instance type.</p>
/// </li>
/// <li>
/// <p>
/// <code>vcpu-info.valid-cores</code> - The number of cores that can be configured for the instance type.</p>
/// </li>
/// <li>
/// <p>
/// <code>vcpu-info.valid-threads-per-core</code> - The number of threads per core that can be configured for the instance type.
/// For example, "1" or "1,2".</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results
/// can be seen by sending another request with the next token value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results
/// can be seen by sending another request with the next token value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeInternetGateways`.
///
/// <p>Describes one or more of your internet gateways.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeInternetGateways<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_internet_gateways_input::Builder,
}
impl<C, M, R> DescribeInternetGateways<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeInternetGateways`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeInternetGatewaysOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeInternetGatewaysError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeInternetGatewaysInputOperationOutputAlias,
crate::output::DescribeInternetGatewaysOutput,
crate::error::DescribeInternetGatewaysError,
crate::input::DescribeInternetGatewaysInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>attachment.state</code> - The current state of the attachment between the gateway
/// and the VPC (<code>available</code>). Present only if a VPC is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.vpc-id</code> - The ID of an attached VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>internet-gateway-id</code> - The ID of the Internet gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the internet gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>attachment.state</code> - The current state of the attachment between the gateway
/// and the VPC (<code>available</code>). Present only if a VPC is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.vpc-id</code> - The ID of an attached VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>internet-gateway-id</code> - The ID of the Internet gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the internet gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `InternetGatewayIds`.
///
/// To override the contents of this collection use [`set_internet_gateway_ids`](Self::set_internet_gateway_ids).
///
/// <p>One or more internet gateway IDs.</p>
/// <p>Default: Describes all your internet gateways.</p>
pub fn internet_gateway_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.internet_gateway_ids(inp);
self
}
/// <p>One or more internet gateway IDs.</p>
/// <p>Default: Describes all your internet gateways.</p>
pub fn set_internet_gateway_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_internet_gateway_ids(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeIpv6Pools`.
///
/// <p>Describes your IPv6 address pools.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeIpv6Pools<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_ipv6_pools_input::Builder,
}
impl<C, M, R> DescribeIpv6Pools<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeIpv6Pools`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeIpv6PoolsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeIpv6PoolsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeIpv6PoolsInputOperationOutputAlias,
crate::output::DescribeIpv6PoolsOutput,
crate::error::DescribeIpv6PoolsError,
crate::input::DescribeIpv6PoolsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `PoolIds`.
///
/// To override the contents of this collection use [`set_pool_ids`](Self::set_pool_ids).
///
/// <p>The IDs of the IPv6 address pools.</p>
pub fn pool_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pool_ids(inp);
self
}
/// <p>The IDs of the IPv6 address pools.</p>
pub fn set_pool_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_pool_ids(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
}
/// Fluent builder constructing a request to `DescribeKeyPairs`.
///
/// <p>Describes the specified key pairs or all of your key pairs.</p>
/// <p>For more information about key pairs, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html">Amazon EC2 key pairs</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeKeyPairs<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_key_pairs_input::Builder,
}
impl<C, M, R> DescribeKeyPairs<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeKeyPairs`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeKeyPairsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeKeyPairsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeKeyPairsInputOperationOutputAlias,
crate::output::DescribeKeyPairsOutput,
crate::error::DescribeKeyPairsError,
crate::input::DescribeKeyPairsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>key-pair-id</code> - The ID of the key pair.</p>
/// </li>
/// <li>
/// <p>
/// <code>fingerprint</code> - The fingerprint of the key pair.</p>
/// </li>
/// <li>
/// <p>
/// <code>key-name</code> - The name of the key pair.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>key-pair-id</code> - The ID of the key pair.</p>
/// </li>
/// <li>
/// <p>
/// <code>fingerprint</code> - The fingerprint of the key pair.</p>
/// </li>
/// <li>
/// <p>
/// <code>key-name</code> - The name of the key pair.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `KeyNames`.
///
/// To override the contents of this collection use [`set_key_names`](Self::set_key_names).
///
/// <p>The key pair names.</p>
/// <p>Default: Describes all of your key pairs.</p>
pub fn key_names(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.key_names(inp);
self
}
/// <p>The key pair names.</p>
/// <p>Default: Describes all of your key pairs.</p>
pub fn set_key_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_key_names(input);
self
}
/// Appends an item to `KeyPairIds`.
///
/// To override the contents of this collection use [`set_key_pair_ids`](Self::set_key_pair_ids).
///
/// <p>The IDs of the key pairs.</p>
pub fn key_pair_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.key_pair_ids(inp);
self
}
/// <p>The IDs of the key pairs.</p>
pub fn set_key_pair_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_key_pair_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeLaunchTemplates`.
///
/// <p>Describes one or more launch templates.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeLaunchTemplates<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_launch_templates_input::Builder,
}
impl<C, M, R> DescribeLaunchTemplates<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeLaunchTemplates`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeLaunchTemplatesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeLaunchTemplatesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeLaunchTemplatesInputOperationOutputAlias,
crate::output::DescribeLaunchTemplatesOutput,
crate::error::DescribeLaunchTemplatesError,
crate::input::DescribeLaunchTemplatesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `LaunchTemplateIds`.
///
/// To override the contents of this collection use [`set_launch_template_ids`](Self::set_launch_template_ids).
///
/// <p>One or more launch template IDs.</p>
pub fn launch_template_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_ids(inp);
self
}
/// <p>One or more launch template IDs.</p>
pub fn set_launch_template_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_launch_template_ids(input);
self
}
/// Appends an item to `LaunchTemplateNames`.
///
/// To override the contents of this collection use [`set_launch_template_names`](Self::set_launch_template_names).
///
/// <p>One or more launch template names.</p>
pub fn launch_template_names(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_names(inp);
self
}
/// <p>One or more launch template names.</p>
pub fn set_launch_template_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_launch_template_names(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>create-time</code> - The time the launch template was created.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch-template-name</code> - The name of the launch template.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>create-time</code> - The time the launch template was created.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch-template-name</code> - The name of the launch template.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The token to request the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value
/// can be between 1 and 200.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value
/// can be between 1 and 200.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeLaunchTemplateVersions`.
///
/// <p>Describes one or more versions of a specified launch template. You can describe all
/// versions, individual versions, or a range of versions. You can also describe all the
/// latest versions or all the default versions of all the launch templates in your
/// account.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeLaunchTemplateVersions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_launch_template_versions_input::Builder,
}
impl<C, M, R> DescribeLaunchTemplateVersions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeLaunchTemplateVersions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeLaunchTemplateVersionsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeLaunchTemplateVersionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeLaunchTemplateVersionsInputOperationOutputAlias,
crate::output::DescribeLaunchTemplateVersionsOutput,
crate::error::DescribeLaunchTemplateVersionsError,
crate::input::DescribeLaunchTemplateVersionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the launch template. To describe one or more versions of a specified launch
/// template, you must specify either the launch template ID or the launch template name in
/// the request. To describe all the latest or default launch template versions in your
/// account, you must omit this parameter.</p>
pub fn launch_template_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_id(inp);
self
}
/// <p>The ID of the launch template. To describe one or more versions of a specified launch
/// template, you must specify either the launch template ID or the launch template name in
/// the request. To describe all the latest or default launch template versions in your
/// account, you must omit this parameter.</p>
pub fn set_launch_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_launch_template_id(input);
self
}
/// <p>The name of the launch template. To describe one or more versions of a specified
/// launch template, you must specify either the launch template ID or the launch template
/// name in the request. To describe all the latest or default launch template versions in
/// your account, you must omit this parameter.</p>
pub fn launch_template_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_name(inp);
self
}
/// <p>The name of the launch template. To describe one or more versions of a specified
/// launch template, you must specify either the launch template ID or the launch template
/// name in the request. To describe all the latest or default launch template versions in
/// your account, you must omit this parameter.</p>
pub fn set_launch_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_launch_template_name(input);
self
}
/// Appends an item to `Versions`.
///
/// To override the contents of this collection use [`set_versions`](Self::set_versions).
///
/// <p>One or more versions of the launch template. Valid values depend on whether you are describing a specified launch template (by ID or name) or all launch templates in your account.</p>
/// <p>To describe one or more versions of a specified launch template, valid values are <code>$Latest</code>, <code>$Default</code>, and numbers.</p>
/// <p>To describe all launch templates in your account that are defined as the latest
/// version, the valid value is <code>$Latest</code>. To describe all launch templates in
/// your account that are defined as the default version, the valid value is
/// <code>$Default</code>. You can specify <code>$Latest</code> and
/// <code>$Default</code> in the same call. You cannot specify numbers.</p>
pub fn versions(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.versions(inp);
self
}
/// <p>One or more versions of the launch template. Valid values depend on whether you are describing a specified launch template (by ID or name) or all launch templates in your account.</p>
/// <p>To describe one or more versions of a specified launch template, valid values are <code>$Latest</code>, <code>$Default</code>, and numbers.</p>
/// <p>To describe all launch templates in your account that are defined as the latest
/// version, the valid value is <code>$Latest</code>. To describe all launch templates in
/// your account that are defined as the default version, the valid value is
/// <code>$Default</code>. You can specify <code>$Latest</code> and
/// <code>$Default</code> in the same call. You cannot specify numbers.</p>
pub fn set_versions(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_versions(input);
self
}
/// <p>The version number after which to describe launch template versions.</p>
pub fn min_version(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.min_version(inp);
self
}
/// <p>The version number after which to describe launch template versions.</p>
pub fn set_min_version(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_min_version(input);
self
}
/// <p>The version number up to which to describe launch template versions.</p>
pub fn max_version(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.max_version(inp);
self
}
/// <p>The version number up to which to describe launch template versions.</p>
pub fn set_max_version(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_max_version(input);
self
}
/// <p>The token to request the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value
/// can be between 1 and 200.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value
/// can be between 1 and 200.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>create-time</code> - The time the launch template version was created.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-optimized</code> - A boolean that indicates whether the instance
/// is optimized for Amazon EBS I/O.</p>
/// </li>
/// <li>
/// <p>
/// <code>iam-instance-profile</code> - The ARN of the IAM instance
/// profile.</p>
/// </li>
/// <li>
/// <p>
/// <code>image-id</code> - The ID of the AMI.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type.</p>
/// </li>
/// <li>
/// <p>
/// <code>is-default-version</code> - A boolean that indicates whether the
/// launch template version is the default version.</p>
/// </li>
/// <li>
/// <p>
/// <code>kernel-id</code> - The kernel ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>ram-disk-id</code> - The RAM disk ID.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>create-time</code> - The time the launch template version was created.</p>
/// </li>
/// <li>
/// <p>
/// <code>ebs-optimized</code> - A boolean that indicates whether the instance
/// is optimized for Amazon EBS I/O.</p>
/// </li>
/// <li>
/// <p>
/// <code>iam-instance-profile</code> - The ARN of the IAM instance
/// profile.</p>
/// </li>
/// <li>
/// <p>
/// <code>image-id</code> - The ID of the AMI.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type.</p>
/// </li>
/// <li>
/// <p>
/// <code>is-default-version</code> - A boolean that indicates whether the
/// launch template version is the default version.</p>
/// </li>
/// <li>
/// <p>
/// <code>kernel-id</code> - The kernel ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>ram-disk-id</code> - The RAM disk ID.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
}
/// Fluent builder constructing a request to `DescribeLocalGatewayRouteTables`.
///
/// <p>Describes one or more local gateway route tables. By default, all local gateway route tables are described.
/// Alternatively, you can filter the results.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeLocalGatewayRouteTables<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_local_gateway_route_tables_input::Builder,
}
impl<C, M, R> DescribeLocalGatewayRouteTables<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeLocalGatewayRouteTables`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeLocalGatewayRouteTablesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeLocalGatewayRouteTablesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeLocalGatewayRouteTablesInputOperationOutputAlias,
crate::output::DescribeLocalGatewayRouteTablesOutput,
crate::error::DescribeLocalGatewayRouteTablesError,
crate::input::DescribeLocalGatewayRouteTablesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `LocalGatewayRouteTableIds`.
///
/// To override the contents of this collection use [`set_local_gateway_route_table_ids`](Self::set_local_gateway_route_table_ids).
///
/// <p>The IDs of the local gateway route tables.</p>
pub fn local_gateway_route_table_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.local_gateway_route_table_ids(inp);
self
}
/// <p>The IDs of the local gateway route tables.</p>
pub fn set_local_gateway_route_table_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_local_gateway_route_table_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>local-gateway-id</code> - The ID of a local gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-id</code> - The ID of a local gateway route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the local gateway route table.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>local-gateway-id</code> - The ID of a local gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-id</code> - The ID of a local gateway route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the local gateway route table.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations`.
///
/// <p>Describes the associations between virtual interface groups and local gateway route tables.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations<C= aws_smithy_client::erase::DynConnector, M= aws_hyper::AwsMiddleware, R= aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_local_gateway_route_table_virtual_interface_group_associations_input::Builder
}
impl<C, M, R> DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(self) -> std::result::Result<crate::output::DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, aws_smithy_http::result::SdkError<crate::error::DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsError>>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<crate::input::DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInputOperationOutputAlias,
crate::output::DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput,
crate::error::DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsError,
crate::input::DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInputOperationRetryAlias>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds`.
///
/// To override the contents of this collection use [`set_local_gateway_route_table_virtual_interface_group_association_ids`](Self::set_local_gateway_route_table_virtual_interface_group_association_ids).
///
/// <p>The IDs of the associations.</p>
pub fn local_gateway_route_table_virtual_interface_group_association_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self
.inner
.local_gateway_route_table_virtual_interface_group_association_ids(inp);
self
}
/// <p>The IDs of the associations.</p>
pub fn set_local_gateway_route_table_virtual_interface_group_association_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self
.inner
.set_local_gateway_route_table_virtual_interface_group_association_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>local-gateway-id</code> - The ID of a local gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-id</code> - The ID of the local gateway route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-virtual-interface-group-association-id</code> - The ID of the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-virtual-interface-group-id</code> - The ID of the virtual interface group.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the association.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>local-gateway-id</code> - The ID of a local gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-id</code> - The ID of the local gateway route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-virtual-interface-group-association-id</code> - The ID of the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-virtual-interface-group-id</code> - The ID of the virtual interface group.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the association.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeLocalGatewayRouteTableVpcAssociations`.
///
/// <p>Describes the specified associations between VPCs and local gateway route tables.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeLocalGatewayRouteTableVpcAssociations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_local_gateway_route_table_vpc_associations_input::Builder,
}
impl<C, M, R> DescribeLocalGatewayRouteTableVpcAssociations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeLocalGatewayRouteTableVpcAssociations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(self) -> std::result::Result<crate::output::DescribeLocalGatewayRouteTableVpcAssociationsOutput, aws_smithy_http::result::SdkError<crate::error::DescribeLocalGatewayRouteTableVpcAssociationsError>>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<crate::input::DescribeLocalGatewayRouteTableVpcAssociationsInputOperationOutputAlias,
crate::output::DescribeLocalGatewayRouteTableVpcAssociationsOutput,
crate::error::DescribeLocalGatewayRouteTableVpcAssociationsError,
crate::input::DescribeLocalGatewayRouteTableVpcAssociationsInputOperationRetryAlias>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `LocalGatewayRouteTableVpcAssociationIds`.
///
/// To override the contents of this collection use [`set_local_gateway_route_table_vpc_association_ids`](Self::set_local_gateway_route_table_vpc_association_ids).
///
/// <p>The IDs of the associations.</p>
pub fn local_gateway_route_table_vpc_association_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self
.inner
.local_gateway_route_table_vpc_association_ids(inp);
self
}
/// <p>The IDs of the associations.</p>
pub fn set_local_gateway_route_table_vpc_association_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self
.inner
.set_local_gateway_route_table_vpc_association_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>local-gateway-id</code> - The ID of a local gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-id</code> - The ID of the local gateway route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-vpc-association-id</code> - The ID of the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>local-gateway-id</code> - The ID of a local gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-id</code> - The ID of the local gateway route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-vpc-association-id</code> - The ID of the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeLocalGateways`.
///
/// <p>Describes one or more local gateways. By default, all local gateways are described.
/// Alternatively, you can filter the results.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeLocalGateways<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_local_gateways_input::Builder,
}
impl<C, M, R> DescribeLocalGateways<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeLocalGateways`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeLocalGatewaysOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeLocalGatewaysError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeLocalGatewaysInputOperationOutputAlias,
crate::output::DescribeLocalGatewaysOutput,
crate::error::DescribeLocalGatewaysError,
crate::input::DescribeLocalGatewaysInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `LocalGatewayIds`.
///
/// To override the contents of this collection use [`set_local_gateway_ids`](Self::set_local_gateway_ids).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>local-gateway-id</code> - The ID of a local gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-id</code> - The ID of the local gateway route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-virtual-interface-group-association-id</code> - The ID of the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-virtual-interface-group-id</code> - The ID of the virtual interface group.</p>
/// </li>
/// <li>
/// <p>
/// <code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the association.</p>
/// </li>
/// </ul>
pub fn local_gateway_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.local_gateway_ids(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>local-gateway-id</code> - The ID of a local gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-id</code> - The ID of the local gateway route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-virtual-interface-group-association-id</code> - The ID of the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-route-table-virtual-interface-group-id</code> - The ID of the virtual interface group.</p>
/// </li>
/// <li>
/// <p>
/// <code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the association.</p>
/// </li>
/// </ul>
pub fn set_local_gateway_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_local_gateway_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeLocalGatewayVirtualInterfaceGroups`.
///
/// <p>Describes the specified local gateway virtual interface groups.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeLocalGatewayVirtualInterfaceGroups<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_local_gateway_virtual_interface_groups_input::Builder,
}
impl<C, M, R> DescribeLocalGatewayVirtualInterfaceGroups<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeLocalGatewayVirtualInterfaceGroups`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeLocalGatewayVirtualInterfaceGroupsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeLocalGatewayVirtualInterfaceGroupsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeLocalGatewayVirtualInterfaceGroupsInputOperationOutputAlias,
crate::output::DescribeLocalGatewayVirtualInterfaceGroupsOutput,
crate::error::DescribeLocalGatewayVirtualInterfaceGroupsError,
crate::input::DescribeLocalGatewayVirtualInterfaceGroupsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `LocalGatewayVirtualInterfaceGroupIds`.
///
/// To override the contents of this collection use [`set_local_gateway_virtual_interface_group_ids`](Self::set_local_gateway_virtual_interface_group_ids).
///
/// <p>The IDs of the virtual interface groups.</p>
pub fn local_gateway_virtual_interface_group_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.local_gateway_virtual_interface_group_ids(inp);
self
}
/// <p>The IDs of the virtual interface groups.</p>
pub fn set_local_gateway_virtual_interface_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self
.inner
.set_local_gateway_virtual_interface_group_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>local-gateway-id</code> - The ID of a local gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-virtual-interface-id</code> - The ID of the virtual interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-virtual-interface-group-id</code> - The ID of the virtual interface group.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>local-gateway-id</code> - The ID of a local gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-virtual-interface-id</code> - The ID of the virtual interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-gateway-virtual-interface-group-id</code> - The ID of the virtual interface group.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeLocalGatewayVirtualInterfaces`.
///
/// <p>Describes the specified local gateway virtual interfaces.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeLocalGatewayVirtualInterfaces<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_local_gateway_virtual_interfaces_input::Builder,
}
impl<C, M, R> DescribeLocalGatewayVirtualInterfaces<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeLocalGatewayVirtualInterfaces`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeLocalGatewayVirtualInterfacesOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeLocalGatewayVirtualInterfacesError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeLocalGatewayVirtualInterfacesInputOperationOutputAlias,
crate::output::DescribeLocalGatewayVirtualInterfacesOutput,
crate::error::DescribeLocalGatewayVirtualInterfacesError,
crate::input::DescribeLocalGatewayVirtualInterfacesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `LocalGatewayVirtualInterfaceIds`.
///
/// To override the contents of this collection use [`set_local_gateway_virtual_interface_ids`](Self::set_local_gateway_virtual_interface_ids).
///
/// <p>The IDs of the virtual interfaces.</p>
pub fn local_gateway_virtual_interface_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.local_gateway_virtual_interface_ids(inp);
self
}
/// <p>The IDs of the virtual interfaces.</p>
pub fn set_local_gateway_virtual_interface_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_local_gateway_virtual_interface_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeManagedPrefixLists`.
///
/// <p>Describes your managed prefix lists and any Amazon Web Services-managed prefix lists.</p>
/// <p>To view the entries for your prefix list, use <a>GetManagedPrefixListEntries</a>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeManagedPrefixLists<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_managed_prefix_lists_input::Builder,
}
impl<C, M, R> DescribeManagedPrefixLists<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeManagedPrefixLists`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeManagedPrefixListsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeManagedPrefixListsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeManagedPrefixListsInputOperationOutputAlias,
crate::output::DescribeManagedPrefixListsOutput,
crate::error::DescribeManagedPrefixListsError,
crate::input::DescribeManagedPrefixListsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the prefix list owner.</p>
/// </li>
/// <li>
/// <p>
/// <code>prefix-list-id</code> - The ID of the prefix list.</p>
/// </li>
/// <li>
/// <p>
/// <code>prefix-list-name</code> - The name of the prefix list.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the prefix list owner.</p>
/// </li>
/// <li>
/// <p>
/// <code>prefix-list-id</code> - The ID of the prefix list.</p>
/// </li>
/// <li>
/// <p>
/// <code>prefix-list-name</code> - The name of the prefix list.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `PrefixListIds`.
///
/// To override the contents of this collection use [`set_prefix_list_ids`](Self::set_prefix_list_ids).
///
/// <p>One or more prefix list IDs.</p>
pub fn prefix_list_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix_list_ids(inp);
self
}
/// <p>One or more prefix list IDs.</p>
pub fn set_prefix_list_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_prefix_list_ids(input);
self
}
}
/// Fluent builder constructing a request to `DescribeMovingAddresses`.
///
/// <p>Describes your Elastic IP addresses that are being moved to the EC2-VPC platform, or that are being restored to the EC2-Classic platform. This request does not return information about any other Elastic IP addresses in your account.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeMovingAddresses<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_moving_addresses_input::Builder,
}
impl<C, M, R> DescribeMovingAddresses<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeMovingAddresses`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeMovingAddressesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeMovingAddressesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeMovingAddressesInputOperationOutputAlias,
crate::output::DescribeMovingAddressesOutput,
crate::error::DescribeMovingAddressesError,
crate::input::DescribeMovingAddressesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>moving-status</code> - The status of the Elastic IP address
/// (<code>MovingToVpc</code> | <code>RestoringToClassic</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>moving-status</code> - The status of the Elastic IP address
/// (<code>MovingToVpc</code> | <code>RestoringToClassic</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining
/// results of the initial request can be seen by sending another request with the returned
/// <code>NextToken</code> value. This value can be between 5 and 1000; if
/// <code>MaxResults</code> is given a value outside of this range, an error is returned.</p>
/// <p>Default: If no value is provided, the default is 1000.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining
/// results of the initial request can be seen by sending another request with the returned
/// <code>NextToken</code> value. This value can be between 5 and 1000; if
/// <code>MaxResults</code> is given a value outside of this range, an error is returned.</p>
/// <p>Default: If no value is provided, the default is 1000.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `PublicIps`.
///
/// To override the contents of this collection use [`set_public_ips`](Self::set_public_ips).
///
/// <p>One or more Elastic IP addresses.</p>
pub fn public_ips(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.public_ips(inp);
self
}
/// <p>One or more Elastic IP addresses.</p>
pub fn set_public_ips(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_public_ips(input);
self
}
}
/// Fluent builder constructing a request to `DescribeNatGateways`.
///
/// <p>Describes one or more of your NAT gateways.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeNatGateways<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_nat_gateways_input::Builder,
}
impl<C, M, R> DescribeNatGateways<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeNatGateways`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeNatGatewaysOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeNatGatewaysError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeNatGatewaysInputOperationOutputAlias,
crate::output::DescribeNatGatewaysOutput,
crate::error::DescribeNatGatewaysError,
crate::input::DescribeNatGatewaysInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filter`.
///
/// To override the contents of this collection use [`set_filter`](Self::set_filter).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>nat-gateway-id</code> - The ID of the NAT gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the NAT gateway (<code>pending</code> |
/// <code>failed</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet in which the NAT gateway resides.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC in which the NAT gateway resides.</p>
/// </li>
/// </ul>
pub fn filter(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filter(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>nat-gateway-id</code> - The ID of the NAT gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the NAT gateway (<code>pending</code> |
/// <code>failed</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet in which the NAT gateway resides.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC in which the NAT gateway resides.</p>
/// </li>
/// </ul>
pub fn set_filter(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filter(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// Appends an item to `NatGatewayIds`.
///
/// To override the contents of this collection use [`set_nat_gateway_ids`](Self::set_nat_gateway_ids).
///
/// <p>One or more NAT gateway IDs.</p>
pub fn nat_gateway_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.nat_gateway_ids(inp);
self
}
/// <p>One or more NAT gateway IDs.</p>
pub fn set_nat_gateway_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_nat_gateway_ids(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeNetworkAcls`.
///
/// <p>Describes one or more of your network ACLs.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html">Network ACLs</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeNetworkAcls<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_network_acls_input::Builder,
}
impl<C, M, R> DescribeNetworkAcls<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeNetworkAcls`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeNetworkAclsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeNetworkAclsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeNetworkAclsInputOperationOutputAlias,
crate::output::DescribeNetworkAclsOutput,
crate::error::DescribeNetworkAclsError,
crate::input::DescribeNetworkAclsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>association.association-id</code> - The ID of an association ID for the ACL.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.network-acl-id</code> - The ID of the network ACL involved in the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.subnet-id</code> - The ID of the subnet involved in the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>default</code> - Indicates whether the ACL is the default network ACL for the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.cidr</code> - The IPv4 CIDR range specified in the entry.</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.icmp.code</code> - The ICMP code specified in the entry, if any.</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.icmp.type</code> - The ICMP type specified in the entry, if any.</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.ipv6-cidr</code> - The IPv6 CIDR range specified in the entry.</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.port-range.from</code> - The start of the port range specified in the entry. </p>
/// </li>
/// <li>
/// <p>
/// <code>entry.port-range.to</code> - The end of the port range specified in the entry. </p>
/// </li>
/// <li>
/// <p>
/// <code>entry.protocol</code> - The protocol specified in the entry (<code>tcp</code> | <code>udp</code> | <code>icmp</code> or a protocol number).</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.rule-action</code> - Allows or denies the matching traffic (<code>allow</code> | <code>deny</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.rule-number</code> - The number of an entry (in other words, rule) in
/// the set of ACL entries.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-acl-id</code> - The ID of the network ACL.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the network ACL.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC for the network ACL.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>association.association-id</code> - The ID of an association ID for the ACL.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.network-acl-id</code> - The ID of the network ACL involved in the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.subnet-id</code> - The ID of the subnet involved in the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>default</code> - Indicates whether the ACL is the default network ACL for the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.cidr</code> - The IPv4 CIDR range specified in the entry.</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.icmp.code</code> - The ICMP code specified in the entry, if any.</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.icmp.type</code> - The ICMP type specified in the entry, if any.</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.ipv6-cidr</code> - The IPv6 CIDR range specified in the entry.</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.port-range.from</code> - The start of the port range specified in the entry. </p>
/// </li>
/// <li>
/// <p>
/// <code>entry.port-range.to</code> - The end of the port range specified in the entry. </p>
/// </li>
/// <li>
/// <p>
/// <code>entry.protocol</code> - The protocol specified in the entry (<code>tcp</code> | <code>udp</code> | <code>icmp</code> or a protocol number).</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.rule-action</code> - Allows or denies the matching traffic (<code>allow</code> | <code>deny</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>entry.rule-number</code> - The number of an entry (in other words, rule) in
/// the set of ACL entries.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-acl-id</code> - The ID of the network ACL.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the network ACL.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC for the network ACL.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `NetworkAclIds`.
///
/// To override the contents of this collection use [`set_network_acl_ids`](Self::set_network_acl_ids).
///
/// <p>One or more network ACL IDs.</p>
/// <p>Default: Describes all your network ACLs.</p>
pub fn network_acl_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_acl_ids(inp);
self
}
/// <p>One or more network ACL IDs.</p>
/// <p>Default: Describes all your network ACLs.</p>
pub fn set_network_acl_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_network_acl_ids(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeNetworkInsightsAnalyses`.
///
/// <p>Describes one or more of your network insights analyses.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeNetworkInsightsAnalyses<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_network_insights_analyses_input::Builder,
}
impl<C, M, R> DescribeNetworkInsightsAnalyses<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeNetworkInsightsAnalyses`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeNetworkInsightsAnalysesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeNetworkInsightsAnalysesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeNetworkInsightsAnalysesInputOperationOutputAlias,
crate::output::DescribeNetworkInsightsAnalysesOutput,
crate::error::DescribeNetworkInsightsAnalysesError,
crate::input::DescribeNetworkInsightsAnalysesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `NetworkInsightsAnalysisIds`.
///
/// To override the contents of this collection use [`set_network_insights_analysis_ids`](Self::set_network_insights_analysis_ids).
///
/// <p>The ID of the network insights analyses. You must specify either analysis IDs or a path ID.</p>
pub fn network_insights_analysis_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.network_insights_analysis_ids(inp);
self
}
/// <p>The ID of the network insights analyses. You must specify either analysis IDs or a path ID.</p>
pub fn set_network_insights_analysis_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_network_insights_analysis_ids(input);
self
}
/// <p>The ID of the path. You must specify either a path ID or analysis IDs.</p>
pub fn network_insights_path_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_insights_path_id(inp);
self
}
/// <p>The ID of the path. You must specify either a path ID or analysis IDs.</p>
pub fn set_network_insights_path_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_insights_path_id(input);
self
}
/// <p>The time when the network insights analyses started.</p>
pub fn analysis_start_time(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.analysis_start_time(inp);
self
}
/// <p>The time when the network insights analyses started.</p>
pub fn set_analysis_start_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_analysis_start_time(input);
self
}
/// <p>The time when the network insights analyses ended.</p>
pub fn analysis_end_time(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.analysis_end_time(inp);
self
}
/// <p>The time when the network insights analyses ended.</p>
pub fn set_analysis_end_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_analysis_end_time(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters. The following are possible values:</p>
/// <ul>
/// <li>
/// <p>PathFound - A Boolean value that indicates whether a feasible path is found.</p>
/// </li>
/// <li>
/// <p>Status - The status of the analysis (running | succeeded | failed).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters. The following are possible values:</p>
/// <ul>
/// <li>
/// <p>PathFound - A Boolean value that indicates whether a feasible path is found.</p>
/// </li>
/// <li>
/// <p>Status - The status of the analysis (running | succeeded | failed).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeNetworkInsightsPaths`.
///
/// <p>Describes one or more of your paths.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeNetworkInsightsPaths<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_network_insights_paths_input::Builder,
}
impl<C, M, R> DescribeNetworkInsightsPaths<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeNetworkInsightsPaths`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeNetworkInsightsPathsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeNetworkInsightsPathsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeNetworkInsightsPathsInputOperationOutputAlias,
crate::output::DescribeNetworkInsightsPathsOutput,
crate::error::DescribeNetworkInsightsPathsError,
crate::input::DescribeNetworkInsightsPathsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `NetworkInsightsPathIds`.
///
/// To override the contents of this collection use [`set_network_insights_path_ids`](Self::set_network_insights_path_ids).
///
/// <p>The IDs of the paths.</p>
pub fn network_insights_path_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_insights_path_ids(inp);
self
}
/// <p>The IDs of the paths.</p>
pub fn set_network_insights_path_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_network_insights_path_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters. The following are possible values:</p>
/// <ul>
/// <li>
/// <p>Destination - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>DestinationPort - The destination port.</p>
/// </li>
/// <li>
/// <p>Name - The path name.</p>
/// </li>
/// <li>
/// <p>Protocol - The protocol.</p>
/// </li>
/// <li>
/// <p>Source - The ID of the resource.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters. The following are possible values:</p>
/// <ul>
/// <li>
/// <p>Destination - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>DestinationPort - The destination port.</p>
/// </li>
/// <li>
/// <p>Name - The path name.</p>
/// </li>
/// <li>
/// <p>Protocol - The protocol.</p>
/// </li>
/// <li>
/// <p>Source - The ID of the resource.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeNetworkInterfaceAttribute`.
///
/// <p>Describes a network interface attribute. You can specify only one attribute at a time.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeNetworkInterfaceAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_network_interface_attribute_input::Builder,
}
impl<C, M, R> DescribeNetworkInterfaceAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeNetworkInterfaceAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeNetworkInterfaceAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeNetworkInterfaceAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeNetworkInterfaceAttributeInputOperationOutputAlias,
crate::output::DescribeNetworkInterfaceAttributeOutput,
crate::error::DescribeNetworkInterfaceAttributeError,
crate::input::DescribeNetworkInterfaceAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The attribute of the network interface. This parameter is required.</p>
pub fn attribute(mut self, inp: crate::model::NetworkInterfaceAttribute) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The attribute of the network interface. This parameter is required.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::NetworkInterfaceAttribute>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of the network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
}
/// Fluent builder constructing a request to `DescribeNetworkInterfacePermissions`.
///
/// <p>Describes the permissions for your network interfaces. </p>
#[derive(std::fmt::Debug)]
pub struct DescribeNetworkInterfacePermissions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_network_interface_permissions_input::Builder,
}
impl<C, M, R> DescribeNetworkInterfacePermissions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeNetworkInterfacePermissions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeNetworkInterfacePermissionsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeNetworkInterfacePermissionsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeNetworkInterfacePermissionsInputOperationOutputAlias,
crate::output::DescribeNetworkInterfacePermissionsOutput,
crate::error::DescribeNetworkInterfacePermissionsError,
crate::input::DescribeNetworkInterfacePermissionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `NetworkInterfacePermissionIds`.
///
/// To override the contents of this collection use [`set_network_interface_permission_ids`](Self::set_network_interface_permission_ids).
///
/// <p>One or more network interface permission IDs.</p>
pub fn network_interface_permission_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.network_interface_permission_ids(inp);
self
}
/// <p>One or more network interface permission IDs.</p>
pub fn set_network_interface_permission_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_network_interface_permission_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>network-interface-permission.network-interface-permission-id</code> - The ID of the
/// permission.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-permission.network-interface-id</code> - The ID of
/// the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-permission.aws-account-id</code> - The Amazon Web Services account ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-permission.aws-service</code> - The Amazon Web Service.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-permission.permission</code> - The type of
/// permission (<code>INSTANCE-ATTACH</code> |
/// <code>EIP-ASSOCIATE</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>network-interface-permission.network-interface-permission-id</code> - The ID of the
/// permission.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-permission.network-interface-id</code> - The ID of
/// the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-permission.aws-account-id</code> - The Amazon Web Services account ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-permission.aws-service</code> - The Amazon Web Service.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-permission.permission</code> - The type of
/// permission (<code>INSTANCE-ATTACH</code> |
/// <code>EIP-ASSOCIATE</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The token to request the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining results,
/// make another call with the returned <code>NextToken</code> value. If this parameter is not specified, up to 50 results are returned by default.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining results,
/// make another call with the returned <code>NextToken</code> value. If this parameter is not specified, up to 50 results are returned by default.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeNetworkInterfaces`.
///
/// <p>Describes one or more of your network interfaces.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeNetworkInterfaces<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_network_interfaces_input::Builder,
}
impl<C, M, R> DescribeNetworkInterfaces<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeNetworkInterfaces`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeNetworkInterfacesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeNetworkInterfacesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeNetworkInterfacesInputOperationOutputAlias,
crate::output::DescribeNetworkInterfacesOutput,
crate::error::DescribeNetworkInterfacesError,
crate::input::DescribeNetworkInterfacesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>addresses.private-ip-address</code> - The private IPv4 addresses
/// associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>addresses.primary</code> - Whether the private IPv4 address is the primary
/// IP address associated with the network interface. </p>
/// </li>
/// <li>
/// <p>
/// <code>addresses.association.public-ip</code> - The association ID returned when
/// the network interface was associated with the Elastic IP address
/// (IPv4).</p>
/// </li>
/// <li>
/// <p>
/// <code>addresses.association.owner-id</code> - The owner ID of the addresses associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.association-id</code> - The association ID returned when the
/// network interface was associated with an IPv4 address.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.allocation-id</code> - The allocation ID returned when you
/// allocated the Elastic IP address (IPv4) for your network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.ip-owner-id</code> - The owner of the Elastic IP address
/// (IPv4) associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.public-ip</code> - The address of the Elastic IP address
/// (IPv4) bound to the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.public-dns-name</code> - The public DNS name for the network
/// interface (IPv4).</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.attachment-id</code> - The ID of the interface attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.attach-time</code> - The time that the network interface was attached to an instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.delete-on-termination</code> - Indicates whether the attachment is deleted when an instance is terminated.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.device-index</code> - The device index to which the network interface is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.instance-id</code> - The ID of the instance to which the network interface is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.instance-owner-id</code> - The owner ID of the instance to which the network interface is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.status</code> - The status of the attachment (<code>attaching</code> | <code>attached</code> | <code>detaching</code> | <code>detached</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone of the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>description</code> - The description of the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>group-id</code> - The ID of a security group associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>group-name</code> - The name of a security group associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-addresses.ipv6-address</code> - An IPv6 address associated with
/// the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>mac-address</code> - The MAC address of the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-id</code> - The ID of the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the network interface owner.</p>
/// </li>
/// <li>
/// <p>
/// <code>private-ip-address</code> - The private IPv4 address or addresses of the
/// network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>private-dns-name</code> - The private DNS name of the network interface (IPv4).</p>
/// </li>
/// <li>
/// <p>
/// <code>requester-id</code> - The alias or Amazon Web Services account ID of the principal or service that created the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>requester-managed</code> - Indicates whether the network interface is being managed by an Amazon Web Service
/// (for example, Amazon Web Services Management Console, Auto Scaling, and so on).</p>
/// </li>
/// <li>
/// <p>
/// <code>source-dest-check</code> - Indicates whether the network interface performs source/destination checking.
/// A value of <code>true</code> means checking is enabled, and <code>false</code> means checking is disabled.
/// The value must be <code>false</code> for the network interface to perform network address translation (NAT) in your VPC. </p>
/// </li>
/// <li>
/// <p>
/// <code>status</code> - The status of the network interface. If the network interface is not attached to an instance, the status is <code>available</code>;
/// if a network interface is attached to an instance the status is <code>in-use</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet for the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC for the network interface.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>addresses.private-ip-address</code> - The private IPv4 addresses
/// associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>addresses.primary</code> - Whether the private IPv4 address is the primary
/// IP address associated with the network interface. </p>
/// </li>
/// <li>
/// <p>
/// <code>addresses.association.public-ip</code> - The association ID returned when
/// the network interface was associated with the Elastic IP address
/// (IPv4).</p>
/// </li>
/// <li>
/// <p>
/// <code>addresses.association.owner-id</code> - The owner ID of the addresses associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.association-id</code> - The association ID returned when the
/// network interface was associated with an IPv4 address.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.allocation-id</code> - The allocation ID returned when you
/// allocated the Elastic IP address (IPv4) for your network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.ip-owner-id</code> - The owner of the Elastic IP address
/// (IPv4) associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.public-ip</code> - The address of the Elastic IP address
/// (IPv4) bound to the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.public-dns-name</code> - The public DNS name for the network
/// interface (IPv4).</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.attachment-id</code> - The ID of the interface attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.attach-time</code> - The time that the network interface was attached to an instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.delete-on-termination</code> - Indicates whether the attachment is deleted when an instance is terminated.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.device-index</code> - The device index to which the network interface is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.instance-id</code> - The ID of the instance to which the network interface is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.instance-owner-id</code> - The owner ID of the instance to which the network interface is attached.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.status</code> - The status of the attachment (<code>attaching</code> | <code>attached</code> | <code>detaching</code> | <code>detached</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone of the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>description</code> - The description of the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>group-id</code> - The ID of a security group associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>group-name</code> - The name of a security group associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-addresses.ipv6-address</code> - An IPv6 address associated with
/// the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>mac-address</code> - The MAC address of the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-id</code> - The ID of the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the network interface owner.</p>
/// </li>
/// <li>
/// <p>
/// <code>private-ip-address</code> - The private IPv4 address or addresses of the
/// network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>private-dns-name</code> - The private DNS name of the network interface (IPv4).</p>
/// </li>
/// <li>
/// <p>
/// <code>requester-id</code> - The alias or Amazon Web Services account ID of the principal or service that created the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>requester-managed</code> - Indicates whether the network interface is being managed by an Amazon Web Service
/// (for example, Amazon Web Services Management Console, Auto Scaling, and so on).</p>
/// </li>
/// <li>
/// <p>
/// <code>source-dest-check</code> - Indicates whether the network interface performs source/destination checking.
/// A value of <code>true</code> means checking is enabled, and <code>false</code> means checking is disabled.
/// The value must be <code>false</code> for the network interface to perform network address translation (NAT) in your VPC. </p>
/// </li>
/// <li>
/// <p>
/// <code>status</code> - The status of the network interface. If the network interface is not attached to an instance, the status is <code>available</code>;
/// if a network interface is attached to an instance the status is <code>in-use</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet for the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC for the network interface.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `NetworkInterfaceIds`.
///
/// To override the contents of this collection use [`set_network_interface_ids`](Self::set_network_interface_ids).
///
/// <p>One or more network interface IDs.</p>
/// <p>Default: Describes all your network interfaces.</p>
pub fn network_interface_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_ids(inp);
self
}
/// <p>One or more network interface IDs.</p>
/// <p>Default: Describes all your network interfaces.</p>
pub fn set_network_interface_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_network_interface_ids(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of items to return for this request. The request returns a token that you
/// can specify in a subsequent call to get the next set of results. You cannot specify this
/// parameter and the network interface IDs parameter in the same request.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of items to return for this request. The request returns a token that you
/// can specify in a subsequent call to get the next set of results. You cannot specify this
/// parameter and the network interface IDs parameter in the same request.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribePlacementGroups`.
///
/// <p>Describes the specified placement groups or all of your placement groups. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">Placement groups</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribePlacementGroups<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_placement_groups_input::Builder,
}
impl<C, M, R> DescribePlacementGroups<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribePlacementGroups`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribePlacementGroupsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribePlacementGroupsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribePlacementGroupsInputOperationOutputAlias,
crate::output::DescribePlacementGroupsOutput,
crate::error::DescribePlacementGroupsError,
crate::input::DescribePlacementGroupsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>group-name</code> - The name of the placement group.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the placement group (<code>pending</code> |
/// <code>available</code> | <code>deleting</code> |
/// <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>strategy</code> - The strategy of the placement group
/// (<code>cluster</code> | <code>spread</code> |
/// <code>partition</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag:<key></code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>group-name</code> - The name of the placement group.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the placement group (<code>pending</code> |
/// <code>available</code> | <code>deleting</code> |
/// <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>strategy</code> - The strategy of the placement group
/// (<code>cluster</code> | <code>spread</code> |
/// <code>partition</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag:<key></code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `GroupNames`.
///
/// To override the contents of this collection use [`set_group_names`](Self::set_group_names).
///
/// <p>The names of the placement groups.</p>
/// <p>Default: Describes all your placement groups, or only those otherwise
/// specified.</p>
pub fn group_names(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_names(inp);
self
}
/// <p>The names of the placement groups.</p>
/// <p>Default: Describes all your placement groups, or only those otherwise
/// specified.</p>
pub fn set_group_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_group_names(input);
self
}
/// Appends an item to `GroupIds`.
///
/// To override the contents of this collection use [`set_group_ids`](Self::set_group_ids).
///
/// <p>The IDs of the placement groups.</p>
pub fn group_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_ids(inp);
self
}
/// <p>The IDs of the placement groups.</p>
pub fn set_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_group_ids(input);
self
}
}
/// Fluent builder constructing a request to `DescribePrefixLists`.
///
/// <p>Describes available Amazon Web Services services in a prefix list format, which includes the prefix list
/// name and prefix list ID of the service and the IP address range for the service.</p>
/// <p>We recommend that you use <a>DescribeManagedPrefixLists</a> instead.</p>
#[derive(std::fmt::Debug)]
pub struct DescribePrefixLists<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_prefix_lists_input::Builder,
}
impl<C, M, R> DescribePrefixLists<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribePrefixLists`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribePrefixListsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribePrefixListsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribePrefixListsInputOperationOutputAlias,
crate::output::DescribePrefixListsOutput,
crate::error::DescribePrefixListsError,
crate::input::DescribePrefixListsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>prefix-list-id</code>: The ID of a prefix list.</p>
/// </li>
/// <li>
/// <p>
/// <code>prefix-list-name</code>: The name of a prefix list.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>prefix-list-id</code>: The ID of a prefix list.</p>
/// </li>
/// <li>
/// <p>
/// <code>prefix-list-name</code>: The name of a prefix list.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `PrefixListIds`.
///
/// To override the contents of this collection use [`set_prefix_list_ids`](Self::set_prefix_list_ids).
///
/// <p>One or more prefix list IDs.</p>
pub fn prefix_list_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix_list_ids(inp);
self
}
/// <p>One or more prefix list IDs.</p>
pub fn set_prefix_list_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_prefix_list_ids(input);
self
}
}
/// Fluent builder constructing a request to `DescribePrincipalIdFormat`.
///
/// <p>Describes the ID format settings for the root user and all IAM roles and IAM users
/// that have explicitly specified a longer ID (17-character ID) preference. </p>
/// <p>By default, all IAM roles and IAM users default to the same ID settings as the root user, unless they
/// explicitly override the settings. This request is useful for identifying those IAM users and IAM roles
/// that have overridden the default ID settings.</p>
/// <p>The following resource types support longer IDs: <code>bundle</code> |
/// <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code> |
/// <code>network-acl</code> | <code>network-acl-association</code> |
/// <code>network-interface</code> | <code>network-interface-attachment</code> |
/// <code>prefix-list</code> | <code>reservation</code> | <code>route-table</code> |
/// <code>route-table-association</code> | <code>security-group</code> |
/// <code>snapshot</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>volume</code> | <code>vpc</code>
/// | <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> |
/// <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>. </p>
#[derive(std::fmt::Debug)]
pub struct DescribePrincipalIdFormat<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_principal_id_format_input::Builder,
}
impl<C, M, R> DescribePrincipalIdFormat<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribePrincipalIdFormat`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribePrincipalIdFormatOutput,
aws_smithy_http::result::SdkError<crate::error::DescribePrincipalIdFormatError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribePrincipalIdFormatInputOperationOutputAlias,
crate::output::DescribePrincipalIdFormatOutput,
crate::error::DescribePrincipalIdFormatError,
crate::input::DescribePrincipalIdFormatInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Resources`.
///
/// To override the contents of this collection use [`set_resources`](Self::set_resources).
///
/// <p>The type of resource: <code>bundle</code> |
/// <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code> |
/// <code>network-acl</code> | <code>network-acl-association</code> |
/// <code>network-interface</code> | <code>network-interface-attachment</code> |
/// <code>prefix-list</code> | <code>reservation</code> | <code>route-table</code> |
/// <code>route-table-association</code> | <code>security-group</code> |
/// <code>snapshot</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>volume</code> | <code>vpc</code>
/// | <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> |
/// <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>
/// </p>
pub fn resources(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resources(inp);
self
}
/// <p>The type of resource: <code>bundle</code> |
/// <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code> |
/// <code>network-acl</code> | <code>network-acl-association</code> |
/// <code>network-interface</code> | <code>network-interface-attachment</code> |
/// <code>prefix-list</code> | <code>reservation</code> | <code>route-table</code> |
/// <code>route-table-association</code> | <code>security-group</code> |
/// <code>snapshot</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>volume</code> | <code>vpc</code>
/// | <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> |
/// <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>
/// </p>
pub fn set_resources(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resources(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned NextToken value. </p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned NextToken value. </p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to request the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribePublicIpv4Pools`.
///
/// <p>Describes the specified IPv4 address pools.</p>
#[derive(std::fmt::Debug)]
pub struct DescribePublicIpv4Pools<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_public_ipv4_pools_input::Builder,
}
impl<C, M, R> DescribePublicIpv4Pools<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribePublicIpv4Pools`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribePublicIpv4PoolsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribePublicIpv4PoolsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribePublicIpv4PoolsInputOperationOutputAlias,
crate::output::DescribePublicIpv4PoolsOutput,
crate::error::DescribePublicIpv4PoolsError,
crate::input::DescribePublicIpv4PoolsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `PoolIds`.
///
/// To override the contents of this collection use [`set_pool_ids`](Self::set_pool_ids).
///
/// <p>The IDs of the address pools.</p>
pub fn pool_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pool_ids(inp);
self
}
/// <p>The IDs of the address pools.</p>
pub fn set_pool_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_pool_ids(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
}
/// Fluent builder constructing a request to `DescribeRegions`.
///
/// <p>Describes the Regions that are enabled for your account, or all Regions.</p>
/// <p>For a list of the Regions supported by Amazon EC2, see <a href="https://docs.aws.amazon.com/general/latest/gr/ec2-service.html">
/// Amazon Elastic Compute Cloud endpoints and quotas</a>.</p>
/// <p>For information about enabling and disabling Regions for your account, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande-manage.html">Managing Amazon Web Services Regions</a> in the <i>Amazon Web Services General Reference</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeRegions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_regions_input::Builder,
}
impl<C, M, R> DescribeRegions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeRegions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeRegionsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeRegionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeRegionsInputOperationOutputAlias,
crate::output::DescribeRegionsOutput,
crate::error::DescribeRegionsError,
crate::input::DescribeRegionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>endpoint</code> - The endpoint of the Region (for example, <code>ec2.us-east-1.amazonaws.com</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>opt-in-status</code> - The opt-in status of the Region (<code>opt-in-not-required</code> | <code>opted-in</code> |
/// <code>not-opted-in</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>region-name</code> - The name of the Region (for example, <code>us-east-1</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>endpoint</code> - The endpoint of the Region (for example, <code>ec2.us-east-1.amazonaws.com</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>opt-in-status</code> - The opt-in status of the Region (<code>opt-in-not-required</code> | <code>opted-in</code> |
/// <code>not-opted-in</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>region-name</code> - The name of the Region (for example, <code>us-east-1</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `RegionNames`.
///
/// To override the contents of this collection use [`set_region_names`](Self::set_region_names).
///
/// <p>The names of the Regions. You can specify any Regions, whether they are enabled and disabled for your account.</p>
pub fn region_names(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.region_names(inp);
self
}
/// <p>The names of the Regions. You can specify any Regions, whether they are enabled and disabled for your account.</p>
pub fn set_region_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_region_names(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Indicates whether to display all Regions, including Regions that are disabled for your account.</p>
pub fn all_regions(mut self, inp: bool) -> Self {
self.inner = self.inner.all_regions(inp);
self
}
/// <p>Indicates whether to display all Regions, including Regions that are disabled for your account.</p>
pub fn set_all_regions(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_all_regions(input);
self
}
}
/// Fluent builder constructing a request to `DescribeReplaceRootVolumeTasks`.
///
/// <p>Describes a root volume replacement task. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-restoring-volume.html#replace-root">Replace a root volume</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeReplaceRootVolumeTasks<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_replace_root_volume_tasks_input::Builder,
}
impl<C, M, R> DescribeReplaceRootVolumeTasks<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeReplaceRootVolumeTasks`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeReplaceRootVolumeTasksOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeReplaceRootVolumeTasksError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeReplaceRootVolumeTasksInputOperationOutputAlias,
crate::output::DescribeReplaceRootVolumeTasksOutput,
crate::error::DescribeReplaceRootVolumeTasksError,
crate::input::DescribeReplaceRootVolumeTasksInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `ReplaceRootVolumeTaskIds`.
///
/// To override the contents of this collection use [`set_replace_root_volume_task_ids`](Self::set_replace_root_volume_task_ids).
///
/// <p>The ID of the root volume replacement task to view.</p>
pub fn replace_root_volume_task_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.replace_root_volume_task_ids(inp);
self
}
/// <p>The ID of the root volume replacement task to view.</p>
pub fn set_replace_root_volume_task_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_replace_root_volume_task_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>Filter to use:</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance for which the root volume replacement task was created.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>Filter to use:</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance for which the root volume replacement task was created.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeReservedInstances`.
///
/// <p>Describes one or more of the Reserved Instances that you purchased.</p>
/// <p>For more information about Reserved Instances, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html">Reserved
/// Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeReservedInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_reserved_instances_input::Builder,
}
impl<C, M, R> DescribeReservedInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeReservedInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeReservedInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeReservedInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeReservedInstancesInputOperationOutputAlias,
crate::output::DescribeReservedInstancesOutput,
crate::error::DescribeReservedInstancesError,
crate::input::DescribeReservedInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone where the Reserved Instance can be used.</p>
/// </li>
/// <li>
/// <p>
/// <code>duration</code> - The duration of the Reserved Instance (one year or three years), in seconds (<code>31536000</code> | <code>94608000</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>end</code> - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z).</p>
/// </li>
/// <li>
/// <p>
/// <code>fixed-price</code> - The purchase price of the Reserved Instance (for example, 9800.0).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type that is covered by the reservation.</p>
/// </li>
/// <li>
/// <p>
/// <code>scope</code> - The scope of the Reserved Instance (<code>Region</code> or <code>Availability Zone</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>product-description</code> - The Reserved Instance product platform
/// description. Instances that include <code>(Amazon VPC)</code> in the product platform
/// description will only be displayed to EC2-Classic account holders and are for use with
/// Amazon VPC (<code>Linux/UNIX</code> | <code>Linux/UNIX (Amazon VPC)</code> | <code>SUSE
/// Linux</code> | <code>SUSE Linux (Amazon VPC)</code> | <code>Red Hat Enterprise
/// Linux</code> | <code>Red Hat Enterprise Linux (Amazon VPC)</code> | <code>Red Hat
/// Enterprise Linux with HA (Amazon VPC)</code> | <code>Windows</code> | <code>Windows
/// (Amazon VPC)</code> | <code>Windows with SQL Server Standard</code> | <code>Windows with
/// SQL Server Standard (Amazon VPC)</code> | <code>Windows with SQL Server Web</code> |
/// <code>Windows with SQL Server Web (Amazon VPC)</code> | <code>Windows with SQL Server
/// Enterprise</code> | <code>Windows with SQL Server Enterprise (Amazon
/// VPC)</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>reserved-instances-id</code> - The ID of the Reserved Instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>start</code> - The time at which the Reserved Instance purchase request was placed (for example, 2014-08-07T11:54:42.000Z).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the Reserved Instance (<code>payment-pending</code> | <code>active</code> | <code>payment-failed</code> | <code>retired</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag:<key></code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>usage-price</code> - The usage price of the Reserved Instance, per hour (for example, 0.84).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone where the Reserved Instance can be used.</p>
/// </li>
/// <li>
/// <p>
/// <code>duration</code> - The duration of the Reserved Instance (one year or three years), in seconds (<code>31536000</code> | <code>94608000</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>end</code> - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z).</p>
/// </li>
/// <li>
/// <p>
/// <code>fixed-price</code> - The purchase price of the Reserved Instance (for example, 9800.0).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type that is covered by the reservation.</p>
/// </li>
/// <li>
/// <p>
/// <code>scope</code> - The scope of the Reserved Instance (<code>Region</code> or <code>Availability Zone</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>product-description</code> - The Reserved Instance product platform
/// description. Instances that include <code>(Amazon VPC)</code> in the product platform
/// description will only be displayed to EC2-Classic account holders and are for use with
/// Amazon VPC (<code>Linux/UNIX</code> | <code>Linux/UNIX (Amazon VPC)</code> | <code>SUSE
/// Linux</code> | <code>SUSE Linux (Amazon VPC)</code> | <code>Red Hat Enterprise
/// Linux</code> | <code>Red Hat Enterprise Linux (Amazon VPC)</code> | <code>Red Hat
/// Enterprise Linux with HA (Amazon VPC)</code> | <code>Windows</code> | <code>Windows
/// (Amazon VPC)</code> | <code>Windows with SQL Server Standard</code> | <code>Windows with
/// SQL Server Standard (Amazon VPC)</code> | <code>Windows with SQL Server Web</code> |
/// <code>Windows with SQL Server Web (Amazon VPC)</code> | <code>Windows with SQL Server
/// Enterprise</code> | <code>Windows with SQL Server Enterprise (Amazon
/// VPC)</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>reserved-instances-id</code> - The ID of the Reserved Instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>start</code> - The time at which the Reserved Instance purchase request was placed (for example, 2014-08-07T11:54:42.000Z).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the Reserved Instance (<code>payment-pending</code> | <code>active</code> | <code>payment-failed</code> | <code>retired</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag:<key></code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>usage-price</code> - The usage price of the Reserved Instance, per hour (for example, 0.84).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>Describes whether the Reserved Instance is Standard or Convertible.</p>
pub fn offering_class(mut self, inp: crate::model::OfferingClassType) -> Self {
self.inner = self.inner.offering_class(inp);
self
}
/// <p>Describes whether the Reserved Instance is Standard or Convertible.</p>
pub fn set_offering_class(
mut self,
input: std::option::Option<crate::model::OfferingClassType>,
) -> Self {
self.inner = self.inner.set_offering_class(input);
self
}
/// Appends an item to `ReservedInstancesIds`.
///
/// To override the contents of this collection use [`set_reserved_instances_ids`](Self::set_reserved_instances_ids).
///
/// <p>One or more Reserved Instance IDs.</p>
/// <p>Default: Describes all your Reserved Instances, or only those otherwise specified.</p>
pub fn reserved_instances_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.reserved_instances_ids(inp);
self
}
/// <p>One or more Reserved Instance IDs.</p>
/// <p>Default: Describes all your Reserved Instances, or only those otherwise specified.</p>
pub fn set_reserved_instances_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_reserved_instances_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API
/// version, you only have access to the <code>Medium Utilization</code> Reserved Instance
/// offering type.</p>
pub fn offering_type(mut self, inp: crate::model::OfferingTypeValues) -> Self {
self.inner = self.inner.offering_type(inp);
self
}
/// <p>The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API
/// version, you only have access to the <code>Medium Utilization</code> Reserved Instance
/// offering type.</p>
pub fn set_offering_type(
mut self,
input: std::option::Option<crate::model::OfferingTypeValues>,
) -> Self {
self.inner = self.inner.set_offering_type(input);
self
}
}
/// Fluent builder constructing a request to `DescribeReservedInstancesListings`.
///
/// <p>Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.</p>
/// <p>The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.</p>
/// <p>As a seller, you choose to list some or all of your Reserved Instances, and you specify the upfront price to receive for them. Your Reserved Instances are then listed in the Reserved Instance Marketplace and are available for purchase.</p>
/// <p>As a buyer, you specify the configuration of the Reserved Instance to purchase, and the Marketplace matches what you're searching for with what's available. The Marketplace first sells the lowest priced Reserved Instances to you, and continues to sell available Reserved Instance listings to you until your demand is met. You are charged based on the total price of all of the listings that you purchase.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved Instance Marketplace</a>
/// in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeReservedInstancesListings<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_reserved_instances_listings_input::Builder,
}
impl<C, M, R> DescribeReservedInstancesListings<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeReservedInstancesListings`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeReservedInstancesListingsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeReservedInstancesListingsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeReservedInstancesListingsInputOperationOutputAlias,
crate::output::DescribeReservedInstancesListingsOutput,
crate::error::DescribeReservedInstancesListingsError,
crate::input::DescribeReservedInstancesListingsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>reserved-instances-id</code> - The ID of the Reserved Instances.</p>
/// </li>
/// <li>
/// <p>
/// <code>reserved-instances-listing-id</code> - The ID of the Reserved Instances listing.</p>
/// </li>
/// <li>
/// <p>
/// <code>status</code> - The status of the Reserved Instance listing (<code>pending</code> | <code>active</code> |
/// <code>cancelled</code> | <code>closed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>status-message</code> - The reason for the status.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>reserved-instances-id</code> - The ID of the Reserved Instances.</p>
/// </li>
/// <li>
/// <p>
/// <code>reserved-instances-listing-id</code> - The ID of the Reserved Instances listing.</p>
/// </li>
/// <li>
/// <p>
/// <code>status</code> - The status of the Reserved Instance listing (<code>pending</code> | <code>active</code> |
/// <code>cancelled</code> | <code>closed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>status-message</code> - The reason for the status.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>One or more Reserved Instance IDs.</p>
pub fn reserved_instances_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.reserved_instances_id(inp);
self
}
/// <p>One or more Reserved Instance IDs.</p>
pub fn set_reserved_instances_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_reserved_instances_id(input);
self
}
/// <p>One or more Reserved Instance listing IDs.</p>
pub fn reserved_instances_listing_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.reserved_instances_listing_id(inp);
self
}
/// <p>One or more Reserved Instance listing IDs.</p>
pub fn set_reserved_instances_listing_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_reserved_instances_listing_id(input);
self
}
}
/// Fluent builder constructing a request to `DescribeReservedInstancesModifications`.
///
/// <p>Describes the modifications made to your Reserved Instances. If no parameter is specified, information about all your Reserved Instances modification requests is returned. If a modification ID is specified, only information about the specific modification is returned.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html">Modifying Reserved Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeReservedInstancesModifications<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_reserved_instances_modifications_input::Builder,
}
impl<C, M, R> DescribeReservedInstancesModifications<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeReservedInstancesModifications`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeReservedInstancesModificationsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeReservedInstancesModificationsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeReservedInstancesModificationsInputOperationOutputAlias,
crate::output::DescribeReservedInstancesModificationsOutput,
crate::error::DescribeReservedInstancesModificationsError,
crate::input::DescribeReservedInstancesModificationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>client-token</code> - The idempotency token for the modification request.</p>
/// </li>
/// <li>
/// <p>
/// <code>create-date</code> - The time when the modification request was created.</p>
/// </li>
/// <li>
/// <p>
/// <code>effective-date</code> - The time when the modification becomes effective.</p>
/// </li>
/// <li>
/// <p>
/// <code>modification-result.reserved-instances-id</code> - The ID for the Reserved Instances created as part of the modification request. This ID is only available when the status of the modification is <code>fulfilled</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>modification-result.target-configuration.availability-zone</code> - The Availability Zone for the new Reserved Instances.</p>
/// </li>
/// <li>
/// <p>
/// <code>modification-result.target-configuration.instance-count </code> - The number of new Reserved Instances.</p>
/// </li>
/// <li>
/// <p>
/// <code>modification-result.target-configuration.instance-type</code> - The instance type of the new Reserved Instances.</p>
/// </li>
/// <li>
/// <p>
/// <code>modification-result.target-configuration.platform</code> - The network platform of the new Reserved Instances (<code>EC2-Classic</code> | <code>EC2-VPC</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>reserved-instances-id</code> - The ID of the Reserved Instances modified.</p>
/// </li>
/// <li>
/// <p>
/// <code>reserved-instances-modification-id</code> - The ID of the modification request.</p>
/// </li>
/// <li>
/// <p>
/// <code>status</code> - The status of the Reserved Instances modification request
/// (<code>processing</code> | <code>fulfilled</code> | <code>failed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>status-message</code> - The reason for the status.</p>
/// </li>
/// <li>
/// <p>
/// <code>update-date</code> - The time when the modification request was last updated.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>client-token</code> - The idempotency token for the modification request.</p>
/// </li>
/// <li>
/// <p>
/// <code>create-date</code> - The time when the modification request was created.</p>
/// </li>
/// <li>
/// <p>
/// <code>effective-date</code> - The time when the modification becomes effective.</p>
/// </li>
/// <li>
/// <p>
/// <code>modification-result.reserved-instances-id</code> - The ID for the Reserved Instances created as part of the modification request. This ID is only available when the status of the modification is <code>fulfilled</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>modification-result.target-configuration.availability-zone</code> - The Availability Zone for the new Reserved Instances.</p>
/// </li>
/// <li>
/// <p>
/// <code>modification-result.target-configuration.instance-count </code> - The number of new Reserved Instances.</p>
/// </li>
/// <li>
/// <p>
/// <code>modification-result.target-configuration.instance-type</code> - The instance type of the new Reserved Instances.</p>
/// </li>
/// <li>
/// <p>
/// <code>modification-result.target-configuration.platform</code> - The network platform of the new Reserved Instances (<code>EC2-Classic</code> | <code>EC2-VPC</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>reserved-instances-id</code> - The ID of the Reserved Instances modified.</p>
/// </li>
/// <li>
/// <p>
/// <code>reserved-instances-modification-id</code> - The ID of the modification request.</p>
/// </li>
/// <li>
/// <p>
/// <code>status</code> - The status of the Reserved Instances modification request
/// (<code>processing</code> | <code>fulfilled</code> | <code>failed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>status-message</code> - The reason for the status.</p>
/// </li>
/// <li>
/// <p>
/// <code>update-date</code> - The time when the modification request was last updated.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `ReservedInstancesModificationIds`.
///
/// To override the contents of this collection use [`set_reserved_instances_modification_ids`](Self::set_reserved_instances_modification_ids).
///
/// <p>IDs for the submitted modification request.</p>
pub fn reserved_instances_modification_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.reserved_instances_modification_ids(inp);
self
}
/// <p>IDs for the submitted modification request.</p>
pub fn set_reserved_instances_modification_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_reserved_instances_modification_ids(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeReservedInstancesOfferings`.
///
/// <p>Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used.</p>
/// <p>If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace, they will be excluded from these results. This is to ensure that you do not purchase your own Reserved Instances.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved Instance Marketplace</a>
/// in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeReservedInstancesOfferings<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_reserved_instances_offerings_input::Builder,
}
impl<C, M, R> DescribeReservedInstancesOfferings<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeReservedInstancesOfferings`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeReservedInstancesOfferingsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeReservedInstancesOfferingsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeReservedInstancesOfferingsInputOperationOutputAlias,
crate::output::DescribeReservedInstancesOfferingsOutput,
crate::error::DescribeReservedInstancesOfferingsError,
crate::input::DescribeReservedInstancesOfferingsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The Availability Zone in which the Reserved Instance can be used.</p>
pub fn availability_zone(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zone(inp);
self
}
/// <p>The Availability Zone in which the Reserved Instance can be used.</p>
pub fn set_availability_zone(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_availability_zone(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone where the Reserved Instance can be
/// used.</p>
/// </li>
/// <li>
/// <p>
/// <code>duration</code> - The duration of the Reserved Instance (for example, one year or
/// three years), in seconds (<code>31536000</code> | <code>94608000</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>fixed-price</code> - The purchase price of the Reserved Instance (for example,
/// 9800.0).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type that is covered by the
/// reservation.</p>
/// </li>
/// <li>
/// <p>
/// <code>marketplace</code> - Set to <code>true</code> to show only Reserved Instance
/// Marketplace offerings. When this filter is not used, which is the default behavior, all
/// offerings from both Amazon Web Services and the Reserved Instance Marketplace are listed.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-description</code> - The Reserved Instance product platform description.
/// Instances that include <code>(Amazon VPC)</code> in the product platform description will
/// only be displayed to EC2-Classic account holders and are for use with Amazon VPC.
/// (<code>Linux/UNIX</code> | <code>Linux/UNIX (Amazon VPC)</code> | <code>SUSE
/// Linux</code> | <code>SUSE Linux (Amazon VPC)</code> | <code>Red Hat Enterprise
/// Linux</code> | <code>Red Hat Enterprise Linux (Amazon VPC)</code> | <code>Red Hat
/// Enterprise Linux with HA (Amazon VPC)</code> | <code>Windows</code> | <code>Windows
/// (Amazon VPC)</code> | <code>Windows with SQL Server Standard</code> | <code>Windows with
/// SQL Server Standard (Amazon VPC)</code> | <code>Windows with SQL Server Web</code> |
/// <code> Windows with SQL Server Web (Amazon VPC)</code> | <code>Windows with SQL Server
/// Enterprise</code> | <code>Windows with SQL Server Enterprise (Amazon VPC)</code>) </p>
/// </li>
/// <li>
/// <p>
/// <code>reserved-instances-offering-id</code> - The Reserved Instances offering
/// ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>scope</code> - The scope of the Reserved Instance (<code>Availability Zone</code> or
/// <code>Region</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>usage-price</code> - The usage price of the Reserved Instance, per hour (for
/// example, 0.84).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone where the Reserved Instance can be
/// used.</p>
/// </li>
/// <li>
/// <p>
/// <code>duration</code> - The duration of the Reserved Instance (for example, one year or
/// three years), in seconds (<code>31536000</code> | <code>94608000</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>fixed-price</code> - The purchase price of the Reserved Instance (for example,
/// 9800.0).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type that is covered by the
/// reservation.</p>
/// </li>
/// <li>
/// <p>
/// <code>marketplace</code> - Set to <code>true</code> to show only Reserved Instance
/// Marketplace offerings. When this filter is not used, which is the default behavior, all
/// offerings from both Amazon Web Services and the Reserved Instance Marketplace are listed.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-description</code> - The Reserved Instance product platform description.
/// Instances that include <code>(Amazon VPC)</code> in the product platform description will
/// only be displayed to EC2-Classic account holders and are for use with Amazon VPC.
/// (<code>Linux/UNIX</code> | <code>Linux/UNIX (Amazon VPC)</code> | <code>SUSE
/// Linux</code> | <code>SUSE Linux (Amazon VPC)</code> | <code>Red Hat Enterprise
/// Linux</code> | <code>Red Hat Enterprise Linux (Amazon VPC)</code> | <code>Red Hat
/// Enterprise Linux with HA (Amazon VPC)</code> | <code>Windows</code> | <code>Windows
/// (Amazon VPC)</code> | <code>Windows with SQL Server Standard</code> | <code>Windows with
/// SQL Server Standard (Amazon VPC)</code> | <code>Windows with SQL Server Web</code> |
/// <code> Windows with SQL Server Web (Amazon VPC)</code> | <code>Windows with SQL Server
/// Enterprise</code> | <code>Windows with SQL Server Enterprise (Amazon VPC)</code>) </p>
/// </li>
/// <li>
/// <p>
/// <code>reserved-instances-offering-id</code> - The Reserved Instances offering
/// ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>scope</code> - The scope of the Reserved Instance (<code>Availability Zone</code> or
/// <code>Region</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>usage-price</code> - The usage price of the Reserved Instance, per hour (for
/// example, 0.84).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>Include Reserved Instance Marketplace offerings in the response.</p>
pub fn include_marketplace(mut self, inp: bool) -> Self {
self.inner = self.inner.include_marketplace(inp);
self
}
/// <p>Include Reserved Instance Marketplace offerings in the response.</p>
pub fn set_include_marketplace(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_include_marketplace(input);
self
}
/// <p>The instance type that the reservation will cover (for example, <code>m1.small</code>). For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
pub fn instance_type(mut self, inp: crate::model::InstanceType) -> Self {
self.inner = self.inner.instance_type(inp);
self
}
/// <p>The instance type that the reservation will cover (for example, <code>m1.small</code>). For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
pub fn set_instance_type(
mut self,
input: std::option::Option<crate::model::InstanceType>,
) -> Self {
self.inner = self.inner.set_instance_type(input);
self
}
/// <p>The maximum duration (in seconds) to filter when searching for offerings.</p>
/// <p>Default: 94608000 (3 years)</p>
pub fn max_duration(mut self, inp: i64) -> Self {
self.inner = self.inner.max_duration(inp);
self
}
/// <p>The maximum duration (in seconds) to filter when searching for offerings.</p>
/// <p>Default: 94608000 (3 years)</p>
pub fn set_max_duration(mut self, input: std::option::Option<i64>) -> Self {
self.inner = self.inner.set_max_duration(input);
self
}
/// <p>The maximum number of instances to filter when searching for offerings.</p>
/// <p>Default: 20</p>
pub fn max_instance_count(mut self, inp: i32) -> Self {
self.inner = self.inner.max_instance_count(inp);
self
}
/// <p>The maximum number of instances to filter when searching for offerings.</p>
/// <p>Default: 20</p>
pub fn set_max_instance_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_instance_count(input);
self
}
/// <p>The minimum duration (in seconds) to filter when searching for offerings.</p>
/// <p>Default: 2592000 (1 month)</p>
pub fn min_duration(mut self, inp: i64) -> Self {
self.inner = self.inner.min_duration(inp);
self
}
/// <p>The minimum duration (in seconds) to filter when searching for offerings.</p>
/// <p>Default: 2592000 (1 month)</p>
pub fn set_min_duration(mut self, input: std::option::Option<i64>) -> Self {
self.inner = self.inner.set_min_duration(input);
self
}
/// <p>The offering class of the Reserved Instance. Can be <code>standard</code> or <code>convertible</code>.</p>
pub fn offering_class(mut self, inp: crate::model::OfferingClassType) -> Self {
self.inner = self.inner.offering_class(inp);
self
}
/// <p>The offering class of the Reserved Instance. Can be <code>standard</code> or <code>convertible</code>.</p>
pub fn set_offering_class(
mut self,
input: std::option::Option<crate::model::OfferingClassType>,
) -> Self {
self.inner = self.inner.set_offering_class(input);
self
}
/// <p>The Reserved Instance product platform description. Instances that include <code>(Amazon
/// VPC)</code> in the description are for use with Amazon VPC.</p>
pub fn product_description(mut self, inp: crate::model::RiProductDescription) -> Self {
self.inner = self.inner.product_description(inp);
self
}
/// <p>The Reserved Instance product platform description. Instances that include <code>(Amazon
/// VPC)</code> in the description are for use with Amazon VPC.</p>
pub fn set_product_description(
mut self,
input: std::option::Option<crate::model::RiProductDescription>,
) -> Self {
self.inner = self.inner.set_product_description(input);
self
}
/// Appends an item to `ReservedInstancesOfferingIds`.
///
/// To override the contents of this collection use [`set_reserved_instances_offering_ids`](Self::set_reserved_instances_offering_ids).
///
/// <p>One or more Reserved Instances offering IDs.</p>
pub fn reserved_instances_offering_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.reserved_instances_offering_ids(inp);
self
}
/// <p>One or more Reserved Instances offering IDs.</p>
pub fn set_reserved_instances_offering_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_reserved_instances_offering_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy
/// of <code>dedicated</code> is applied to instances that run in a VPC on single-tenant hardware
/// (i.e., Dedicated Instances).</p>
/// <p>
/// <b>Important:</b> The <code>host</code> value cannot be used with this parameter. Use the <code>default</code> or <code>dedicated</code> values only.</p>
/// <p>Default: <code>default</code>
/// </p>
pub fn instance_tenancy(mut self, inp: crate::model::Tenancy) -> Self {
self.inner = self.inner.instance_tenancy(inp);
self
}
/// <p>The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy
/// of <code>dedicated</code> is applied to instances that run in a VPC on single-tenant hardware
/// (i.e., Dedicated Instances).</p>
/// <p>
/// <b>Important:</b> The <code>host</code> value cannot be used with this parameter. Use the <code>default</code> or <code>dedicated</code> values only.</p>
/// <p>Default: <code>default</code>
/// </p>
pub fn set_instance_tenancy(
mut self,
input: std::option::Option<crate::model::Tenancy>,
) -> Self {
self.inner = self.inner.set_instance_tenancy(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining
/// results of the initial request can be seen by sending another request with the returned
/// <code>NextToken</code> value. The maximum is 100.</p>
/// <p>Default: 100</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining
/// results of the initial request can be seen by sending another request with the returned
/// <code>NextToken</code> value. The maximum is 100.</p>
/// <p>Default: 100</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API
/// version, you only have access to the <code>Medium Utilization</code> Reserved Instance
/// offering type. </p>
pub fn offering_type(mut self, inp: crate::model::OfferingTypeValues) -> Self {
self.inner = self.inner.offering_type(inp);
self
}
/// <p>The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API
/// version, you only have access to the <code>Medium Utilization</code> Reserved Instance
/// offering type. </p>
pub fn set_offering_type(
mut self,
input: std::option::Option<crate::model::OfferingTypeValues>,
) -> Self {
self.inner = self.inner.set_offering_type(input);
self
}
}
/// Fluent builder constructing a request to `DescribeRouteTables`.
///
/// <p>Describes one or more of your route tables.</p>
/// <p>Each subnet in your VPC must be associated with a route table. If a subnet is not explicitly associated with any route table, it is implicitly associated with the main route table. This command does not return the subnet ID for implicit associations.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route tables</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeRouteTables<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_route_tables_input::Builder,
}
impl<C, M, R> DescribeRouteTables<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeRouteTables`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeRouteTablesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeRouteTablesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeRouteTablesInputOperationOutputAlias,
crate::output::DescribeRouteTablesOutput,
crate::error::DescribeRouteTablesError,
crate::input::DescribeRouteTablesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>association.route-table-association-id</code> - The ID of an association
/// ID for the route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.route-table-id</code> - The ID of the route table involved in
/// the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.subnet-id</code> - The ID of the subnet involved in the
/// association.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.main</code> - Indicates whether the route table is the main
/// route table for the VPC (<code>true</code> | <code>false</code>). Route tables
/// that do not have an association ID are not returned in the response.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-table-id</code> - The ID of the route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.destination-cidr-block</code> - The IPv4 CIDR range specified in a
/// route in the table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.destination-ipv6-cidr-block</code> - The IPv6 CIDR range specified in a route in the route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.destination-prefix-list-id</code> - The ID (prefix) of the Amazon Web Service
/// specified in a route in the table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.egress-only-internet-gateway-id</code> - The ID of an
/// egress-only Internet gateway specified in a route in the route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.gateway-id</code> - The ID of a gateway specified in a route in the table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.instance-id</code> - The ID of an instance specified in a route in the table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.nat-gateway-id</code> - The ID of a NAT gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.transit-gateway-id</code> - The ID of a transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.origin</code> - Describes how the route was created.
/// <code>CreateRouteTable</code> indicates that the route was automatically
/// created when the route table was created; <code>CreateRoute</code> indicates
/// that the route was manually added to the route table;
/// <code>EnableVgwRoutePropagation</code> indicates that the route was
/// propagated by route propagation.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.state</code> - The state of a route in the route table
/// (<code>active</code> | <code>blackhole</code>). The blackhole state
/// indicates that the route's target isn't available (for example, the specified
/// gateway isn't attached to the VPC, the specified NAT instance has been
/// terminated, and so on).</p>
/// </li>
/// <li>
/// <p>
/// <code>route.vpc-peering-connection-id</code> - The ID of a VPC peering
/// connection specified in a route in the table.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC for the route table.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>association.route-table-association-id</code> - The ID of an association
/// ID for the route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.route-table-id</code> - The ID of the route table involved in
/// the association.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.subnet-id</code> - The ID of the subnet involved in the
/// association.</p>
/// </li>
/// <li>
/// <p>
/// <code>association.main</code> - Indicates whether the route table is the main
/// route table for the VPC (<code>true</code> | <code>false</code>). Route tables
/// that do not have an association ID are not returned in the response.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-table-id</code> - The ID of the route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.destination-cidr-block</code> - The IPv4 CIDR range specified in a
/// route in the table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.destination-ipv6-cidr-block</code> - The IPv6 CIDR range specified in a route in the route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.destination-prefix-list-id</code> - The ID (prefix) of the Amazon Web Service
/// specified in a route in the table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.egress-only-internet-gateway-id</code> - The ID of an
/// egress-only Internet gateway specified in a route in the route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.gateway-id</code> - The ID of a gateway specified in a route in the table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.instance-id</code> - The ID of an instance specified in a route in the table.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.nat-gateway-id</code> - The ID of a NAT gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.transit-gateway-id</code> - The ID of a transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.origin</code> - Describes how the route was created.
/// <code>CreateRouteTable</code> indicates that the route was automatically
/// created when the route table was created; <code>CreateRoute</code> indicates
/// that the route was manually added to the route table;
/// <code>EnableVgwRoutePropagation</code> indicates that the route was
/// propagated by route propagation.</p>
/// </li>
/// <li>
/// <p>
/// <code>route.state</code> - The state of a route in the route table
/// (<code>active</code> | <code>blackhole</code>). The blackhole state
/// indicates that the route's target isn't available (for example, the specified
/// gateway isn't attached to the VPC, the specified NAT instance has been
/// terminated, and so on).</p>
/// </li>
/// <li>
/// <p>
/// <code>route.vpc-peering-connection-id</code> - The ID of a VPC peering
/// connection specified in a route in the table.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC for the route table.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `RouteTableIds`.
///
/// To override the contents of this collection use [`set_route_table_ids`](Self::set_route_table_ids).
///
/// <p>One or more route table IDs.</p>
/// <p>Default: Describes all your route tables.</p>
pub fn route_table_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.route_table_ids(inp);
self
}
/// <p>One or more route table IDs.</p>
/// <p>Default: Describes all your route tables.</p>
pub fn set_route_table_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_route_table_ids(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeScheduledInstanceAvailability`.
///
/// <p>Finds available schedules that meet the specified criteria.</p>
/// <p>You can search for an available schedule no more than 3 months in advance. You must meet the minimum required duration of 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.</p>
/// <p>After you find a schedule that meets your needs, call <a>PurchaseScheduledInstances</a>
/// to purchase Scheduled Instances with that schedule.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeScheduledInstanceAvailability<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_scheduled_instance_availability_input::Builder,
}
impl<C, M, R> DescribeScheduledInstanceAvailability<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeScheduledInstanceAvailability`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeScheduledInstanceAvailabilityOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeScheduledInstanceAvailabilityError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeScheduledInstanceAvailabilityInputOperationOutputAlias,
crate::output::DescribeScheduledInstanceAvailabilityOutput,
crate::error::DescribeScheduledInstanceAvailabilityError,
crate::input::DescribeScheduledInstanceAvailabilityInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone (for example, <code>us-west-2a</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type (for example, <code>c4.large</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-platform</code> - The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>platform</code> - The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone (for example, <code>us-west-2a</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type (for example, <code>c4.large</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-platform</code> - The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>platform</code> - The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The time period for the first schedule to start.</p>
pub fn first_slot_start_time_range(
mut self,
inp: crate::model::SlotDateTimeRangeRequest,
) -> Self {
self.inner = self.inner.first_slot_start_time_range(inp);
self
}
/// <p>The time period for the first schedule to start.</p>
pub fn set_first_slot_start_time_range(
mut self,
input: std::option::Option<crate::model::SlotDateTimeRangeRequest>,
) -> Self {
self.inner = self.inner.set_first_slot_start_time_range(input);
self
}
/// <p>The maximum number of results to return in a single call.
/// This value can be between 5 and 300. The default value is 300.
/// To retrieve the remaining results, make another call with the returned
/// <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call.
/// This value can be between 5 and 300. The default value is 300.
/// To retrieve the remaining results, make another call with the returned
/// <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The maximum available duration, in hours. This value must be greater than <code>MinSlotDurationInHours</code>
/// and less than 1,720.</p>
pub fn max_slot_duration_in_hours(mut self, inp: i32) -> Self {
self.inner = self.inner.max_slot_duration_in_hours(inp);
self
}
/// <p>The maximum available duration, in hours. This value must be greater than <code>MinSlotDurationInHours</code>
/// and less than 1,720.</p>
pub fn set_max_slot_duration_in_hours(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_slot_duration_in_hours(input);
self
}
/// <p>The minimum available duration, in hours. The minimum required duration is 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.</p>
pub fn min_slot_duration_in_hours(mut self, inp: i32) -> Self {
self.inner = self.inner.min_slot_duration_in_hours(inp);
self
}
/// <p>The minimum available duration, in hours. The minimum required duration is 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.</p>
pub fn set_min_slot_duration_in_hours(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_min_slot_duration_in_hours(input);
self
}
/// <p>The token for the next set of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next set of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The schedule recurrence.</p>
pub fn recurrence(mut self, inp: crate::model::ScheduledInstanceRecurrenceRequest) -> Self {
self.inner = self.inner.recurrence(inp);
self
}
/// <p>The schedule recurrence.</p>
pub fn set_recurrence(
mut self,
input: std::option::Option<crate::model::ScheduledInstanceRecurrenceRequest>,
) -> Self {
self.inner = self.inner.set_recurrence(input);
self
}
}
/// Fluent builder constructing a request to `DescribeScheduledInstances`.
///
/// <p>Describes the specified Scheduled Instances or all your Scheduled Instances.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeScheduledInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_scheduled_instances_input::Builder,
}
impl<C, M, R> DescribeScheduledInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeScheduledInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeScheduledInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeScheduledInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeScheduledInstancesInputOperationOutputAlias,
crate::output::DescribeScheduledInstancesOutput,
crate::error::DescribeScheduledInstancesError,
crate::input::DescribeScheduledInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone (for example, <code>us-west-2a</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type (for example, <code>c4.large</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-platform</code> - The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>platform</code> - The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone (for example, <code>us-west-2a</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The instance type (for example, <code>c4.large</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>network-platform</code> - The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>platform</code> - The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return in a single call.
/// This value can be between 5 and 300. The default value is 100.
/// To retrieve the remaining results, make another call with the returned
/// <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call.
/// This value can be between 5 and 300. The default value is 100.
/// To retrieve the remaining results, make another call with the returned
/// <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next set of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next set of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `ScheduledInstanceIds`.
///
/// To override the contents of this collection use [`set_scheduled_instance_ids`](Self::set_scheduled_instance_ids).
///
/// <p>The Scheduled Instance IDs.</p>
pub fn scheduled_instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.scheduled_instance_ids(inp);
self
}
/// <p>The Scheduled Instance IDs.</p>
pub fn set_scheduled_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_scheduled_instance_ids(input);
self
}
/// <p>The time period for the first schedule to start.</p>
pub fn slot_start_time_range(
mut self,
inp: crate::model::SlotStartTimeRangeRequest,
) -> Self {
self.inner = self.inner.slot_start_time_range(inp);
self
}
/// <p>The time period for the first schedule to start.</p>
pub fn set_slot_start_time_range(
mut self,
input: std::option::Option<crate::model::SlotStartTimeRangeRequest>,
) -> Self {
self.inner = self.inner.set_slot_start_time_range(input);
self
}
}
/// Fluent builder constructing a request to `DescribeSecurityGroupReferences`.
///
/// <p>[VPC only] Describes the VPCs on the other side of a VPC peering connection that are referencing the security groups you've specified in this request.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeSecurityGroupReferences<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_security_group_references_input::Builder,
}
impl<C, M, R> DescribeSecurityGroupReferences<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeSecurityGroupReferences`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeSecurityGroupReferencesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSecurityGroupReferencesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSecurityGroupReferencesInputOperationOutputAlias,
crate::output::DescribeSecurityGroupReferencesOutput,
crate::error::DescribeSecurityGroupReferencesError,
crate::input::DescribeSecurityGroupReferencesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `GroupId`.
///
/// To override the contents of this collection use [`set_group_id`](Self::set_group_id).
///
/// <p>The IDs of the security groups in your account.</p>
pub fn group_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_id(inp);
self
}
/// <p>The IDs of the security groups in your account.</p>
pub fn set_group_id(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_group_id(input);
self
}
}
/// Fluent builder constructing a request to `DescribeSecurityGroupRules`.
///
/// <p>Describes one or more of your security group rules.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeSecurityGroupRules<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_security_group_rules_input::Builder,
}
impl<C, M, R> DescribeSecurityGroupRules<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeSecurityGroupRules`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeSecurityGroupRulesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSecurityGroupRulesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSecurityGroupRulesInputOperationOutputAlias,
crate::output::DescribeSecurityGroupRulesOutput,
crate::error::DescribeSecurityGroupRulesError,
crate::input::DescribeSecurityGroupRulesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>group-id</code> - The ID of the security group.</p>
/// </li>
/// <li>
/// <p>
/// <code>security-group-rule-id</code> - The ID of the security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>group-id</code> - The ID of the security group.</p>
/// </li>
/// <li>
/// <p>
/// <code>security-group-rule-id</code> - The ID of the security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `SecurityGroupRuleIds`.
///
/// To override the contents of this collection use [`set_security_group_rule_ids`](Self::set_security_group_rule_ids).
///
/// <p>The IDs of the security group rules.</p>
pub fn security_group_rule_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.security_group_rule_ids(inp);
self
}
/// <p>The IDs of the security group rules.</p>
pub fn set_security_group_rule_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_security_group_rule_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another request with the returned <code>NextToken</code> value. This value
/// can be between 5 and 1000. If this parameter is not specified, then all results are
/// returned.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another request with the returned <code>NextToken</code> value. This value
/// can be between 5 and 1000. If this parameter is not specified, then all results are
/// returned.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeSecurityGroups`.
///
/// <p>Describes the specified security groups or all of your security groups.</p>
/// <p>A security group is for use with instances either in the EC2-Classic platform
/// or in a specific VPC. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html">Amazon EC2 security groups</a> in
/// the <i>Amazon Elastic Compute Cloud User Guide</i> and
/// <a href="https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html">Security groups for your VPC</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeSecurityGroups<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_security_groups_input::Builder,
}
impl<C, M, R> DescribeSecurityGroups<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeSecurityGroups`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeSecurityGroupsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSecurityGroupsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSecurityGroupsInputOperationOutputAlias,
crate::output::DescribeSecurityGroupsOutput,
crate::error::DescribeSecurityGroupsError,
crate::input::DescribeSecurityGroupsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters. If using multiple filters for rules, the results include security groups for which any combination of rules - not necessarily a single rule - match all filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>description</code> - The description of the security group.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.cidr</code> - An IPv4 CIDR block for an outbound
/// security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.from-port</code> - For an outbound rule, the
/// start of port range for the TCP and UDP protocols, or an ICMP type
/// number.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.group-id</code> - The ID of a security group
/// that has been referenced in an outbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.group-name</code> - The name of a security group
/// that is referenced in an outbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.ipv6-cidr</code> - An IPv6 CIDR block for an
/// outbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.prefix-list-id</code> - The ID of a prefix list to which a security group rule allows outbound access.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.protocol</code> - The IP protocol for an
/// outbound security group rule (<code>tcp</code> | <code>udp</code> |
/// <code>icmp</code>, a protocol number, or -1 for all protocols).</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.to-port</code> - For an outbound rule, the end
/// of port range for the TCP and UDP protocols, or an ICMP code.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.user-id</code> - The ID of an Amazon Web Services account that
/// has been referenced in an outbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>group-id</code> - The ID of the security group. </p>
/// </li>
/// <li>
/// <p>
/// <code>group-name</code> - The name of the security group.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.cidr</code> - An IPv4 CIDR block for an inbound security
/// group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.from-port</code> - For an inbound rule, the start of port
/// range for the TCP and UDP protocols, or an ICMP type number.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.group-id</code> - The ID of a security group that has been
/// referenced in an inbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.group-name</code> - The name of a security group that is
/// referenced in an inbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.ipv6-cidr</code> - An IPv6 CIDR block for an inbound security
/// group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.prefix-list-id</code> - The ID of a prefix list from which a security group rule allows inbound access.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.protocol</code> - The IP protocol for an inbound security
/// group rule (<code>tcp</code> | <code>udp</code> | <code>icmp</code>, a
/// protocol number, or -1 for all protocols).</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.to-port</code> - For an inbound rule, the end of port range
/// for the TCP and UDP protocols, or an ICMP code.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.user-id</code> - The ID of an Amazon Web Services account that has been
/// referenced in an inbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the owner of the security group.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC specified when the security group was created.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters. If using multiple filters for rules, the results include security groups for which any combination of rules - not necessarily a single rule - match all filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>description</code> - The description of the security group.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.cidr</code> - An IPv4 CIDR block for an outbound
/// security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.from-port</code> - For an outbound rule, the
/// start of port range for the TCP and UDP protocols, or an ICMP type
/// number.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.group-id</code> - The ID of a security group
/// that has been referenced in an outbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.group-name</code> - The name of a security group
/// that is referenced in an outbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.ipv6-cidr</code> - An IPv6 CIDR block for an
/// outbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.prefix-list-id</code> - The ID of a prefix list to which a security group rule allows outbound access.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.protocol</code> - The IP protocol for an
/// outbound security group rule (<code>tcp</code> | <code>udp</code> |
/// <code>icmp</code>, a protocol number, or -1 for all protocols).</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.to-port</code> - For an outbound rule, the end
/// of port range for the TCP and UDP protocols, or an ICMP code.</p>
/// </li>
/// <li>
/// <p>
/// <code>egress.ip-permission.user-id</code> - The ID of an Amazon Web Services account that
/// has been referenced in an outbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>group-id</code> - The ID of the security group. </p>
/// </li>
/// <li>
/// <p>
/// <code>group-name</code> - The name of the security group.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.cidr</code> - An IPv4 CIDR block for an inbound security
/// group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.from-port</code> - For an inbound rule, the start of port
/// range for the TCP and UDP protocols, or an ICMP type number.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.group-id</code> - The ID of a security group that has been
/// referenced in an inbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.group-name</code> - The name of a security group that is
/// referenced in an inbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.ipv6-cidr</code> - An IPv6 CIDR block for an inbound security
/// group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.prefix-list-id</code> - The ID of a prefix list from which a security group rule allows inbound access.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.protocol</code> - The IP protocol for an inbound security
/// group rule (<code>tcp</code> | <code>udp</code> | <code>icmp</code>, a
/// protocol number, or -1 for all protocols).</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.to-port</code> - For an inbound rule, the end of port range
/// for the TCP and UDP protocols, or an ICMP code.</p>
/// </li>
/// <li>
/// <p>
/// <code>ip-permission.user-id</code> - The ID of an Amazon Web Services account that has been
/// referenced in an inbound security group rule.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the owner of the security group.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC specified when the security group was created.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `GroupIds`.
///
/// To override the contents of this collection use [`set_group_ids`](Self::set_group_ids).
///
/// <p>The IDs of the security groups. Required for security groups in a nondefault VPC.</p>
/// <p>Default: Describes all of your security groups.</p>
pub fn group_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_ids(inp);
self
}
/// <p>The IDs of the security groups. Required for security groups in a nondefault VPC.</p>
/// <p>Default: Describes all of your security groups.</p>
pub fn set_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_group_ids(input);
self
}
/// Appends an item to `GroupNames`.
///
/// To override the contents of this collection use [`set_group_names`](Self::set_group_names).
///
/// <p>[EC2-Classic and default VPC only] The names of the security groups. You can specify either
/// the security group name or the security group ID. For security groups in a nondefault VPC, use
/// the <code>group-name</code> filter to describe security groups by name.</p>
/// <p>Default: Describes all of your security groups.</p>
pub fn group_names(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_names(inp);
self
}
/// <p>[EC2-Classic and default VPC only] The names of the security groups. You can specify either
/// the security group name or the security group ID. For security groups in a nondefault VPC, use
/// the <code>group-name</code> filter to describe security groups by name.</p>
/// <p>Default: Describes all of your security groups.</p>
pub fn set_group_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_group_names(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The token to request the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another request with the returned <code>NextToken</code> value. This value
/// can be between 5 and 1000. If this parameter is not specified, then all results are
/// returned.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another request with the returned <code>NextToken</code> value. This value
/// can be between 5 and 1000. If this parameter is not specified, then all results are
/// returned.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeSnapshotAttribute`.
///
/// <p>Describes the specified attribute of the specified snapshot. You can specify only one
/// attribute at a time.</p>
/// <p>For more information about EBS snapshots, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html">Amazon EBS snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeSnapshotAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_snapshot_attribute_input::Builder,
}
impl<C, M, R> DescribeSnapshotAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeSnapshotAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeSnapshotAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSnapshotAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSnapshotAttributeInputOperationOutputAlias,
crate::output::DescribeSnapshotAttributeOutput,
crate::error::DescribeSnapshotAttributeError,
crate::input::DescribeSnapshotAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The snapshot attribute you would like to view.</p>
pub fn attribute(mut self, inp: crate::model::SnapshotAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The snapshot attribute you would like to view.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::SnapshotAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <p>The ID of the EBS snapshot.</p>
pub fn snapshot_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.snapshot_id(inp);
self
}
/// <p>The ID of the EBS snapshot.</p>
pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_snapshot_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeSnapshots`.
///
/// <p>Describes the specified EBS snapshots available to you or all of the EBS snapshots
/// available to you.</p>
/// <p>The snapshots available to you include public snapshots, private snapshots that you own,
/// and private snapshots owned by other Amazon Web Services accounts for which you have explicit create volume
/// permissions.</p>
/// <p>The create volume permissions fall into the following categories:</p>
/// <ul>
/// <li>
/// <p>
/// <i>public</i>: The owner of the snapshot granted create volume
/// permissions for the snapshot to the <code>all</code> group. All Amazon Web Services accounts have create
/// volume permissions for these snapshots.</p>
/// </li>
/// <li>
/// <p>
/// <i>explicit</i>: The owner of the snapshot granted create volume
/// permissions to a specific Amazon Web Services account.</p>
/// </li>
/// <li>
/// <p>
/// <i>implicit</i>: An Amazon Web Services account has implicit create volume permissions
/// for all snapshots it owns.</p>
/// </li>
/// </ul>
/// <p>The list of snapshots returned can be filtered by specifying snapshot IDs, snapshot
/// owners, or Amazon Web Services accounts with create volume permissions. If no options are specified,
/// Amazon EC2 returns all snapshots for which you have create volume permissions.</p>
/// <p>If you specify one or more snapshot IDs, only snapshots that have the specified IDs are
/// returned. If you specify an invalid snapshot ID, an error is returned. If you specify a
/// snapshot ID for which you do not have access, it is not included in the returned
/// results.</p>
/// <p>If you specify one or more snapshot owners using the <code>OwnerIds</code> option, only
/// snapshots from the specified owners and for which you have access are returned. The results
/// can include the Amazon Web Services account IDs of the specified owners, <code>amazon</code> for snapshots
/// owned by Amazon, or <code>self</code> for snapshots that you own.</p>
/// <p>If you specify a list of restorable users, only snapshots with create snapshot permissions
/// for those users are returned. You can specify Amazon Web Services account IDs (if you own the snapshots),
/// <code>self</code> for snapshots for which you own or have explicit permissions, or
/// <code>all</code> for public snapshots.</p>
/// <p>If you are describing a long list of snapshots, we recommend that you paginate the output to make the
/// list more manageable. The <code>MaxResults</code> parameter sets the maximum number of results
/// returned in a single page. If the list of results exceeds your <code>MaxResults</code> value,
/// then that number of results is returned along with a <code>NextToken</code> value that can be
/// passed to a subsequent <code>DescribeSnapshots</code> request to retrieve the remaining
/// results.</p>
/// <p>To get the state of fast snapshot restores for a snapshot, use <a>DescribeFastSnapshotRestores</a>.</p>
/// <p>For more information about EBS snapshots, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html">Amazon EBS snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeSnapshots<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_snapshots_input::Builder,
}
impl<C, M, R> DescribeSnapshots<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeSnapshots`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeSnapshotsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSnapshotsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSnapshotsInputOperationOutputAlias,
crate::output::DescribeSnapshotsOutput,
crate::error::DescribeSnapshotsError,
crate::input::DescribeSnapshotsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>description</code> - A description of the snapshot.</p>
/// </li>
/// <li>
/// <p>
/// <code>encrypted</code> - Indicates whether the snapshot is encrypted
/// (<code>true</code> | <code>false</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-alias</code> - The owner alias, from an Amazon-maintained list
/// (<code>amazon</code>).
/// This is not the user-configured Amazon Web Services account alias set using the IAM console.
/// We recommend that you use the related parameter instead of this filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the owner. We recommend that
/// you use the related parameter instead of this filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>progress</code> - The progress of the snapshot, as a percentage (for example,
/// 80%).</p>
/// </li>
/// <li>
/// <p>
/// <code>snapshot-id</code> - The snapshot ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>start-time</code> - The time stamp when the snapshot was initiated.</p>
/// </li>
/// <li>
/// <p>
/// <code>status</code> - The status of the snapshot (<code>pending</code> |
/// <code>completed</code> | <code>error</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-id</code> - The ID of the volume the snapshot is for.</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-size</code> - The size of the volume, in GiB.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>description</code> - A description of the snapshot.</p>
/// </li>
/// <li>
/// <p>
/// <code>encrypted</code> - Indicates whether the snapshot is encrypted
/// (<code>true</code> | <code>false</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-alias</code> - The owner alias, from an Amazon-maintained list
/// (<code>amazon</code>).
/// This is not the user-configured Amazon Web Services account alias set using the IAM console.
/// We recommend that you use the related parameter instead of this filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The Amazon Web Services account ID of the owner. We recommend that
/// you use the related parameter instead of this filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>progress</code> - The progress of the snapshot, as a percentage (for example,
/// 80%).</p>
/// </li>
/// <li>
/// <p>
/// <code>snapshot-id</code> - The snapshot ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>start-time</code> - The time stamp when the snapshot was initiated.</p>
/// </li>
/// <li>
/// <p>
/// <code>status</code> - The status of the snapshot (<code>pending</code> |
/// <code>completed</code> | <code>error</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-id</code> - The ID of the volume the snapshot is for.</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-size</code> - The size of the volume, in GiB.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of snapshot results returned by <code>DescribeSnapshots</code> in
/// paginated output. When this parameter is used, <code>DescribeSnapshots</code> only returns
/// <code>MaxResults</code> results in a single page along with a <code>NextToken</code>
/// response element. The remaining results of the initial request can be seen by sending another
/// <code>DescribeSnapshots</code> request with the returned <code>NextToken</code> value. This
/// value can be between 5 and 1,000; if <code>MaxResults</code> is given a value larger than 1,000,
/// only 1,000 results are returned. If this parameter is not used, then
/// <code>DescribeSnapshots</code> returns all results. You cannot specify this parameter and
/// the snapshot IDs parameter in the same request.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of snapshot results returned by <code>DescribeSnapshots</code> in
/// paginated output. When this parameter is used, <code>DescribeSnapshots</code> only returns
/// <code>MaxResults</code> results in a single page along with a <code>NextToken</code>
/// response element. The remaining results of the initial request can be seen by sending another
/// <code>DescribeSnapshots</code> request with the returned <code>NextToken</code> value. This
/// value can be between 5 and 1,000; if <code>MaxResults</code> is given a value larger than 1,000,
/// only 1,000 results are returned. If this parameter is not used, then
/// <code>DescribeSnapshots</code> returns all results. You cannot specify this parameter and
/// the snapshot IDs parameter in the same request.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The <code>NextToken</code> value returned from a previous paginated
/// <code>DescribeSnapshots</code> request where <code>MaxResults</code> was used and the
/// results exceeded the value of that parameter. Pagination continues from the end of the
/// previous results that returned the <code>NextToken</code> value. This value is
/// <code>null</code> when there are no more results to return.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The <code>NextToken</code> value returned from a previous paginated
/// <code>DescribeSnapshots</code> request where <code>MaxResults</code> was used and the
/// results exceeded the value of that parameter. Pagination continues from the end of the
/// previous results that returned the <code>NextToken</code> value. This value is
/// <code>null</code> when there are no more results to return.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `OwnerIds`.
///
/// To override the contents of this collection use [`set_owner_ids`](Self::set_owner_ids).
///
/// <p>Scopes the results to snapshots with the specified owners. You can specify a combination of
/// Amazon Web Services account IDs, <code>self</code>, and <code>amazon</code>.</p>
pub fn owner_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.owner_ids(inp);
self
}
/// <p>Scopes the results to snapshots with the specified owners. You can specify a combination of
/// Amazon Web Services account IDs, <code>self</code>, and <code>amazon</code>.</p>
pub fn set_owner_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_owner_ids(input);
self
}
/// Appends an item to `RestorableByUserIds`.
///
/// To override the contents of this collection use [`set_restorable_by_user_ids`](Self::set_restorable_by_user_ids).
///
/// <p>The IDs of the Amazon Web Services accounts that can create volumes from the snapshot.</p>
pub fn restorable_by_user_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.restorable_by_user_ids(inp);
self
}
/// <p>The IDs of the Amazon Web Services accounts that can create volumes from the snapshot.</p>
pub fn set_restorable_by_user_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_restorable_by_user_ids(input);
self
}
/// Appends an item to `SnapshotIds`.
///
/// To override the contents of this collection use [`set_snapshot_ids`](Self::set_snapshot_ids).
///
/// <p>The snapshot IDs.</p>
/// <p>Default: Describes the snapshots for which you have create volume permissions.</p>
pub fn snapshot_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.snapshot_ids(inp);
self
}
/// <p>The snapshot IDs.</p>
/// <p>Default: Describes the snapshots for which you have create volume permissions.</p>
pub fn set_snapshot_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_snapshot_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeSpotDatafeedSubscription`.
///
/// <p>Describes the data feed for Spot Instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html">Spot
/// Instance data feed</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeSpotDatafeedSubscription<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_spot_datafeed_subscription_input::Builder,
}
impl<C, M, R> DescribeSpotDatafeedSubscription<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeSpotDatafeedSubscription`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeSpotDatafeedSubscriptionOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSpotDatafeedSubscriptionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSpotDatafeedSubscriptionInputOperationOutputAlias,
crate::output::DescribeSpotDatafeedSubscriptionOutput,
crate::error::DescribeSpotDatafeedSubscriptionError,
crate::input::DescribeSpotDatafeedSubscriptionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeSpotFleetInstances`.
///
/// <p>Describes the running instances for the specified Spot Fleet.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeSpotFleetInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_spot_fleet_instances_input::Builder,
}
impl<C, M, R> DescribeSpotFleetInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeSpotFleetInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeSpotFleetInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSpotFleetInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSpotFleetInstancesInputOperationOutputAlias,
crate::output::DescribeSpotFleetInstancesOutput,
crate::error::DescribeSpotFleetInstancesError,
crate::input::DescribeSpotFleetInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1
/// and 1000. The default value is 1000. To retrieve the remaining results, make another
/// call with the returned <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1
/// and 1000. The default value is 1000. To retrieve the remaining results, make another
/// call with the returned <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next set of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next set of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The ID of the Spot Fleet request.</p>
pub fn spot_fleet_request_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.spot_fleet_request_id(inp);
self
}
/// <p>The ID of the Spot Fleet request.</p>
pub fn set_spot_fleet_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_spot_fleet_request_id(input);
self
}
}
/// Fluent builder constructing a request to `DescribeSpotFleetRequestHistory`.
///
/// <p>Describes the events for the specified Spot Fleet request during the specified
/// time.</p>
/// <p>Spot Fleet events are delayed by up to 30 seconds before they can be described. This
/// ensures that you can query by the last evaluated time and not miss a recorded event.
/// Spot Fleet events are available for 48 hours.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/fleet-monitor.html">Monitor fleet events using Amazon
/// EventBridge</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeSpotFleetRequestHistory<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_spot_fleet_request_history_input::Builder,
}
impl<C, M, R> DescribeSpotFleetRequestHistory<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeSpotFleetRequestHistory`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeSpotFleetRequestHistoryOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSpotFleetRequestHistoryError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSpotFleetRequestHistoryInputOperationOutputAlias,
crate::output::DescribeSpotFleetRequestHistoryOutput,
crate::error::DescribeSpotFleetRequestHistoryError,
crate::input::DescribeSpotFleetRequestHistoryInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The type of events to describe. By default, all events are described.</p>
pub fn event_type(mut self, inp: crate::model::EventType) -> Self {
self.inner = self.inner.event_type(inp);
self
}
/// <p>The type of events to describe. By default, all events are described.</p>
pub fn set_event_type(
mut self,
input: std::option::Option<crate::model::EventType>,
) -> Self {
self.inner = self.inner.set_event_type(input);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1
/// and 1000. The default value is 1000. To retrieve the remaining results, make another
/// call with the returned <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1
/// and 1000. The default value is 1000. To retrieve the remaining results, make another
/// call with the returned <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next set of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next set of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The ID of the Spot Fleet request.</p>
pub fn spot_fleet_request_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.spot_fleet_request_id(inp);
self
}
/// <p>The ID of the Spot Fleet request.</p>
pub fn set_spot_fleet_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_spot_fleet_request_id(input);
self
}
/// <p>The starting date and time for the events, in UTC format (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
pub fn start_time(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.start_time(inp);
self
}
/// <p>The starting date and time for the events, in UTC format (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
pub fn set_start_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_start_time(input);
self
}
}
/// Fluent builder constructing a request to `DescribeSpotFleetRequests`.
///
/// <p>Describes your Spot Fleet requests.</p>
/// <p>Spot Fleet requests are deleted 48 hours after they are canceled and their instances
/// are terminated.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeSpotFleetRequests<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_spot_fleet_requests_input::Builder,
}
impl<C, M, R> DescribeSpotFleetRequests<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeSpotFleetRequests`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeSpotFleetRequestsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSpotFleetRequestsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSpotFleetRequestsInputOperationOutputAlias,
crate::output::DescribeSpotFleetRequestsOutput,
crate::error::DescribeSpotFleetRequestsError,
crate::input::DescribeSpotFleetRequestsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1
/// and 1000. The default value is 1000. To retrieve the remaining results, make another
/// call with the returned <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1
/// and 1000. The default value is 1000. To retrieve the remaining results, make another
/// call with the returned <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next set of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next set of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `SpotFleetRequestIds`.
///
/// To override the contents of this collection use [`set_spot_fleet_request_ids`](Self::set_spot_fleet_request_ids).
///
/// <p>The IDs of the Spot Fleet requests.</p>
pub fn spot_fleet_request_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.spot_fleet_request_ids(inp);
self
}
/// <p>The IDs of the Spot Fleet requests.</p>
pub fn set_spot_fleet_request_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_spot_fleet_request_ids(input);
self
}
}
/// Fluent builder constructing a request to `DescribeSpotInstanceRequests`.
///
/// <p>Describes the specified Spot Instance requests.</p>
/// <p>You can use <code>DescribeSpotInstanceRequests</code> to find a running Spot Instance by
/// examining the response. If the status of the Spot Instance is <code>fulfilled</code>, the
/// instance ID appears in the response and contains the identifier of the instance.
/// Alternatively, you can use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances">DescribeInstances</a>
/// with a filter to look for instances where the instance lifecycle is
/// <code>spot</code>.</p>
/// <p>We recommend that you set <code>MaxResults</code> to a value between 5 and 1000 to
/// limit the number of results returned. This paginates the output, which makes the list
/// more manageable and returns the results faster. If the list of results exceeds your
/// <code>MaxResults</code> value, then that number of results is returned along with a
/// <code>NextToken</code> value that can be passed to a subsequent
/// <code>DescribeSpotInstanceRequests</code> request to retrieve the remaining
/// results.</p>
/// <p>Spot Instance requests are deleted four hours after they are canceled and their instances are
/// terminated.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeSpotInstanceRequests<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_spot_instance_requests_input::Builder,
}
impl<C, M, R> DescribeSpotInstanceRequests<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeSpotInstanceRequests`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeSpotInstanceRequestsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSpotInstanceRequestsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSpotInstanceRequestsInputOperationOutputAlias,
crate::output::DescribeSpotInstanceRequestsOutput,
crate::error::DescribeSpotInstanceRequestsError,
crate::input::DescribeSpotInstanceRequestsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone-group</code> - The Availability Zone group.</p>
/// </li>
/// <li>
/// <p>
/// <code>create-time</code> - The time stamp when the Spot Instance request was
/// created.</p>
/// </li>
/// <li>
/// <p>
/// <code>fault-code</code> - The fault code related to the request.</p>
/// </li>
/// <li>
/// <p>
/// <code>fault-message</code> - The fault message related to the request.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance that fulfilled the
/// request.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch-group</code> - The Spot Instance launch group.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.block-device-mapping.delete-on-termination</code> - Indicates
/// whether the EBS volume is deleted on instance termination.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.block-device-mapping.device-name</code> - The device name for the
/// volume in the block device mapping (for example, <code>/dev/sdh</code> or
/// <code>xvdh</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.block-device-mapping.snapshot-id</code> - The ID of the snapshot
/// for the EBS volume.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.block-device-mapping.volume-size</code> - The size of the EBS
/// volume, in GiB.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.block-device-mapping.volume-type</code> - The type of EBS volume:
/// <code>gp2</code> for General Purpose SSD, <code>io1</code> or
/// <code>io2</code> for Provisioned IOPS SSD, <code>st1</code> for Throughput
/// Optimized HDD, <code>sc1</code>for Cold HDD, or <code>standard</code> for
/// Magnetic.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.group-id</code> - The ID of the security group for the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.group-name</code> - The name of the security group for the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.image-id</code> - The ID of the AMI.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.instance-type</code> - The type of instance (for example,
/// <code>m3.medium</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.kernel-id</code> - The kernel ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.key-name</code> - The name of the key pair the instance launched
/// with.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.monitoring-enabled</code> - Whether detailed monitoring is
/// enabled for the Spot Instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.ramdisk-id</code> - The RAM disk ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>launched-availability-zone</code> - The Availability Zone in which the
/// request is launched.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.addresses.primary</code> - Indicates whether the IP
/// address is the primary private IP address.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.delete-on-termination</code> - Indicates whether the
/// network interface is deleted when the instance is terminated.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.description</code> - A description of the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.device-index</code> - The index of the device for the
/// network interface attachment on the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.group-id</code> - The ID of the security group
/// associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.network-interface-id</code> - The ID of the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.private-ip-address</code> - The primary private IP
/// address of the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.subnet-id</code> - The ID of the subnet for the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-description</code> - The product description associated with the
/// instance (<code>Linux/UNIX</code> | <code>Windows</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>spot-instance-request-id</code> - The Spot Instance request ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>spot-price</code> - The maximum hourly price for any Spot Instance
/// launched to fulfill the request.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the Spot Instance request (<code>open</code>
/// | <code>active</code> | <code>closed</code> | <code>cancelled</code> |
/// <code>failed</code>). Spot request status information can help you track
/// your Amazon EC2 Spot Instance requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html">Spot
/// request status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
/// </li>
/// <li>
/// <p>
/// <code>status-code</code> - The short code describing the most recent
/// evaluation of your Spot Instance request.</p>
/// </li>
/// <li>
/// <p>
/// <code>status-message</code> - The message explaining the status of the Spot
/// Instance request.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag:<key></code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of Spot Instance request (<code>one-time</code> |
/// <code>persistent</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>valid-from</code> - The start date of the request.</p>
/// </li>
/// <li>
/// <p>
/// <code>valid-until</code> - The end date of the request.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone-group</code> - The Availability Zone group.</p>
/// </li>
/// <li>
/// <p>
/// <code>create-time</code> - The time stamp when the Spot Instance request was
/// created.</p>
/// </li>
/// <li>
/// <p>
/// <code>fault-code</code> - The fault code related to the request.</p>
/// </li>
/// <li>
/// <p>
/// <code>fault-message</code> - The fault message related to the request.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-id</code> - The ID of the instance that fulfilled the
/// request.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch-group</code> - The Spot Instance launch group.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.block-device-mapping.delete-on-termination</code> - Indicates
/// whether the EBS volume is deleted on instance termination.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.block-device-mapping.device-name</code> - The device name for the
/// volume in the block device mapping (for example, <code>/dev/sdh</code> or
/// <code>xvdh</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.block-device-mapping.snapshot-id</code> - The ID of the snapshot
/// for the EBS volume.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.block-device-mapping.volume-size</code> - The size of the EBS
/// volume, in GiB.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.block-device-mapping.volume-type</code> - The type of EBS volume:
/// <code>gp2</code> for General Purpose SSD, <code>io1</code> or
/// <code>io2</code> for Provisioned IOPS SSD, <code>st1</code> for Throughput
/// Optimized HDD, <code>sc1</code>for Cold HDD, or <code>standard</code> for
/// Magnetic.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.group-id</code> - The ID of the security group for the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.group-name</code> - The name of the security group for the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.image-id</code> - The ID of the AMI.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.instance-type</code> - The type of instance (for example,
/// <code>m3.medium</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.kernel-id</code> - The kernel ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.key-name</code> - The name of the key pair the instance launched
/// with.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.monitoring-enabled</code> - Whether detailed monitoring is
/// enabled for the Spot Instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>launch.ramdisk-id</code> - The RAM disk ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>launched-availability-zone</code> - The Availability Zone in which the
/// request is launched.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.addresses.primary</code> - Indicates whether the IP
/// address is the primary private IP address.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.delete-on-termination</code> - Indicates whether the
/// network interface is deleted when the instance is terminated.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.description</code> - A description of the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.device-index</code> - The index of the device for the
/// network interface attachment on the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.group-id</code> - The ID of the security group
/// associated with the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.network-interface-id</code> - The ID of the network
/// interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.private-ip-address</code> - The primary private IP
/// address of the network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface.subnet-id</code> - The ID of the subnet for the
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>product-description</code> - The product description associated with the
/// instance (<code>Linux/UNIX</code> | <code>Windows</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>spot-instance-request-id</code> - The Spot Instance request ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>spot-price</code> - The maximum hourly price for any Spot Instance
/// launched to fulfill the request.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the Spot Instance request (<code>open</code>
/// | <code>active</code> | <code>closed</code> | <code>cancelled</code> |
/// <code>failed</code>). Spot request status information can help you track
/// your Amazon EC2 Spot Instance requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html">Spot
/// request status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
/// </li>
/// <li>
/// <p>
/// <code>status-code</code> - The short code describing the most recent
/// evaluation of your Spot Instance request.</p>
/// </li>
/// <li>
/// <p>
/// <code>status-message</code> - The message explaining the status of the Spot
/// Instance request.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag:<key></code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of Spot Instance request (<code>one-time</code> |
/// <code>persistent</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>valid-from</code> - The start date of the request.</p>
/// </li>
/// <li>
/// <p>
/// <code>valid-until</code> - The end date of the request.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `SpotInstanceRequestIds`.
///
/// To override the contents of this collection use [`set_spot_instance_request_ids`](Self::set_spot_instance_request_ids).
///
/// <p>One or more Spot Instance request IDs.</p>
pub fn spot_instance_request_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.spot_instance_request_ids(inp);
self
}
/// <p>One or more Spot Instance request IDs.</p>
pub fn set_spot_instance_request_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_spot_instance_request_ids(input);
self
}
/// <p>The token to request the next set of results. This value is <code>null</code> when
/// there are no more results to return.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to request the next set of results. This value is <code>null</code> when
/// there are no more results to return.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 5
/// and 1000. To retrieve the remaining results, make another call with the returned
/// <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 5
/// and 1000. To retrieve the remaining results, make another call with the returned
/// <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeSpotPriceHistory`.
///
/// <p>Describes the Spot price history. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html">Spot Instance pricing history</a> in the
/// <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
/// <p>When you specify a start and end time, the operation returns the prices of the
/// instance types within that time range. It also returns the last price change before the
/// start time, which is the effective price as of the start time.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeSpotPriceHistory<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_spot_price_history_input::Builder,
}
impl<C, M, R> DescribeSpotPriceHistory<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeSpotPriceHistory`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeSpotPriceHistoryOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSpotPriceHistoryError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSpotPriceHistoryInputOperationOutputAlias,
crate::output::DescribeSpotPriceHistoryOutput,
crate::error::DescribeSpotPriceHistoryError,
crate::input::DescribeSpotPriceHistoryInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone for which prices should
/// be returned.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The type of instance (for example,
/// <code>m3.medium</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>product-description</code> - The product description for the Spot price
/// (<code>Linux/UNIX</code> | <code>Red Hat Enterprise Linux</code> |
/// <code>SUSE Linux</code> | <code>Windows</code> | <code>Linux/UNIX (Amazon
/// VPC)</code> | <code>Red Hat Enterprise Linux (Amazon VPC)</code> |
/// <code>SUSE Linux (Amazon VPC)</code> | <code>Windows (Amazon
/// VPC)</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>spot-price</code> - The Spot price. The value must match exactly (or use
/// wildcards; greater than or less than comparison is not supported).</p>
/// </li>
/// <li>
/// <p>
/// <code>timestamp</code> - The time stamp of the Spot price history, in UTC format
/// (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).
/// You can use wildcards (* and ?). Greater than or less than comparison is not
/// supported.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone for which prices should
/// be returned.</p>
/// </li>
/// <li>
/// <p>
/// <code>instance-type</code> - The type of instance (for example,
/// <code>m3.medium</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>product-description</code> - The product description for the Spot price
/// (<code>Linux/UNIX</code> | <code>Red Hat Enterprise Linux</code> |
/// <code>SUSE Linux</code> | <code>Windows</code> | <code>Linux/UNIX (Amazon
/// VPC)</code> | <code>Red Hat Enterprise Linux (Amazon VPC)</code> |
/// <code>SUSE Linux (Amazon VPC)</code> | <code>Windows (Amazon
/// VPC)</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>spot-price</code> - The Spot price. The value must match exactly (or use
/// wildcards; greater than or less than comparison is not supported).</p>
/// </li>
/// <li>
/// <p>
/// <code>timestamp</code> - The time stamp of the Spot price history, in UTC format
/// (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).
/// You can use wildcards (* and ?). Greater than or less than comparison is not
/// supported.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>Filters the results by the specified Availability Zone.</p>
pub fn availability_zone(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zone(inp);
self
}
/// <p>Filters the results by the specified Availability Zone.</p>
pub fn set_availability_zone(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_availability_zone(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The date and time, up to the current date, from which to stop retrieving the price
/// history data, in UTC format (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
pub fn end_time(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.end_time(inp);
self
}
/// <p>The date and time, up to the current date, from which to stop retrieving the price
/// history data, in UTC format (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
pub fn set_end_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_end_time(input);
self
}
/// Appends an item to `InstanceTypes`.
///
/// To override the contents of this collection use [`set_instance_types`](Self::set_instance_types).
///
/// <p>Filters the results by the specified instance types.</p>
pub fn instance_types(mut self, inp: impl Into<crate::model::InstanceType>) -> Self {
self.inner = self.inner.instance_types(inp);
self
}
/// <p>Filters the results by the specified instance types.</p>
pub fn set_instance_types(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InstanceType>>,
) -> Self {
self.inner = self.inner.set_instance_types(input);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1
/// and 1000. The default value is 1000. To retrieve the remaining results, make another
/// call with the returned <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. Specify a value between 1
/// and 1000. The default value is 1000. To retrieve the remaining results, make another
/// call with the returned <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next set of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next set of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `ProductDescriptions`.
///
/// To override the contents of this collection use [`set_product_descriptions`](Self::set_product_descriptions).
///
/// <p>Filters the results by the specified basic product descriptions.</p>
pub fn product_descriptions(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.product_descriptions(inp);
self
}
/// <p>Filters the results by the specified basic product descriptions.</p>
pub fn set_product_descriptions(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_product_descriptions(input);
self
}
/// <p>The date and time, up to the past 90 days, from which to start retrieving the price
/// history data, in UTC format (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
pub fn start_time(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.start_time(inp);
self
}
/// <p>The date and time, up to the past 90 days, from which to start retrieving the price
/// history data, in UTC format (for example,
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
pub fn set_start_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_start_time(input);
self
}
}
/// Fluent builder constructing a request to `DescribeStaleSecurityGroups`.
///
/// <p>[VPC only] Describes the stale security group rules for security groups in a specified VPC. Rules are stale when they reference a deleted security group in a peer VPC, or a security group in a peer VPC for which the VPC peering connection has been deleted.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeStaleSecurityGroups<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_stale_security_groups_input::Builder,
}
impl<C, M, R> DescribeStaleSecurityGroups<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeStaleSecurityGroups`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeStaleSecurityGroupsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeStaleSecurityGroupsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeStaleSecurityGroupsInputOperationOutputAlias,
crate::output::DescribeStaleSecurityGroupsOutput,
crate::error::DescribeStaleSecurityGroupsError,
crate::input::DescribeStaleSecurityGroupsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next set of items to return. (You received this token from a prior call.)</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next set of items to return. (You received this token from a prior call.)</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
}
/// Fluent builder constructing a request to `DescribeStoreImageTasks`.
///
/// <p>Describes the progress of the AMI store tasks. You can describe the store tasks for
/// specified AMIs. If you don't specify the AMIs, you get a paginated list of store tasks from
/// the last 31 days.</p>
/// <p>For each AMI task, the response indicates if the task is <code>InProgress</code>,
/// <code>Completed</code>, or <code>Failed</code>. For tasks <code>InProgress</code>, the
/// response shows the estimated progress as a percentage.</p>
/// <p>Tasks are listed in reverse chronological order. Currently, only tasks from the past 31
/// days can be viewed.</p>
/// <p>To use this API, you must have the required permissions. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions">Permissions for storing and restoring AMIs using Amazon S3</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html">Store and restore an AMI using
/// Amazon S3</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeStoreImageTasks<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_store_image_tasks_input::Builder,
}
impl<C, M, R> DescribeStoreImageTasks<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeStoreImageTasks`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeStoreImageTasksOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeStoreImageTasksError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeStoreImageTasksInputOperationOutputAlias,
crate::output::DescribeStoreImageTasksOutput,
crate::error::DescribeStoreImageTasksError,
crate::input::DescribeStoreImageTasksInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `ImageIds`.
///
/// To override the contents of this collection use [`set_image_ids`](Self::set_image_ids).
///
/// <p>The AMI IDs for which to show progress. Up to 20 AMI IDs can be included in a request.</p>
pub fn image_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.image_ids(inp);
self
}
/// <p>The AMI IDs for which to show progress. Up to 20 AMI IDs can be included in a request.</p>
pub fn set_image_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_image_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>task-state</code> - Returns tasks in a certain state (<code>InProgress</code> |
/// <code>Completed</code> | <code>Failed</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>bucket</code> - Returns task information for tasks that targeted a specific
/// bucket. For the filter value, specify the bucket name.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>task-state</code> - Returns tasks in a certain state (<code>InProgress</code> |
/// <code>Completed</code> | <code>Failed</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>bucket</code> - Returns task information for tasks that targeted a specific
/// bucket. For the filter value, specify the bucket name.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value can be
/// between 1 and 200. You cannot specify this parameter and the <code>ImageIDs</code> parameter
/// in the same call.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another call with the returned <code>NextToken</code> value. This value can be
/// between 1 and 200. You cannot specify this parameter and the <code>ImageIDs</code> parameter
/// in the same call.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeSubnets`.
///
/// <p>Describes one or more of your subnets.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html">Your VPC and subnets</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeSubnets<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_subnets_input::Builder,
}
impl<C, M, R> DescribeSubnets<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeSubnets`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeSubnetsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSubnetsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSubnetsInputOperationOutputAlias,
crate::output::DescribeSubnetsOutput,
crate::error::DescribeSubnetsError,
crate::input::DescribeSubnetsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone for the subnet. You can also use
/// <code>availabilityZone</code> as the filter name.</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone-id</code> - The ID of the Availability Zone for the subnet.
/// You can also use <code>availabilityZoneId</code> as the filter name.</p>
/// </li>
/// <li>
/// <p>
/// <code>available-ip-address-count</code> - The number of IPv4 addresses in the
/// subnet that are available.</p>
/// </li>
/// <li>
/// <p>
/// <code>cidr-block</code> - The IPv4 CIDR block of the subnet. The CIDR block you
/// specify must exactly match the subnet's CIDR block for information to be
/// returned for the subnet. You can also use <code>cidr</code> or
/// <code>cidrBlock</code> as the filter names.</p>
/// </li>
/// <li>
/// <p>
/// <code>default-for-az</code> - Indicates whether this is the default subnet for the
/// Availability Zone. You can also use <code>defaultForAz</code> as the filter name.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR
/// block associated with the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.association-id</code> - An association ID
/// for an IPv6 CIDR block associated with the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR
/// block associated with the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the subnet (<code>pending</code> | <code>available</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-arn</code> - The Amazon Resource Name (ARN) of the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC for the subnet.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone for the subnet. You can also use
/// <code>availabilityZone</code> as the filter name.</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone-id</code> - The ID of the Availability Zone for the subnet.
/// You can also use <code>availabilityZoneId</code> as the filter name.</p>
/// </li>
/// <li>
/// <p>
/// <code>available-ip-address-count</code> - The number of IPv4 addresses in the
/// subnet that are available.</p>
/// </li>
/// <li>
/// <p>
/// <code>cidr-block</code> - The IPv4 CIDR block of the subnet. The CIDR block you
/// specify must exactly match the subnet's CIDR block for information to be
/// returned for the subnet. You can also use <code>cidr</code> or
/// <code>cidrBlock</code> as the filter names.</p>
/// </li>
/// <li>
/// <p>
/// <code>default-for-az</code> - Indicates whether this is the default subnet for the
/// Availability Zone. You can also use <code>defaultForAz</code> as the filter name.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR
/// block associated with the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.association-id</code> - An association ID
/// for an IPv6 CIDR block associated with the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR
/// block associated with the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the subnet (<code>pending</code> | <code>available</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-arn</code> - The Amazon Resource Name (ARN) of the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC for the subnet.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `SubnetIds`.
///
/// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
///
/// <p>One or more subnet IDs.</p>
/// <p>Default: Describes all your subnets.</p>
pub fn subnet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_ids(inp);
self
}
/// <p>One or more subnet IDs.</p>
/// <p>Default: Describes all your subnets.</p>
pub fn set_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_subnet_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTags`.
///
/// <p>Describes the specified tags for your EC2 resources.</p>
/// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging Your Resources</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTags<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_tags_input::Builder,
}
impl<C, M, R> DescribeTags<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTags`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTagsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeTagsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTagsInputOperationOutputAlias,
crate::output::DescribeTagsOutput,
crate::error::DescribeTagsError,
crate::input::DescribeTagsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>key</code> - The tag key.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-type</code> - The resource type (<code>customer-gateway</code> | <code>dedicated-host</code> | <code>dhcp-options</code> | <code>elastic-ip</code> | <code>fleet</code> | <code>fpga-image</code> | <code>host-reservation</code> | <code>image</code> | <code>instance</code> | <code>internet-gateway</code> | <code>key-pair</code> | <code>launch-template</code> | <code>natgateway</code> | <code>network-acl</code> | <code>network-interface</code> | <code>placement-group</code> | <code>reserved-instances</code> | <code>route-table</code> | <code>security-group</code> | <code>snapshot</code> | <code>spot-instances-request</code> | <code>subnet</code> | <code>volume</code> | <code>vpc</code> | <code>vpc-endpoint</code> | <code>vpc-endpoint-service</code> | <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of the tag. For example,
/// specify "tag:Owner" for the filter name and "TeamA" for the filter value to find
/// resources with the tag "Owner=TeamA".</p>
/// </li>
/// <li>
/// <p>
/// <code>value</code> - The tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>key</code> - The tag key.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-type</code> - The resource type (<code>customer-gateway</code> | <code>dedicated-host</code> | <code>dhcp-options</code> | <code>elastic-ip</code> | <code>fleet</code> | <code>fpga-image</code> | <code>host-reservation</code> | <code>image</code> | <code>instance</code> | <code>internet-gateway</code> | <code>key-pair</code> | <code>launch-template</code> | <code>natgateway</code> | <code>network-acl</code> | <code>network-interface</code> | <code>placement-group</code> | <code>reserved-instances</code> | <code>route-table</code> | <code>security-group</code> | <code>snapshot</code> | <code>spot-instances-request</code> | <code>subnet</code> | <code>volume</code> | <code>vpc</code> | <code>vpc-endpoint</code> | <code>vpc-endpoint-service</code> | <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of the tag. For example,
/// specify "tag:Owner" for the filter name and "TeamA" for the filter value to find
/// resources with the tag "Owner=TeamA".</p>
/// </li>
/// <li>
/// <p>
/// <code>value</code> - The tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return in a single call.
/// This value can be between 5 and 1000.
/// To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call.
/// This value can be between 5 and 1000.
/// To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTrafficMirrorFilters`.
///
/// <p>Describes one or more Traffic Mirror filters.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTrafficMirrorFilters<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_traffic_mirror_filters_input::Builder,
}
impl<C, M, R> DescribeTrafficMirrorFilters<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTrafficMirrorFilters`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTrafficMirrorFiltersOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeTrafficMirrorFiltersError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTrafficMirrorFiltersInputOperationOutputAlias,
crate::output::DescribeTrafficMirrorFiltersOutput,
crate::error::DescribeTrafficMirrorFiltersError,
crate::input::DescribeTrafficMirrorFiltersInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TrafficMirrorFilterIds`.
///
/// To override the contents of this collection use [`set_traffic_mirror_filter_ids`](Self::set_traffic_mirror_filter_ids).
///
/// <p>The ID of the Traffic Mirror filter.</p>
pub fn traffic_mirror_filter_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_filter_ids(inp);
self
}
/// <p>The ID of the Traffic Mirror filter.</p>
pub fn set_traffic_mirror_filter_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_filter_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>description</code>: The Traffic Mirror filter description.</p>
/// </li>
/// <li>
/// <p>
/// <code>traffic-mirror-filter-id</code>: The ID of the Traffic Mirror filter.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>description</code>: The Traffic Mirror filter description.</p>
/// </li>
/// <li>
/// <p>
/// <code>traffic-mirror-filter-id</code>: The ID of the Traffic Mirror filter.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTrafficMirrorSessions`.
///
/// <p>Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror sessions are described. Alternatively, you can filter the results.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTrafficMirrorSessions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_traffic_mirror_sessions_input::Builder,
}
impl<C, M, R> DescribeTrafficMirrorSessions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTrafficMirrorSessions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTrafficMirrorSessionsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeTrafficMirrorSessionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTrafficMirrorSessionsInputOperationOutputAlias,
crate::output::DescribeTrafficMirrorSessionsOutput,
crate::error::DescribeTrafficMirrorSessionsError,
crate::input::DescribeTrafficMirrorSessionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TrafficMirrorSessionIds`.
///
/// To override the contents of this collection use [`set_traffic_mirror_session_ids`](Self::set_traffic_mirror_session_ids).
///
/// <p>The ID of the Traffic Mirror session.</p>
pub fn traffic_mirror_session_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_session_ids(inp);
self
}
/// <p>The ID of the Traffic Mirror session.</p>
pub fn set_traffic_mirror_session_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_session_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>description</code>: The Traffic Mirror session description.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-id</code>: The ID of the Traffic Mirror session network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code>: The ID of the account that owns the Traffic Mirror session.</p>
/// </li>
/// <li>
/// <p>
/// <code>packet-length</code>: The assigned number of packets to mirror. </p>
/// </li>
/// <li>
/// <p>
/// <code>session-number</code>: The assigned session number. </p>
/// </li>
/// <li>
/// <p>
/// <code>traffic-mirror-filter-id</code>: The ID of the Traffic Mirror filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>traffic-mirror-session-id</code>: The ID of the Traffic Mirror session.</p>
/// </li>
/// <li>
/// <p>
/// <code>traffic-mirror-target-id</code>: The ID of the Traffic Mirror target.</p>
/// </li>
/// <li>
/// <p>
/// <code>virtual-network-id</code>: The virtual network ID of the Traffic Mirror session.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>description</code>: The Traffic Mirror session description.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-id</code>: The ID of the Traffic Mirror session network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code>: The ID of the account that owns the Traffic Mirror session.</p>
/// </li>
/// <li>
/// <p>
/// <code>packet-length</code>: The assigned number of packets to mirror. </p>
/// </li>
/// <li>
/// <p>
/// <code>session-number</code>: The assigned session number. </p>
/// </li>
/// <li>
/// <p>
/// <code>traffic-mirror-filter-id</code>: The ID of the Traffic Mirror filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>traffic-mirror-session-id</code>: The ID of the Traffic Mirror session.</p>
/// </li>
/// <li>
/// <p>
/// <code>traffic-mirror-target-id</code>: The ID of the Traffic Mirror target.</p>
/// </li>
/// <li>
/// <p>
/// <code>virtual-network-id</code>: The virtual network ID of the Traffic Mirror session.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTrafficMirrorTargets`.
///
/// <p>Information about one or more Traffic Mirror targets.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTrafficMirrorTargets<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_traffic_mirror_targets_input::Builder,
}
impl<C, M, R> DescribeTrafficMirrorTargets<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTrafficMirrorTargets`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTrafficMirrorTargetsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeTrafficMirrorTargetsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTrafficMirrorTargetsInputOperationOutputAlias,
crate::output::DescribeTrafficMirrorTargetsOutput,
crate::error::DescribeTrafficMirrorTargetsError,
crate::input::DescribeTrafficMirrorTargetsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TrafficMirrorTargetIds`.
///
/// To override the contents of this collection use [`set_traffic_mirror_target_ids`](Self::set_traffic_mirror_target_ids).
///
/// <p>The ID of the Traffic Mirror targets.</p>
pub fn traffic_mirror_target_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_target_ids(inp);
self
}
/// <p>The ID of the Traffic Mirror targets.</p>
pub fn set_traffic_mirror_target_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_target_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>description</code>: The Traffic Mirror target description.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-id</code>: The ID of the Traffic Mirror session network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-load-balancer-arn</code>: The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the session.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code>: The ID of the account that owns the Traffic Mirror session.</p>
/// </li>
/// <li>
/// <p>
/// <code>traffic-mirror-target-id</code>: The ID of the Traffic Mirror target.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>description</code>: The Traffic Mirror target description.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-interface-id</code>: The ID of the Traffic Mirror session network interface.</p>
/// </li>
/// <li>
/// <p>
/// <code>network-load-balancer-arn</code>: The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the session.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code>: The ID of the account that owns the Traffic Mirror session.</p>
/// </li>
/// <li>
/// <p>
/// <code>traffic-mirror-target-id</code>: The ID of the Traffic Mirror target.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTransitGatewayAttachments`.
///
/// <p>Describes one or more attachments between resources and transit gateways. By default, all attachments are described.
/// Alternatively, you can filter the results by attachment ID, attachment state, resource ID, or resource owner.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTransitGatewayAttachments<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_transit_gateway_attachments_input::Builder,
}
impl<C, M, R> DescribeTransitGatewayAttachments<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTransitGatewayAttachments`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTransitGatewayAttachmentsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeTransitGatewayAttachmentsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTransitGatewayAttachmentsInputOperationOutputAlias,
crate::output::DescribeTransitGatewayAttachmentsOutput,
crate::error::DescribeTransitGatewayAttachmentsError,
crate::input::DescribeTransitGatewayAttachmentsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TransitGatewayAttachmentIds`.
///
/// To override the contents of this collection use [`set_transit_gateway_attachment_ids`](Self::set_transit_gateway_attachment_ids).
///
/// <p>The IDs of the attachments.</p>
pub fn transit_gateway_attachment_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_ids(inp);
self
}
/// <p>The IDs of the attachments.</p>
pub fn set_transit_gateway_attachment_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>association.state</code> - The state of the association (<code>associating</code> | <code>associated</code> |
/// <code>disassociating</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>association.transit-gateway-route-table-id</code> - The ID of the route table for the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-owner-id</code> - The ID of the Amazon Web Services account that owns the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-type</code> - The resource type. Valid values are <code>vpc</code>
/// | <code>vpn</code> | <code>direct-connect-gateway</code> | <code>peering</code>
/// | <code>connect</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the attachment. Valid values are <code>available</code> | <code>deleted</code> | <code>deleting</code> | <code>failed</code> | <code>failing</code> | <code>initiatingRequest</code> | <code>modifying</code> | <code>pendingAcceptance</code> | <code>pending</code> | <code>rollingBack</code> | <code>rejected</code> | <code>rejecting</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-owner-id</code> - The ID of the Amazon Web Services account that owns the transit gateway.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>association.state</code> - The state of the association (<code>associating</code> | <code>associated</code> |
/// <code>disassociating</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>association.transit-gateway-route-table-id</code> - The ID of the route table for the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-owner-id</code> - The ID of the Amazon Web Services account that owns the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-type</code> - The resource type. Valid values are <code>vpc</code>
/// | <code>vpn</code> | <code>direct-connect-gateway</code> | <code>peering</code>
/// | <code>connect</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the attachment. Valid values are <code>available</code> | <code>deleted</code> | <code>deleting</code> | <code>failed</code> | <code>failing</code> | <code>initiatingRequest</code> | <code>modifying</code> | <code>pendingAcceptance</code> | <code>pending</code> | <code>rollingBack</code> | <code>rejected</code> | <code>rejecting</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-owner-id</code> - The ID of the Amazon Web Services account that owns the transit gateway.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTransitGatewayConnectPeers`.
///
/// <p>Describes one or more Connect peers.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTransitGatewayConnectPeers<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_transit_gateway_connect_peers_input::Builder,
}
impl<C, M, R> DescribeTransitGatewayConnectPeers<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTransitGatewayConnectPeers`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTransitGatewayConnectPeersOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeTransitGatewayConnectPeersError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTransitGatewayConnectPeersInputOperationOutputAlias,
crate::output::DescribeTransitGatewayConnectPeersOutput,
crate::error::DescribeTransitGatewayConnectPeersError,
crate::input::DescribeTransitGatewayConnectPeersInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TransitGatewayConnectPeerIds`.
///
/// To override the contents of this collection use [`set_transit_gateway_connect_peer_ids`](Self::set_transit_gateway_connect_peer_ids).
///
/// <p>The IDs of the Connect peers.</p>
pub fn transit_gateway_connect_peer_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_connect_peer_ids(inp);
self
}
/// <p>The IDs of the Connect peers.</p>
pub fn set_transit_gateway_connect_peer_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_transit_gateway_connect_peer_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>state</code> - The state of the Connect peer (<code>pending</code> |
/// <code>available</code> | <code>deleting</code> |
/// <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-connect-peer-id</code> - The ID of the Connect peer.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>state</code> - The state of the Connect peer (<code>pending</code> |
/// <code>available</code> | <code>deleting</code> |
/// <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-connect-peer-id</code> - The ID of the Connect peer.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTransitGatewayConnects`.
///
/// <p>Describes one or more Connect attachments.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTransitGatewayConnects<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_transit_gateway_connects_input::Builder,
}
impl<C, M, R> DescribeTransitGatewayConnects<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTransitGatewayConnects`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTransitGatewayConnectsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeTransitGatewayConnectsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTransitGatewayConnectsInputOperationOutputAlias,
crate::output::DescribeTransitGatewayConnectsOutput,
crate::error::DescribeTransitGatewayConnectsError,
crate::input::DescribeTransitGatewayConnectsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TransitGatewayAttachmentIds`.
///
/// To override the contents of this collection use [`set_transit_gateway_attachment_ids`](Self::set_transit_gateway_attachment_ids).
///
/// <p>The IDs of the attachments.</p>
pub fn transit_gateway_attachment_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_ids(inp);
self
}
/// <p>The IDs of the attachments.</p>
pub fn set_transit_gateway_attachment_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>options.protocol</code> - The tunnel protocol (<code>gre</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the attachment (<code>initiating</code> |
/// <code>initiatingRequest</code> | <code>pendingAcceptance</code> |
/// <code>rollingBack</code> | <code>pending</code> | <code>available</code> |
/// <code>modifying</code> | <code>deleting</code> | <code>deleted</code> |
/// <code>failed</code> | <code>rejected</code> | <code>rejecting</code> |
/// <code>failing</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the
/// Connect attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>transport-transit-gateway-attachment-id</code> - The ID of the transit gateway attachment from which the Connect attachment was created.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>options.protocol</code> - The tunnel protocol (<code>gre</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the attachment (<code>initiating</code> |
/// <code>initiatingRequest</code> | <code>pendingAcceptance</code> |
/// <code>rollingBack</code> | <code>pending</code> | <code>available</code> |
/// <code>modifying</code> | <code>deleting</code> | <code>deleted</code> |
/// <code>failed</code> | <code>rejected</code> | <code>rejecting</code> |
/// <code>failing</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the
/// Connect attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>transport-transit-gateway-attachment-id</code> - The ID of the transit gateway attachment from which the Connect attachment was created.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTransitGatewayMulticastDomains`.
///
/// <p>Describes one or more transit gateway multicast domains.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTransitGatewayMulticastDomains<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_transit_gateway_multicast_domains_input::Builder,
}
impl<C, M, R> DescribeTransitGatewayMulticastDomains<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTransitGatewayMulticastDomains`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTransitGatewayMulticastDomainsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeTransitGatewayMulticastDomainsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTransitGatewayMulticastDomainsInputOperationOutputAlias,
crate::output::DescribeTransitGatewayMulticastDomainsOutput,
crate::error::DescribeTransitGatewayMulticastDomainsError,
crate::input::DescribeTransitGatewayMulticastDomainsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TransitGatewayMulticastDomainIds`.
///
/// To override the contents of this collection use [`set_transit_gateway_multicast_domain_ids`](Self::set_transit_gateway_multicast_domain_ids).
///
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn transit_gateway_multicast_domain_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_multicast_domain_ids(inp);
self
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn set_transit_gateway_multicast_domain_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_transit_gateway_multicast_domain_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>state</code> - The state of the transit gateway multicast domain. Valid values are <code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-multicast-domain-id</code> - The ID of the transit gateway multicast domain.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>state</code> - The state of the transit gateway multicast domain. Valid values are <code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-multicast-domain-id</code> - The ID of the transit gateway multicast domain.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTransitGatewayPeeringAttachments`.
///
/// <p>Describes your transit gateway peering attachments.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTransitGatewayPeeringAttachments<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_transit_gateway_peering_attachments_input::Builder,
}
impl<C, M, R> DescribeTransitGatewayPeeringAttachments<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTransitGatewayPeeringAttachments`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTransitGatewayPeeringAttachmentsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeTransitGatewayPeeringAttachmentsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTransitGatewayPeeringAttachmentsInputOperationOutputAlias,
crate::output::DescribeTransitGatewayPeeringAttachmentsOutput,
crate::error::DescribeTransitGatewayPeeringAttachmentsError,
crate::input::DescribeTransitGatewayPeeringAttachmentsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TransitGatewayAttachmentIds`.
///
/// To override the contents of this collection use [`set_transit_gateway_attachment_ids`](Self::set_transit_gateway_attachment_ids).
///
/// <p>One or more IDs of the transit gateway peering attachments.</p>
pub fn transit_gateway_attachment_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_ids(inp);
self
}
/// <p>One or more IDs of the transit gateway peering attachments.</p>
pub fn set_transit_gateway_attachment_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the transit gateway attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-owner-id</code> - The ID of your Amazon Web Services account.</p>
/// </li>
/// <li>
/// <p>
/// <code>remote-owner-id</code> - The ID of the Amazon Web Services account in the remote Region that owns the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the peering attachment. Valid values are <code>available</code> | <code>deleted</code> | <code>deleting</code> | <code>failed</code> | <code>failing</code> | <code>initiatingRequest</code> | <code>modifying</code> | <code>pendingAcceptance</code> | <code>pending</code> | <code>rollingBack</code> | <code>rejected</code> | <code>rejecting</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the transit gateway attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>local-owner-id</code> - The ID of your Amazon Web Services account.</p>
/// </li>
/// <li>
/// <p>
/// <code>remote-owner-id</code> - The ID of the Amazon Web Services account in the remote Region that owns the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the peering attachment. Valid values are <code>available</code> | <code>deleted</code> | <code>deleting</code> | <code>failed</code> | <code>failing</code> | <code>initiatingRequest</code> | <code>modifying</code> | <code>pendingAcceptance</code> | <code>pending</code> | <code>rollingBack</code> | <code>rejected</code> | <code>rejecting</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTransitGatewayRouteTables`.
///
/// <p>Describes one or more transit gateway route tables. By default, all transit gateway route tables are described.
/// Alternatively, you can filter the results.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTransitGatewayRouteTables<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_transit_gateway_route_tables_input::Builder,
}
impl<C, M, R> DescribeTransitGatewayRouteTables<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTransitGatewayRouteTables`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTransitGatewayRouteTablesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeTransitGatewayRouteTablesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTransitGatewayRouteTablesInputOperationOutputAlias,
crate::output::DescribeTransitGatewayRouteTablesOutput,
crate::error::DescribeTransitGatewayRouteTablesError,
crate::input::DescribeTransitGatewayRouteTablesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TransitGatewayRouteTableIds`.
///
/// To override the contents of this collection use [`set_transit_gateway_route_table_ids`](Self::set_transit_gateway_route_table_ids).
///
/// <p>The IDs of the transit gateway route tables.</p>
pub fn transit_gateway_route_table_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_ids(inp);
self
}
/// <p>The IDs of the transit gateway route tables.</p>
pub fn set_transit_gateway_route_table_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>default-association-route-table</code> - Indicates whether this is the default
/// association route table for the transit gateway (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>default-propagation-route-table</code> - Indicates whether this is the default
/// propagation route table for the transit gateway (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the route table (<code>available</code> | <code>deleting</code> | <code>deleted</code> | <code>pending</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-route-table-id</code> - The ID of the transit gateway route table.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>default-association-route-table</code> - Indicates whether this is the default
/// association route table for the transit gateway (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>default-propagation-route-table</code> - Indicates whether this is the default
/// propagation route table for the transit gateway (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the route table (<code>available</code> | <code>deleting</code> | <code>deleted</code> | <code>pending</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-route-table-id</code> - The ID of the transit gateway route table.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTransitGateways`.
///
/// <p>Describes one or more transit gateways. By default, all transit gateways are described. Alternatively, you can
/// filter the results.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTransitGateways<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_transit_gateways_input::Builder,
}
impl<C, M, R> DescribeTransitGateways<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTransitGateways`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTransitGatewaysOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeTransitGatewaysError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTransitGatewaysInputOperationOutputAlias,
crate::output::DescribeTransitGatewaysOutput,
crate::error::DescribeTransitGatewaysError,
crate::input::DescribeTransitGatewaysInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TransitGatewayIds`.
///
/// To override the contents of this collection use [`set_transit_gateway_ids`](Self::set_transit_gateway_ids).
///
/// <p>The IDs of the transit gateways.</p>
pub fn transit_gateway_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.transit_gateway_ids(inp);
self
}
/// <p>The IDs of the transit gateways.</p>
pub fn set_transit_gateway_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_transit_gateway_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>options.propagation-default-route-table-id</code> - The ID of the default propagation route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>options.amazon-side-asn</code> - The private ASN for the Amazon side of a BGP session.</p>
/// </li>
/// <li>
/// <p>
/// <code>options.association-default-route-table-id</code> - The ID of the default association route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>options.auto-accept-shared-attachments</code> - Indicates whether there is automatic acceptance of attachment requests (<code>enable</code> | <code>disable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>options.default-route-table-association</code> - Indicates whether resource attachments are automatically
/// associated with the default association route table (<code>enable</code> | <code>disable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>options.default-route-table-propagation</code> - Indicates whether resource attachments automatically propagate
/// routes to the default propagation route table (<code>enable</code> | <code>disable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>options.dns-support</code> - Indicates whether DNS support is enabled (<code>enable</code> | <code>disable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>options.vpn-ecmp-support</code> - Indicates whether Equal Cost Multipath Protocol support is enabled (<code>enable</code> | <code>disable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the transit gateway (<code>available</code> | <code>deleted</code> | <code>deleting</code> | <code>modifying</code> | <code>pending</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>options.propagation-default-route-table-id</code> - The ID of the default propagation route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>options.amazon-side-asn</code> - The private ASN for the Amazon side of a BGP session.</p>
/// </li>
/// <li>
/// <p>
/// <code>options.association-default-route-table-id</code> - The ID of the default association route table.</p>
/// </li>
/// <li>
/// <p>
/// <code>options.auto-accept-shared-attachments</code> - Indicates whether there is automatic acceptance of attachment requests (<code>enable</code> | <code>disable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>options.default-route-table-association</code> - Indicates whether resource attachments are automatically
/// associated with the default association route table (<code>enable</code> | <code>disable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>options.default-route-table-propagation</code> - Indicates whether resource attachments automatically propagate
/// routes to the default propagation route table (<code>enable</code> | <code>disable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>options.dns-support</code> - Indicates whether DNS support is enabled (<code>enable</code> | <code>disable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>options.vpn-ecmp-support</code> - Indicates whether Equal Cost Multipath Protocol support is enabled (<code>enable</code> | <code>disable</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the transit gateway (<code>available</code> | <code>deleted</code> | <code>deleting</code> | <code>modifying</code> | <code>pending</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTransitGatewayVpcAttachments`.
///
/// <p>Describes one or more VPC attachments. By default, all VPC attachments are described.
/// Alternatively, you can filter the results.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTransitGatewayVpcAttachments<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_transit_gateway_vpc_attachments_input::Builder,
}
impl<C, M, R> DescribeTransitGatewayVpcAttachments<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTransitGatewayVpcAttachments`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTransitGatewayVpcAttachmentsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeTransitGatewayVpcAttachmentsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTransitGatewayVpcAttachmentsInputOperationOutputAlias,
crate::output::DescribeTransitGatewayVpcAttachmentsOutput,
crate::error::DescribeTransitGatewayVpcAttachmentsError,
crate::input::DescribeTransitGatewayVpcAttachmentsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `TransitGatewayAttachmentIds`.
///
/// To override the contents of this collection use [`set_transit_gateway_attachment_ids`](Self::set_transit_gateway_attachment_ids).
///
/// <p>The IDs of the attachments.</p>
pub fn transit_gateway_attachment_ids(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_ids(inp);
self
}
/// <p>The IDs of the attachments.</p>
pub fn set_transit_gateway_attachment_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>state</code> - The state of the attachment. Valid values are <code>available</code> | <code>deleted</code> | <code>deleting</code> | <code>failed</code> | <code>failing</code> | <code>initiatingRequest</code> | <code>modifying</code> | <code>pendingAcceptance</code> | <code>pending</code> | <code>rollingBack</code> | <code>rejected</code> | <code>rejecting</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>state</code> - The state of the attachment. Valid values are <code>available</code> | <code>deleted</code> | <code>deleting</code> | <code>failed</code> | <code>failing</code> | <code>initiatingRequest</code> | <code>modifying</code> | <code>pendingAcceptance</code> | <code>pending</code> | <code>rollingBack</code> | <code>rejected</code> | <code>rejecting</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of the transit gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeTrunkInterfaceAssociations`.
///
/// <note>
/// <p>This API action is currently in <b>limited preview only</b>.
/// If you are interested in using this feature, contact your account manager.</p>
/// </note>
/// <p>Describes one or more network interface trunk associations.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeTrunkInterfaceAssociations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_trunk_interface_associations_input::Builder,
}
impl<C, M, R> DescribeTrunkInterfaceAssociations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeTrunkInterfaceAssociations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeTrunkInterfaceAssociationsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeTrunkInterfaceAssociationsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeTrunkInterfaceAssociationsInputOperationOutputAlias,
crate::output::DescribeTrunkInterfaceAssociationsOutput,
crate::error::DescribeTrunkInterfaceAssociationsError,
crate::input::DescribeTrunkInterfaceAssociationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `AssociationIds`.
///
/// To override the contents of this collection use [`set_association_ids`](Self::set_association_ids).
///
/// <p>The IDs of the associations.</p>
pub fn association_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_ids(inp);
self
}
/// <p>The IDs of the associations.</p>
pub fn set_association_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_association_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>gre-key</code> - The ID of a trunk interface association.</p>
/// </li>
/// <li>
/// <p>
/// <code>interface-protocol</code> - The interface protocol. Valid values are <code>VLAN</code> and <code>GRE</code>.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>gre-key</code> - The ID of a trunk interface association.</p>
/// </li>
/// <li>
/// <p>
/// <code>interface-protocol</code> - The interface protocol. Valid values are <code>VLAN</code> and <code>GRE</code>.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVolumeAttribute`.
///
/// <p>Describes the specified attribute of the specified volume. You can specify only one
/// attribute at a time.</p>
/// <p>For more information about EBS volumes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html">Amazon EBS volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVolumeAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_volume_attribute_input::Builder,
}
impl<C, M, R> DescribeVolumeAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVolumeAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVolumeAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVolumeAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVolumeAttributeInputOperationOutputAlias,
crate::output::DescribeVolumeAttributeOutput,
crate::error::DescribeVolumeAttributeError,
crate::input::DescribeVolumeAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The attribute of the volume. This parameter is required.</p>
pub fn attribute(mut self, inp: crate::model::VolumeAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The attribute of the volume. This parameter is required.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::VolumeAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <p>The ID of the volume.</p>
pub fn volume_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.volume_id(inp);
self
}
/// <p>The ID of the volume.</p>
pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_volume_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVolumes`.
///
/// <p>Describes the specified EBS volumes or all of your EBS volumes.</p>
/// <p>If you are describing a long list of volumes, we recommend that you paginate the output to make the list
/// more manageable. The <code>MaxResults</code> parameter sets the maximum number of results
/// returned in a single page. If the list of results exceeds your <code>MaxResults</code> value,
/// then that number of results is returned along with a <code>NextToken</code> value that can be
/// passed to a subsequent <code>DescribeVolumes</code> request to retrieve the remaining
/// results.</p>
/// <p>For more information about EBS volumes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html">Amazon EBS volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVolumes<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_volumes_input::Builder,
}
impl<C, M, R> DescribeVolumes<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVolumes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVolumesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVolumesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVolumesInputOperationOutputAlias,
crate::output::DescribeVolumesOutput,
crate::error::DescribeVolumesError,
crate::input::DescribeVolumesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>attachment.attach-time</code> - The time stamp when the attachment
/// initiated.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.delete-on-termination</code> - Whether the volume is deleted on
/// instance termination.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.device</code> - The device name specified in the block device mapping
/// (for example, <code>/dev/sda1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.instance-id</code> - The ID of the instance the volume is attached
/// to.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.status</code> - The attachment state (<code>attaching</code> |
/// <code>attached</code> | <code>detaching</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone in which the volume was
/// created.</p>
/// </li>
/// <li>
/// <p>
/// <code>create-time</code> - The time stamp when the volume was created.</p>
/// </li>
/// <li>
/// <p>
/// <code>encrypted</code> - Indicates whether the volume is encrypted (<code>true</code>
/// | <code>false</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>multi-attach-enabled</code> - Indicates whether the volume is enabled for Multi-Attach (<code>true</code>
/// | <code>false</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>fast-restored</code> - Indicates whether the volume was created from a
/// snapshot that is enabled for fast snapshot restore (<code>true</code> |
/// <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>size</code> - The size of the volume, in GiB.</p>
/// </li>
/// <li>
/// <p>
/// <code>snapshot-id</code> - The snapshot from which the volume was created.</p>
/// </li>
/// <li>
/// <p>
/// <code>status</code> - The state of the volume (<code>creating</code> |
/// <code>available</code> | <code>in-use</code> | <code>deleting</code> |
/// <code>deleted</code> | <code>error</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-id</code> - The volume ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-type</code> - The Amazon EBS volume type (<code>gp2</code> | <code>gp3</code> | <code>io1</code> | <code>io2</code> |
/// <code>st1</code> | <code>sc1</code>| <code>standard</code>)</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>attachment.attach-time</code> - The time stamp when the attachment
/// initiated.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.delete-on-termination</code> - Whether the volume is deleted on
/// instance termination.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.device</code> - The device name specified in the block device mapping
/// (for example, <code>/dev/sda1</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.instance-id</code> - The ID of the instance the volume is attached
/// to.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.status</code> - The attachment state (<code>attaching</code> |
/// <code>attached</code> | <code>detaching</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone in which the volume was
/// created.</p>
/// </li>
/// <li>
/// <p>
/// <code>create-time</code> - The time stamp when the volume was created.</p>
/// </li>
/// <li>
/// <p>
/// <code>encrypted</code> - Indicates whether the volume is encrypted (<code>true</code>
/// | <code>false</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>multi-attach-enabled</code> - Indicates whether the volume is enabled for Multi-Attach (<code>true</code>
/// | <code>false</code>)</p>
/// </li>
/// <li>
/// <p>
/// <code>fast-restored</code> - Indicates whether the volume was created from a
/// snapshot that is enabled for fast snapshot restore (<code>true</code> |
/// <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>size</code> - The size of the volume, in GiB.</p>
/// </li>
/// <li>
/// <p>
/// <code>snapshot-id</code> - The snapshot from which the volume was created.</p>
/// </li>
/// <li>
/// <p>
/// <code>status</code> - The state of the volume (<code>creating</code> |
/// <code>available</code> | <code>in-use</code> | <code>deleting</code> |
/// <code>deleted</code> | <code>error</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-id</code> - The volume ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-type</code> - The Amazon EBS volume type (<code>gp2</code> | <code>gp3</code> | <code>io1</code> | <code>io2</code> |
/// <code>st1</code> | <code>sc1</code>| <code>standard</code>)</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `VolumeIds`.
///
/// To override the contents of this collection use [`set_volume_ids`](Self::set_volume_ids).
///
/// <p>The volume IDs.</p>
pub fn volume_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.volume_ids(inp);
self
}
/// <p>The volume IDs.</p>
pub fn set_volume_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_volume_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The maximum number of volume results returned by <code>DescribeVolumes</code> in paginated
/// output. When this parameter is used, <code>DescribeVolumes</code> only returns
/// <code>MaxResults</code> results in a single page along with a <code>NextToken</code>
/// response element. The remaining results of the initial request can be seen by sending another
/// <code>DescribeVolumes</code> request with the returned <code>NextToken</code> value. This
/// value can be between 5 and 500; if <code>MaxResults</code> is given a value larger than 500,
/// only 500 results are returned. If this parameter is not used, then
/// <code>DescribeVolumes</code> returns all results. You cannot specify this parameter and the
/// volume IDs parameter in the same request.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of volume results returned by <code>DescribeVolumes</code> in paginated
/// output. When this parameter is used, <code>DescribeVolumes</code> only returns
/// <code>MaxResults</code> results in a single page along with a <code>NextToken</code>
/// response element. The remaining results of the initial request can be seen by sending another
/// <code>DescribeVolumes</code> request with the returned <code>NextToken</code> value. This
/// value can be between 5 and 500; if <code>MaxResults</code> is given a value larger than 500,
/// only 500 results are returned. If this parameter is not used, then
/// <code>DescribeVolumes</code> returns all results. You cannot specify this parameter and the
/// volume IDs parameter in the same request.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The <code>NextToken</code> value returned from a previous paginated
/// <code>DescribeVolumes</code> request where <code>MaxResults</code> was used and the results
/// exceeded the value of that parameter. Pagination continues from the end of the previous
/// results that returned the <code>NextToken</code> value. This value is <code>null</code> when
/// there are no more results to return.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The <code>NextToken</code> value returned from a previous paginated
/// <code>DescribeVolumes</code> request where <code>MaxResults</code> was used and the results
/// exceeded the value of that parameter. Pagination continues from the end of the previous
/// results that returned the <code>NextToken</code> value. This value is <code>null</code> when
/// there are no more results to return.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVolumesModifications`.
///
/// <p>Describes the most recent volume modification request for the specified EBS volumes.</p>
/// <p>If a volume has never been modified, some information in the output will be null.
/// If a volume has been modified more than once, the output includes only the most
/// recent modification request.</p>
/// <p>You can also use CloudWatch Events to check the status of a modification to an EBS
/// volume. For information about CloudWatch Events, see the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/">Amazon CloudWatch Events User Guide</a>. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-modifications.html">Monitor the progress of volume modifications</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVolumesModifications<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_volumes_modifications_input::Builder,
}
impl<C, M, R> DescribeVolumesModifications<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVolumesModifications`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVolumesModificationsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVolumesModificationsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVolumesModificationsInputOperationOutputAlias,
crate::output::DescribeVolumesModificationsOutput,
crate::error::DescribeVolumesModificationsError,
crate::input::DescribeVolumesModificationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `VolumeIds`.
///
/// To override the contents of this collection use [`set_volume_ids`](Self::set_volume_ids).
///
/// <p>The IDs of the volumes.</p>
pub fn volume_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.volume_ids(inp);
self
}
/// <p>The IDs of the volumes.</p>
pub fn set_volume_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_volume_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>modification-state</code> - The current modification state (modifying |
/// optimizing | completed | failed).</p>
/// </li>
/// <li>
/// <p>
/// <code>original-iops</code> - The original IOPS rate of the volume.</p>
/// </li>
/// <li>
/// <p>
/// <code>original-size</code> - The original size of the volume, in GiB.</p>
/// </li>
/// <li>
/// <p>
/// <code>original-volume-type</code> - The original volume type of the volume (standard |
/// io1 | io2 | gp2 | sc1 | st1).</p>
/// </li>
/// <li>
/// <p>
/// <code>originalMultiAttachEnabled</code> - Indicates whether Multi-Attach support was enabled (true | false).</p>
/// </li>
/// <li>
/// <p>
/// <code>start-time</code> - The modification start time.</p>
/// </li>
/// <li>
/// <p>
/// <code>target-iops</code> - The target IOPS rate of the volume.</p>
/// </li>
/// <li>
/// <p>
/// <code>target-size</code> - The target size of the volume, in GiB.</p>
/// </li>
/// <li>
/// <p>
/// <code>target-volume-type</code> - The target volume type of the volume (standard |
/// io1 | io2 | gp2 | sc1 | st1).</p>
/// </li>
/// <li>
/// <p>
/// <code>targetMultiAttachEnabled</code> - Indicates whether Multi-Attach support is to be enabled (true | false).</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-id</code> - The ID of the volume.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>modification-state</code> - The current modification state (modifying |
/// optimizing | completed | failed).</p>
/// </li>
/// <li>
/// <p>
/// <code>original-iops</code> - The original IOPS rate of the volume.</p>
/// </li>
/// <li>
/// <p>
/// <code>original-size</code> - The original size of the volume, in GiB.</p>
/// </li>
/// <li>
/// <p>
/// <code>original-volume-type</code> - The original volume type of the volume (standard |
/// io1 | io2 | gp2 | sc1 | st1).</p>
/// </li>
/// <li>
/// <p>
/// <code>originalMultiAttachEnabled</code> - Indicates whether Multi-Attach support was enabled (true | false).</p>
/// </li>
/// <li>
/// <p>
/// <code>start-time</code> - The modification start time.</p>
/// </li>
/// <li>
/// <p>
/// <code>target-iops</code> - The target IOPS rate of the volume.</p>
/// </li>
/// <li>
/// <p>
/// <code>target-size</code> - The target size of the volume, in GiB.</p>
/// </li>
/// <li>
/// <p>
/// <code>target-volume-type</code> - The target volume type of the volume (standard |
/// io1 | io2 | gp2 | sc1 | st1).</p>
/// </li>
/// <li>
/// <p>
/// <code>targetMultiAttachEnabled</code> - Indicates whether Multi-Attach support is to be enabled (true | false).</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-id</code> - The ID of the volume.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The <code>nextToken</code> value returned by a previous paginated request.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The <code>nextToken</code> value returned by a previous paginated request.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results (up to a limit of 500) to be returned in a paginated
/// request.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results (up to a limit of 500) to be returned in a paginated
/// request.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVolumeStatus`.
///
/// <p>Describes the status of the specified volumes. Volume status provides the result of the
/// checks performed on your volumes to determine events that can impair the performance of your
/// volumes. The performance of a volume can be affected if an issue occurs on the volume's
/// underlying host. If the volume's underlying host experiences a power outage or system issue,
/// after the system is restored, there could be data inconsistencies on the volume. Volume events
/// notify you if this occurs. Volume actions notify you if any action needs to be taken in
/// response to the event.</p>
/// <p>The <code>DescribeVolumeStatus</code> operation provides the following information about
/// the specified volumes:</p>
/// <p>
/// <i>Status</i>: Reflects the current status of the volume. The possible
/// values are <code>ok</code>, <code>impaired</code> , <code>warning</code>, or
/// <code>insufficient-data</code>. If all checks pass, the overall status of the volume is
/// <code>ok</code>. If the check fails, the overall status is <code>impaired</code>. If the
/// status is <code>insufficient-data</code>, then the checks might still be taking place on your
/// volume at the time. We recommend that you retry the request. For more information about volume
/// status, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html">Monitor the status of your volumes</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>
/// <i>Events</i>: Reflect the cause of a volume status and might require you to
/// take action. For example, if your volume returns an <code>impaired</code> status, then the
/// volume event might be <code>potential-data-inconsistency</code>. This means that your volume
/// has been affected by an issue with the underlying host, has all I/O operations disabled, and
/// might have inconsistent data.</p>
/// <p>
/// <i>Actions</i>: Reflect the actions you might have to take in response to an
/// event. For example, if the status of the volume is <code>impaired</code> and the volume event
/// shows <code>potential-data-inconsistency</code>, then the action shows
/// <code>enable-volume-io</code>. This means that you may want to enable the I/O operations for
/// the volume by calling the <a>EnableVolumeIO</a> action and then check the volume
/// for data consistency.</p>
/// <p>Volume status is based on the volume status checks, and does not reflect the volume state.
/// Therefore, volume status does not indicate volumes in the <code>error</code> state (for
/// example, when a volume is incapable of accepting I/O.)</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVolumeStatus<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_volume_status_input::Builder,
}
impl<C, M, R> DescribeVolumeStatus<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVolumeStatus`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVolumeStatusOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVolumeStatusError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVolumeStatusInputOperationOutputAlias,
crate::output::DescribeVolumeStatusOutput,
crate::error::DescribeVolumeStatusError,
crate::input::DescribeVolumeStatusInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>action.code</code> - The action code for the event (for example,
/// <code>enable-volume-io</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>action.description</code> - A description of the action.</p>
/// </li>
/// <li>
/// <p>
/// <code>action.event-id</code> - The event ID associated with the action.</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.description</code> - A description of the event.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.event-id</code> - The event ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.event-type</code> - The event type (for <code>io-enabled</code>:
/// <code>passed</code> | <code>failed</code>; for <code>io-performance</code>:
/// <code>io-performance:degraded</code> | <code>io-performance:severely-degraded</code> |
/// <code>io-performance:stalled</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>event.not-after</code> - The latest end time for the event.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.not-before</code> - The earliest start time for the event.</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-status.details-name</code> - The cause for
/// <code>volume-status.status</code> (<code>io-enabled</code> |
/// <code>io-performance</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-status.details-status</code> - The status of
/// <code>volume-status.details-name</code> (for <code>io-enabled</code>:
/// <code>passed</code> | <code>failed</code>; for <code>io-performance</code>:
/// <code>normal</code> | <code>degraded</code> | <code>severely-degraded</code> |
/// <code>stalled</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-status.status</code> - The status of the volume (<code>ok</code> |
/// <code>impaired</code> | <code>warning</code> | <code>insufficient-data</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>action.code</code> - The action code for the event (for example,
/// <code>enable-volume-io</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>action.description</code> - A description of the action.</p>
/// </li>
/// <li>
/// <p>
/// <code>action.event-id</code> - The event ID associated with the action.</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone of the instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.description</code> - A description of the event.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.event-id</code> - The event ID.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.event-type</code> - The event type (for <code>io-enabled</code>:
/// <code>passed</code> | <code>failed</code>; for <code>io-performance</code>:
/// <code>io-performance:degraded</code> | <code>io-performance:severely-degraded</code> |
/// <code>io-performance:stalled</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>event.not-after</code> - The latest end time for the event.</p>
/// </li>
/// <li>
/// <p>
/// <code>event.not-before</code> - The earliest start time for the event.</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-status.details-name</code> - The cause for
/// <code>volume-status.status</code> (<code>io-enabled</code> |
/// <code>io-performance</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-status.details-status</code> - The status of
/// <code>volume-status.details-name</code> (for <code>io-enabled</code>:
/// <code>passed</code> | <code>failed</code>; for <code>io-performance</code>:
/// <code>normal</code> | <code>degraded</code> | <code>severely-degraded</code> |
/// <code>stalled</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>volume-status.status</code> - The status of the volume (<code>ok</code> |
/// <code>impaired</code> | <code>warning</code> | <code>insufficient-data</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of volume results returned by <code>DescribeVolumeStatus</code> in
/// paginated output. When this parameter is used, the request only returns
/// <code>MaxResults</code> results in a single page along with a <code>NextToken</code>
/// response element. The remaining results of the initial request can be seen by sending another
/// request with the returned <code>NextToken</code> value. This value can be between 5 and 1,000;
/// if <code>MaxResults</code> is given a value larger than 1,000, only 1,000 results are returned.
/// If this parameter is not used, then <code>DescribeVolumeStatus</code> returns all results. You
/// cannot specify this parameter and the volume IDs parameter in the same request.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of volume results returned by <code>DescribeVolumeStatus</code> in
/// paginated output. When this parameter is used, the request only returns
/// <code>MaxResults</code> results in a single page along with a <code>NextToken</code>
/// response element. The remaining results of the initial request can be seen by sending another
/// request with the returned <code>NextToken</code> value. This value can be between 5 and 1,000;
/// if <code>MaxResults</code> is given a value larger than 1,000, only 1,000 results are returned.
/// If this parameter is not used, then <code>DescribeVolumeStatus</code> returns all results. You
/// cannot specify this parameter and the volume IDs parameter in the same request.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The <code>NextToken</code> value to include in a future <code>DescribeVolumeStatus</code>
/// request. When the results of the request exceed <code>MaxResults</code>, this value can be
/// used to retrieve the next page of results. This value is <code>null</code> when there are no
/// more results to return.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The <code>NextToken</code> value to include in a future <code>DescribeVolumeStatus</code>
/// request. When the results of the request exceed <code>MaxResults</code>, this value can be
/// used to retrieve the next page of results. This value is <code>null</code> when there are no
/// more results to return.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `VolumeIds`.
///
/// To override the contents of this collection use [`set_volume_ids`](Self::set_volume_ids).
///
/// <p>The IDs of the volumes.</p>
/// <p>Default: Describes all your volumes.</p>
pub fn volume_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.volume_ids(inp);
self
}
/// <p>The IDs of the volumes.</p>
/// <p>Default: Describes all your volumes.</p>
pub fn set_volume_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_volume_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpcAttribute`.
///
/// <p>Describes the specified attribute of the specified VPC. You can specify only one attribute at a time.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpcAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpc_attribute_input::Builder,
}
impl<C, M, R> DescribeVpcAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpcAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpcAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVpcAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpcAttributeInputOperationOutputAlias,
crate::output::DescribeVpcAttributeOutput,
crate::error::DescribeVpcAttributeError,
crate::input::DescribeVpcAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The VPC attribute.</p>
pub fn attribute(mut self, inp: crate::model::VpcAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The VPC attribute.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::VpcAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpcClassicLink`.
///
/// <p>Describes the ClassicLink status of one or more VPCs.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpcClassicLink<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpc_classic_link_input::Builder,
}
impl<C, M, R> DescribeVpcClassicLink<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpcClassicLink`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpcClassicLinkOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVpcClassicLinkError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpcClassicLinkInputOperationOutputAlias,
crate::output::DescribeVpcClassicLinkOutput,
crate::error::DescribeVpcClassicLinkError,
crate::input::DescribeVpcClassicLinkInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>is-classic-link-enabled</code> - Whether the VPC is enabled for ClassicLink
/// (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>is-classic-link-enabled</code> - Whether the VPC is enabled for ClassicLink
/// (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `VpcIds`.
///
/// To override the contents of this collection use [`set_vpc_ids`](Self::set_vpc_ids).
///
/// <p>One or more VPCs for which you want to describe the ClassicLink status.</p>
pub fn vpc_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_ids(inp);
self
}
/// <p>One or more VPCs for which you want to describe the ClassicLink status.</p>
pub fn set_vpc_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_vpc_ids(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpcClassicLinkDnsSupport`.
///
/// <p>Describes the ClassicLink DNS support status of one or more VPCs. If enabled, the DNS
/// hostname of a linked EC2-Classic instance resolves to its private IP address when
/// addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname
/// of an instance in a VPC resolves to its private IP address when addressed from a linked
/// EC2-Classic instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html">ClassicLink</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpcClassicLinkDnsSupport<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpc_classic_link_dns_support_input::Builder,
}
impl<C, M, R> DescribeVpcClassicLinkDnsSupport<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpcClassicLinkDnsSupport`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpcClassicLinkDnsSupportOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVpcClassicLinkDnsSupportError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpcClassicLinkDnsSupportInputOperationOutputAlias,
crate::output::DescribeVpcClassicLinkDnsSupportOutput,
crate::error::DescribeVpcClassicLinkDnsSupportError,
crate::input::DescribeVpcClassicLinkDnsSupportInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Appends an item to `VpcIds`.
///
/// To override the contents of this collection use [`set_vpc_ids`](Self::set_vpc_ids).
///
/// <p>One or more VPC IDs.</p>
pub fn vpc_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_ids(inp);
self
}
/// <p>One or more VPC IDs.</p>
pub fn set_vpc_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_vpc_ids(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpcEndpointConnectionNotifications`.
///
/// <p>Describes the connection notifications for VPC endpoints and VPC endpoint
/// services.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpcEndpointConnectionNotifications<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpc_endpoint_connection_notifications_input::Builder,
}
impl<C, M, R> DescribeVpcEndpointConnectionNotifications<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpcEndpointConnectionNotifications`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpcEndpointConnectionNotificationsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeVpcEndpointConnectionNotificationsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpcEndpointConnectionNotificationsInputOperationOutputAlias,
crate::output::DescribeVpcEndpointConnectionNotificationsOutput,
crate::error::DescribeVpcEndpointConnectionNotificationsError,
crate::input::DescribeVpcEndpointConnectionNotificationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the notification.</p>
pub fn connection_notification_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connection_notification_id(inp);
self
}
/// <p>The ID of the notification.</p>
pub fn set_connection_notification_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connection_notification_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>connection-notification-arn</code> - The ARN of the SNS topic for the
/// notification.</p>
/// </li>
/// <li>
/// <p>
/// <code>connection-notification-id</code> - The ID of the
/// notification.</p>
/// </li>
/// <li>
/// <p>
/// <code>connection-notification-state</code> - The state of the notification
/// (<code>Enabled</code> | <code>Disabled</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>connection-notification-type</code> - The type of notification
/// (<code>Topic</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>service-id</code> - The ID of the endpoint service.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-id</code> - The ID of the VPC endpoint.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>connection-notification-arn</code> - The ARN of the SNS topic for the
/// notification.</p>
/// </li>
/// <li>
/// <p>
/// <code>connection-notification-id</code> - The ID of the
/// notification.</p>
/// </li>
/// <li>
/// <p>
/// <code>connection-notification-state</code> - The state of the notification
/// (<code>Enabled</code> | <code>Disabled</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>connection-notification-type</code> - The type of notification
/// (<code>Topic</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>service-id</code> - The ID of the endpoint service.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-id</code> - The ID of the VPC endpoint.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another request with the returned <code>NextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return in a single call. To retrieve the remaining
/// results, make another request with the returned <code>NextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to request the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpcEndpointConnections`.
///
/// <p>Describes the VPC endpoint connections to your VPC endpoint services, including any
/// endpoints that are pending your acceptance.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpcEndpointConnections<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpc_endpoint_connections_input::Builder,
}
impl<C, M, R> DescribeVpcEndpointConnections<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpcEndpointConnections`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpcEndpointConnectionsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVpcEndpointConnectionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpcEndpointConnectionsInputOperationOutputAlias,
crate::output::DescribeVpcEndpointConnectionsOutput,
crate::error::DescribeVpcEndpointConnectionsError,
crate::input::DescribeVpcEndpointConnectionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>service-id</code> - The ID of the service.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-owner</code> - The ID of the Amazon Web Services account ID
/// that owns the endpoint.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-state</code> - The state of the endpoint
/// (<code>pendingAcceptance</code> | <code>pending</code> |
/// <code>available</code> | <code>deleting</code> | <code>deleted</code> |
/// <code>rejected</code> | <code>failed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-id</code> - The ID of the endpoint.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>service-id</code> - The ID of the service.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-owner</code> - The ID of the Amazon Web Services account ID
/// that owns the endpoint.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-state</code> - The state of the endpoint
/// (<code>pendingAcceptance</code> | <code>pending</code> |
/// <code>available</code> | <code>deleting</code> | <code>deleted</code> |
/// <code>rejected</code> | <code>failed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-id</code> - The ID of the endpoint.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining
/// results of the initial request can be seen by sending another request with the returned
/// <code>NextToken</code> value. This value can be between 5 and 1,000; if
/// <code>MaxResults</code> is given a value larger than 1,000, only 1,000 results are
/// returned.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining
/// results of the initial request can be seen by sending another request with the returned
/// <code>NextToken</code> value. This value can be between 5 and 1,000; if
/// <code>MaxResults</code> is given a value larger than 1,000, only 1,000 results are
/// returned.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpcEndpoints`.
///
/// <p>Describes one or more of your VPC endpoints.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpcEndpoints<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpc_endpoints_input::Builder,
}
impl<C, M, R> DescribeVpcEndpoints<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpcEndpoints`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpcEndpointsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVpcEndpointsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpcEndpointsInputOperationOutputAlias,
crate::output::DescribeVpcEndpointsOutput,
crate::error::DescribeVpcEndpointsError,
crate::input::DescribeVpcEndpointsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `VpcEndpointIds`.
///
/// To override the contents of this collection use [`set_vpc_endpoint_ids`](Self::set_vpc_endpoint_ids).
///
/// <p>One or more endpoint IDs.</p>
pub fn vpc_endpoint_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_endpoint_ids(inp);
self
}
/// <p>One or more endpoint IDs.</p>
pub fn set_vpc_endpoint_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_vpc_endpoint_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>service-name</code> - The name of the service.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC in which the endpoint resides.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-id</code> - The ID of the endpoint.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-state</code> - The state of the endpoint
/// (<code>pendingAcceptance</code> | <code>pending</code> |
/// <code>available</code> | <code>deleting</code> | <code>deleted</code> |
/// <code>rejected</code> | <code>failed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-type</code> - The type of VPC endpoint (<code>Interface</code> | <code>Gateway</code> | <code>GatewayLoadBalancer</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>service-name</code> - The name of the service.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC in which the endpoint resides.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-id</code> - The ID of the endpoint.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-state</code> - The state of the endpoint
/// (<code>pendingAcceptance</code> | <code>pending</code> |
/// <code>available</code> | <code>deleting</code> | <code>deleted</code> |
/// <code>rejected</code> | <code>failed</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-endpoint-type</code> - The type of VPC endpoint (<code>Interface</code> | <code>Gateway</code> | <code>GatewayLoadBalancer</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p>
/// <p>Constraint: If the value is greater than 1,000, we return only 1,000 items.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p>
/// <p>Constraint: If the value is greater than 1,000, we return only 1,000 items.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next set of items to return. (You received this token from a prior call.)</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next set of items to return. (You received this token from a prior call.)</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpcEndpointServiceConfigurations`.
///
/// <p>Describes the VPC endpoint service configurations in your account (your services).</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpcEndpointServiceConfigurations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpc_endpoint_service_configurations_input::Builder,
}
impl<C, M, R> DescribeVpcEndpointServiceConfigurations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpcEndpointServiceConfigurations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpcEndpointServiceConfigurationsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeVpcEndpointServiceConfigurationsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpcEndpointServiceConfigurationsInputOperationOutputAlias,
crate::output::DescribeVpcEndpointServiceConfigurationsOutput,
crate::error::DescribeVpcEndpointServiceConfigurationsError,
crate::input::DescribeVpcEndpointServiceConfigurationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `ServiceIds`.
///
/// To override the contents of this collection use [`set_service_ids`](Self::set_service_ids).
///
/// <p>The IDs of one or more services.</p>
pub fn service_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_ids(inp);
self
}
/// <p>The IDs of one or more services.</p>
pub fn set_service_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_service_ids(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>service-name</code> - The name of the service.</p>
/// </li>
/// <li>
/// <p>
/// <code>service-id</code> - The ID of the service.</p>
/// </li>
/// <li>
/// <p>
/// <code>service-state</code> - The state of the service (<code>Pending</code> |
/// <code>Available</code> | <code>Deleting</code> | <code>Deleted</code> |
/// <code>Failed</code>). </p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>service-name</code> - The name of the service.</p>
/// </li>
/// <li>
/// <p>
/// <code>service-id</code> - The ID of the service.</p>
/// </li>
/// <li>
/// <p>
/// <code>service-state</code> - The state of the service (<code>Pending</code> |
/// <code>Available</code> | <code>Deleting</code> | <code>Deleted</code> |
/// <code>Failed</code>). </p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining
/// results of the initial request can be seen by sending another request with the returned
/// <code>NextToken</code> value. This value can be between 5 and 1,000; if
/// <code>MaxResults</code> is given a value larger than 1,000, only 1,000 results are
/// returned.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining
/// results of the initial request can be seen by sending another request with the returned
/// <code>NextToken</code> value. This value can be between 5 and 1,000; if
/// <code>MaxResults</code> is given a value larger than 1,000, only 1,000 results are
/// returned.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpcEndpointServicePermissions`.
///
/// <p>Describes the principals (service consumers) that are permitted to discover your VPC
/// endpoint service.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpcEndpointServicePermissions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpc_endpoint_service_permissions_input::Builder,
}
impl<C, M, R> DescribeVpcEndpointServicePermissions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpcEndpointServicePermissions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpcEndpointServicePermissionsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeVpcEndpointServicePermissionsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpcEndpointServicePermissionsInputOperationOutputAlias,
crate::output::DescribeVpcEndpointServicePermissionsOutput,
crate::error::DescribeVpcEndpointServicePermissionsError,
crate::input::DescribeVpcEndpointServicePermissionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the service.</p>
pub fn service_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(inp);
self
}
/// <p>The ID of the service.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>principal</code> - The ARN of the principal.</p>
/// </li>
/// <li>
/// <p>
/// <code>principal-type</code> - The principal type (<code>All</code> |
/// <code>Service</code> | <code>OrganizationUnit</code> | <code>Account</code>
/// | <code>User</code> | <code>Role</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>principal</code> - The ARN of the principal.</p>
/// </li>
/// <li>
/// <p>
/// <code>principal-type</code> - The principal type (<code>All</code> |
/// <code>Service</code> | <code>OrganizationUnit</code> | <code>Account</code>
/// | <code>User</code> | <code>Role</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining
/// results of the initial request can be seen by sending another request with the returned
/// <code>NextToken</code> value. This value can be between 5 and 1,000; if
/// <code>MaxResults</code> is given a value larger than 1,000, only 1,000 results are
/// returned.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining
/// results of the initial request can be seen by sending another request with the returned
/// <code>NextToken</code> value. This value can be between 5 and 1,000; if
/// <code>MaxResults</code> is given a value larger than 1,000, only 1,000 results are
/// returned.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpcEndpointServices`.
///
/// <p>Describes available services to which you can create a VPC endpoint.</p>
/// <p>When the service provider and the consumer have different accounts in multiple
/// Availability Zones, and the consumer views the VPC endpoint service information, the
/// response only includes the common Availability Zones. For example, when the service
/// provider account uses <code>us-east-1a</code> and <code>us-east-1c</code> and the
/// consumer uses <code>us-east-1a</code> and <code>us-east-1b</code>, the response includes
/// the VPC endpoint services in the common Availability Zone,
/// <code>us-east-1a</code>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpcEndpointServices<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpc_endpoint_services_input::Builder,
}
impl<C, M, R> DescribeVpcEndpointServices<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpcEndpointServices`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpcEndpointServicesOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVpcEndpointServicesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpcEndpointServicesInputOperationOutputAlias,
crate::output::DescribeVpcEndpointServicesOutput,
crate::error::DescribeVpcEndpointServicesError,
crate::input::DescribeVpcEndpointServicesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `ServiceNames`.
///
/// To override the contents of this collection use [`set_service_names`](Self::set_service_names).
///
/// <p>One or more service names.</p>
pub fn service_names(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_names(inp);
self
}
/// <p>One or more service names.</p>
pub fn set_service_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_service_names(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>service-name</code> - The name of the service.</p>
/// </li>
/// <li>
/// <p>
/// <code>service-type</code> - The type of service (<code>Interface</code> |
/// <code>Gateway</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>service-name</code> - The name of the service.</p>
/// </li>
/// <li>
/// <p>
/// <code>service-type</code> - The type of service (<code>Interface</code> |
/// <code>Gateway</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p>
/// <p>Constraint: If the value is greater than 1,000, we return only 1,000 items.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p>
/// <p>Constraint: If the value is greater than 1,000, we return only 1,000 items.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next set of items to return. (You received this token from a prior call.)</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next set of items to return. (You received this token from a prior call.)</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpcPeeringConnections`.
///
/// <p>Describes one or more of your VPC peering connections.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpcPeeringConnections<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpc_peering_connections_input::Builder,
}
impl<C, M, R> DescribeVpcPeeringConnections<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpcPeeringConnections`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpcPeeringConnectionsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVpcPeeringConnectionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpcPeeringConnectionsInputOperationOutputAlias,
crate::output::DescribeVpcPeeringConnectionsOutput,
crate::error::DescribeVpcPeeringConnectionsError,
crate::input::DescribeVpcPeeringConnectionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>accepter-vpc-info.cidr-block</code> - The IPv4 CIDR block of the accepter
/// VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>accepter-vpc-info.owner-id</code> - The ID of the Amazon Web Services account that owns the
/// accepter VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>accepter-vpc-info.vpc-id</code> - The ID of the accepter VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>expiration-time</code> - The expiration date and time for the VPC peering
/// connection.</p>
/// </li>
/// <li>
/// <p>
/// <code>requester-vpc-info.cidr-block</code> - The IPv4 CIDR block of the
/// requester's VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>requester-vpc-info.owner-id</code> - The ID of the Amazon Web Services account that owns the
/// requester VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>requester-vpc-info.vpc-id</code> - The ID of the requester VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>status-code</code> - The status of the VPC peering connection
/// (<code>pending-acceptance</code> | <code>failed</code> |
/// <code>expired</code> | <code>provisioning</code> | <code>active</code> |
/// <code>deleting</code> | <code>deleted</code> |
/// <code>rejected</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>status-message</code> - A message that provides more information about the status
/// of the VPC peering connection, if applicable.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-peering-connection-id</code> - The ID of the VPC peering connection.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>accepter-vpc-info.cidr-block</code> - The IPv4 CIDR block of the accepter
/// VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>accepter-vpc-info.owner-id</code> - The ID of the Amazon Web Services account that owns the
/// accepter VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>accepter-vpc-info.vpc-id</code> - The ID of the accepter VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>expiration-time</code> - The expiration date and time for the VPC peering
/// connection.</p>
/// </li>
/// <li>
/// <p>
/// <code>requester-vpc-info.cidr-block</code> - The IPv4 CIDR block of the
/// requester's VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>requester-vpc-info.owner-id</code> - The ID of the Amazon Web Services account that owns the
/// requester VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>requester-vpc-info.vpc-id</code> - The ID of the requester VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>status-code</code> - The status of the VPC peering connection
/// (<code>pending-acceptance</code> | <code>failed</code> |
/// <code>expired</code> | <code>provisioning</code> | <code>active</code> |
/// <code>deleting</code> | <code>deleted</code> |
/// <code>rejected</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>status-message</code> - A message that provides more information about the status
/// of the VPC peering connection, if applicable.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-peering-connection-id</code> - The ID of the VPC peering connection.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `VpcPeeringConnectionIds`.
///
/// To override the contents of this collection use [`set_vpc_peering_connection_ids`](Self::set_vpc_peering_connection_ids).
///
/// <p>One or more VPC peering connection IDs.</p>
/// <p>Default: Describes all your VPC peering connections.</p>
pub fn vpc_peering_connection_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_peering_connection_ids(inp);
self
}
/// <p>One or more VPC peering connection IDs.</p>
/// <p>Default: Describes all your VPC peering connections.</p>
pub fn set_vpc_peering_connection_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_vpc_peering_connection_ids(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpcs`.
///
/// <p>Describes one or more of your VPCs.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpcs<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpcs_input::Builder,
}
impl<C, M, R> DescribeVpcs<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpcs`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpcsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVpcsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpcsInputOperationOutputAlias,
crate::output::DescribeVpcsOutput,
crate::error::DescribeVpcsError,
crate::input::DescribeVpcsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>cidr</code> - The primary IPv4 CIDR block of the VPC. The CIDR block you
/// specify must exactly match the VPC's CIDR block for information to be returned
/// for the VPC. Must contain the slash followed by one or two digits (for example,
/// <code>/28</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>cidr-block-association.cidr-block</code> - An IPv4 CIDR block associated with the
/// VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>cidr-block-association.association-id</code> - The association ID for
/// an IPv4 CIDR block associated with the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>cidr-block-association.state</code> - The state of an IPv4 CIDR block
/// associated with the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>dhcp-options-id</code> - The ID of a set of DHCP options.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR
/// block associated with the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.ipv6-pool</code> - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.association-id</code> - The association
/// ID for an IPv6 CIDR block associated with the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR
/// block associated with the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>is-default</code> - Indicates whether the VPC is the default VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the VPC (<code>pending</code> | <code>available</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>cidr</code> - The primary IPv4 CIDR block of the VPC. The CIDR block you
/// specify must exactly match the VPC's CIDR block for information to be returned
/// for the VPC. Must contain the slash followed by one or two digits (for example,
/// <code>/28</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>cidr-block-association.cidr-block</code> - An IPv4 CIDR block associated with the
/// VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>cidr-block-association.association-id</code> - The association ID for
/// an IPv4 CIDR block associated with the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>cidr-block-association.state</code> - The state of an IPv4 CIDR block
/// associated with the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>dhcp-options-id</code> - The ID of a set of DHCP options.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR
/// block associated with the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.ipv6-pool</code> - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.association-id</code> - The association
/// ID for an IPv6 CIDR block associated with the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR
/// block associated with the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>is-default</code> - Indicates whether the VPC is the default VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>owner-id</code> - The ID of the Amazon Web Services account that owns the VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the VPC (<code>pending</code> | <code>available</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpc-id</code> - The ID of the VPC.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `VpcIds`.
///
/// To override the contents of this collection use [`set_vpc_ids`](Self::set_vpc_ids).
///
/// <p>One or more VPC IDs.</p>
/// <p>Default: Describes all your VPCs.</p>
pub fn vpc_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_ids(inp);
self
}
/// <p>One or more VPC IDs.</p>
/// <p>Default: Describes all your VPCs.</p>
pub fn set_vpc_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_vpc_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpnConnections`.
///
/// <p>Describes one or more of your VPN connections.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">Amazon Web Services Site-to-Site VPN</a> in the <i>Amazon Web Services Site-to-Site VPN
/// User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpnConnections<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpn_connections_input::Builder,
}
impl<C, M, R> DescribeVpnConnections<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpnConnections`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpnConnectionsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVpnConnectionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpnConnectionsInputOperationOutputAlias,
crate::output::DescribeVpnConnectionsOutput,
crate::error::DescribeVpnConnectionsError,
crate::input::DescribeVpnConnectionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>customer-gateway-configuration</code> - The configuration information
/// for the customer gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>customer-gateway-id</code> - The ID of a customer gateway associated
/// with the VPN connection.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the VPN connection (<code>pending</code> |
/// <code>available</code> | <code>deleting</code> |
/// <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>option.static-routes-only</code> - Indicates whether the connection has
/// static routes only. Used for devices that do not support Border Gateway Protocol
/// (BGP).</p>
/// </li>
/// <li>
/// <p>
/// <code>route.destination-cidr-block</code> - The destination CIDR block. This
/// corresponds to the subnet used in a customer data center.</p>
/// </li>
/// <li>
/// <p>
/// <code>bgp-asn</code> - The BGP Autonomous System Number (ASN) associated with
/// a BGP device.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of VPN connection. Currently the only supported
/// type is <code>ipsec.1</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpn-connection-id</code> - The ID of the VPN connection.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpn-gateway-id</code> - The ID of a virtual private gateway associated
/// with the VPN connection.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of a transit gateway associated with
/// the VPN connection.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>customer-gateway-configuration</code> - The configuration information
/// for the customer gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>customer-gateway-id</code> - The ID of a customer gateway associated
/// with the VPN connection.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the VPN connection (<code>pending</code> |
/// <code>available</code> | <code>deleting</code> |
/// <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>option.static-routes-only</code> - Indicates whether the connection has
/// static routes only. Used for devices that do not support Border Gateway Protocol
/// (BGP).</p>
/// </li>
/// <li>
/// <p>
/// <code>route.destination-cidr-block</code> - The destination CIDR block. This
/// corresponds to the subnet used in a customer data center.</p>
/// </li>
/// <li>
/// <p>
/// <code>bgp-asn</code> - The BGP Autonomous System Number (ASN) associated with
/// a BGP device.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of VPN connection. Currently the only supported
/// type is <code>ipsec.1</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpn-connection-id</code> - The ID of the VPN connection.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpn-gateway-id</code> - The ID of a virtual private gateway associated
/// with the VPN connection.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-id</code> - The ID of a transit gateway associated with
/// the VPN connection.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `VpnConnectionIds`.
///
/// To override the contents of this collection use [`set_vpn_connection_ids`](Self::set_vpn_connection_ids).
///
/// <p>One or more VPN connection IDs.</p>
/// <p>Default: Describes your VPN connections.</p>
pub fn vpn_connection_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_connection_ids(inp);
self
}
/// <p>One or more VPN connection IDs.</p>
/// <p>Default: Describes your VPN connections.</p>
pub fn set_vpn_connection_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_vpn_connection_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DescribeVpnGateways`.
///
/// <p>Describes one or more of your virtual private gateways.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">Amazon Web Services Site-to-Site VPN</a> in the <i>Amazon Web Services Site-to-Site VPN
/// User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DescribeVpnGateways<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_vpn_gateways_input::Builder,
}
impl<C, M, R> DescribeVpnGateways<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeVpnGateways`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeVpnGatewaysOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeVpnGatewaysError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeVpnGatewaysInputOperationOutputAlias,
crate::output::DescribeVpnGatewaysOutput,
crate::error::DescribeVpnGatewaysError,
crate::input::DescribeVpnGatewaysInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>amazon-side-asn</code> - The Autonomous System Number (ASN) for the
/// Amazon side of the gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.state</code> - The current state of the attachment between
/// the gateway and the VPC (<code>attaching</code> | <code>attached</code> |
/// <code>detaching</code> | <code>detached</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.vpc-id</code> - The ID of an attached VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone for the virtual private
/// gateway (if applicable).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the virtual private gateway
/// (<code>pending</code> | <code>available</code> | <code>deleting</code> |
/// <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of virtual private gateway. Currently the only
/// supported type is <code>ipsec.1</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpn-gateway-id</code> - The ID of the virtual private gateway.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>amazon-side-asn</code> - The Autonomous System Number (ASN) for the
/// Amazon side of the gateway.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.state</code> - The current state of the attachment between
/// the gateway and the VPC (<code>attaching</code> | <code>attached</code> |
/// <code>detaching</code> | <code>detached</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.vpc-id</code> - The ID of an attached VPC.</p>
/// </li>
/// <li>
/// <p>
/// <code>availability-zone</code> - The Availability Zone for the virtual private
/// gateway (if applicable).</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the virtual private gateway
/// (<code>pending</code> | <code>available</code> | <code>deleting</code> |
/// <code>deleted</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of virtual private gateway. Currently the only
/// supported type is <code>ipsec.1</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>vpn-gateway-id</code> - The ID of the virtual private gateway.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// Appends an item to `VpnGatewayIds`.
///
/// To override the contents of this collection use [`set_vpn_gateway_ids`](Self::set_vpn_gateway_ids).
///
/// <p>One or more virtual private gateway IDs.</p>
/// <p>Default: Describes all your virtual private gateways.</p>
pub fn vpn_gateway_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_gateway_ids(inp);
self
}
/// <p>One or more virtual private gateway IDs.</p>
/// <p>Default: Describes all your virtual private gateways.</p>
pub fn set_vpn_gateway_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_vpn_gateway_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DetachClassicLinkVpc`.
///
/// <p>Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped.</p>
#[derive(std::fmt::Debug)]
pub struct DetachClassicLinkVpc<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::detach_classic_link_vpc_input::Builder,
}
impl<C, M, R> DetachClassicLinkVpc<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DetachClassicLinkVpc`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DetachClassicLinkVpcOutput,
aws_smithy_http::result::SdkError<crate::error::DetachClassicLinkVpcError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DetachClassicLinkVpcInputOperationOutputAlias,
crate::output::DetachClassicLinkVpcOutput,
crate::error::DetachClassicLinkVpcError,
crate::input::DetachClassicLinkVpcInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the instance to unlink from the VPC.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance to unlink from the VPC.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The ID of the VPC to which the instance is linked.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC to which the instance is linked.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
}
/// Fluent builder constructing a request to `DetachInternetGateway`.
///
/// <p>Detaches an internet gateway from a VPC, disabling connectivity between the internet
/// and the VPC. The VPC must not contain any running instances with Elastic IP addresses or
/// public IPv4 addresses.</p>
#[derive(std::fmt::Debug)]
pub struct DetachInternetGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::detach_internet_gateway_input::Builder,
}
impl<C, M, R> DetachInternetGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DetachInternetGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DetachInternetGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::DetachInternetGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DetachInternetGatewayInputOperationOutputAlias,
crate::output::DetachInternetGatewayOutput,
crate::error::DetachInternetGatewayError,
crate::input::DetachInternetGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the internet gateway.</p>
pub fn internet_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.internet_gateway_id(inp);
self
}
/// <p>The ID of the internet gateway.</p>
pub fn set_internet_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_internet_gateway_id(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
}
/// Fluent builder constructing a request to `DetachNetworkInterface`.
///
/// <p>Detaches a network interface from an instance.</p>
#[derive(std::fmt::Debug)]
pub struct DetachNetworkInterface<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::detach_network_interface_input::Builder,
}
impl<C, M, R> DetachNetworkInterface<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DetachNetworkInterface`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DetachNetworkInterfaceOutput,
aws_smithy_http::result::SdkError<crate::error::DetachNetworkInterfaceError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DetachNetworkInterfaceInputOperationOutputAlias,
crate::output::DetachNetworkInterfaceOutput,
crate::error::DetachNetworkInterfaceError,
crate::input::DetachNetworkInterfaceInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the attachment.</p>
pub fn attachment_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_attachment_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Specifies whether to force a detachment.</p>
/// <note>
/// <ul>
/// <li>
/// <p>Use the <code>Force</code> parameter only as a last resort to detach a network interface from a failed instance. </p>
/// </li>
/// <li>
/// <p>If you use the <code>Force</code> parameter to detach a network interface, you might not be able to attach a different network interface to the same index on the instance without first stopping and starting the instance.</p>
/// </li>
/// <li>
/// <p>If you force the detachment of a network interface, the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">instance metadata</a>
/// might not get updated. This means that the attributes associated
/// with the detached network interface might still be visible. The
/// instance metadata will get updated when you stop and start the
/// instance.</p>
/// </li>
/// </ul>
/// </note>
pub fn force(mut self, inp: bool) -> Self {
self.inner = self.inner.force(inp);
self
}
/// <p>Specifies whether to force a detachment.</p>
/// <note>
/// <ul>
/// <li>
/// <p>Use the <code>Force</code> parameter only as a last resort to detach a network interface from a failed instance. </p>
/// </li>
/// <li>
/// <p>If you use the <code>Force</code> parameter to detach a network interface, you might not be able to attach a different network interface to the same index on the instance without first stopping and starting the instance.</p>
/// </li>
/// <li>
/// <p>If you force the detachment of a network interface, the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">instance metadata</a>
/// might not get updated. This means that the attributes associated
/// with the detached network interface might still be visible. The
/// instance metadata will get updated when you stop and start the
/// instance.</p>
/// </li>
/// </ul>
/// </note>
pub fn set_force(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_force(input);
self
}
}
/// Fluent builder constructing a request to `DetachVolume`.
///
/// <p>Detaches an EBS volume from an instance. Make sure to unmount any file systems on the
/// device within your operating system before detaching the volume. Failure to do so can result
/// in the volume becoming stuck in the <code>busy</code> state while detaching. If this happens,
/// detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot
/// the instance, or all three. If an EBS volume is the root device of an instance, it can't be
/// detached while the instance is running. To detach the root volume, stop the instance
/// first.</p>
/// <p>When a volume with an Amazon Web Services Marketplace product code is detached from an instance, the
/// product code is no longer associated with the instance.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html">Detach an Amazon EBS volume</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DetachVolume<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::detach_volume_input::Builder,
}
impl<C, M, R> DetachVolume<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DetachVolume`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DetachVolumeOutput,
aws_smithy_http::result::SdkError<crate::error::DetachVolumeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DetachVolumeInputOperationOutputAlias,
crate::output::DetachVolumeOutput,
crate::error::DetachVolumeError,
crate::input::DetachVolumeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The device name.</p>
pub fn device(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.device(inp);
self
}
/// <p>The device name.</p>
pub fn set_device(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_device(input);
self
}
/// <p>Forces detachment if the previous detachment attempt did not occur cleanly (for example,
/// logging into an instance, unmounting the volume, and detaching normally). This option can lead
/// to data loss or a corrupted file system. Use this option only as a last resort to detach a
/// volume from a failed instance. The instance won't have an opportunity to flush file system
/// caches or file system metadata. If you use this option, you must perform file system check and
/// repair procedures.</p>
pub fn force(mut self, inp: bool) -> Self {
self.inner = self.inner.force(inp);
self
}
/// <p>Forces detachment if the previous detachment attempt did not occur cleanly (for example,
/// logging into an instance, unmounting the volume, and detaching normally). This option can lead
/// to data loss or a corrupted file system. Use this option only as a last resort to detach a
/// volume from a failed instance. The instance won't have an opportunity to flush file system
/// caches or file system metadata. If you use this option, you must perform file system check and
/// repair procedures.</p>
pub fn set_force(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_force(input);
self
}
/// <p>The ID of the instance. If you are detaching a Multi-Attach enabled volume, you must specify an instance ID.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance. If you are detaching a Multi-Attach enabled volume, you must specify an instance ID.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The ID of the volume.</p>
pub fn volume_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.volume_id(inp);
self
}
/// <p>The ID of the volume.</p>
pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_volume_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DetachVpnGateway`.
///
/// <p>Detaches a virtual private gateway from a VPC. You do this if you're planning to turn
/// off the VPC and not use it anymore. You can confirm a virtual private gateway has been
/// completely detached from a VPC by describing the virtual private gateway (any
/// attachments to the virtual private gateway are also described).</p>
/// <p>You must wait for the attachment's state to switch to <code>detached</code> before you
/// can delete the VPC or attach a different VPC to the virtual private gateway.</p>
#[derive(std::fmt::Debug)]
pub struct DetachVpnGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::detach_vpn_gateway_input::Builder,
}
impl<C, M, R> DetachVpnGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DetachVpnGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DetachVpnGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::DetachVpnGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DetachVpnGatewayInputOperationOutputAlias,
crate::output::DetachVpnGatewayOutput,
crate::error::DetachVpnGatewayError,
crate::input::DetachVpnGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// <p>The ID of the virtual private gateway.</p>
pub fn vpn_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_gateway_id(inp);
self
}
/// <p>The ID of the virtual private gateway.</p>
pub fn set_vpn_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_gateway_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisableEbsEncryptionByDefault`.
///
/// <p>Disables EBS encryption by default for your account in the current Region.</p>
/// <p>After you disable encryption by default, you can still create encrypted volumes by
/// enabling encryption when you create each volume.</p>
/// <p>Disabling encryption by default does not change the encryption status of your
/// existing volumes.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS encryption</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DisableEbsEncryptionByDefault<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disable_ebs_encryption_by_default_input::Builder,
}
impl<C, M, R> DisableEbsEncryptionByDefault<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisableEbsEncryptionByDefault`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisableEbsEncryptionByDefaultOutput,
aws_smithy_http::result::SdkError<crate::error::DisableEbsEncryptionByDefaultError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisableEbsEncryptionByDefaultInputOperationOutputAlias,
crate::output::DisableEbsEncryptionByDefaultOutput,
crate::error::DisableEbsEncryptionByDefaultError,
crate::input::DisableEbsEncryptionByDefaultInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisableFastSnapshotRestores`.
///
/// <p>Disables fast snapshot restores for the specified snapshots in the specified Availability Zones.</p>
#[derive(std::fmt::Debug)]
pub struct DisableFastSnapshotRestores<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disable_fast_snapshot_restores_input::Builder,
}
impl<C, M, R> DisableFastSnapshotRestores<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisableFastSnapshotRestores`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisableFastSnapshotRestoresOutput,
aws_smithy_http::result::SdkError<crate::error::DisableFastSnapshotRestoresError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisableFastSnapshotRestoresInputOperationOutputAlias,
crate::output::DisableFastSnapshotRestoresOutput,
crate::error::DisableFastSnapshotRestoresError,
crate::input::DisableFastSnapshotRestoresInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `AvailabilityZones`.
///
/// To override the contents of this collection use [`set_availability_zones`](Self::set_availability_zones).
///
/// <p>One or more Availability Zones. For example, <code>us-east-2a</code>.</p>
pub fn availability_zones(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zones(inp);
self
}
/// <p>One or more Availability Zones. For example, <code>us-east-2a</code>.</p>
pub fn set_availability_zones(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_availability_zones(input);
self
}
/// Appends an item to `SourceSnapshotIds`.
///
/// To override the contents of this collection use [`set_source_snapshot_ids`](Self::set_source_snapshot_ids).
///
/// <p>The IDs of one or more snapshots. For example, <code>snap-1234567890abcdef0</code>.</p>
pub fn source_snapshot_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_snapshot_ids(inp);
self
}
/// <p>The IDs of one or more snapshots. For example, <code>snap-1234567890abcdef0</code>.</p>
pub fn set_source_snapshot_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_source_snapshot_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisableImageDeprecation`.
///
/// <p>Cancels the deprecation of the specified AMI.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html">Deprecate an AMI</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DisableImageDeprecation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disable_image_deprecation_input::Builder,
}
impl<C, M, R> DisableImageDeprecation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisableImageDeprecation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisableImageDeprecationOutput,
aws_smithy_http::result::SdkError<crate::error::DisableImageDeprecationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisableImageDeprecationInputOperationOutputAlias,
crate::output::DisableImageDeprecationOutput,
crate::error::DisableImageDeprecationError,
crate::input::DisableImageDeprecationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the AMI.</p>
pub fn image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.image_id(inp);
self
}
/// <p>The ID of the AMI.</p>
pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_image_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisableSerialConsoleAccess`.
///
/// <p>Disables access to the EC2 serial console of all instances for your account. By default,
/// access to the EC2 serial console is disabled for your account. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-access-to-serial-console.html#serial-console-account-access">Manage account access to the EC2 serial console</a> in the <i>Amazon EC2
/// User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DisableSerialConsoleAccess<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disable_serial_console_access_input::Builder,
}
impl<C, M, R> DisableSerialConsoleAccess<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisableSerialConsoleAccess`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisableSerialConsoleAccessOutput,
aws_smithy_http::result::SdkError<crate::error::DisableSerialConsoleAccessError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisableSerialConsoleAccessInputOperationOutputAlias,
crate::output::DisableSerialConsoleAccessOutput,
crate::error::DisableSerialConsoleAccessError,
crate::input::DisableSerialConsoleAccessInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisableTransitGatewayRouteTablePropagation`.
///
/// <p>Disables the specified resource attachment from propagating routes to the specified
/// propagation route table.</p>
#[derive(std::fmt::Debug)]
pub struct DisableTransitGatewayRouteTablePropagation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disable_transit_gateway_route_table_propagation_input::Builder,
}
impl<C, M, R> DisableTransitGatewayRouteTablePropagation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisableTransitGatewayRouteTablePropagation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisableTransitGatewayRouteTablePropagationOutput,
aws_smithy_http::result::SdkError<
crate::error::DisableTransitGatewayRouteTablePropagationError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisableTransitGatewayRouteTablePropagationInputOperationOutputAlias,
crate::output::DisableTransitGatewayRouteTablePropagationOutput,
crate::error::DisableTransitGatewayRouteTablePropagationError,
crate::input::DisableTransitGatewayRouteTablePropagationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the propagation route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the propagation route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// <p>The ID of the attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisableVgwRoutePropagation`.
///
/// <p>Disables a virtual private gateway (VGW) from propagating routes to a specified route
/// table of a VPC.</p>
#[derive(std::fmt::Debug)]
pub struct DisableVgwRoutePropagation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disable_vgw_route_propagation_input::Builder,
}
impl<C, M, R> DisableVgwRoutePropagation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisableVgwRoutePropagation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisableVgwRoutePropagationOutput,
aws_smithy_http::result::SdkError<crate::error::DisableVgwRoutePropagationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisableVgwRoutePropagationInputOperationOutputAlias,
crate::output::DisableVgwRoutePropagationOutput,
crate::error::DisableVgwRoutePropagationError,
crate::input::DisableVgwRoutePropagationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the virtual private gateway.</p>
pub fn gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.gateway_id(inp);
self
}
/// <p>The ID of the virtual private gateway.</p>
pub fn set_gateway_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_gateway_id(input);
self
}
/// <p>The ID of the route table.</p>
pub fn route_table_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.route_table_id(inp);
self
}
/// <p>The ID of the route table.</p>
pub fn set_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_route_table_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisableVpcClassicLink`.
///
/// <p>Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has EC2-Classic instances linked to it.</p>
#[derive(std::fmt::Debug)]
pub struct DisableVpcClassicLink<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disable_vpc_classic_link_input::Builder,
}
impl<C, M, R> DisableVpcClassicLink<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisableVpcClassicLink`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisableVpcClassicLinkOutput,
aws_smithy_http::result::SdkError<crate::error::DisableVpcClassicLinkError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisableVpcClassicLinkInputOperationOutputAlias,
crate::output::DisableVpcClassicLinkOutput,
crate::error::DisableVpcClassicLinkError,
crate::input::DisableVpcClassicLinkInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
}
/// Fluent builder constructing a request to `DisableVpcClassicLinkDnsSupport`.
///
/// <p>Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to
/// public IP addresses when addressed between a linked EC2-Classic instance and instances
/// in the VPC to which it's linked. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html">ClassicLink</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>You must specify a VPC ID in the request.</p>
#[derive(std::fmt::Debug)]
pub struct DisableVpcClassicLinkDnsSupport<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disable_vpc_classic_link_dns_support_input::Builder,
}
impl<C, M, R> DisableVpcClassicLinkDnsSupport<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisableVpcClassicLinkDnsSupport`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisableVpcClassicLinkDnsSupportOutput,
aws_smithy_http::result::SdkError<crate::error::DisableVpcClassicLinkDnsSupportError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisableVpcClassicLinkDnsSupportInputOperationOutputAlias,
crate::output::DisableVpcClassicLinkDnsSupportOutput,
crate::error::DisableVpcClassicLinkDnsSupportError,
crate::input::DisableVpcClassicLinkDnsSupportInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateAddress`.
///
/// <p>Disassociates an Elastic IP address from the instance or network interface it's associated with.</p>
/// <p>An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic IP
/// Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.</p>
#[derive(std::fmt::Debug)]
pub struct DisassociateAddress<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disassociate_address_input::Builder,
}
impl<C, M, R> DisassociateAddress<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisassociateAddress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateAddressOutput,
aws_smithy_http::result::SdkError<crate::error::DisassociateAddressError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisassociateAddressInputOperationOutputAlias,
crate::output::DisassociateAddressOutput,
crate::error::DisassociateAddressError,
crate::input::DisassociateAddressInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>[EC2-VPC] The association ID. Required for EC2-VPC.</p>
pub fn association_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_id(inp);
self
}
/// <p>[EC2-VPC] The association ID. Required for EC2-VPC.</p>
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_association_id(input);
self
}
/// <p>[EC2-Classic] The Elastic IP address. Required for EC2-Classic.</p>
pub fn public_ip(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.public_ip(inp);
self
}
/// <p>[EC2-Classic] The Elastic IP address. Required for EC2-Classic.</p>
pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_public_ip(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateClientVpnTargetNetwork`.
///
/// <p>Disassociates a target network from the specified Client VPN endpoint. When you disassociate the
/// last target network from a Client VPN, the following happens:</p>
/// <ul>
/// <li>
/// <p>The route that was automatically added for the VPC is deleted</p>
/// </li>
/// <li>
/// <p>All active client connections are terminated</p>
/// </li>
/// <li>
/// <p>New client connections are disallowed</p>
/// </li>
/// <li>
/// <p>The Client VPN endpoint's status changes to <code>pending-associate</code>
/// </p>
/// </li>
/// </ul>
#[derive(std::fmt::Debug)]
pub struct DisassociateClientVpnTargetNetwork<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disassociate_client_vpn_target_network_input::Builder,
}
impl<C, M, R> DisassociateClientVpnTargetNetwork<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisassociateClientVpnTargetNetwork`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateClientVpnTargetNetworkOutput,
aws_smithy_http::result::SdkError<
crate::error::DisassociateClientVpnTargetNetworkError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisassociateClientVpnTargetNetworkInputOperationOutputAlias,
crate::output::DisassociateClientVpnTargetNetworkOutput,
crate::error::DisassociateClientVpnTargetNetworkError,
crate::input::DisassociateClientVpnTargetNetworkInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint from which to disassociate the target network.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint from which to disassociate the target network.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <p>The ID of the target network association.</p>
pub fn association_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_id(inp);
self
}
/// <p>The ID of the target network association.</p>
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_association_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateEnclaveCertificateIamRole`.
///
/// <p>Disassociates an IAM role from an Certificate Manager (ACM) certificate. Disassociating an IAM role
/// from an ACM certificate removes the Amazon S3 object that contains the certificate, certificate chain, and
/// encrypted private key from the Amazon S3 bucket. It also revokes the IAM role's permission to use the
/// KMS key used to encrypt the private key. This effectively revokes the role's permission
/// to use the certificate.</p>
#[derive(std::fmt::Debug)]
pub struct DisassociateEnclaveCertificateIamRole<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disassociate_enclave_certificate_iam_role_input::Builder,
}
impl<C, M, R> DisassociateEnclaveCertificateIamRole<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisassociateEnclaveCertificateIamRole`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateEnclaveCertificateIamRoleOutput,
aws_smithy_http::result::SdkError<
crate::error::DisassociateEnclaveCertificateIamRoleError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisassociateEnclaveCertificateIamRoleInputOperationOutputAlias,
crate::output::DisassociateEnclaveCertificateIamRoleOutput,
crate::error::DisassociateEnclaveCertificateIamRoleError,
crate::input::DisassociateEnclaveCertificateIamRoleInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ARN of the ACM certificate from which to disassociate the IAM role.</p>
pub fn certificate_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.certificate_arn(inp);
self
}
/// <p>The ARN of the ACM certificate from which to disassociate the IAM role.</p>
pub fn set_certificate_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_certificate_arn(input);
self
}
/// <p>The ARN of the IAM role to disassociate.</p>
pub fn role_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.role_arn(inp);
self
}
/// <p>The ARN of the IAM role to disassociate.</p>
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_role_arn(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateIamInstanceProfile`.
///
/// <p>Disassociates an IAM instance profile from a running or stopped instance.</p>
/// <p>Use <a>DescribeIamInstanceProfileAssociations</a> to get the association
/// ID.</p>
#[derive(std::fmt::Debug)]
pub struct DisassociateIamInstanceProfile<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disassociate_iam_instance_profile_input::Builder,
}
impl<C, M, R> DisassociateIamInstanceProfile<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisassociateIamInstanceProfile`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateIamInstanceProfileOutput,
aws_smithy_http::result::SdkError<crate::error::DisassociateIamInstanceProfileError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisassociateIamInstanceProfileInputOperationOutputAlias,
crate::output::DisassociateIamInstanceProfileOutput,
crate::error::DisassociateIamInstanceProfileError,
crate::input::DisassociateIamInstanceProfileInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the IAM instance profile association.</p>
pub fn association_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_id(inp);
self
}
/// <p>The ID of the IAM instance profile association.</p>
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_association_id(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateInstanceEventWindow`.
///
/// <p>Disassociates one or more targets from an event window.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html">Define event windows for scheduled
/// events</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DisassociateInstanceEventWindow<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disassociate_instance_event_window_input::Builder,
}
impl<C, M, R> DisassociateInstanceEventWindow<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisassociateInstanceEventWindow`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateInstanceEventWindowOutput,
aws_smithy_http::result::SdkError<crate::error::DisassociateInstanceEventWindowError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisassociateInstanceEventWindowInputOperationOutputAlias,
crate::output::DisassociateInstanceEventWindowOutput,
crate::error::DisassociateInstanceEventWindowError,
crate::input::DisassociateInstanceEventWindowInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the event window.</p>
pub fn instance_event_window_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_event_window_id(inp);
self
}
/// <p>The ID of the event window.</p>
pub fn set_instance_event_window_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_instance_event_window_id(input);
self
}
/// <p>One or more targets to disassociate from the specified event window.</p>
pub fn association_target(
mut self,
inp: crate::model::InstanceEventWindowDisassociationRequest,
) -> Self {
self.inner = self.inner.association_target(inp);
self
}
/// <p>One or more targets to disassociate from the specified event window.</p>
pub fn set_association_target(
mut self,
input: std::option::Option<crate::model::InstanceEventWindowDisassociationRequest>,
) -> Self {
self.inner = self.inner.set_association_target(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateRouteTable`.
///
/// <p>Disassociates a subnet or gateway from a route table.</p>
/// <p>After you perform this action, the subnet no longer uses the routes in the route table.
/// Instead, it uses the routes in the VPC's main route table. For more information
/// about route tables, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route
/// tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct DisassociateRouteTable<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disassociate_route_table_input::Builder,
}
impl<C, M, R> DisassociateRouteTable<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisassociateRouteTable`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateRouteTableOutput,
aws_smithy_http::result::SdkError<crate::error::DisassociateRouteTableError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisassociateRouteTableInputOperationOutputAlias,
crate::output::DisassociateRouteTableOutput,
crate::error::DisassociateRouteTableError,
crate::input::DisassociateRouteTableInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The association ID representing the current association between the route table and subnet or gateway.</p>
pub fn association_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_id(inp);
self
}
/// <p>The association ID representing the current association between the route table and subnet or gateway.</p>
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_association_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateSubnetCidrBlock`.
///
/// <p>Disassociates a CIDR block from a subnet. Currently, you can disassociate an IPv6 CIDR block only. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it. </p>
#[derive(std::fmt::Debug)]
pub struct DisassociateSubnetCidrBlock<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disassociate_subnet_cidr_block_input::Builder,
}
impl<C, M, R> DisassociateSubnetCidrBlock<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisassociateSubnetCidrBlock`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateSubnetCidrBlockOutput,
aws_smithy_http::result::SdkError<crate::error::DisassociateSubnetCidrBlockError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisassociateSubnetCidrBlockInputOperationOutputAlias,
crate::output::DisassociateSubnetCidrBlockOutput,
crate::error::DisassociateSubnetCidrBlockError,
crate::input::DisassociateSubnetCidrBlockInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The association ID for the CIDR block.</p>
pub fn association_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_id(inp);
self
}
/// <p>The association ID for the CIDR block.</p>
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_association_id(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateTransitGatewayMulticastDomain`.
///
/// <p>Disassociates the specified subnets from the transit gateway multicast domain. </p>
#[derive(std::fmt::Debug)]
pub struct DisassociateTransitGatewayMulticastDomain<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disassociate_transit_gateway_multicast_domain_input::Builder,
}
impl<C, M, R> DisassociateTransitGatewayMulticastDomain<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisassociateTransitGatewayMulticastDomain`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateTransitGatewayMulticastDomainOutput,
aws_smithy_http::result::SdkError<
crate::error::DisassociateTransitGatewayMulticastDomainError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisassociateTransitGatewayMulticastDomainInputOperationOutputAlias,
crate::output::DisassociateTransitGatewayMulticastDomainOutput,
crate::error::DisassociateTransitGatewayMulticastDomainError,
crate::input::DisassociateTransitGatewayMulticastDomainInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn transit_gateway_multicast_domain_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_multicast_domain_id(inp);
self
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn set_transit_gateway_multicast_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_multicast_domain_id(input);
self
}
/// <p>The ID of the attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// Appends an item to `SubnetIds`.
///
/// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
///
/// <p>The IDs of the subnets;</p>
pub fn subnet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_ids(inp);
self
}
/// <p>The IDs of the subnets;</p>
pub fn set_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_subnet_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateTransitGatewayRouteTable`.
///
/// <p>Disassociates a resource attachment from a transit gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct DisassociateTransitGatewayRouteTable<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disassociate_transit_gateway_route_table_input::Builder,
}
impl<C, M, R> DisassociateTransitGatewayRouteTable<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisassociateTransitGatewayRouteTable`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateTransitGatewayRouteTableOutput,
aws_smithy_http::result::SdkError<
crate::error::DisassociateTransitGatewayRouteTableError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisassociateTransitGatewayRouteTableInputOperationOutputAlias,
crate::output::DisassociateTransitGatewayRouteTableOutput,
crate::error::DisassociateTransitGatewayRouteTableError,
crate::input::DisassociateTransitGatewayRouteTableInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the transit gateway route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// <p>The ID of the attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateTrunkInterface`.
///
/// <note>
/// <p>This API action is currently in <b>limited preview only</b>.
/// If you are interested in using this feature, contact your account manager.</p>
/// </note>
/// <p>Removes an association between a branch network interface with a trunk network interface.</p>
#[derive(std::fmt::Debug)]
pub struct DisassociateTrunkInterface<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disassociate_trunk_interface_input::Builder,
}
impl<C, M, R> DisassociateTrunkInterface<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisassociateTrunkInterface`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateTrunkInterfaceOutput,
aws_smithy_http::result::SdkError<crate::error::DisassociateTrunkInterfaceError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisassociateTrunkInterfaceInputOperationOutputAlias,
crate::output::DisassociateTrunkInterfaceOutput,
crate::error::DisassociateTrunkInterfaceError,
crate::input::DisassociateTrunkInterfaceInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the association</p>
pub fn association_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_id(inp);
self
}
/// <p>The ID of the association</p>
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_association_id(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to Ensure
/// Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to Ensure
/// Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateVpcCidrBlock`.
///
/// <p>Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you must
/// specify its association ID. You can get the association ID by using
/// <a>DescribeVpcs</a>. You must detach or delete all gateways and resources that
/// are associated with the CIDR block before you can disassociate it. </p>
/// <p>You cannot disassociate the CIDR block with which you originally created the VPC (the
/// primary CIDR block).</p>
#[derive(std::fmt::Debug)]
pub struct DisassociateVpcCidrBlock<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::disassociate_vpc_cidr_block_input::Builder,
}
impl<C, M, R> DisassociateVpcCidrBlock<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DisassociateVpcCidrBlock`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateVpcCidrBlockOutput,
aws_smithy_http::result::SdkError<crate::error::DisassociateVpcCidrBlockError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DisassociateVpcCidrBlockInputOperationOutputAlias,
crate::output::DisassociateVpcCidrBlockOutput,
crate::error::DisassociateVpcCidrBlockError,
crate::input::DisassociateVpcCidrBlockInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The association ID for the CIDR block.</p>
pub fn association_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_id(inp);
self
}
/// <p>The association ID for the CIDR block.</p>
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_association_id(input);
self
}
}
/// Fluent builder constructing a request to `EnableEbsEncryptionByDefault`.
///
/// <p>Enables EBS encryption by default for your account in the current Region.</p>
/// <p>After you enable encryption by default, the EBS volumes that you create are
/// always encrypted, either using the default KMS key or the KMS key that you specified
/// when you created each volume. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS encryption</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>You can specify the default KMS key for encryption by default using <a>ModifyEbsDefaultKmsKeyId</a>
/// or <a>ResetEbsDefaultKmsKeyId</a>.</p>
/// <p>Enabling encryption by default has no effect on the encryption status of your
/// existing volumes.</p>
/// <p>After you enable encryption by default, you can no longer launch instances
/// using instance types that do not support encryption. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances">Supported
/// instance types</a>.</p>
#[derive(std::fmt::Debug)]
pub struct EnableEbsEncryptionByDefault<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::enable_ebs_encryption_by_default_input::Builder,
}
impl<C, M, R> EnableEbsEncryptionByDefault<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `EnableEbsEncryptionByDefault`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::EnableEbsEncryptionByDefaultOutput,
aws_smithy_http::result::SdkError<crate::error::EnableEbsEncryptionByDefaultError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::EnableEbsEncryptionByDefaultInputOperationOutputAlias,
crate::output::EnableEbsEncryptionByDefaultOutput,
crate::error::EnableEbsEncryptionByDefaultError,
crate::input::EnableEbsEncryptionByDefaultInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `EnableFastSnapshotRestores`.
///
/// <p>Enables fast snapshot restores for the specified snapshots in the specified Availability Zones.</p>
/// <p>You get the full benefit of fast snapshot restores after they enter the <code>enabled</code> state.
/// To get the current state of fast snapshot restores, use <a>DescribeFastSnapshotRestores</a>.
/// To disable fast snapshot restores, use <a>DisableFastSnapshotRestores</a>.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-fast-snapshot-restore.html">Amazon EBS fast snapshot
/// restore</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct EnableFastSnapshotRestores<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::enable_fast_snapshot_restores_input::Builder,
}
impl<C, M, R> EnableFastSnapshotRestores<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `EnableFastSnapshotRestores`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::EnableFastSnapshotRestoresOutput,
aws_smithy_http::result::SdkError<crate::error::EnableFastSnapshotRestoresError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::EnableFastSnapshotRestoresInputOperationOutputAlias,
crate::output::EnableFastSnapshotRestoresOutput,
crate::error::EnableFastSnapshotRestoresError,
crate::input::EnableFastSnapshotRestoresInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `AvailabilityZones`.
///
/// To override the contents of this collection use [`set_availability_zones`](Self::set_availability_zones).
///
/// <p>One or more Availability Zones. For example, <code>us-east-2a</code>.</p>
pub fn availability_zones(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zones(inp);
self
}
/// <p>One or more Availability Zones. For example, <code>us-east-2a</code>.</p>
pub fn set_availability_zones(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_availability_zones(input);
self
}
/// Appends an item to `SourceSnapshotIds`.
///
/// To override the contents of this collection use [`set_source_snapshot_ids`](Self::set_source_snapshot_ids).
///
/// <p>The IDs of one or more snapshots. For example, <code>snap-1234567890abcdef0</code>. You can specify
/// a snapshot that was shared with you from another Amazon Web Services account.</p>
pub fn source_snapshot_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_snapshot_ids(inp);
self
}
/// <p>The IDs of one or more snapshots. For example, <code>snap-1234567890abcdef0</code>. You can specify
/// a snapshot that was shared with you from another Amazon Web Services account.</p>
pub fn set_source_snapshot_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_source_snapshot_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `EnableImageDeprecation`.
///
/// <p>Enables deprecation of the specified AMI at the specified date and time.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html">Deprecate an AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct EnableImageDeprecation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::enable_image_deprecation_input::Builder,
}
impl<C, M, R> EnableImageDeprecation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `EnableImageDeprecation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::EnableImageDeprecationOutput,
aws_smithy_http::result::SdkError<crate::error::EnableImageDeprecationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::EnableImageDeprecationInputOperationOutputAlias,
crate::output::EnableImageDeprecationOutput,
crate::error::EnableImageDeprecationError,
crate::input::EnableImageDeprecationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the AMI.</p>
pub fn image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.image_id(inp);
self
}
/// <p>The ID of the AMI.</p>
pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_image_id(input);
self
}
/// <p>The date and time to deprecate the AMI, in UTC, in the following format:
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z.
/// If you specify a value for seconds, Amazon EC2 rounds the seconds to the
/// nearest minute.</p>
/// <p>You can’t specify a date in the past. The upper limit for <code>DeprecateAt</code> is 10
/// years from now.</p>
pub fn deprecate_at(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.deprecate_at(inp);
self
}
/// <p>The date and time to deprecate the AMI, in UTC, in the following format:
/// <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z.
/// If you specify a value for seconds, Amazon EC2 rounds the seconds to the
/// nearest minute.</p>
/// <p>You can’t specify a date in the past. The upper limit for <code>DeprecateAt</code> is 10
/// years from now.</p>
pub fn set_deprecate_at(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_deprecate_at(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `EnableSerialConsoleAccess`.
///
/// <p>Enables access to the EC2 serial console of all instances for your account. By default,
/// access to the EC2 serial console is disabled for your account. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-access-to-serial-console.html#serial-console-account-access">Manage account access to the EC2 serial console</a>
/// in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct EnableSerialConsoleAccess<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::enable_serial_console_access_input::Builder,
}
impl<C, M, R> EnableSerialConsoleAccess<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `EnableSerialConsoleAccess`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::EnableSerialConsoleAccessOutput,
aws_smithy_http::result::SdkError<crate::error::EnableSerialConsoleAccessError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::EnableSerialConsoleAccessInputOperationOutputAlias,
crate::output::EnableSerialConsoleAccessOutput,
crate::error::EnableSerialConsoleAccessError,
crate::input::EnableSerialConsoleAccessInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `EnableTransitGatewayRouteTablePropagation`.
///
/// <p>Enables the specified attachment to propagate routes to the specified
/// propagation route table.</p>
#[derive(std::fmt::Debug)]
pub struct EnableTransitGatewayRouteTablePropagation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::enable_transit_gateway_route_table_propagation_input::Builder,
}
impl<C, M, R> EnableTransitGatewayRouteTablePropagation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `EnableTransitGatewayRouteTablePropagation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::EnableTransitGatewayRouteTablePropagationOutput,
aws_smithy_http::result::SdkError<
crate::error::EnableTransitGatewayRouteTablePropagationError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::EnableTransitGatewayRouteTablePropagationInputOperationOutputAlias,
crate::output::EnableTransitGatewayRouteTablePropagationOutput,
crate::error::EnableTransitGatewayRouteTablePropagationError,
crate::input::EnableTransitGatewayRouteTablePropagationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the propagation route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the propagation route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// <p>The ID of the attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `EnableVgwRoutePropagation`.
///
/// <p>Enables a virtual private gateway (VGW) to propagate routes to the specified route
/// table of a VPC.</p>
#[derive(std::fmt::Debug)]
pub struct EnableVgwRoutePropagation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::enable_vgw_route_propagation_input::Builder,
}
impl<C, M, R> EnableVgwRoutePropagation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `EnableVgwRoutePropagation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::EnableVgwRoutePropagationOutput,
aws_smithy_http::result::SdkError<crate::error::EnableVgwRoutePropagationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::EnableVgwRoutePropagationInputOperationOutputAlias,
crate::output::EnableVgwRoutePropagationOutput,
crate::error::EnableVgwRoutePropagationError,
crate::input::EnableVgwRoutePropagationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the virtual private gateway that is attached to a VPC. The virtual private
/// gateway must be attached to the same VPC that the routing tables are associated with.
/// </p>
pub fn gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.gateway_id(inp);
self
}
/// <p>The ID of the virtual private gateway that is attached to a VPC. The virtual private
/// gateway must be attached to the same VPC that the routing tables are associated with.
/// </p>
pub fn set_gateway_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_gateway_id(input);
self
}
/// <p>The ID of the route table. The routing table must be associated with the same VPC that
/// the virtual private gateway is attached to. </p>
pub fn route_table_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.route_table_id(inp);
self
}
/// <p>The ID of the route table. The routing table must be associated with the same VPC that
/// the virtual private gateway is attached to. </p>
pub fn set_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_route_table_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `EnableVolumeIO`.
///
/// <p>Enables I/O operations for a volume that had I/O operations disabled because the data on
/// the volume was potentially inconsistent.</p>
#[derive(std::fmt::Debug)]
pub struct EnableVolumeIO<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::enable_volume_io_input::Builder,
}
impl<C, M, R> EnableVolumeIO<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `EnableVolumeIO`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::EnableVolumeIoOutput,
aws_smithy_http::result::SdkError<crate::error::EnableVolumeIOError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::EnableVolumeIoInputOperationOutputAlias,
crate::output::EnableVolumeIoOutput,
crate::error::EnableVolumeIOError,
crate::input::EnableVolumeIoInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the volume.</p>
pub fn volume_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.volume_id(inp);
self
}
/// <p>The ID of the volume.</p>
pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_volume_id(input);
self
}
}
/// Fluent builder constructing a request to `EnableVpcClassicLink`.
///
/// <p>Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your
/// ClassicLink-enabled VPC to allow communication over private IP addresses. You cannot
/// enable your VPC for ClassicLink if any of your VPC route tables have existing routes for
/// address ranges within the <code>10.0.0.0/8</code> IP address range, excluding local
/// routes for VPCs in the <code>10.0.0.0/16</code> and <code>10.1.0.0/16</code> IP address
/// ranges. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html">ClassicLink</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct EnableVpcClassicLink<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::enable_vpc_classic_link_input::Builder,
}
impl<C, M, R> EnableVpcClassicLink<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `EnableVpcClassicLink`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::EnableVpcClassicLinkOutput,
aws_smithy_http::result::SdkError<crate::error::EnableVpcClassicLinkError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::EnableVpcClassicLinkInputOperationOutputAlias,
crate::output::EnableVpcClassicLinkOutput,
crate::error::EnableVpcClassicLinkError,
crate::input::EnableVpcClassicLinkInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
}
/// Fluent builder constructing a request to `EnableVpcClassicLinkDnsSupport`.
///
/// <p>Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, the DNS
/// hostname of a linked EC2-Classic instance resolves to its private IP address when
/// addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname
/// of an instance in a VPC resolves to its private IP address when addressed from a linked
/// EC2-Classic instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html">ClassicLink</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>You must specify a VPC ID in the request.</p>
#[derive(std::fmt::Debug)]
pub struct EnableVpcClassicLinkDnsSupport<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::enable_vpc_classic_link_dns_support_input::Builder,
}
impl<C, M, R> EnableVpcClassicLinkDnsSupport<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `EnableVpcClassicLinkDnsSupport`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::EnableVpcClassicLinkDnsSupportOutput,
aws_smithy_http::result::SdkError<crate::error::EnableVpcClassicLinkDnsSupportError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::EnableVpcClassicLinkDnsSupportInputOperationOutputAlias,
crate::output::EnableVpcClassicLinkDnsSupportOutput,
crate::error::EnableVpcClassicLinkDnsSupportError,
crate::input::EnableVpcClassicLinkDnsSupportInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
}
/// Fluent builder constructing a request to `ExportClientVpnClientCertificateRevocationList`.
///
/// <p>Downloads the client certificate revocation list for the specified Client VPN endpoint.</p>
#[derive(std::fmt::Debug)]
pub struct ExportClientVpnClientCertificateRevocationList<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::export_client_vpn_client_certificate_revocation_list_input::Builder,
}
impl<C, M, R> ExportClientVpnClientCertificateRevocationList<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ExportClientVpnClientCertificateRevocationList`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(self) -> std::result::Result<crate::output::ExportClientVpnClientCertificateRevocationListOutput, aws_smithy_http::result::SdkError<crate::error::ExportClientVpnClientCertificateRevocationListError>>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<crate::input::ExportClientVpnClientCertificateRevocationListInputOperationOutputAlias,
crate::output::ExportClientVpnClientCertificateRevocationListOutput,
crate::error::ExportClientVpnClientCertificateRevocationListError,
crate::input::ExportClientVpnClientCertificateRevocationListInputOperationRetryAlias>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ExportClientVpnClientConfiguration`.
///
/// <p>Downloads the contents of the Client VPN endpoint configuration file for the specified Client VPN endpoint. The Client VPN endpoint configuration
/// file includes the Client VPN endpoint and certificate information clients need to establish a connection
/// with the Client VPN endpoint.</p>
#[derive(std::fmt::Debug)]
pub struct ExportClientVpnClientConfiguration<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::export_client_vpn_client_configuration_input::Builder,
}
impl<C, M, R> ExportClientVpnClientConfiguration<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ExportClientVpnClientConfiguration`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ExportClientVpnClientConfigurationOutput,
aws_smithy_http::result::SdkError<
crate::error::ExportClientVpnClientConfigurationError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ExportClientVpnClientConfigurationInputOperationOutputAlias,
crate::output::ExportClientVpnClientConfigurationOutput,
crate::error::ExportClientVpnClientConfigurationError,
crate::input::ExportClientVpnClientConfigurationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ExportImage`.
///
/// <p>Exports an Amazon Machine Image (AMI) to a VM file. For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport_image.html">Exporting a VM
/// directly from an Amazon Machine Image (AMI)</a> in the
/// <i>VM Import/Export User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ExportImage<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::export_image_input::Builder,
}
impl<C, M, R> ExportImage<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ExportImage`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ExportImageOutput,
aws_smithy_http::result::SdkError<crate::error::ExportImageError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ExportImageInputOperationOutputAlias,
crate::output::ExportImageOutput,
crate::error::ExportImageError,
crate::input::ExportImageInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Token to enable idempotency for export image requests.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Token to enable idempotency for export image requests.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>A description of the image being exported. The maximum length is 255 characters.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description of the image being exported. The maximum length is 255 characters.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>The disk image format.</p>
pub fn disk_image_format(mut self, inp: crate::model::DiskImageFormat) -> Self {
self.inner = self.inner.disk_image_format(inp);
self
}
/// <p>The disk image format.</p>
pub fn set_disk_image_format(
mut self,
input: std::option::Option<crate::model::DiskImageFormat>,
) -> Self {
self.inner = self.inner.set_disk_image_format(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the image.</p>
pub fn image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.image_id(inp);
self
}
/// <p>The ID of the image.</p>
pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_image_id(input);
self
}
/// <p>Information about the destination Amazon S3 bucket. The bucket must exist and grant WRITE
/// and READ_ACP permissions to the Amazon Web Services account vm-import-export@amazon.com.</p>
pub fn s3_export_location(
mut self,
inp: crate::model::ExportTaskS3LocationRequest,
) -> Self {
self.inner = self.inner.s3_export_location(inp);
self
}
/// <p>Information about the destination Amazon S3 bucket. The bucket must exist and grant WRITE
/// and READ_ACP permissions to the Amazon Web Services account vm-import-export@amazon.com.</p>
pub fn set_s3_export_location(
mut self,
input: std::option::Option<crate::model::ExportTaskS3LocationRequest>,
) -> Self {
self.inner = self.inner.set_s3_export_location(input);
self
}
/// <p>The name of the role that grants VM Import/Export permission to export images to your Amazon
/// S3 bucket. If this parameter is not specified, the default role is named 'vmimport'.</p>
pub fn role_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.role_name(inp);
self
}
/// <p>The name of the role that grants VM Import/Export permission to export images to your Amazon
/// S3 bucket. If this parameter is not specified, the default role is named 'vmimport'.</p>
pub fn set_role_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_role_name(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the export image task during creation.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the export image task during creation.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `ExportTransitGatewayRoutes`.
///
/// <p>Exports routes from the specified transit gateway route table to the specified S3 bucket.
/// By default, all routes are exported. Alternatively, you can filter by CIDR range.</p>
/// <p>The routes are saved to the specified bucket in a JSON file. For more information, see
/// <a href="https://docs.aws.amazon.com/vpc/latest/tgw/tgw-route-tables.html#tgw-export-route-tables">Export Route Tables
/// to Amazon S3</a> in <i>Transit Gateways</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ExportTransitGatewayRoutes<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::export_transit_gateway_routes_input::Builder,
}
impl<C, M, R> ExportTransitGatewayRoutes<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ExportTransitGatewayRoutes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ExportTransitGatewayRoutesOutput,
aws_smithy_http::result::SdkError<crate::error::ExportTransitGatewayRoutesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ExportTransitGatewayRoutesInputOperationOutputAlias,
crate::output::ExportTransitGatewayRoutesOutput,
crate::error::ExportTransitGatewayRoutesError,
crate::input::ExportTransitGatewayRoutesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>attachment.transit-gateway-attachment-id</code> - The id of the transit gateway attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.resource-id</code> - The resource id of the transit gateway attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.exact-match</code> - The exact match of the specified filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.longest-prefix-match</code> - The longest prefix that matches the route.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.subnet-of-match</code> - The routes with a subnet that match the specified CIDR filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.supernet-of-match</code> - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the route (<code>active</code> | <code>blackhole</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-route-destination-cidr-block</code> - The CIDR range.</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of route (<code>propagated</code> |
/// <code>static</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>attachment.transit-gateway-attachment-id</code> - The id of the transit gateway attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.resource-id</code> - The resource id of the transit gateway attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.exact-match</code> - The exact match of the specified filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.longest-prefix-match</code> - The longest prefix that matches the route.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.subnet-of-match</code> - The routes with a subnet that match the specified CIDR filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.supernet-of-match</code> - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the route (<code>active</code> | <code>blackhole</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-route-destination-cidr-block</code> - The CIDR range.</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of route (<code>propagated</code> |
/// <code>static</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The name of the S3 bucket.</p>
pub fn s3_bucket(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.s3_bucket(inp);
self
}
/// <p>The name of the S3 bucket.</p>
pub fn set_s3_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_s3_bucket(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetAssociatedEnclaveCertificateIamRoles`.
///
/// <p>Returns the IAM roles that are associated with the specified ACM (ACM) certificate.
/// It also returns the name of the Amazon S3 bucket and the Amazon S3 object key where the certificate,
/// certificate chain, and encrypted private key bundle are stored, and the ARN of the KMS key
/// that's used to encrypt the private key.</p>
#[derive(std::fmt::Debug)]
pub struct GetAssociatedEnclaveCertificateIamRoles<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_associated_enclave_certificate_iam_roles_input::Builder,
}
impl<C, M, R> GetAssociatedEnclaveCertificateIamRoles<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetAssociatedEnclaveCertificateIamRoles`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetAssociatedEnclaveCertificateIamRolesOutput,
aws_smithy_http::result::SdkError<
crate::error::GetAssociatedEnclaveCertificateIamRolesError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetAssociatedEnclaveCertificateIamRolesInputOperationOutputAlias,
crate::output::GetAssociatedEnclaveCertificateIamRolesOutput,
crate::error::GetAssociatedEnclaveCertificateIamRolesError,
crate::input::GetAssociatedEnclaveCertificateIamRolesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ARN of the ACM certificate for which to view the associated IAM roles, encryption keys, and Amazon
/// S3 object information.</p>
pub fn certificate_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.certificate_arn(inp);
self
}
/// <p>The ARN of the ACM certificate for which to view the associated IAM roles, encryption keys, and Amazon
/// S3 object information.</p>
pub fn set_certificate_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_certificate_arn(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetAssociatedIpv6PoolCidrs`.
///
/// <p>Gets information about the IPv6 CIDR block associations for a specified IPv6 address pool.</p>
#[derive(std::fmt::Debug)]
pub struct GetAssociatedIpv6PoolCidrs<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_associated_ipv6_pool_cidrs_input::Builder,
}
impl<C, M, R> GetAssociatedIpv6PoolCidrs<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetAssociatedIpv6PoolCidrs`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetAssociatedIpv6PoolCidrsOutput,
aws_smithy_http::result::SdkError<crate::error::GetAssociatedIpv6PoolCidrsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetAssociatedIpv6PoolCidrsInputOperationOutputAlias,
crate::output::GetAssociatedIpv6PoolCidrsOutput,
crate::error::GetAssociatedIpv6PoolCidrsError,
crate::input::GetAssociatedIpv6PoolCidrsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the IPv6 address pool.</p>
pub fn pool_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pool_id(inp);
self
}
/// <p>The ID of the IPv6 address pool.</p>
pub fn set_pool_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pool_id(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetCapacityReservationUsage`.
///
/// <p>Gets usage information about a Capacity Reservation. If the Capacity Reservation is shared, it shows usage information for the Capacity Reservation owner
/// and each Amazon Web Services account that is currently using the shared capacity. If the Capacity Reservation is not shared, it shows only
/// the Capacity Reservation owner's usage.</p>
#[derive(std::fmt::Debug)]
pub struct GetCapacityReservationUsage<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_capacity_reservation_usage_input::Builder,
}
impl<C, M, R> GetCapacityReservationUsage<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetCapacityReservationUsage`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetCapacityReservationUsageOutput,
aws_smithy_http::result::SdkError<crate::error::GetCapacityReservationUsageError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetCapacityReservationUsageInputOperationOutputAlias,
crate::output::GetCapacityReservationUsageOutput,
crate::error::GetCapacityReservationUsageError,
crate::input::GetCapacityReservationUsageInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Capacity Reservation.</p>
pub fn capacity_reservation_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.capacity_reservation_id(inp);
self
}
/// <p>The ID of the Capacity Reservation.</p>
pub fn set_capacity_reservation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_capacity_reservation_id(input);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
/// <p>Valid range: Minimum value of 1. Maximum value of 1000.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
/// <p>Valid range: Minimum value of 1. Maximum value of 1000.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetCoipPoolUsage`.
///
/// <p>Describes the allocations from the specified customer-owned address pool.</p>
#[derive(std::fmt::Debug)]
pub struct GetCoipPoolUsage<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_coip_pool_usage_input::Builder,
}
impl<C, M, R> GetCoipPoolUsage<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetCoipPoolUsage`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetCoipPoolUsageOutput,
aws_smithy_http::result::SdkError<crate::error::GetCoipPoolUsageError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetCoipPoolUsageInputOperationOutputAlias,
crate::output::GetCoipPoolUsageOutput,
crate::error::GetCoipPoolUsageError,
crate::input::GetCoipPoolUsageInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the address pool.</p>
pub fn pool_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.pool_id(inp);
self
}
/// <p>The ID of the address pool.</p>
pub fn set_pool_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_pool_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>The filters. The following are the possible values:</p>
/// <ul>
/// <li>
/// <p>
/// <code>coip-address-usage.allocation-id</code>
/// </p>
/// </li>
/// </ul>
/// <ul>
/// <li>
/// <p>
/// <code>coip-address-usage.aws-account-id</code>
/// </p>
/// </li>
/// </ul>
/// <ul>
/// <li>
/// <p>
/// <code>coip-address-usage.aws-service</code>
/// </p>
/// </li>
/// </ul>
/// <ul>
/// <li>
/// <p>
/// <code>coip-address-usage.co-ip</code>
/// </p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>The filters. The following are the possible values:</p>
/// <ul>
/// <li>
/// <p>
/// <code>coip-address-usage.allocation-id</code>
/// </p>
/// </li>
/// </ul>
/// <ul>
/// <li>
/// <p>
/// <code>coip-address-usage.aws-account-id</code>
/// </p>
/// </li>
/// </ul>
/// <ul>
/// <li>
/// <p>
/// <code>coip-address-usage.aws-service</code>
/// </p>
/// </li>
/// </ul>
/// <ul>
/// <li>
/// <p>
/// <code>coip-address-usage.co-ip</code>
/// </p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetConsoleOutput`.
///
/// <p>Gets the console output for the specified instance. For Linux instances, the instance
/// console output displays the exact console output that would normally be displayed on a
/// physical monitor attached to a computer. For Windows instances, the instance console
/// output includes the last three system event log errors.</p>
/// <p>By default, the console output returns buffered information that was posted shortly
/// after an instance transition state (start, stop, reboot, or terminate). This information
/// is available for at least one hour after the most recent post. Only the most recent 64
/// KB of console output is available.</p>
/// <p>You can optionally retrieve the latest serial console output at any time during the
/// instance lifecycle. This option is supported on instance types that use the Nitro
/// hypervisor.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html#instance-console-console-output">Instance
/// console output</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct GetConsoleOutput<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_console_output_input::Builder,
}
impl<C, M, R> GetConsoleOutput<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetConsoleOutput`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetConsoleOutputOutput,
aws_smithy_http::result::SdkError<crate::error::GetConsoleOutputError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetConsoleOutputInputOperationOutputAlias,
crate::output::GetConsoleOutputOutput,
crate::error::GetConsoleOutputError,
crate::input::GetConsoleOutputInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>When enabled, retrieves the latest console output for the instance.</p>
/// <p>Default: disabled (<code>false</code>)</p>
pub fn latest(mut self, inp: bool) -> Self {
self.inner = self.inner.latest(inp);
self
}
/// <p>When enabled, retrieves the latest console output for the instance.</p>
/// <p>Default: disabled (<code>false</code>)</p>
pub fn set_latest(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_latest(input);
self
}
}
/// Fluent builder constructing a request to `GetConsoleScreenshot`.
///
/// <p>Retrieve a JPG-format screenshot of a running instance to help with
/// troubleshooting.</p>
/// <p>The returned content is Base64-encoded.</p>
#[derive(std::fmt::Debug)]
pub struct GetConsoleScreenshot<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_console_screenshot_input::Builder,
}
impl<C, M, R> GetConsoleScreenshot<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetConsoleScreenshot`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetConsoleScreenshotOutput,
aws_smithy_http::result::SdkError<crate::error::GetConsoleScreenshotError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetConsoleScreenshotInputOperationOutputAlias,
crate::output::GetConsoleScreenshotOutput,
crate::error::GetConsoleScreenshotError,
crate::input::GetConsoleScreenshotInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>When set to <code>true</code>, acts as keystroke input and wakes up an instance that's
/// in standby or "sleep" mode.</p>
pub fn wake_up(mut self, inp: bool) -> Self {
self.inner = self.inner.wake_up(inp);
self
}
/// <p>When set to <code>true</code>, acts as keystroke input and wakes up an instance that's
/// in standby or "sleep" mode.</p>
pub fn set_wake_up(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_wake_up(input);
self
}
}
/// Fluent builder constructing a request to `GetDefaultCreditSpecification`.
///
/// <p>Describes the default credit option for CPU usage of a burstable performance instance family.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable
/// performance instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct GetDefaultCreditSpecification<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_default_credit_specification_input::Builder,
}
impl<C, M, R> GetDefaultCreditSpecification<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetDefaultCreditSpecification`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetDefaultCreditSpecificationOutput,
aws_smithy_http::result::SdkError<crate::error::GetDefaultCreditSpecificationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetDefaultCreditSpecificationInputOperationOutputAlias,
crate::output::GetDefaultCreditSpecificationOutput,
crate::error::GetDefaultCreditSpecificationError,
crate::input::GetDefaultCreditSpecificationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The instance family.</p>
pub fn instance_family(
mut self,
inp: crate::model::UnlimitedSupportedInstanceFamily,
) -> Self {
self.inner = self.inner.instance_family(inp);
self
}
/// <p>The instance family.</p>
pub fn set_instance_family(
mut self,
input: std::option::Option<crate::model::UnlimitedSupportedInstanceFamily>,
) -> Self {
self.inner = self.inner.set_instance_family(input);
self
}
}
/// Fluent builder constructing a request to `GetEbsDefaultKmsKeyId`.
///
/// <p>Describes the default KMS key for EBS encryption by default for your account in this Region.
/// You can change the default KMS key for encryption by default using <a>ModifyEbsDefaultKmsKeyId</a> or
/// <a>ResetEbsDefaultKmsKeyId</a>.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS encryption</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct GetEbsDefaultKmsKeyId<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_ebs_default_kms_key_id_input::Builder,
}
impl<C, M, R> GetEbsDefaultKmsKeyId<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetEbsDefaultKmsKeyId`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetEbsDefaultKmsKeyIdOutput,
aws_smithy_http::result::SdkError<crate::error::GetEbsDefaultKmsKeyIdError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetEbsDefaultKmsKeyIdInputOperationOutputAlias,
crate::output::GetEbsDefaultKmsKeyIdOutput,
crate::error::GetEbsDefaultKmsKeyIdError,
crate::input::GetEbsDefaultKmsKeyIdInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetEbsEncryptionByDefault`.
///
/// <p>Describes whether EBS encryption by default is enabled for your account in the current
/// Region.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS encryption</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct GetEbsEncryptionByDefault<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_ebs_encryption_by_default_input::Builder,
}
impl<C, M, R> GetEbsEncryptionByDefault<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetEbsEncryptionByDefault`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetEbsEncryptionByDefaultOutput,
aws_smithy_http::result::SdkError<crate::error::GetEbsEncryptionByDefaultError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetEbsEncryptionByDefaultInputOperationOutputAlias,
crate::output::GetEbsEncryptionByDefaultOutput,
crate::error::GetEbsEncryptionByDefaultError,
crate::input::GetEbsEncryptionByDefaultInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetFlowLogsIntegrationTemplate`.
///
/// <p>Generates a CloudFormation template that streamlines and automates the integration of VPC flow logs
/// with Amazon Athena. This make it easier for you to query and gain insights from VPC flow logs data.
/// Based on the information that you provide, we configure resources in the template to do the following:</p>
/// <ul>
/// <li>
/// <p>Create a table in Athena that maps fields to a custom log format</p>
/// </li>
/// <li>
/// <p>Create a Lambda function that updates the table with new partitions on a daily, weekly, or
/// monthly basis</p>
/// </li>
/// <li>
/// <p>Create a table partitioned between two timestamps in the past</p>
/// </li>
/// <li>
/// <p>Create a set of named queries in Athena that you can use to get started quickly</p>
/// </li>
/// </ul>
#[derive(std::fmt::Debug)]
pub struct GetFlowLogsIntegrationTemplate<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_flow_logs_integration_template_input::Builder,
}
impl<C, M, R> GetFlowLogsIntegrationTemplate<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetFlowLogsIntegrationTemplate`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetFlowLogsIntegrationTemplateOutput,
aws_smithy_http::result::SdkError<crate::error::GetFlowLogsIntegrationTemplateError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetFlowLogsIntegrationTemplateInputOperationOutputAlias,
crate::output::GetFlowLogsIntegrationTemplateOutput,
crate::error::GetFlowLogsIntegrationTemplateError,
crate::input::GetFlowLogsIntegrationTemplateInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the flow log.</p>
pub fn flow_log_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.flow_log_id(inp);
self
}
/// <p>The ID of the flow log.</p>
pub fn set_flow_log_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_flow_log_id(input);
self
}
/// <p>To store the CloudFormation template in Amazon S3, specify the location in Amazon S3.</p>
pub fn config_delivery_s3_destination_arn(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.config_delivery_s3_destination_arn(inp);
self
}
/// <p>To store the CloudFormation template in Amazon S3, specify the location in Amazon S3.</p>
pub fn set_config_delivery_s3_destination_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_config_delivery_s3_destination_arn(input);
self
}
/// <p>Information about the service integration.</p>
pub fn integrate_services(mut self, inp: crate::model::IntegrateServices) -> Self {
self.inner = self.inner.integrate_services(inp);
self
}
/// <p>Information about the service integration.</p>
pub fn set_integrate_services(
mut self,
input: std::option::Option<crate::model::IntegrateServices>,
) -> Self {
self.inner = self.inner.set_integrate_services(input);
self
}
}
/// Fluent builder constructing a request to `GetGroupsForCapacityReservation`.
///
/// <p>Lists the resource groups to which a Capacity Reservation has been added.</p>
#[derive(std::fmt::Debug)]
pub struct GetGroupsForCapacityReservation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_groups_for_capacity_reservation_input::Builder,
}
impl<C, M, R> GetGroupsForCapacityReservation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetGroupsForCapacityReservation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetGroupsForCapacityReservationOutput,
aws_smithy_http::result::SdkError<crate::error::GetGroupsForCapacityReservationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetGroupsForCapacityReservationInputOperationOutputAlias,
crate::output::GetGroupsForCapacityReservationOutput,
crate::error::GetGroupsForCapacityReservationError,
crate::input::GetGroupsForCapacityReservationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Capacity Reservation.</p>
pub fn capacity_reservation_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.capacity_reservation_id(inp);
self
}
/// <p>The ID of the Capacity Reservation.</p>
pub fn set_capacity_reservation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_capacity_reservation_id(input);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token to use to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetHostReservationPurchasePreview`.
///
/// <p>Preview a reservation purchase with configurations that match those of your
/// Dedicated Host. You must have active Dedicated Hosts in your account before you purchase
/// a reservation.</p>
/// <p>This is a preview of the <a>PurchaseHostReservation</a> action and does
/// not result in the offering being purchased.</p>
#[derive(std::fmt::Debug)]
pub struct GetHostReservationPurchasePreview<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_host_reservation_purchase_preview_input::Builder,
}
impl<C, M, R> GetHostReservationPurchasePreview<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetHostReservationPurchasePreview`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetHostReservationPurchasePreviewOutput,
aws_smithy_http::result::SdkError<crate::error::GetHostReservationPurchasePreviewError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetHostReservationPurchasePreviewInputOperationOutputAlias,
crate::output::GetHostReservationPurchasePreviewOutput,
crate::error::GetHostReservationPurchasePreviewError,
crate::input::GetHostReservationPurchasePreviewInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `HostIdSet`.
///
/// To override the contents of this collection use [`set_host_id_set`](Self::set_host_id_set).
///
/// <p>The IDs of the Dedicated Hosts with which the reservation is associated.</p>
pub fn host_id_set(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.host_id_set(inp);
self
}
/// <p>The IDs of the Dedicated Hosts with which the reservation is associated.</p>
pub fn set_host_id_set(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_host_id_set(input);
self
}
/// <p>The offering ID of the reservation.</p>
pub fn offering_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.offering_id(inp);
self
}
/// <p>The offering ID of the reservation.</p>
pub fn set_offering_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_offering_id(input);
self
}
}
/// Fluent builder constructing a request to `GetLaunchTemplateData`.
///
/// <p>Retrieves the configuration data of the specified instance. You can use this data
/// to create a launch template. </p>
/// <p>This action calls on other describe actions to get instance information. Depending on your instance configuration, you may need to allow the following
/// actions in your IAM policy: DescribeSpotInstanceRequests, DescribeInstanceCreditSpecifications, DescribeVolumes, DescribeInstanceAttribute, and DescribeElasticGpus. Or, you can allow
/// <code>describe*</code> depending on your instance requirements.</p>
#[derive(std::fmt::Debug)]
pub struct GetLaunchTemplateData<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_launch_template_data_input::Builder,
}
impl<C, M, R> GetLaunchTemplateData<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetLaunchTemplateData`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetLaunchTemplateDataOutput,
aws_smithy_http::result::SdkError<crate::error::GetLaunchTemplateDataError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetLaunchTemplateDataInputOperationOutputAlias,
crate::output::GetLaunchTemplateDataOutput,
crate::error::GetLaunchTemplateDataError,
crate::input::GetLaunchTemplateDataInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
}
/// Fluent builder constructing a request to `GetManagedPrefixListAssociations`.
///
/// <p>Gets information about the resources that are associated with the specified managed prefix list.</p>
#[derive(std::fmt::Debug)]
pub struct GetManagedPrefixListAssociations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_managed_prefix_list_associations_input::Builder,
}
impl<C, M, R> GetManagedPrefixListAssociations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetManagedPrefixListAssociations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetManagedPrefixListAssociationsOutput,
aws_smithy_http::result::SdkError<crate::error::GetManagedPrefixListAssociationsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetManagedPrefixListAssociationsInputOperationOutputAlias,
crate::output::GetManagedPrefixListAssociationsOutput,
crate::error::GetManagedPrefixListAssociationsError,
crate::input::GetManagedPrefixListAssociationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the prefix list.</p>
pub fn prefix_list_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix_list_id(inp);
self
}
/// <p>The ID of the prefix list.</p>
pub fn set_prefix_list_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_prefix_list_id(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `GetManagedPrefixListEntries`.
///
/// <p>Gets information about the entries for a specified managed prefix list.</p>
#[derive(std::fmt::Debug)]
pub struct GetManagedPrefixListEntries<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_managed_prefix_list_entries_input::Builder,
}
impl<C, M, R> GetManagedPrefixListEntries<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetManagedPrefixListEntries`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetManagedPrefixListEntriesOutput,
aws_smithy_http::result::SdkError<crate::error::GetManagedPrefixListEntriesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetManagedPrefixListEntriesInputOperationOutputAlias,
crate::output::GetManagedPrefixListEntriesOutput,
crate::error::GetManagedPrefixListEntriesError,
crate::input::GetManagedPrefixListEntriesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the prefix list.</p>
pub fn prefix_list_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix_list_id(inp);
self
}
/// <p>The ID of the prefix list.</p>
pub fn set_prefix_list_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_prefix_list_id(input);
self
}
/// <p>The version of the prefix list for which to return the entries. The default is the current version.</p>
pub fn target_version(mut self, inp: i64) -> Self {
self.inner = self.inner.target_version(inp);
self
}
/// <p>The version of the prefix list for which to return the entries. The default is the current version.</p>
pub fn set_target_version(mut self, input: std::option::Option<i64>) -> Self {
self.inner = self.inner.set_target_version(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
}
/// Fluent builder constructing a request to `GetPasswordData`.
///
/// <p>Retrieves the encrypted administrator password for a running Windows instance.</p>
/// <p>The Windows password is generated at boot by the <code>EC2Config</code> service or
/// <code>EC2Launch</code> scripts (Windows Server 2016 and later). This usually only
/// happens the first time an instance is launched. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/UsingConfig_WinAMI.html">EC2Config</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2launch.html">EC2Launch</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
/// <p>For the <code>EC2Config</code> service, the password is not generated for rebundled
/// AMIs unless <code>Ec2SetPassword</code> is enabled before bundling.</p>
/// <p>The password is encrypted using the key pair that you specified when you launched the
/// instance. You must provide the corresponding key pair file.</p>
/// <p>When you launch an instance, password generation and encryption may take a few
/// minutes. If you try to retrieve the password before it's available, the output returns
/// an empty string. We recommend that you wait up to 15 minutes after launching an instance
/// before trying to retrieve the generated password.</p>
#[derive(std::fmt::Debug)]
pub struct GetPasswordData<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_password_data_input::Builder,
}
impl<C, M, R> GetPasswordData<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetPasswordData`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetPasswordDataOutput,
aws_smithy_http::result::SdkError<crate::error::GetPasswordDataError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetPasswordDataInputOperationOutputAlias,
crate::output::GetPasswordDataOutput,
crate::error::GetPasswordDataError,
crate::input::GetPasswordDataInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Windows instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the Windows instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetReservedInstancesExchangeQuote`.
///
/// <p>Returns a quote and exchange information for exchanging one or more specified
/// Convertible Reserved Instances for a new Convertible Reserved Instance. If the exchange
/// cannot be performed, the reason is returned in the response. Use <a>AcceptReservedInstancesExchangeQuote</a> to perform the exchange.</p>
#[derive(std::fmt::Debug)]
pub struct GetReservedInstancesExchangeQuote<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_reserved_instances_exchange_quote_input::Builder,
}
impl<C, M, R> GetReservedInstancesExchangeQuote<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetReservedInstancesExchangeQuote`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetReservedInstancesExchangeQuoteOutput,
aws_smithy_http::result::SdkError<crate::error::GetReservedInstancesExchangeQuoteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetReservedInstancesExchangeQuoteInputOperationOutputAlias,
crate::output::GetReservedInstancesExchangeQuoteOutput,
crate::error::GetReservedInstancesExchangeQuoteError,
crate::input::GetReservedInstancesExchangeQuoteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `ReservedInstanceIds`.
///
/// To override the contents of this collection use [`set_reserved_instance_ids`](Self::set_reserved_instance_ids).
///
/// <p>The IDs of the Convertible Reserved Instances to exchange.</p>
pub fn reserved_instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.reserved_instance_ids(inp);
self
}
/// <p>The IDs of the Convertible Reserved Instances to exchange.</p>
pub fn set_reserved_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_reserved_instance_ids(input);
self
}
/// Appends an item to `TargetConfigurations`.
///
/// To override the contents of this collection use [`set_target_configurations`](Self::set_target_configurations).
///
/// <p>The configuration of the target Convertible Reserved Instance to exchange for your
/// current Convertible Reserved Instances.</p>
pub fn target_configurations(
mut self,
inp: impl Into<crate::model::TargetConfigurationRequest>,
) -> Self {
self.inner = self.inner.target_configurations(inp);
self
}
/// <p>The configuration of the target Convertible Reserved Instance to exchange for your
/// current Convertible Reserved Instances.</p>
pub fn set_target_configurations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TargetConfigurationRequest>>,
) -> Self {
self.inner = self.inner.set_target_configurations(input);
self
}
}
/// Fluent builder constructing a request to `GetSerialConsoleAccessStatus`.
///
/// <p>Retrieves the access status of your account to the EC2 serial console of all instances. By
/// default, access to the EC2 serial console is disabled for your account. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-access-to-serial-console.html#serial-console-account-access">Manage account access to the EC2 serial console</a> in the <i>Amazon EC2
/// User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct GetSerialConsoleAccessStatus<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_serial_console_access_status_input::Builder,
}
impl<C, M, R> GetSerialConsoleAccessStatus<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetSerialConsoleAccessStatus`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetSerialConsoleAccessStatusOutput,
aws_smithy_http::result::SdkError<crate::error::GetSerialConsoleAccessStatusError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetSerialConsoleAccessStatusInputOperationOutputAlias,
crate::output::GetSerialConsoleAccessStatusOutput,
crate::error::GetSerialConsoleAccessStatusError,
crate::input::GetSerialConsoleAccessStatusInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetSubnetCidrReservations`.
///
/// <p>Gets information about the subnet CIDR reservations.</p>
#[derive(std::fmt::Debug)]
pub struct GetSubnetCidrReservations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_subnet_cidr_reservations_input::Builder,
}
impl<C, M, R> GetSubnetCidrReservations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetSubnetCidrReservations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetSubnetCidrReservationsOutput,
aws_smithy_http::result::SdkError<crate::error::GetSubnetCidrReservationsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetSubnetCidrReservationsInputOperationOutputAlias,
crate::output::GetSubnetCidrReservationsOutput,
crate::error::GetSubnetCidrReservationsError,
crate::input::GetSubnetCidrReservationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>reservationType</code> - The type of reservation (<code>prefix</code> |
/// <code>explicit</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
/// <ul>
/// <li>
/// <p>
/// <code>reservationType</code> - The type of reservation (<code>prefix</code> |
/// <code>explicit</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.
/// For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
/// </li>
/// <li>
/// <p>
/// <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The ID of the subnet.</p>
pub fn subnet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_id(inp);
self
}
/// <p>The ID of the subnet.</p>
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_subnet_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `GetTransitGatewayAttachmentPropagations`.
///
/// <p>Lists the route tables to which the specified resource attachment propagates routes.</p>
#[derive(std::fmt::Debug)]
pub struct GetTransitGatewayAttachmentPropagations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_transit_gateway_attachment_propagations_input::Builder,
}
impl<C, M, R> GetTransitGatewayAttachmentPropagations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetTransitGatewayAttachmentPropagations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetTransitGatewayAttachmentPropagationsOutput,
aws_smithy_http::result::SdkError<
crate::error::GetTransitGatewayAttachmentPropagationsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetTransitGatewayAttachmentPropagationsInputOperationOutputAlias,
crate::output::GetTransitGatewayAttachmentPropagationsOutput,
crate::error::GetTransitGatewayAttachmentPropagationsError,
crate::input::GetTransitGatewayAttachmentPropagationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>transit-gateway-route-table-id</code> - The ID of the transit gateway route table.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>transit-gateway-route-table-id</code> - The ID of the transit gateway route table.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetTransitGatewayMulticastDomainAssociations`.
///
/// <p>Gets information about the associations for the transit gateway multicast domain.</p>
#[derive(std::fmt::Debug)]
pub struct GetTransitGatewayMulticastDomainAssociations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_transit_gateway_multicast_domain_associations_input::Builder,
}
impl<C, M, R> GetTransitGatewayMulticastDomainAssociations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetTransitGatewayMulticastDomainAssociations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetTransitGatewayMulticastDomainAssociationsOutput,
aws_smithy_http::result::SdkError<
crate::error::GetTransitGatewayMulticastDomainAssociationsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetTransitGatewayMulticastDomainAssociationsInputOperationOutputAlias,
crate::output::GetTransitGatewayMulticastDomainAssociationsOutput,
crate::error::GetTransitGatewayMulticastDomainAssociationsError,
crate::input::GetTransitGatewayMulticastDomainAssociationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn transit_gateway_multicast_domain_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_multicast_domain_id(inp);
self
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn set_transit_gateway_multicast_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_multicast_domain_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-type</code> - The type of resource. The valid value is: <code>vpc</code>.</p>
/// </li>
/// <li>
///
/// <p>
/// <code>state</code> - The state of the subnet association. Valid values are
/// <code>associated</code> |
/// <code>associating</code>
/// | <code>disassociated</code> | <code>disassociating</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The id of the transit gateway attachment.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-type</code> - The type of resource. The valid value is: <code>vpc</code>.</p>
/// </li>
/// <li>
///
/// <p>
/// <code>state</code> - The state of the subnet association. Valid values are
/// <code>associated</code> |
/// <code>associating</code>
/// | <code>disassociated</code> | <code>disassociating</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The id of the transit gateway attachment.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetTransitGatewayPrefixListReferences`.
///
/// <p>Gets information about the prefix list references in a specified transit gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct GetTransitGatewayPrefixListReferences<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_transit_gateway_prefix_list_references_input::Builder,
}
impl<C, M, R> GetTransitGatewayPrefixListReferences<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetTransitGatewayPrefixListReferences`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetTransitGatewayPrefixListReferencesOutput,
aws_smithy_http::result::SdkError<
crate::error::GetTransitGatewayPrefixListReferencesError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetTransitGatewayPrefixListReferencesInputOperationOutputAlias,
crate::output::GetTransitGatewayPrefixListReferencesOutput,
crate::error::GetTransitGatewayPrefixListReferencesError,
crate::input::GetTransitGatewayPrefixListReferencesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the transit gateway route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>attachment.resource-id</code> - The ID of the resource for the attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.resource-type</code> - The type of resource for the
/// attachment. Valid values are <code>vpc</code> | <code>vpn</code> |
/// <code>direct-connect-gateway</code> | <code>peering</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.transit-gateway-attachment-id</code> - The ID of the attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>is-blackhole</code> - Whether traffic matching the route is blocked (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>prefix-list-id</code> - The ID of the prefix list.</p>
/// </li>
/// <li>
/// <p>
/// <code>prefix-list-owner-id</code> - The ID of the owner of the prefix list.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the prefix list reference (<code>pending</code> | <code>available</code> | <code>modifying</code> | <code>deleting</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>attachment.resource-id</code> - The ID of the resource for the attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.resource-type</code> - The type of resource for the
/// attachment. Valid values are <code>vpc</code> | <code>vpn</code> |
/// <code>direct-connect-gateway</code> | <code>peering</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.transit-gateway-attachment-id</code> - The ID of the attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>is-blackhole</code> - Whether traffic matching the route is blocked (<code>true</code> | <code>false</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>prefix-list-id</code> - The ID of the prefix list.</p>
/// </li>
/// <li>
/// <p>
/// <code>prefix-list-owner-id</code> - The ID of the owner of the prefix list.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the prefix list reference (<code>pending</code> | <code>available</code> | <code>modifying</code> | <code>deleting</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetTransitGatewayRouteTableAssociations`.
///
/// <p>Gets information about the associations for the specified transit gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct GetTransitGatewayRouteTableAssociations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_transit_gateway_route_table_associations_input::Builder,
}
impl<C, M, R> GetTransitGatewayRouteTableAssociations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetTransitGatewayRouteTableAssociations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetTransitGatewayRouteTableAssociationsOutput,
aws_smithy_http::result::SdkError<
crate::error::GetTransitGatewayRouteTableAssociationsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetTransitGatewayRouteTableAssociationsInputOperationOutputAlias,
crate::output::GetTransitGatewayRouteTableAssociationsOutput,
crate::error::GetTransitGatewayRouteTableAssociationsError,
crate::input::GetTransitGatewayRouteTableAssociationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the transit gateway route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-type</code> - The resource type. Valid values are <code>vpc</code>
/// | <code>vpn</code> | <code>direct-connect-gateway</code> | <code>peering</code>
/// | <code>connect</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the attachment.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-type</code> - The resource type. Valid values are <code>vpc</code>
/// | <code>vpn</code> | <code>direct-connect-gateway</code> | <code>peering</code>
/// | <code>connect</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the attachment.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetTransitGatewayRouteTablePropagations`.
///
/// <p>Gets information about the route table propagations for the specified transit gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct GetTransitGatewayRouteTablePropagations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_transit_gateway_route_table_propagations_input::Builder,
}
impl<C, M, R> GetTransitGatewayRouteTablePropagations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetTransitGatewayRouteTablePropagations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetTransitGatewayRouteTablePropagationsOutput,
aws_smithy_http::result::SdkError<
crate::error::GetTransitGatewayRouteTablePropagationsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetTransitGatewayRouteTablePropagationsInputOperationOutputAlias,
crate::output::GetTransitGatewayRouteTablePropagationsOutput,
crate::error::GetTransitGatewayRouteTablePropagationsError,
crate::input::GetTransitGatewayRouteTablePropagationsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the transit gateway route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-type</code> - The resource type. Valid values are <code>vpc</code>
/// | <code>vpn</code> | <code>direct-connect-gateway</code> | <code>peering</code>
/// | <code>connect</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the attachment.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-type</code> - The resource type. Valid values are <code>vpc</code>
/// | <code>vpn</code> | <code>direct-connect-gateway</code> | <code>peering</code>
/// | <code>connect</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The ID of the attachment.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetVpnConnectionDeviceSampleConfiguration`.
///
/// <p>Download an Amazon Web Services-provided sample configuration file to be used with the customer
/// gateway device specified for your Site-to-Site VPN connection.</p>
#[derive(std::fmt::Debug)]
pub struct GetVpnConnectionDeviceSampleConfiguration<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_vpn_connection_device_sample_configuration_input::Builder,
}
impl<C, M, R> GetVpnConnectionDeviceSampleConfiguration<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetVpnConnectionDeviceSampleConfiguration`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetVpnConnectionDeviceSampleConfigurationOutput,
aws_smithy_http::result::SdkError<
crate::error::GetVpnConnectionDeviceSampleConfigurationError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetVpnConnectionDeviceSampleConfigurationInputOperationOutputAlias,
crate::output::GetVpnConnectionDeviceSampleConfigurationOutput,
crate::error::GetVpnConnectionDeviceSampleConfigurationError,
crate::input::GetVpnConnectionDeviceSampleConfigurationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The <code>VpnConnectionId</code> specifies the Site-to-Site VPN connection used for the sample
/// configuration.</p>
pub fn vpn_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_connection_id(inp);
self
}
/// <p>The <code>VpnConnectionId</code> specifies the Site-to-Site VPN connection used for the sample
/// configuration.</p>
pub fn set_vpn_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_connection_id(input);
self
}
/// <p>Device identifier provided by the <code>GetVpnConnectionDeviceTypes</code> API.</p>
pub fn vpn_connection_device_type_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.vpn_connection_device_type_id(inp);
self
}
/// <p>Device identifier provided by the <code>GetVpnConnectionDeviceTypes</code> API.</p>
pub fn set_vpn_connection_device_type_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_connection_device_type_id(input);
self
}
/// <p>The IKE version to be used in the sample configuration file for your customer gateway
/// device. You can specify one of the following versions: <code>ikev1</code> or
/// <code>ikev2</code>.</p>
pub fn internet_key_exchange_version(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.internet_key_exchange_version(inp);
self
}
/// <p>The IKE version to be used in the sample configuration file for your customer gateway
/// device. You can specify one of the following versions: <code>ikev1</code> or
/// <code>ikev2</code>.</p>
pub fn set_internet_key_exchange_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_internet_key_exchange_version(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `GetVpnConnectionDeviceTypes`.
///
/// <p>Obtain a list of customer gateway devices for which sample configuration
/// files can be provided. The request has no additional parameters. You can also see the
/// list of device types with sample configuration files available under <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/your-cgw.html">Your customer gateway
/// device</a> in the <i>Amazon Web Services Site-to-Site VPN User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct GetVpnConnectionDeviceTypes<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_vpn_connection_device_types_input::Builder,
}
impl<C, M, R> GetVpnConnectionDeviceTypes<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetVpnConnectionDeviceTypes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetVpnConnectionDeviceTypesOutput,
aws_smithy_http::result::SdkError<crate::error::GetVpnConnectionDeviceTypesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetVpnConnectionDeviceTypesInputOperationOutputAlias,
crate::output::GetVpnConnectionDeviceTypesOutput,
crate::error::GetVpnConnectionDeviceTypesError,
crate::input::GetVpnConnectionDeviceTypesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The maximum number of results returned by <code>GetVpnConnectionDeviceTypes</code> in
/// paginated output. When this parameter is used, <code>GetVpnConnectionDeviceTypes</code>
/// only returns <code>MaxResults</code> results in a single page along with a
/// <code>NextToken</code> response element. The remaining results of the initial
/// request can be seen by sending another <code>GetVpnConnectionDeviceTypes</code> request
/// with the returned <code>NextToken</code> value. This value can be between 200 and 1000.
/// If this parameter is not used, then <code>GetVpnConnectionDeviceTypes</code> returns all
/// results.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results returned by <code>GetVpnConnectionDeviceTypes</code> in
/// paginated output. When this parameter is used, <code>GetVpnConnectionDeviceTypes</code>
/// only returns <code>MaxResults</code> results in a single page along with a
/// <code>NextToken</code> response element. The remaining results of the initial
/// request can be seen by sending another <code>GetVpnConnectionDeviceTypes</code> request
/// with the returned <code>NextToken</code> value. This value can be between 200 and 1000.
/// If this parameter is not used, then <code>GetVpnConnectionDeviceTypes</code> returns all
/// results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The <code>NextToken</code> value returned from a previous paginated
/// <code>GetVpnConnectionDeviceTypes</code> request where <code>MaxResults</code> was
/// used and the results exceeded the value of that parameter. Pagination continues from the
/// end of the previous results that returned the <code>NextToken</code> value. This value
/// is null when there are no more results to return. </p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The <code>NextToken</code> value returned from a previous paginated
/// <code>GetVpnConnectionDeviceTypes</code> request where <code>MaxResults</code> was
/// used and the results exceeded the value of that parameter. Pagination continues from the
/// end of the previous results that returned the <code>NextToken</code> value. This value
/// is null when there are no more results to return. </p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ImportClientVpnClientCertificateRevocationList`.
///
/// <p>Uploads a client certificate revocation list to the specified Client VPN endpoint. Uploading a client certificate revocation list overwrites the existing client certificate revocation list.</p>
/// <p>Uploading a client certificate revocation list resets existing client connections.</p>
#[derive(std::fmt::Debug)]
pub struct ImportClientVpnClientCertificateRevocationList<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::import_client_vpn_client_certificate_revocation_list_input::Builder,
}
impl<C, M, R> ImportClientVpnClientCertificateRevocationList<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ImportClientVpnClientCertificateRevocationList`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(self) -> std::result::Result<crate::output::ImportClientVpnClientCertificateRevocationListOutput, aws_smithy_http::result::SdkError<crate::error::ImportClientVpnClientCertificateRevocationListError>>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<crate::input::ImportClientVpnClientCertificateRevocationListInputOperationOutputAlias,
crate::output::ImportClientVpnClientCertificateRevocationListOutput,
crate::error::ImportClientVpnClientCertificateRevocationListError,
crate::input::ImportClientVpnClientCertificateRevocationListInputOperationRetryAlias>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint to which the client certificate revocation list applies.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint to which the client certificate revocation list applies.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <p>The client certificate revocation list file. For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-certificates.html#cvpn-working-certificates-generate">Generate a Client Certificate Revocation List</a> in the
/// <i>Client VPN Administrator Guide</i>.</p>
pub fn certificate_revocation_list(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.certificate_revocation_list(inp);
self
}
/// <p>The client certificate revocation list file. For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-certificates.html#cvpn-working-certificates-generate">Generate a Client Certificate Revocation List</a> in the
/// <i>Client VPN Administrator Guide</i>.</p>
pub fn set_certificate_revocation_list(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_certificate_revocation_list(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ImportImage`.
///
/// <p>Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI).</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html">Importing a
/// VM as an image using VM Import/Export</a> in the <i>VM Import/Export User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ImportImage<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::import_image_input::Builder,
}
impl<C, M, R> ImportImage<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ImportImage`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ImportImageOutput,
aws_smithy_http::result::SdkError<crate::error::ImportImageError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ImportImageInputOperationOutputAlias,
crate::output::ImportImageOutput,
crate::error::ImportImageError,
crate::input::ImportImageInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The architecture of the virtual machine.</p>
/// <p>Valid values: <code>i386</code> | <code>x86_64</code> | <code>arm64</code>
/// </p>
pub fn architecture(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.architecture(inp);
self
}
/// <p>The architecture of the virtual machine.</p>
/// <p>Valid values: <code>i386</code> | <code>x86_64</code> | <code>arm64</code>
/// </p>
pub fn set_architecture(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_architecture(input);
self
}
/// <p>The client-specific data.</p>
pub fn client_data(mut self, inp: crate::model::ClientData) -> Self {
self.inner = self.inner.client_data(inp);
self
}
/// <p>The client-specific data.</p>
pub fn set_client_data(
mut self,
input: std::option::Option<crate::model::ClientData>,
) -> Self {
self.inner = self.inner.set_client_data(input);
self
}
/// <p>The token to enable idempotency for VM import requests.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>The token to enable idempotency for VM import requests.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>A description string for the import image task.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description string for the import image task.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// Appends an item to `DiskContainers`.
///
/// To override the contents of this collection use [`set_disk_containers`](Self::set_disk_containers).
///
/// <p>Information about the disk containers.</p>
pub fn disk_containers(mut self, inp: impl Into<crate::model::ImageDiskContainer>) -> Self {
self.inner = self.inner.disk_containers(inp);
self
}
/// <p>Information about the disk containers.</p>
pub fn set_disk_containers(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ImageDiskContainer>>,
) -> Self {
self.inner = self.inner.set_disk_containers(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Specifies whether the destination AMI of the imported image should be encrypted. The default KMS key for EBS is used
/// unless you specify a non-default KMS key using <code>KmsKeyId</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS Encryption</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn encrypted(mut self, inp: bool) -> Self {
self.inner = self.inner.encrypted(inp);
self
}
/// <p>Specifies whether the destination AMI of the imported image should be encrypted. The default KMS key for EBS is used
/// unless you specify a non-default KMS key using <code>KmsKeyId</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS Encryption</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_encrypted(input);
self
}
/// <p>The target hypervisor platform.</p>
/// <p>Valid values: <code>xen</code>
/// </p>
pub fn hypervisor(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.hypervisor(inp);
self
}
/// <p>The target hypervisor platform.</p>
/// <p>Valid values: <code>xen</code>
/// </p>
pub fn set_hypervisor(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_hypervisor(input);
self
}
/// <p>An identifier for the symmetric KMS key to use when creating the
/// encrypted AMI. This parameter is only required if you want to use a non-default KMS key; if this
/// parameter is not specified, the default KMS key for EBS is used. If a <code>KmsKeyId</code> is
/// specified, the <code>Encrypted</code> flag must also be set. </p>
/// <p>The KMS key identifier may be provided in any of the following formats: </p>
/// <ul>
/// <li>
/// <p>Key ID</p>
/// </li>
/// <li>
/// <p>Key alias. The alias ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>alias</code> namespace, and then the key alias. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:alias/<i>ExampleAlias</i>.</p>
/// </li>
/// <li>
/// <p>ARN using key ID. The ID ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>key</code> namespace, and then the key ID. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:key/<i>abcd1234-a123-456a-a12b-a123b4cd56ef</i>.</p>
/// </li>
/// <li>
/// <p>ARN using key alias. The alias ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>alias</code> namespace, and then the key alias. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:alias/<i>ExampleAlias</i>. </p>
/// </li>
/// </ul>
/// <p>Amazon Web Services parses <code>KmsKeyId</code> asynchronously, meaning that the action you call may appear to complete even
/// though you provided an invalid identifier. This action will eventually report failure. </p>
/// <p>The specified KMS key must exist in the Region that the AMI is being copied to.</p>
/// <p>Amazon EBS does not support asymmetric KMS keys.</p>
pub fn kms_key_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.kms_key_id(inp);
self
}
/// <p>An identifier for the symmetric KMS key to use when creating the
/// encrypted AMI. This parameter is only required if you want to use a non-default KMS key; if this
/// parameter is not specified, the default KMS key for EBS is used. If a <code>KmsKeyId</code> is
/// specified, the <code>Encrypted</code> flag must also be set. </p>
/// <p>The KMS key identifier may be provided in any of the following formats: </p>
/// <ul>
/// <li>
/// <p>Key ID</p>
/// </li>
/// <li>
/// <p>Key alias. The alias ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>alias</code> namespace, and then the key alias. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:alias/<i>ExampleAlias</i>.</p>
/// </li>
/// <li>
/// <p>ARN using key ID. The ID ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>key</code> namespace, and then the key ID. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:key/<i>abcd1234-a123-456a-a12b-a123b4cd56ef</i>.</p>
/// </li>
/// <li>
/// <p>ARN using key alias. The alias ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>alias</code> namespace, and then the key alias. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:alias/<i>ExampleAlias</i>. </p>
/// </li>
/// </ul>
/// <p>Amazon Web Services parses <code>KmsKeyId</code> asynchronously, meaning that the action you call may appear to complete even
/// though you provided an invalid identifier. This action will eventually report failure. </p>
/// <p>The specified KMS key must exist in the Region that the AMI is being copied to.</p>
/// <p>Amazon EBS does not support asymmetric KMS keys.</p>
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_kms_key_id(input);
self
}
/// <p>The license type to be used for the Amazon Machine Image (AMI) after importing.</p>
/// <p>By default, we detect the source-system operating system (OS) and apply the appropriate license. Specify
/// <code>AWS</code> to replace the source-system license with an Amazon Web Services license, if appropriate. Specify <code>BYOL</code>
/// to retain the source-system license, if appropriate.</p>
/// <p>To use <code>BYOL</code>, you must have existing licenses with rights to use these licenses in a third party
/// cloud, such as Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image">Prerequisites</a> in the
/// VM Import/Export User Guide.</p>
pub fn license_type(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.license_type(inp);
self
}
/// <p>The license type to be used for the Amazon Machine Image (AMI) after importing.</p>
/// <p>By default, we detect the source-system operating system (OS) and apply the appropriate license. Specify
/// <code>AWS</code> to replace the source-system license with an Amazon Web Services license, if appropriate. Specify <code>BYOL</code>
/// to retain the source-system license, if appropriate.</p>
/// <p>To use <code>BYOL</code>, you must have existing licenses with rights to use these licenses in a third party
/// cloud, such as Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image">Prerequisites</a> in the
/// VM Import/Export User Guide.</p>
pub fn set_license_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_license_type(input);
self
}
/// <p>The operating system of the virtual machine.</p>
/// <p>Valid values: <code>Windows</code> | <code>Linux</code>
/// </p>
pub fn platform(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.platform(inp);
self
}
/// <p>The operating system of the virtual machine.</p>
/// <p>Valid values: <code>Windows</code> | <code>Linux</code>
/// </p>
pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_platform(input);
self
}
/// <p>The name of the role to use when not using the default role, 'vmimport'.</p>
pub fn role_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.role_name(inp);
self
}
/// <p>The name of the role to use when not using the default role, 'vmimport'.</p>
pub fn set_role_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_role_name(input);
self
}
/// Appends an item to `LicenseSpecifications`.
///
/// To override the contents of this collection use [`set_license_specifications`](Self::set_license_specifications).
///
/// <p>The ARNs of the license configurations.</p>
pub fn license_specifications(
mut self,
inp: impl Into<crate::model::ImportImageLicenseConfigurationRequest>,
) -> Self {
self.inner = self.inner.license_specifications(inp);
self
}
/// <p>The ARNs of the license configurations.</p>
pub fn set_license_specifications(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::ImportImageLicenseConfigurationRequest>,
>,
) -> Self {
self.inner = self.inner.set_license_specifications(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the import image task during creation.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the import image task during creation.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>The usage operation value. For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#prerequisites">Licensing options</a> in the <i>VM Import/Export User Guide</i>.</p>
pub fn usage_operation(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.usage_operation(inp);
self
}
/// <p>The usage operation value. For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#prerequisites">Licensing options</a> in the <i>VM Import/Export User Guide</i>.</p>
pub fn set_usage_operation(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_usage_operation(input);
self
}
/// <p>The boot mode of the virtual machine.</p>
pub fn boot_mode(mut self, inp: crate::model::BootModeValues) -> Self {
self.inner = self.inner.boot_mode(inp);
self
}
/// <p>The boot mode of the virtual machine.</p>
pub fn set_boot_mode(
mut self,
input: std::option::Option<crate::model::BootModeValues>,
) -> Self {
self.inner = self.inner.set_boot_mode(input);
self
}
}
/// Fluent builder constructing a request to `ImportInstance`.
///
/// <p>Creates an import instance task using metadata from the specified disk image.</p>
/// <p>This API action supports only single-volume VMs. To import multi-volume VMs, use <a>ImportImage</a>
/// instead.</p>
/// <p>This API action is not supported by the Command Line Interface (CLI). For
/// information about using the Amazon EC2 CLI, which is deprecated, see
/// <a href="https://awsdocs.s3.amazonaws.com/EC2/ec2-clt.pdf#UsingVirtualMachinesinAmazonEC2">Importing a VM to Amazon EC2</a> in the <i>Amazon EC2 CLI Reference</i> PDF file.</p>
/// <p>For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM Import Manifest</a>.</p>
#[derive(std::fmt::Debug)]
pub struct ImportInstance<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::import_instance_input::Builder,
}
impl<C, M, R> ImportInstance<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ImportInstance`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ImportInstanceOutput,
aws_smithy_http::result::SdkError<crate::error::ImportInstanceError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ImportInstanceInputOperationOutputAlias,
crate::output::ImportInstanceOutput,
crate::error::ImportInstanceError,
crate::input::ImportInstanceInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>A description for the instance being imported.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for the instance being imported.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// Appends an item to `DiskImages`.
///
/// To override the contents of this collection use [`set_disk_images`](Self::set_disk_images).
///
/// <p>The disk image.</p>
pub fn disk_images(mut self, inp: impl Into<crate::model::DiskImage>) -> Self {
self.inner = self.inner.disk_images(inp);
self
}
/// <p>The disk image.</p>
pub fn set_disk_images(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::DiskImage>>,
) -> Self {
self.inner = self.inner.set_disk_images(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The launch specification.</p>
pub fn launch_specification(
mut self,
inp: crate::model::ImportInstanceLaunchSpecification,
) -> Self {
self.inner = self.inner.launch_specification(inp);
self
}
/// <p>The launch specification.</p>
pub fn set_launch_specification(
mut self,
input: std::option::Option<crate::model::ImportInstanceLaunchSpecification>,
) -> Self {
self.inner = self.inner.set_launch_specification(input);
self
}
/// <p>The instance operating system.</p>
pub fn platform(mut self, inp: crate::model::PlatformValues) -> Self {
self.inner = self.inner.platform(inp);
self
}
/// <p>The instance operating system.</p>
pub fn set_platform(
mut self,
input: std::option::Option<crate::model::PlatformValues>,
) -> Self {
self.inner = self.inner.set_platform(input);
self
}
}
/// Fluent builder constructing a request to `ImportKeyPair`.
///
/// <p>Imports the public key from an RSA or ED25519 key pair that you created with a third-party tool.
/// Compare this with <a>CreateKeyPair</a>, in which Amazon Web Services creates the key pair and gives the keys to you
/// (Amazon Web Services keeps a copy of the public key). With ImportKeyPair, you create the key pair and give Amazon Web Services just the public key.
/// The private key is never transferred between you and Amazon Web Services.</p>
/// <p>For more information about key pairs, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html">Amazon EC2 key pairs</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ImportKeyPair<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::import_key_pair_input::Builder,
}
impl<C, M, R> ImportKeyPair<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ImportKeyPair`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ImportKeyPairOutput,
aws_smithy_http::result::SdkError<crate::error::ImportKeyPairError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ImportKeyPairInputOperationOutputAlias,
crate::output::ImportKeyPairOutput,
crate::error::ImportKeyPairError,
crate::input::ImportKeyPairInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>A unique name for the key pair.</p>
pub fn key_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.key_name(inp);
self
}
/// <p>A unique name for the key pair.</p>
pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_key_name(input);
self
}
/// <p>The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.</p>
pub fn public_key_material(mut self, inp: aws_smithy_types::Blob) -> Self {
self.inner = self.inner.public_key_material(inp);
self
}
/// <p>The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.</p>
pub fn set_public_key_material(
mut self,
input: std::option::Option<aws_smithy_types::Blob>,
) -> Self {
self.inner = self.inner.set_public_key_material(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the imported key pair.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the imported key pair.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `ImportSnapshot`.
///
/// <p>Imports a disk into an EBS snapshot.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html">Importing a disk as a snapshot using VM Import/Export</a> in the
/// <i>VM Import/Export User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ImportSnapshot<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::import_snapshot_input::Builder,
}
impl<C, M, R> ImportSnapshot<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ImportSnapshot`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ImportSnapshotOutput,
aws_smithy_http::result::SdkError<crate::error::ImportSnapshotError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ImportSnapshotInputOperationOutputAlias,
crate::output::ImportSnapshotOutput,
crate::error::ImportSnapshotError,
crate::input::ImportSnapshotInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The client-specific data.</p>
pub fn client_data(mut self, inp: crate::model::ClientData) -> Self {
self.inner = self.inner.client_data(inp);
self
}
/// <p>The client-specific data.</p>
pub fn set_client_data(
mut self,
input: std::option::Option<crate::model::ClientData>,
) -> Self {
self.inner = self.inner.set_client_data(input);
self
}
/// <p>Token to enable idempotency for VM import requests.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Token to enable idempotency for VM import requests.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>The description string for the import snapshot task.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>The description string for the import snapshot task.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>Information about the disk container.</p>
pub fn disk_container(mut self, inp: crate::model::SnapshotDiskContainer) -> Self {
self.inner = self.inner.disk_container(inp);
self
}
/// <p>Information about the disk container.</p>
pub fn set_disk_container(
mut self,
input: std::option::Option<crate::model::SnapshotDiskContainer>,
) -> Self {
self.inner = self.inner.set_disk_container(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Specifies whether the destination snapshot of the imported image should be encrypted. The default KMS key for EBS is
/// used unless you specify a non-default KMS key using <code>KmsKeyId</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS Encryption</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn encrypted(mut self, inp: bool) -> Self {
self.inner = self.inner.encrypted(inp);
self
}
/// <p>Specifies whether the destination snapshot of the imported image should be encrypted. The default KMS key for EBS is
/// used unless you specify a non-default KMS key using <code>KmsKeyId</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS Encryption</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_encrypted(input);
self
}
/// <p>An identifier for the symmetric KMS key to use when creating the
/// encrypted snapshot. This parameter is only required if you want to use a non-default KMS key; if this
/// parameter is not specified, the default KMS key for EBS is used. If a <code>KmsKeyId</code> is
/// specified, the <code>Encrypted</code> flag must also be set. </p>
/// <p>The KMS key identifier may be provided in any of the following formats: </p>
/// <ul>
/// <li>
/// <p>Key ID</p>
/// </li>
/// <li>
/// <p>Key alias. The alias ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>alias</code> namespace, and then the key alias. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:alias/<i>ExampleAlias</i>.</p>
/// </li>
/// <li>
/// <p>ARN using key ID. The ID ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>key</code> namespace, and then the key ID. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:key/<i>abcd1234-a123-456a-a12b-a123b4cd56ef</i>.</p>
/// </li>
/// <li>
/// <p>ARN using key alias. The alias ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>alias</code> namespace, and then the key alias. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:alias/<i>ExampleAlias</i>. </p>
/// </li>
/// </ul>
/// <p>Amazon Web Services parses <code>KmsKeyId</code> asynchronously, meaning that the action you call may appear to complete even
/// though you provided an invalid identifier. This action will eventually report failure. </p>
/// <p>The specified KMS key must exist in the Region that the snapshot is being copied to.</p>
/// <p>Amazon EBS does not support asymmetric KMS keys.</p>
pub fn kms_key_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.kms_key_id(inp);
self
}
/// <p>An identifier for the symmetric KMS key to use when creating the
/// encrypted snapshot. This parameter is only required if you want to use a non-default KMS key; if this
/// parameter is not specified, the default KMS key for EBS is used. If a <code>KmsKeyId</code> is
/// specified, the <code>Encrypted</code> flag must also be set. </p>
/// <p>The KMS key identifier may be provided in any of the following formats: </p>
/// <ul>
/// <li>
/// <p>Key ID</p>
/// </li>
/// <li>
/// <p>Key alias. The alias ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>alias</code> namespace, and then the key alias. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:alias/<i>ExampleAlias</i>.</p>
/// </li>
/// <li>
/// <p>ARN using key ID. The ID ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>key</code> namespace, and then the key ID. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:key/<i>abcd1234-a123-456a-a12b-a123b4cd56ef</i>.</p>
/// </li>
/// <li>
/// <p>ARN using key alias. The alias ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>alias</code> namespace, and then the key alias. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:alias/<i>ExampleAlias</i>. </p>
/// </li>
/// </ul>
/// <p>Amazon Web Services parses <code>KmsKeyId</code> asynchronously, meaning that the action you call may appear to complete even
/// though you provided an invalid identifier. This action will eventually report failure. </p>
/// <p>The specified KMS key must exist in the Region that the snapshot is being copied to.</p>
/// <p>Amazon EBS does not support asymmetric KMS keys.</p>
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_kms_key_id(input);
self
}
/// <p>The name of the role to use when not using the default role, 'vmimport'.</p>
pub fn role_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.role_name(inp);
self
}
/// <p>The name of the role to use when not using the default role, 'vmimport'.</p>
pub fn set_role_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_role_name(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the import snapshot task during creation.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the import snapshot task during creation.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `ImportVolume`.
///
/// <p>Creates an import volume task using metadata from the specified disk image.</p>
/// <p>This API action supports only single-volume VMs. To import multi-volume VMs, use
/// <a>ImportImage</a> instead. To import a disk to a snapshot, use
/// <a>ImportSnapshot</a> instead.</p>
/// <p>This API action is not supported by the Command Line Interface (CLI). For
/// information about using the Amazon EC2 CLI, which is deprecated, see <a href="https://awsdocs.s3.amazonaws.com/EC2/ec2-clt.pdf#importing-your-volumes-into-amazon-ebs">Importing Disks to Amazon EBS</a> in the <i>Amazon EC2 CLI Reference</i> PDF file.</p>
/// <p>For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM Import Manifest</a>.</p>
#[derive(std::fmt::Debug)]
pub struct ImportVolume<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::import_volume_input::Builder,
}
impl<C, M, R> ImportVolume<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ImportVolume`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ImportVolumeOutput,
aws_smithy_http::result::SdkError<crate::error::ImportVolumeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ImportVolumeInputOperationOutputAlias,
crate::output::ImportVolumeOutput,
crate::error::ImportVolumeError,
crate::input::ImportVolumeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The Availability Zone for the resulting EBS volume.</p>
pub fn availability_zone(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zone(inp);
self
}
/// <p>The Availability Zone for the resulting EBS volume.</p>
pub fn set_availability_zone(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_availability_zone(input);
self
}
/// <p>A description of the volume.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description of the volume.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The disk image.</p>
pub fn image(mut self, inp: crate::model::DiskImageDetail) -> Self {
self.inner = self.inner.image(inp);
self
}
/// <p>The disk image.</p>
pub fn set_image(
mut self,
input: std::option::Option<crate::model::DiskImageDetail>,
) -> Self {
self.inner = self.inner.set_image(input);
self
}
/// <p>The volume size.</p>
pub fn volume(mut self, inp: crate::model::VolumeDetail) -> Self {
self.inner = self.inner.volume(inp);
self
}
/// <p>The volume size.</p>
pub fn set_volume(
mut self,
input: std::option::Option<crate::model::VolumeDetail>,
) -> Self {
self.inner = self.inner.set_volume(input);
self
}
}
/// Fluent builder constructing a request to `ModifyAddressAttribute`.
///
/// <p>Modifies an attribute of the specified Elastic IP address. For requirements, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#Using_Elastic_Addressing_Reverse_DNS">Using reverse DNS for email applications</a>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyAddressAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_address_attribute_input::Builder,
}
impl<C, M, R> ModifyAddressAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyAddressAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyAddressAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyAddressAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyAddressAttributeInputOperationOutputAlias,
crate::output::ModifyAddressAttributeOutput,
crate::error::ModifyAddressAttributeError,
crate::input::ModifyAddressAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>[EC2-VPC] The allocation ID.</p>
pub fn allocation_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.allocation_id(inp);
self
}
/// <p>[EC2-VPC] The allocation ID.</p>
pub fn set_allocation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_allocation_id(input);
self
}
/// <p>The domain name to modify for the IP address.</p>
pub fn domain_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.domain_name(inp);
self
}
/// <p>The domain name to modify for the IP address.</p>
pub fn set_domain_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_domain_name(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyAvailabilityZoneGroup`.
///
/// <p>Changes the opt-in status of the Local Zone and Wavelength Zone group for your
/// account.</p>
/// <p>Use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html">
/// DescribeAvailabilityZones</a> to view the value for <code>GroupName</code>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyAvailabilityZoneGroup<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_availability_zone_group_input::Builder,
}
impl<C, M, R> ModifyAvailabilityZoneGroup<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyAvailabilityZoneGroup`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyAvailabilityZoneGroupOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyAvailabilityZoneGroupError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyAvailabilityZoneGroupInputOperationOutputAlias,
crate::output::ModifyAvailabilityZoneGroupOutput,
crate::error::ModifyAvailabilityZoneGroupError,
crate::input::ModifyAvailabilityZoneGroupInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the Availability Zone group, Local Zone group, or Wavelength Zone
/// group.</p>
pub fn group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_name(inp);
self
}
/// <p>The name of the Availability Zone group, Local Zone group, or Wavelength Zone
/// group.</p>
pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_name(input);
self
}
/// <p>Indicates whether you are opted in to the Local Zone group or Wavelength Zone group. The
/// only valid value is <code>opted-in</code>. You must contact <a href="https://console.aws.amazon.com/support/home#/case/create%3FissueType=customer-service%26serviceCode=general-info%26getting-started%26categoryCode=using-aws%26services">Amazon Web Services Support</a> to opt out of a Local Zone or Wavelength Zone group.</p>
pub fn opt_in_status(
mut self,
inp: crate::model::ModifyAvailabilityZoneOptInStatus,
) -> Self {
self.inner = self.inner.opt_in_status(inp);
self
}
/// <p>Indicates whether you are opted in to the Local Zone group or Wavelength Zone group. The
/// only valid value is <code>opted-in</code>. You must contact <a href="https://console.aws.amazon.com/support/home#/case/create%3FissueType=customer-service%26serviceCode=general-info%26getting-started%26categoryCode=using-aws%26services">Amazon Web Services Support</a> to opt out of a Local Zone or Wavelength Zone group.</p>
pub fn set_opt_in_status(
mut self,
input: std::option::Option<crate::model::ModifyAvailabilityZoneOptInStatus>,
) -> Self {
self.inner = self.inner.set_opt_in_status(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyCapacityReservation`.
///
/// <p>Modifies a Capacity Reservation's capacity and the conditions under which it is to be released. You
/// cannot change a Capacity Reservation's instance type, EBS optimization, instance store settings,
/// platform, Availability Zone, or instance eligibility. If you need to modify any of these
/// attributes, we recommend that you cancel the Capacity Reservation, and then create a new one with
/// the required attributes.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyCapacityReservation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_capacity_reservation_input::Builder,
}
impl<C, M, R> ModifyCapacityReservation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyCapacityReservation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyCapacityReservationOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyCapacityReservationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyCapacityReservationInputOperationOutputAlias,
crate::output::ModifyCapacityReservationOutput,
crate::error::ModifyCapacityReservationError,
crate::input::ModifyCapacityReservationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Capacity Reservation.</p>
pub fn capacity_reservation_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.capacity_reservation_id(inp);
self
}
/// <p>The ID of the Capacity Reservation.</p>
pub fn set_capacity_reservation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_capacity_reservation_id(input);
self
}
/// <p>The number of instances for which to reserve capacity. The number of instances can't be increased or
/// decreased by more than <code>1000</code> in a single request.</p>
pub fn instance_count(mut self, inp: i32) -> Self {
self.inner = self.inner.instance_count(inp);
self
}
/// <p>The number of instances for which to reserve capacity. The number of instances can't be increased or
/// decreased by more than <code>1000</code> in a single request.</p>
pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_instance_count(input);
self
}
/// <p>The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity
/// is released and you can no longer launch instances into it. The Capacity Reservation's state changes to
/// <code>expired</code> when it reaches its end date and time.</p>
/// <p>The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify
/// 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.</p>
/// <p>You must provide an <code>EndDate</code> value if <code>EndDateType</code> is
/// <code>limited</code>. Omit <code>EndDate</code> if <code>EndDateType</code> is
/// <code>unlimited</code>.</p>
pub fn end_date(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.end_date(inp);
self
}
/// <p>The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity
/// is released and you can no longer launch instances into it. The Capacity Reservation's state changes to
/// <code>expired</code> when it reaches its end date and time.</p>
/// <p>The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify
/// 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.</p>
/// <p>You must provide an <code>EndDate</code> value if <code>EndDateType</code> is
/// <code>limited</code>. Omit <code>EndDate</code> if <code>EndDateType</code> is
/// <code>unlimited</code>.</p>
pub fn set_end_date(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_end_date(input);
self
}
/// <p>Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end
/// types:</p>
/// <ul>
/// <li>
/// <p>
/// <code>unlimited</code> - The Capacity Reservation remains active until you explicitly cancel it. Do not
/// provide an <code>EndDate</code> value if <code>EndDateType</code> is
/// <code>unlimited</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>limited</code> - The Capacity Reservation expires automatically at a specified date and time. You must
/// provide an <code>EndDate</code> value if <code>EndDateType</code> is
/// <code>limited</code>.</p>
/// </li>
/// </ul>
pub fn end_date_type(mut self, inp: crate::model::EndDateType) -> Self {
self.inner = self.inner.end_date_type(inp);
self
}
/// <p>Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end
/// types:</p>
/// <ul>
/// <li>
/// <p>
/// <code>unlimited</code> - The Capacity Reservation remains active until you explicitly cancel it. Do not
/// provide an <code>EndDate</code> value if <code>EndDateType</code> is
/// <code>unlimited</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>limited</code> - The Capacity Reservation expires automatically at a specified date and time. You must
/// provide an <code>EndDate</code> value if <code>EndDateType</code> is
/// <code>limited</code>.</p>
/// </li>
/// </ul>
pub fn set_end_date_type(
mut self,
input: std::option::Option<crate::model::EndDateType>,
) -> Self {
self.inner = self.inner.set_end_date_type(input);
self
}
/// <p>Reserved. Capacity Reservations you have created are accepted by default.</p>
pub fn accept(mut self, inp: bool) -> Self {
self.inner = self.inner.accept(inp);
self
}
/// <p>Reserved. Capacity Reservations you have created are accepted by default.</p>
pub fn set_accept(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_accept(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyCapacityReservationFleet`.
///
/// <p>Modifies a Capacity Reservation Fleet.</p>
/// <p>When you modify the total target capacity of a Capacity Reservation Fleet, the Fleet automatically
/// creates new Capacity Reservations, or modifies or cancels existing Capacity Reservations in the Fleet
/// to meet the new total target capacity. When you modify the end date for the Fleet, the end dates for
/// all of the individual Capacity Reservations in the Fleet are updated accordingly.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyCapacityReservationFleet<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_capacity_reservation_fleet_input::Builder,
}
impl<C, M, R> ModifyCapacityReservationFleet<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyCapacityReservationFleet`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyCapacityReservationFleetOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyCapacityReservationFleetError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyCapacityReservationFleetInputOperationOutputAlias,
crate::output::ModifyCapacityReservationFleetOutput,
crate::error::ModifyCapacityReservationFleetError,
crate::input::ModifyCapacityReservationFleetInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Capacity Reservation Fleet to modify.</p>
pub fn capacity_reservation_fleet_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.capacity_reservation_fleet_id(inp);
self
}
/// <p>The ID of the Capacity Reservation Fleet to modify.</p>
pub fn set_capacity_reservation_fleet_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_capacity_reservation_fleet_id(input);
self
}
/// <p>The total number of capacity units to be reserved by the Capacity Reservation Fleet. This value,
/// together with the instance type weights that you assign to each instance type used by the Fleet
/// determine the number of instances for which the Fleet reserves capacity. Both values are based on
/// units that make sense for your workload. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity">Total target capacity</a>
/// in the Amazon EC2 User Guide.</p>
pub fn total_target_capacity(mut self, inp: i32) -> Self {
self.inner = self.inner.total_target_capacity(inp);
self
}
/// <p>The total number of capacity units to be reserved by the Capacity Reservation Fleet. This value,
/// together with the instance type weights that you assign to each instance type used by the Fleet
/// determine the number of instances for which the Fleet reserves capacity. Both values are based on
/// units that make sense for your workload. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity">Total target capacity</a>
/// in the Amazon EC2 User Guide.</p>
pub fn set_total_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_total_target_capacity(input);
self
}
/// <p>The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation
/// Fleet expires, its state changes to <code>expired</code> and all of the Capacity Reservations in the
/// Fleet expire.</p>
/// <p>The Capacity Reservation Fleet expires within an hour after the specified time. For example, if you
/// specify <code>5/31/2019</code>, <code>13:30:55</code>, the Capacity Reservation Fleet is guaranteed
/// to expire between <code>13:30:55</code> and <code>14:30:55</code> on <code>5/31/2019</code>.</p>
/// <p>You can't specify <b>EndDate</b> and <b>
/// RemoveEndDate</b> in the same request.</p>
pub fn end_date(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.end_date(inp);
self
}
/// <p>The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation
/// Fleet expires, its state changes to <code>expired</code> and all of the Capacity Reservations in the
/// Fleet expire.</p>
/// <p>The Capacity Reservation Fleet expires within an hour after the specified time. For example, if you
/// specify <code>5/31/2019</code>, <code>13:30:55</code>, the Capacity Reservation Fleet is guaranteed
/// to expire between <code>13:30:55</code> and <code>14:30:55</code> on <code>5/31/2019</code>.</p>
/// <p>You can't specify <b>EndDate</b> and <b>
/// RemoveEndDate</b> in the same request.</p>
pub fn set_end_date(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_end_date(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Indicates whether to remove the end date from the Capacity Reservation Fleet. If you remove the
/// end date, the Capacity Reservation Fleet does not expire and it remains active until you explicitly
/// cancel it using the <b>CancelCapacityReservationFleet</b> action.</p>
/// <p>You can't specify <b>RemoveEndDate</b> and <b>
/// EndDate</b> in the same request.</p>
pub fn remove_end_date(mut self, inp: bool) -> Self {
self.inner = self.inner.remove_end_date(inp);
self
}
/// <p>Indicates whether to remove the end date from the Capacity Reservation Fleet. If you remove the
/// end date, the Capacity Reservation Fleet does not expire and it remains active until you explicitly
/// cancel it using the <b>CancelCapacityReservationFleet</b> action.</p>
/// <p>You can't specify <b>RemoveEndDate</b> and <b>
/// EndDate</b> in the same request.</p>
pub fn set_remove_end_date(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_remove_end_date(input);
self
}
}
/// Fluent builder constructing a request to `ModifyClientVpnEndpoint`.
///
/// <p>Modifies the specified Client VPN endpoint. Modifying the DNS server resets existing client connections.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyClientVpnEndpoint<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_client_vpn_endpoint_input::Builder,
}
impl<C, M, R> ModifyClientVpnEndpoint<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyClientVpnEndpoint`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyClientVpnEndpointOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyClientVpnEndpointError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyClientVpnEndpointInputOperationOutputAlias,
crate::output::ModifyClientVpnEndpointOutput,
crate::error::ModifyClientVpnEndpointError,
crate::input::ModifyClientVpnEndpointInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint to modify.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint to modify.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <p>The ARN of the server certificate to be used. The server certificate must be provisioned in
/// Certificate Manager (ACM).</p>
pub fn server_certificate_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.server_certificate_arn(inp);
self
}
/// <p>The ARN of the server certificate to be used. The server certificate must be provisioned in
/// Certificate Manager (ACM).</p>
pub fn set_server_certificate_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_server_certificate_arn(input);
self
}
/// <p>Information about the client connection logging options.</p>
/// <p>If you enable client connection logging, data about client connections is sent to a
/// Cloudwatch Logs log stream. The following information is logged:</p>
/// <ul>
/// <li>
/// <p>Client connection requests</p>
/// </li>
/// <li>
/// <p>Client connection results (successful and unsuccessful)</p>
/// </li>
/// <li>
/// <p>Reasons for unsuccessful client connection requests</p>
/// </li>
/// <li>
/// <p>Client connection termination time</p>
/// </li>
/// </ul>
pub fn connection_log_options(mut self, inp: crate::model::ConnectionLogOptions) -> Self {
self.inner = self.inner.connection_log_options(inp);
self
}
/// <p>Information about the client connection logging options.</p>
/// <p>If you enable client connection logging, data about client connections is sent to a
/// Cloudwatch Logs log stream. The following information is logged:</p>
/// <ul>
/// <li>
/// <p>Client connection requests</p>
/// </li>
/// <li>
/// <p>Client connection results (successful and unsuccessful)</p>
/// </li>
/// <li>
/// <p>Reasons for unsuccessful client connection requests</p>
/// </li>
/// <li>
/// <p>Client connection termination time</p>
/// </li>
/// </ul>
pub fn set_connection_log_options(
mut self,
input: std::option::Option<crate::model::ConnectionLogOptions>,
) -> Self {
self.inner = self.inner.set_connection_log_options(input);
self
}
/// <p>Information about the DNS servers to be used by Client VPN connections. A Client VPN endpoint can have
/// up to two DNS servers.</p>
pub fn dns_servers(mut self, inp: crate::model::DnsServersOptionsModifyStructure) -> Self {
self.inner = self.inner.dns_servers(inp);
self
}
/// <p>Information about the DNS servers to be used by Client VPN connections. A Client VPN endpoint can have
/// up to two DNS servers.</p>
pub fn set_dns_servers(
mut self,
input: std::option::Option<crate::model::DnsServersOptionsModifyStructure>,
) -> Self {
self.inner = self.inner.set_dns_servers(input);
self
}
/// <p>The port number to assign to the Client VPN endpoint for TCP and UDP traffic.</p>
/// <p>Valid Values: <code>443</code> | <code>1194</code>
/// </p>
/// <p>Default Value: <code>443</code>
/// </p>
pub fn vpn_port(mut self, inp: i32) -> Self {
self.inner = self.inner.vpn_port(inp);
self
}
/// <p>The port number to assign to the Client VPN endpoint for TCP and UDP traffic.</p>
/// <p>Valid Values: <code>443</code> | <code>1194</code>
/// </p>
/// <p>Default Value: <code>443</code>
/// </p>
pub fn set_vpn_port(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_vpn_port(input);
self
}
/// <p>A brief description of the Client VPN endpoint.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A brief description of the Client VPN endpoint.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>Indicates whether the VPN is split-tunnel.</p>
/// <p>For information about split-tunnel VPN endpoints, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html">Split-tunnel Client VPN endpoint</a> in the
/// <i>Client VPN Administrator Guide</i>.</p>
pub fn split_tunnel(mut self, inp: bool) -> Self {
self.inner = self.inner.split_tunnel(inp);
self
}
/// <p>Indicates whether the VPN is split-tunnel.</p>
/// <p>For information about split-tunnel VPN endpoints, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html">Split-tunnel Client VPN endpoint</a> in the
/// <i>Client VPN Administrator Guide</i>.</p>
pub fn set_split_tunnel(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_split_tunnel(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `SecurityGroupIds`.
///
/// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
///
/// <p>The IDs of one or more security groups to apply to the target network.</p>
pub fn security_group_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.security_group_ids(inp);
self
}
/// <p>The IDs of one or more security groups to apply to the target network.</p>
pub fn set_security_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_security_group_ids(input);
self
}
/// <p>The ID of the VPC to associate with the Client VPN endpoint.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC to associate with the Client VPN endpoint.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// <p>Specify whether to enable the self-service portal for the Client VPN endpoint.</p>
pub fn self_service_portal(mut self, inp: crate::model::SelfServicePortal) -> Self {
self.inner = self.inner.self_service_portal(inp);
self
}
/// <p>Specify whether to enable the self-service portal for the Client VPN endpoint.</p>
pub fn set_self_service_portal(
mut self,
input: std::option::Option<crate::model::SelfServicePortal>,
) -> Self {
self.inner = self.inner.set_self_service_portal(input);
self
}
/// <p>The options for managing connection authorization for new client connections.</p>
pub fn client_connect_options(mut self, inp: crate::model::ClientConnectOptions) -> Self {
self.inner = self.inner.client_connect_options(inp);
self
}
/// <p>The options for managing connection authorization for new client connections.</p>
pub fn set_client_connect_options(
mut self,
input: std::option::Option<crate::model::ClientConnectOptions>,
) -> Self {
self.inner = self.inner.set_client_connect_options(input);
self
}
}
/// Fluent builder constructing a request to `ModifyDefaultCreditSpecification`.
///
/// <p>Modifies the default credit option for CPU usage of burstable performance instances.
/// The default credit option is set at the account level per Amazon Web Services Region, and is specified
/// per instance family. All new burstable performance instances in the account launch using
/// the default credit option.</p>
/// <p>
/// <code>ModifyDefaultCreditSpecification</code> is an asynchronous operation, which works at an Amazon Web Services Region
/// level and modifies the credit option for each Availability Zone. All zones in a
/// Region are updated within five minutes. But if instances are launched during this
/// operation, they might not get the new credit option until the zone is updated. To verify
/// whether the update has occurred, you can call <code>GetDefaultCreditSpecification</code> and check
/// <code>DefaultCreditSpecification</code> for updates.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable
/// performance instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyDefaultCreditSpecification<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_default_credit_specification_input::Builder,
}
impl<C, M, R> ModifyDefaultCreditSpecification<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyDefaultCreditSpecification`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyDefaultCreditSpecificationOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyDefaultCreditSpecificationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyDefaultCreditSpecificationInputOperationOutputAlias,
crate::output::ModifyDefaultCreditSpecificationOutput,
crate::error::ModifyDefaultCreditSpecificationError,
crate::input::ModifyDefaultCreditSpecificationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The instance family.</p>
pub fn instance_family(
mut self,
inp: crate::model::UnlimitedSupportedInstanceFamily,
) -> Self {
self.inner = self.inner.instance_family(inp);
self
}
/// <p>The instance family.</p>
pub fn set_instance_family(
mut self,
input: std::option::Option<crate::model::UnlimitedSupportedInstanceFamily>,
) -> Self {
self.inner = self.inner.set_instance_family(input);
self
}
/// <p>The credit option for CPU usage of the instance family.</p>
/// <p>Valid Values: <code>standard</code> | <code>unlimited</code>
/// </p>
pub fn cpu_credits(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cpu_credits(inp);
self
}
/// <p>The credit option for CPU usage of the instance family.</p>
/// <p>Valid Values: <code>standard</code> | <code>unlimited</code>
/// </p>
pub fn set_cpu_credits(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cpu_credits(input);
self
}
}
/// Fluent builder constructing a request to `ModifyEbsDefaultKmsKeyId`.
///
/// <p>Changes the default KMS key for EBS encryption by default for your account in this Region.</p>
/// <p>Amazon Web Services creates a unique Amazon Web Services managed KMS key in each Region for use with encryption by default. If
/// you change the default KMS key to a symmetric customer managed KMS key, it is used instead of the Amazon Web Services
/// managed KMS key. To reset the default KMS key to the Amazon Web Services managed KMS key for EBS, use <a>ResetEbsDefaultKmsKeyId</a>. Amazon EBS does not support asymmetric KMS keys.</p>
/// <p>If you delete or disable the customer managed KMS key that you specified for use with
/// encryption by default, your instances will fail to launch.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS encryption</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyEbsDefaultKmsKeyId<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_ebs_default_kms_key_id_input::Builder,
}
impl<C, M, R> ModifyEbsDefaultKmsKeyId<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyEbsDefaultKmsKeyId`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyEbsDefaultKmsKeyIdOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyEbsDefaultKmsKeyIdError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyEbsDefaultKmsKeyIdInputOperationOutputAlias,
crate::output::ModifyEbsDefaultKmsKeyIdOutput,
crate::error::ModifyEbsDefaultKmsKeyIdError,
crate::input::ModifyEbsDefaultKmsKeyIdInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption.
/// If this parameter is not specified, your KMS key for Amazon EBS is used. If <code>KmsKeyId</code> is
/// specified, the encrypted state must be <code>true</code>.</p>
/// <p>You can specify the KMS key using any of the following:</p>
/// <ul>
/// <li>
/// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Key alias. For example, alias/ExampleAlias.</p>
/// </li>
/// <li>
/// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p>
/// </li>
/// </ul>
/// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid,
/// the action can appear to complete, but eventually fails.</p>
/// <p>Amazon EBS does not support asymmetric KMS keys.</p>
pub fn kms_key_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.kms_key_id(inp);
self
}
/// <p>The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption.
/// If this parameter is not specified, your KMS key for Amazon EBS is used. If <code>KmsKeyId</code> is
/// specified, the encrypted state must be <code>true</code>.</p>
/// <p>You can specify the KMS key using any of the following:</p>
/// <ul>
/// <li>
/// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Key alias. For example, alias/ExampleAlias.</p>
/// </li>
/// <li>
/// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p>
/// </li>
/// <li>
/// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p>
/// </li>
/// </ul>
/// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid,
/// the action can appear to complete, but eventually fails.</p>
/// <p>Amazon EBS does not support asymmetric KMS keys.</p>
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_kms_key_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyFleet`.
///
/// <p>Modifies the specified EC2 Fleet.</p>
/// <p>You can only modify an EC2 Fleet request of type <code>maintain</code>.</p>
/// <p>While the EC2 Fleet is being modified, it is in the <code>modifying</code> state.</p>
/// <p>To scale up your EC2 Fleet, increase its target capacity. The EC2 Fleet launches the additional
/// Spot Instances according to the allocation strategy for the EC2 Fleet request. If the allocation
/// strategy is <code>lowest-price</code>, the EC2 Fleet launches instances using the Spot Instance
/// pool with the lowest price. If the allocation strategy is <code>diversified</code>, the
/// EC2 Fleet distributes the instances across the Spot Instance pools. If the allocation strategy
/// is <code>capacity-optimized</code>, EC2 Fleet launches instances from Spot Instance pools with optimal
/// capacity for the number of instances that are launching.</p>
/// <p>To scale down your EC2 Fleet, decrease its target capacity. First, the EC2 Fleet cancels any open
/// requests that exceed the new target capacity. You can request that the EC2 Fleet terminate Spot
/// Instances until the size of the fleet no longer exceeds the new target capacity. If the
/// allocation strategy is <code>lowest-price</code>, the EC2 Fleet terminates the instances with
/// the highest price per unit. If the allocation strategy is <code>capacity-optimized</code>,
/// the EC2 Fleet terminates the instances in the Spot Instance pools that have the least available
/// Spot Instance capacity. If the allocation strategy is <code>diversified</code>, the EC2 Fleet terminates
/// instances across the Spot Instance pools. Alternatively, you can request that the EC2 Fleet keep
/// the fleet at its current size, but not replace any Spot Instances that are interrupted or
/// that you terminate manually.</p>
/// <p>If you are finished with your EC2 Fleet for now, but will use it again later, you can set the
/// target capacity to 0.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyFleet<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_fleet_input::Builder,
}
impl<C, M, R> ModifyFleet<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyFleet`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyFleetOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyFleetError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyFleetInputOperationOutputAlias,
crate::output::ModifyFleetOutput,
crate::error::ModifyFleetError,
crate::input::ModifyFleetInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Indicates whether running instances should be terminated if the total target capacity of
/// the EC2 Fleet is decreased below the current size of the EC2 Fleet.</p>
pub fn excess_capacity_termination_policy(
mut self,
inp: crate::model::FleetExcessCapacityTerminationPolicy,
) -> Self {
self.inner = self.inner.excess_capacity_termination_policy(inp);
self
}
/// <p>Indicates whether running instances should be terminated if the total target capacity of
/// the EC2 Fleet is decreased below the current size of the EC2 Fleet.</p>
pub fn set_excess_capacity_termination_policy(
mut self,
input: std::option::Option<crate::model::FleetExcessCapacityTerminationPolicy>,
) -> Self {
self.inner = self.inner.set_excess_capacity_termination_policy(input);
self
}
/// Appends an item to `LaunchTemplateConfigs`.
///
/// To override the contents of this collection use [`set_launch_template_configs`](Self::set_launch_template_configs).
///
/// <p>The launch template and overrides.</p>
pub fn launch_template_configs(
mut self,
inp: impl Into<crate::model::FleetLaunchTemplateConfigRequest>,
) -> Self {
self.inner = self.inner.launch_template_configs(inp);
self
}
/// <p>The launch template and overrides.</p>
pub fn set_launch_template_configs(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::FleetLaunchTemplateConfigRequest>,
>,
) -> Self {
self.inner = self.inner.set_launch_template_configs(input);
self
}
/// <p>The ID of the EC2 Fleet.</p>
pub fn fleet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.fleet_id(inp);
self
}
/// <p>The ID of the EC2 Fleet.</p>
pub fn set_fleet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_fleet_id(input);
self
}
/// <p>The size of the EC2 Fleet.</p>
pub fn target_capacity_specification(
mut self,
inp: crate::model::TargetCapacitySpecificationRequest,
) -> Self {
self.inner = self.inner.target_capacity_specification(inp);
self
}
/// <p>The size of the EC2 Fleet.</p>
pub fn set_target_capacity_specification(
mut self,
input: std::option::Option<crate::model::TargetCapacitySpecificationRequest>,
) -> Self {
self.inner = self.inner.set_target_capacity_specification(input);
self
}
/// <p>Reserved.</p>
pub fn context(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.context(inp);
self
}
/// <p>Reserved.</p>
pub fn set_context(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_context(input);
self
}
}
/// Fluent builder constructing a request to `ModifyFpgaImageAttribute`.
///
/// <p>Modifies the specified attribute of the specified Amazon FPGA Image (AFI).</p>
#[derive(std::fmt::Debug)]
pub struct ModifyFpgaImageAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_fpga_image_attribute_input::Builder,
}
impl<C, M, R> ModifyFpgaImageAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyFpgaImageAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyFpgaImageAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyFpgaImageAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyFpgaImageAttributeInputOperationOutputAlias,
crate::output::ModifyFpgaImageAttributeOutput,
crate::error::ModifyFpgaImageAttributeError,
crate::input::ModifyFpgaImageAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the AFI.</p>
pub fn fpga_image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.fpga_image_id(inp);
self
}
/// <p>The ID of the AFI.</p>
pub fn set_fpga_image_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_fpga_image_id(input);
self
}
/// <p>The name of the attribute.</p>
pub fn attribute(mut self, inp: crate::model::FpgaImageAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The name of the attribute.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::FpgaImageAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <p>The operation type.</p>
pub fn operation_type(mut self, inp: crate::model::OperationType) -> Self {
self.inner = self.inner.operation_type(inp);
self
}
/// <p>The operation type.</p>
pub fn set_operation_type(
mut self,
input: std::option::Option<crate::model::OperationType>,
) -> Self {
self.inner = self.inner.set_operation_type(input);
self
}
/// Appends an item to `UserIds`.
///
/// To override the contents of this collection use [`set_user_ids`](Self::set_user_ids).
///
/// <p>The Amazon Web Services account IDs. This parameter is valid only when modifying the <code>loadPermission</code> attribute.</p>
pub fn user_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.user_ids(inp);
self
}
/// <p>The Amazon Web Services account IDs. This parameter is valid only when modifying the <code>loadPermission</code> attribute.</p>
pub fn set_user_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_user_ids(input);
self
}
/// Appends an item to `UserGroups`.
///
/// To override the contents of this collection use [`set_user_groups`](Self::set_user_groups).
///
/// <p>The user groups. This parameter is valid only when modifying the <code>loadPermission</code> attribute.</p>
pub fn user_groups(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.user_groups(inp);
self
}
/// <p>The user groups. This parameter is valid only when modifying the <code>loadPermission</code> attribute.</p>
pub fn set_user_groups(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_user_groups(input);
self
}
/// Appends an item to `ProductCodes`.
///
/// To override the contents of this collection use [`set_product_codes`](Self::set_product_codes).
///
/// <p>The product codes. After you add a product code to an AFI, it can't be removed.
/// This parameter is valid only when modifying the <code>productCodes</code> attribute.</p>
pub fn product_codes(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.product_codes(inp);
self
}
/// <p>The product codes. After you add a product code to an AFI, it can't be removed.
/// This parameter is valid only when modifying the <code>productCodes</code> attribute.</p>
pub fn set_product_codes(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_product_codes(input);
self
}
/// <p>The load permission for the AFI.</p>
pub fn load_permission(mut self, inp: crate::model::LoadPermissionModifications) -> Self {
self.inner = self.inner.load_permission(inp);
self
}
/// <p>The load permission for the AFI.</p>
pub fn set_load_permission(
mut self,
input: std::option::Option<crate::model::LoadPermissionModifications>,
) -> Self {
self.inner = self.inner.set_load_permission(input);
self
}
/// <p>A description for the AFI.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for the AFI.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>A name for the AFI.</p>
pub fn name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(inp);
self
}
/// <p>A name for the AFI.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
}
/// Fluent builder constructing a request to `ModifyHosts`.
///
/// <p>Modify the auto-placement setting of a Dedicated Host. When auto-placement is enabled,
/// any instances that you launch with a tenancy of <code>host</code> but without a specific host
/// ID are placed onto any available Dedicated Host in your account that has auto-placement enabled.
/// When auto-placement is disabled, you need to provide a host ID to have the instance launch onto
/// a specific host. If no host ID is provided, the instance is launched onto a suitable host with
/// auto-placement enabled.</p>
/// <p>You can also use this API action to modify a Dedicated Host to support either multiple
/// instance types in an instance family, or to support a specific instance type only.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyHosts<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_hosts_input::Builder,
}
impl<C, M, R> ModifyHosts<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyHosts`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyHostsOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyHostsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyHostsInputOperationOutputAlias,
crate::output::ModifyHostsOutput,
crate::error::ModifyHostsError,
crate::input::ModifyHostsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specify whether to enable or disable auto-placement.</p>
pub fn auto_placement(mut self, inp: crate::model::AutoPlacement) -> Self {
self.inner = self.inner.auto_placement(inp);
self
}
/// <p>Specify whether to enable or disable auto-placement.</p>
pub fn set_auto_placement(
mut self,
input: std::option::Option<crate::model::AutoPlacement>,
) -> Self {
self.inner = self.inner.set_auto_placement(input);
self
}
/// Appends an item to `HostIds`.
///
/// To override the contents of this collection use [`set_host_ids`](Self::set_host_ids).
///
/// <p>The IDs of the Dedicated Hosts to modify.</p>
pub fn host_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.host_ids(inp);
self
}
/// <p>The IDs of the Dedicated Hosts to modify.</p>
pub fn set_host_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_host_ids(input);
self
}
/// <p>Indicates whether to enable or disable host recovery for the Dedicated Host. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html">
/// Host recovery</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn host_recovery(mut self, inp: crate::model::HostRecovery) -> Self {
self.inner = self.inner.host_recovery(inp);
self
}
/// <p>Indicates whether to enable or disable host recovery for the Dedicated Host. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html">
/// Host recovery</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_host_recovery(
mut self,
input: std::option::Option<crate::model::HostRecovery>,
) -> Self {
self.inner = self.inner.set_host_recovery(input);
self
}
/// <p>Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to
/// modify a Dedicated Host to support only a specific instance type.</p>
///
/// <p>If you want to modify a Dedicated Host to support multiple instance types in its current instance
/// family, omit this parameter and specify <b>InstanceFamily</b>
/// instead. You cannot specify <b>InstanceType</b> and
/// <b>InstanceFamily</b> in the same request.</p>
pub fn instance_type(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_type(inp);
self
}
/// <p>Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to
/// modify a Dedicated Host to support only a specific instance type.</p>
///
/// <p>If you want to modify a Dedicated Host to support multiple instance types in its current instance
/// family, omit this parameter and specify <b>InstanceFamily</b>
/// instead. You cannot specify <b>InstanceType</b> and
/// <b>InstanceFamily</b> in the same request.</p>
pub fn set_instance_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_instance_type(input);
self
}
/// <p>Specifies the instance family to be supported by the Dedicated Host. Specify this parameter
/// to modify a Dedicated Host to support multiple instance types within its current
/// instance family.</p>
///
/// <p>If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter
/// and specify <b>InstanceType</b> instead. You cannot specify
/// <b>InstanceFamily</b> and <b>InstanceType</b>
/// in the same request.</p>
pub fn instance_family(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_family(inp);
self
}
/// <p>Specifies the instance family to be supported by the Dedicated Host. Specify this parameter
/// to modify a Dedicated Host to support multiple instance types within its current
/// instance family.</p>
///
/// <p>If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter
/// and specify <b>InstanceType</b> instead. You cannot specify
/// <b>InstanceFamily</b> and <b>InstanceType</b>
/// in the same request.</p>
pub fn set_instance_family(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_instance_family(input);
self
}
}
/// Fluent builder constructing a request to `ModifyIdentityIdFormat`.
///
/// <p>Modifies the ID format of a resource for a specified IAM user, IAM role, or the root
/// user for an account; or all IAM users, IAM roles, and the root user for an account. You can
/// specify that resources should receive longer IDs (17-character IDs) when they are created. </p>
/// <p>This request can only be used to modify longer ID settings for resource types that are
/// within the opt-in period. Resources currently in their opt-in period include:
/// <code>bundle</code> | <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>internet-gateway</code> | <code>network-acl</code>
/// | <code>network-acl-association</code> | <code>network-interface</code> |
/// <code>network-interface-attachment</code> | <code>prefix-list</code> |
/// <code>route-table</code> | <code>route-table-association</code> |
/// <code>security-group</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>vpc</code> |
/// <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> | <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>. </p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html">Resource IDs</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>. </p>
/// <p>This setting applies to the principal specified in the request; it does not apply to the
/// principal that makes the request. </p>
/// <p>Resources created with longer IDs are visible to all IAM roles and users, regardless of these
/// settings and provided that they have permission to use the relevant <code>Describe</code>
/// command for the resource type.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyIdentityIdFormat<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_identity_id_format_input::Builder,
}
impl<C, M, R> ModifyIdentityIdFormat<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyIdentityIdFormat`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyIdentityIdFormatOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyIdentityIdFormatError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyIdentityIdFormatInputOperationOutputAlias,
crate::output::ModifyIdentityIdFormatOutput,
crate::error::ModifyIdentityIdFormatError,
crate::input::ModifyIdentityIdFormatInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ARN of the principal, which can be an IAM user, IAM role, or the root user. Specify
/// <code>all</code> to modify the ID format for all IAM users, IAM roles, and the root user of
/// the account.</p>
pub fn principal_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.principal_arn(inp);
self
}
/// <p>The ARN of the principal, which can be an IAM user, IAM role, or the root user. Specify
/// <code>all</code> to modify the ID format for all IAM users, IAM roles, and the root user of
/// the account.</p>
pub fn set_principal_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_principal_arn(input);
self
}
/// <p>The type of resource: <code>bundle</code> | <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>internet-gateway</code> | <code>network-acl</code>
/// | <code>network-acl-association</code> | <code>network-interface</code> |
/// <code>network-interface-attachment</code> | <code>prefix-list</code> |
/// <code>route-table</code> | <code>route-table-association</code> |
/// <code>security-group</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>vpc</code> |
/// <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> | <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>.</p>
/// <p>Alternatively, use the <code>all-current</code> option to include all resource types that are
/// currently within their opt-in period for longer IDs.</p>
pub fn resource(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource(inp);
self
}
/// <p>The type of resource: <code>bundle</code> | <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>internet-gateway</code> | <code>network-acl</code>
/// | <code>network-acl-association</code> | <code>network-interface</code> |
/// <code>network-interface-attachment</code> | <code>prefix-list</code> |
/// <code>route-table</code> | <code>route-table-association</code> |
/// <code>security-group</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>vpc</code> |
/// <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> | <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>.</p>
/// <p>Alternatively, use the <code>all-current</code> option to include all resource types that are
/// currently within their opt-in period for longer IDs.</p>
pub fn set_resource(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_resource(input);
self
}
/// <p>Indicates whether the resource should use longer IDs (17-character IDs)</p>
pub fn use_long_ids(mut self, inp: bool) -> Self {
self.inner = self.inner.use_long_ids(inp);
self
}
/// <p>Indicates whether the resource should use longer IDs (17-character IDs)</p>
pub fn set_use_long_ids(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_use_long_ids(input);
self
}
}
/// Fluent builder constructing a request to `ModifyIdFormat`.
///
/// <p>Modifies the ID format for the specified resource on a per-Region basis. You can
/// specify that resources should receive longer IDs (17-character IDs) when they are
/// created.</p>
/// <p>This request can only be used to modify longer ID settings for resource types that
/// are within the opt-in period. Resources currently in their opt-in period include:
/// <code>bundle</code> | <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>internet-gateway</code> | <code>network-acl</code>
/// | <code>network-acl-association</code> | <code>network-interface</code> |
/// <code>network-interface-attachment</code> | <code>prefix-list</code> |
/// <code>route-table</code> | <code>route-table-association</code> |
/// <code>security-group</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>vpc</code> |
/// <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> | <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>.</p>
/// <p>This setting applies to the IAM user who makes the request; it does not apply to the
/// entire Amazon Web Services account. By default, an IAM user defaults to the same settings as the root user. If
/// you're using this action as the root user, then these settings apply to the entire account,
/// unless an IAM user explicitly overrides these settings for themselves. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html">Resource IDs</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>Resources created with longer IDs are visible to all IAM roles and users, regardless
/// of these settings and provided that they have permission to use the relevant
/// <code>Describe</code> command for the resource type.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyIdFormat<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_id_format_input::Builder,
}
impl<C, M, R> ModifyIdFormat<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyIdFormat`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyIdFormatOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyIdFormatError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyIdFormatInputOperationOutputAlias,
crate::output::ModifyIdFormatOutput,
crate::error::ModifyIdFormatError,
crate::input::ModifyIdFormatInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The type of resource: <code>bundle</code> | <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>internet-gateway</code> | <code>network-acl</code>
/// | <code>network-acl-association</code> | <code>network-interface</code> |
/// <code>network-interface-attachment</code> | <code>prefix-list</code> |
/// <code>route-table</code> | <code>route-table-association</code> |
/// <code>security-group</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>vpc</code> |
/// <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> | <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>.</p>
/// <p>Alternatively, use the <code>all-current</code> option to include all resource types that are
/// currently within their opt-in period for longer IDs.</p>
pub fn resource(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource(inp);
self
}
/// <p>The type of resource: <code>bundle</code> | <code>conversion-task</code> | <code>customer-gateway</code> | <code>dhcp-options</code> |
/// <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code> |
/// <code>export-task</code> | <code>flow-log</code> | <code>image</code> |
/// <code>import-task</code> | <code>internet-gateway</code> | <code>network-acl</code>
/// | <code>network-acl-association</code> | <code>network-interface</code> |
/// <code>network-interface-attachment</code> | <code>prefix-list</code> |
/// <code>route-table</code> | <code>route-table-association</code> |
/// <code>security-group</code> | <code>subnet</code> |
/// <code>subnet-cidr-block-association</code> | <code>vpc</code> |
/// <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> | <code>vpc-peering-connection</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>.</p>
/// <p>Alternatively, use the <code>all-current</code> option to include all resource types that are
/// currently within their opt-in period for longer IDs.</p>
pub fn set_resource(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_resource(input);
self
}
/// <p>Indicate whether the resource should use longer IDs (17-character IDs).</p>
pub fn use_long_ids(mut self, inp: bool) -> Self {
self.inner = self.inner.use_long_ids(inp);
self
}
/// <p>Indicate whether the resource should use longer IDs (17-character IDs).</p>
pub fn set_use_long_ids(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_use_long_ids(input);
self
}
}
/// Fluent builder constructing a request to `ModifyImageAttribute`.
///
/// <p>Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.
/// You can use the <code>Attribute</code> parameter to specify the attribute or one of the following parameters:
/// <code>Description</code> or <code>LaunchPermission</code>.</p>
/// <p>Images with an Amazon Web Services Marketplace product code cannot be made public.</p>
/// <p>To enable the SriovNetSupport enhanced networking attribute of an image, enable SriovNetSupport on an instance
/// and create an AMI from the instance.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyImageAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_image_attribute_input::Builder,
}
impl<C, M, R> ModifyImageAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyImageAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyImageAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyImageAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyImageAttributeInputOperationOutputAlias,
crate::output::ModifyImageAttributeOutput,
crate::error::ModifyImageAttributeError,
crate::input::ModifyImageAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the attribute to modify.
/// The valid values are <code>description</code> and <code>launchPermission</code>.</p>
pub fn attribute(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The name of the attribute to modify.
/// The valid values are <code>description</code> and <code>launchPermission</code>.</p>
pub fn set_attribute(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <p>A new description for the AMI.</p>
pub fn description(mut self, inp: crate::model::AttributeValue) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A new description for the AMI.</p>
pub fn set_description(
mut self,
input: std::option::Option<crate::model::AttributeValue>,
) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>The ID of the AMI.</p>
pub fn image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.image_id(inp);
self
}
/// <p>The ID of the AMI.</p>
pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_image_id(input);
self
}
/// <p>A new launch permission for the AMI.</p>
pub fn launch_permission(
mut self,
inp: crate::model::LaunchPermissionModifications,
) -> Self {
self.inner = self.inner.launch_permission(inp);
self
}
/// <p>A new launch permission for the AMI.</p>
pub fn set_launch_permission(
mut self,
input: std::option::Option<crate::model::LaunchPermissionModifications>,
) -> Self {
self.inner = self.inner.set_launch_permission(input);
self
}
/// <p>The operation type.
/// This parameter can be used only when the <code>Attribute</code> parameter is <code>launchPermission</code>.</p>
pub fn operation_type(mut self, inp: crate::model::OperationType) -> Self {
self.inner = self.inner.operation_type(inp);
self
}
/// <p>The operation type.
/// This parameter can be used only when the <code>Attribute</code> parameter is <code>launchPermission</code>.</p>
pub fn set_operation_type(
mut self,
input: std::option::Option<crate::model::OperationType>,
) -> Self {
self.inner = self.inner.set_operation_type(input);
self
}
/// Appends an item to `ProductCodes`.
///
/// To override the contents of this collection use [`set_product_codes`](Self::set_product_codes).
///
/// <p>Not supported.</p>
pub fn product_codes(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.product_codes(inp);
self
}
/// <p>Not supported.</p>
pub fn set_product_codes(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_product_codes(input);
self
}
/// Appends an item to `UserGroups`.
///
/// To override the contents of this collection use [`set_user_groups`](Self::set_user_groups).
///
/// <p>The user groups.
/// This parameter can be used only when the <code>Attribute</code> parameter is <code>launchPermission</code>.</p>
pub fn user_groups(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.user_groups(inp);
self
}
/// <p>The user groups.
/// This parameter can be used only when the <code>Attribute</code> parameter is <code>launchPermission</code>.</p>
pub fn set_user_groups(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_user_groups(input);
self
}
/// Appends an item to `UserIds`.
///
/// To override the contents of this collection use [`set_user_ids`](Self::set_user_ids).
///
/// <p>The Amazon Web Services account IDs.
/// This parameter can be used only when the <code>Attribute</code> parameter is <code>launchPermission</code>.</p>
pub fn user_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.user_ids(inp);
self
}
/// <p>The Amazon Web Services account IDs.
/// This parameter can be used only when the <code>Attribute</code> parameter is <code>launchPermission</code>.</p>
pub fn set_user_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_user_ids(input);
self
}
/// <p>The value of the attribute being modified.
/// This parameter can be used only when the <code>Attribute</code> parameter is <code>description</code>.</p>
pub fn value(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.value(inp);
self
}
/// <p>The value of the attribute being modified.
/// This parameter can be used only when the <code>Attribute</code> parameter is <code>description</code>.</p>
pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_value(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyInstanceAttribute`.
///
/// <p>Modifies the specified attribute of the specified instance. You can specify only one
/// attribute at a time.</p>
/// <p>
/// <b>Note: </b>Using this action to change the security groups
/// associated with an elastic network interface (ENI) attached to an instance in a VPC can
/// result in an error if the instance has more than one ENI. To change the security groups
/// associated with an ENI attached to an instance that has multiple ENIs, we recommend that
/// you use the <a>ModifyNetworkInterfaceAttribute</a> action.</p>
/// <p>To modify some attributes, the instance must be stopped. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html">Modifying attributes of a stopped instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyInstanceAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_instance_attribute_input::Builder,
}
impl<C, M, R> ModifyInstanceAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyInstanceAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyInstanceAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyInstanceAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyInstanceAttributeInputOperationOutputAlias,
crate::output::ModifyInstanceAttributeOutput,
crate::error::ModifyInstanceAttributeError,
crate::input::ModifyInstanceAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Enable or disable source/destination checks, which ensure that the instance
/// is either the source or the destination of any traffic that it receives.
/// If the value is <code>true</code>, source/destination checks are enabled;
/// otherwise, they are disabled. The default value is <code>true</code>.
/// You must disable source/destination checks if the instance runs services
/// such as network address translation, routing, or firewalls.</p>
pub fn source_dest_check(mut self, inp: crate::model::AttributeBooleanValue) -> Self {
self.inner = self.inner.source_dest_check(inp);
self
}
/// <p>Enable or disable source/destination checks, which ensure that the instance
/// is either the source or the destination of any traffic that it receives.
/// If the value is <code>true</code>, source/destination checks are enabled;
/// otherwise, they are disabled. The default value is <code>true</code>.
/// You must disable source/destination checks if the instance runs services
/// such as network address translation, routing, or firewalls.</p>
pub fn set_source_dest_check(
mut self,
input: std::option::Option<crate::model::AttributeBooleanValue>,
) -> Self {
self.inner = self.inner.set_source_dest_check(input);
self
}
/// <p>The name of the attribute.</p>
pub fn attribute(mut self, inp: crate::model::InstanceAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The name of the attribute.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::InstanceAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// Appends an item to `BlockDeviceMappings`.
///
/// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
///
/// <p>Modifies the <code>DeleteOnTermination</code> attribute for volumes that are currently
/// attached. The volume must be owned by the caller. If no value is specified for
/// <code>DeleteOnTermination</code>, the default is <code>true</code> and the volume is
/// deleted when the instance is terminated.</p>
/// <p>To add instance store volumes to an Amazon EBS-backed instance, you must add them when
/// you launch the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM">Updating the block device mapping when launching an instance</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
pub fn block_device_mappings(
mut self,
inp: impl Into<crate::model::InstanceBlockDeviceMappingSpecification>,
) -> Self {
self.inner = self.inner.block_device_mappings(inp);
self
}
/// <p>Modifies the <code>DeleteOnTermination</code> attribute for volumes that are currently
/// attached. The volume must be owned by the caller. If no value is specified for
/// <code>DeleteOnTermination</code>, the default is <code>true</code> and the volume is
/// deleted when the instance is terminated.</p>
/// <p>To add instance store volumes to an Amazon EBS-backed instance, you must add them when
/// you launch the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM">Updating the block device mapping when launching an instance</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
pub fn set_block_device_mappings(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::InstanceBlockDeviceMappingSpecification>,
>,
) -> Self {
self.inner = self.inner.set_block_device_mappings(input);
self
}
/// <p>If the value is <code>true</code>, you can't terminate the instance using the Amazon
/// EC2 console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot
/// Instances.</p>
pub fn disable_api_termination(mut self, inp: crate::model::AttributeBooleanValue) -> Self {
self.inner = self.inner.disable_api_termination(inp);
self
}
/// <p>If the value is <code>true</code>, you can't terminate the instance using the Amazon
/// EC2 console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot
/// Instances.</p>
pub fn set_disable_api_termination(
mut self,
input: std::option::Option<crate::model::AttributeBooleanValue>,
) -> Self {
self.inner = self.inner.set_disable_api_termination(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Specifies whether the instance is optimized for Amazon EBS I/O. This optimization
/// provides dedicated throughput to Amazon EBS and an optimized configuration stack to
/// provide optimal EBS I/O performance. This optimization isn't available with all instance
/// types. Additional usage charges apply when using an EBS Optimized instance.</p>
pub fn ebs_optimized(mut self, inp: crate::model::AttributeBooleanValue) -> Self {
self.inner = self.inner.ebs_optimized(inp);
self
}
/// <p>Specifies whether the instance is optimized for Amazon EBS I/O. This optimization
/// provides dedicated throughput to Amazon EBS and an optimized configuration stack to
/// provide optimal EBS I/O performance. This optimization isn't available with all instance
/// types. Additional usage charges apply when using an EBS Optimized instance.</p>
pub fn set_ebs_optimized(
mut self,
input: std::option::Option<crate::model::AttributeBooleanValue>,
) -> Self {
self.inner = self.inner.set_ebs_optimized(input);
self
}
/// <p>Set to <code>true</code> to enable enhanced networking with ENA for the
/// instance.</p>
/// <p>This option is supported only for HVM instances. Specifying this option with a PV
/// instance can make it unreachable.</p>
pub fn ena_support(mut self, inp: crate::model::AttributeBooleanValue) -> Self {
self.inner = self.inner.ena_support(inp);
self
}
/// <p>Set to <code>true</code> to enable enhanced networking with ENA for the
/// instance.</p>
/// <p>This option is supported only for HVM instances. Specifying this option with a PV
/// instance can make it unreachable.</p>
pub fn set_ena_support(
mut self,
input: std::option::Option<crate::model::AttributeBooleanValue>,
) -> Self {
self.inner = self.inner.set_ena_support(input);
self
}
/// Appends an item to `Groups`.
///
/// To override the contents of this collection use [`set_groups`](Self::set_groups).
///
/// <p>[EC2-VPC] Replaces the security groups of the instance with the specified security groups.
/// You must specify at least one security group, even if it's just the default security group for the VPC. You must
/// specify the security group ID, not the security group name.</p>
pub fn groups(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.groups(inp);
self
}
/// <p>[EC2-VPC] Replaces the security groups of the instance with the specified security groups.
/// You must specify at least one security group, even if it's just the default security group for the VPC. You must
/// specify the security group ID, not the security group name.</p>
pub fn set_groups(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_groups(input);
self
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>Specifies whether an instance stops or terminates when you initiate shutdown from the
/// instance (using the operating system command for system shutdown).</p>
pub fn instance_initiated_shutdown_behavior(
mut self,
inp: crate::model::AttributeValue,
) -> Self {
self.inner = self.inner.instance_initiated_shutdown_behavior(inp);
self
}
/// <p>Specifies whether an instance stops or terminates when you initiate shutdown from the
/// instance (using the operating system command for system shutdown).</p>
pub fn set_instance_initiated_shutdown_behavior(
mut self,
input: std::option::Option<crate::model::AttributeValue>,
) -> Self {
self.inner = self.inner.set_instance_initiated_shutdown_behavior(input);
self
}
/// <p>Changes the instance type to the specified value. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance
/// types</a> in the <i>Amazon EC2 User Guide</i>. If the instance type is not valid,
/// the error returned is <code>InvalidInstanceAttributeValue</code>.</p>
pub fn instance_type(mut self, inp: crate::model::AttributeValue) -> Self {
self.inner = self.inner.instance_type(inp);
self
}
/// <p>Changes the instance type to the specified value. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance
/// types</a> in the <i>Amazon EC2 User Guide</i>. If the instance type is not valid,
/// the error returned is <code>InvalidInstanceAttributeValue</code>.</p>
pub fn set_instance_type(
mut self,
input: std::option::Option<crate::model::AttributeValue>,
) -> Self {
self.inner = self.inner.set_instance_type(input);
self
}
/// <p>Changes the instance's kernel to the specified value. We recommend that you use
/// PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html">PV-GRUB</a>.</p>
pub fn kernel(mut self, inp: crate::model::AttributeValue) -> Self {
self.inner = self.inner.kernel(inp);
self
}
/// <p>Changes the instance's kernel to the specified value. We recommend that you use
/// PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html">PV-GRUB</a>.</p>
pub fn set_kernel(
mut self,
input: std::option::Option<crate::model::AttributeValue>,
) -> Self {
self.inner = self.inner.set_kernel(input);
self
}
/// <p>Changes the instance's RAM disk to the specified value. We recommend that you use
/// PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html">PV-GRUB</a>.</p>
pub fn ramdisk(mut self, inp: crate::model::AttributeValue) -> Self {
self.inner = self.inner.ramdisk(inp);
self
}
/// <p>Changes the instance's RAM disk to the specified value. We recommend that you use
/// PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html">PV-GRUB</a>.</p>
pub fn set_ramdisk(
mut self,
input: std::option::Option<crate::model::AttributeValue>,
) -> Self {
self.inner = self.inner.set_ramdisk(input);
self
}
/// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual
/// Function interface for the instance.</p>
/// <p>There is no way to disable enhanced networking with the Intel 82599 Virtual Function
/// interface at this time.</p>
/// <p>This option is supported only for HVM instances. Specifying this option with a PV
/// instance can make it unreachable.</p>
pub fn sriov_net_support(mut self, inp: crate::model::AttributeValue) -> Self {
self.inner = self.inner.sriov_net_support(inp);
self
}
/// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual
/// Function interface for the instance.</p>
/// <p>There is no way to disable enhanced networking with the Intel 82599 Virtual Function
/// interface at this time.</p>
/// <p>This option is supported only for HVM instances. Specifying this option with a PV
/// instance can make it unreachable.</p>
pub fn set_sriov_net_support(
mut self,
input: std::option::Option<crate::model::AttributeValue>,
) -> Self {
self.inner = self.inner.set_sriov_net_support(input);
self
}
/// <p>Changes the instance's user data to the specified value. If you are using an Amazon Web Services SDK
/// or command line tool, base64-encoding is performed for you, and you can load the text
/// from a file. Otherwise, you must provide base64-encoded text.</p>
pub fn user_data(mut self, inp: crate::model::BlobAttributeValue) -> Self {
self.inner = self.inner.user_data(inp);
self
}
/// <p>Changes the instance's user data to the specified value. If you are using an Amazon Web Services SDK
/// or command line tool, base64-encoding is performed for you, and you can load the text
/// from a file. Otherwise, you must provide base64-encoded text.</p>
pub fn set_user_data(
mut self,
input: std::option::Option<crate::model::BlobAttributeValue>,
) -> Self {
self.inner = self.inner.set_user_data(input);
self
}
/// <p>A new value for the attribute. Use only with the <code>kernel</code>,
/// <code>ramdisk</code>, <code>userData</code>, <code>disableApiTermination</code>, or
/// <code>instanceInitiatedShutdownBehavior</code> attribute.</p>
pub fn value(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.value(inp);
self
}
/// <p>A new value for the attribute. Use only with the <code>kernel</code>,
/// <code>ramdisk</code>, <code>userData</code>, <code>disableApiTermination</code>, or
/// <code>instanceInitiatedShutdownBehavior</code> attribute.</p>
pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_value(input);
self
}
}
/// Fluent builder constructing a request to `ModifyInstanceCapacityReservationAttributes`.
///
/// <p>Modifies the Capacity Reservation settings for a stopped instance. Use this action to configure an
/// instance to target a specific Capacity Reservation, run in any <code>open</code> Capacity Reservation with matching
/// attributes, or run On-Demand Instance capacity.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyInstanceCapacityReservationAttributes<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_instance_capacity_reservation_attributes_input::Builder,
}
impl<C, M, R> ModifyInstanceCapacityReservationAttributes<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyInstanceCapacityReservationAttributes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyInstanceCapacityReservationAttributesOutput,
aws_smithy_http::result::SdkError<
crate::error::ModifyInstanceCapacityReservationAttributesError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyInstanceCapacityReservationAttributesInputOperationOutputAlias,
crate::output::ModifyInstanceCapacityReservationAttributesOutput,
crate::error::ModifyInstanceCapacityReservationAttributesError,
crate::input::ModifyInstanceCapacityReservationAttributesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the instance to be modified.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance to be modified.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>Information about the Capacity Reservation targeting option.</p>
pub fn capacity_reservation_specification(
mut self,
inp: crate::model::CapacityReservationSpecification,
) -> Self {
self.inner = self.inner.capacity_reservation_specification(inp);
self
}
/// <p>Information about the Capacity Reservation targeting option.</p>
pub fn set_capacity_reservation_specification(
mut self,
input: std::option::Option<crate::model::CapacityReservationSpecification>,
) -> Self {
self.inner = self.inner.set_capacity_reservation_specification(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyInstanceCreditSpecification`.
///
/// <p>Modifies the credit option for CPU usage on a running or stopped burstable performance
/// instance. The credit options are <code>standard</code> and
/// <code>unlimited</code>.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable
/// performance instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyInstanceCreditSpecification<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_instance_credit_specification_input::Builder,
}
impl<C, M, R> ModifyInstanceCreditSpecification<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyInstanceCreditSpecification`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyInstanceCreditSpecificationOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyInstanceCreditSpecificationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyInstanceCreditSpecificationInputOperationOutputAlias,
crate::output::ModifyInstanceCreditSpecificationOutput,
crate::error::ModifyInstanceCreditSpecificationError,
crate::input::ModifyInstanceCreditSpecificationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>A unique, case-sensitive token that you provide to ensure idempotency of your
/// modification request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>A unique, case-sensitive token that you provide to ensure idempotency of your
/// modification request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// Appends an item to `InstanceCreditSpecifications`.
///
/// To override the contents of this collection use [`set_instance_credit_specifications`](Self::set_instance_credit_specifications).
///
/// <p>Information about the credit option for CPU usage.</p>
pub fn instance_credit_specifications(
mut self,
inp: impl Into<crate::model::InstanceCreditSpecificationRequest>,
) -> Self {
self.inner = self.inner.instance_credit_specifications(inp);
self
}
/// <p>Information about the credit option for CPU usage.</p>
pub fn set_instance_credit_specifications(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::InstanceCreditSpecificationRequest>,
>,
) -> Self {
self.inner = self.inner.set_instance_credit_specifications(input);
self
}
}
/// Fluent builder constructing a request to `ModifyInstanceEventStartTime`.
///
/// <p>Modifies the start time for a scheduled Amazon EC2 instance event.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyInstanceEventStartTime<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_instance_event_start_time_input::Builder,
}
impl<C, M, R> ModifyInstanceEventStartTime<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyInstanceEventStartTime`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyInstanceEventStartTimeOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyInstanceEventStartTimeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyInstanceEventStartTimeInputOperationOutputAlias,
crate::output::ModifyInstanceEventStartTimeOutput,
crate::error::ModifyInstanceEventStartTimeError,
crate::input::ModifyInstanceEventStartTimeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the instance with the scheduled event.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance with the scheduled event.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The ID of the event whose date and time you are modifying.</p>
pub fn instance_event_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_event_id(inp);
self
}
/// <p>The ID of the event whose date and time you are modifying.</p>
pub fn set_instance_event_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_instance_event_id(input);
self
}
/// <p>The new date and time when the event will take place.</p>
pub fn not_before(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.not_before(inp);
self
}
/// <p>The new date and time when the event will take place.</p>
pub fn set_not_before(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_not_before(input);
self
}
}
/// Fluent builder constructing a request to `ModifyInstanceEventWindow`.
///
/// <p>Modifies the specified event window.</p>
/// <p>You can define either a set of time ranges or a cron expression when modifying the event
/// window, but not both.</p>
/// <p>To modify the targets associated with the event window, use the <a>AssociateInstanceEventWindow</a> and <a>DisassociateInstanceEventWindow</a> API.</p>
/// <p>If Amazon Web Services has already scheduled an event, modifying an event window won't change the time
/// of the scheduled event.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html">Define event windows for scheduled
/// events</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyInstanceEventWindow<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_instance_event_window_input::Builder,
}
impl<C, M, R> ModifyInstanceEventWindow<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyInstanceEventWindow`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyInstanceEventWindowOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyInstanceEventWindowError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyInstanceEventWindowInputOperationOutputAlias,
crate::output::ModifyInstanceEventWindowOutput,
crate::error::ModifyInstanceEventWindowError,
crate::input::ModifyInstanceEventWindowInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The name of the event window.</p>
pub fn name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(inp);
self
}
/// <p>The name of the event window.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The ID of the event window.</p>
pub fn instance_event_window_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_event_window_id(inp);
self
}
/// <p>The ID of the event window.</p>
pub fn set_instance_event_window_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_instance_event_window_id(input);
self
}
/// Appends an item to `TimeRanges`.
///
/// To override the contents of this collection use [`set_time_ranges`](Self::set_time_ranges).
///
/// <p>The time ranges of the event window.</p>
pub fn time_ranges(
mut self,
inp: impl Into<crate::model::InstanceEventWindowTimeRangeRequest>,
) -> Self {
self.inner = self.inner.time_ranges(inp);
self
}
/// <p>The time ranges of the event window.</p>
pub fn set_time_ranges(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::InstanceEventWindowTimeRangeRequest>,
>,
) -> Self {
self.inner = self.inner.set_time_ranges(input);
self
}
/// <p>The cron expression of the event window, for example, <code>* 0-4,20-23 * * 1,5</code>.</p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>Only hour and day of the week values are supported.</p>
/// </li>
/// <li>
/// <p>For day of the week values, you can specify either integers <code>0</code> through
/// <code>6</code>, or alternative single values <code>SUN</code> through
/// <code>SAT</code>.</p>
/// </li>
/// <li>
/// <p>The minute, month, and year must be specified by <code>*</code>.</p>
/// </li>
/// <li>
/// <p>The hour value must be one or a multiple range, for example, <code>0-4</code> or
/// <code>0-4,20-23</code>.</p>
/// </li>
/// <li>
/// <p>Each hour range must be >= 2 hours, for example, <code>0-2</code> or
/// <code>20-23</code>.</p>
/// </li>
/// <li>
/// <p>The event window must be >= 4 hours. The combined total time ranges in the event
/// window must be >= 4 hours.</p>
/// </li>
/// </ul>
/// <p>For more information about cron expressions, see <a href="https://en.wikipedia.org/wiki/Cron">cron</a> on the <i>Wikipedia
/// website</i>.</p>
pub fn cron_expression(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cron_expression(inp);
self
}
/// <p>The cron expression of the event window, for example, <code>* 0-4,20-23 * * 1,5</code>.</p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>Only hour and day of the week values are supported.</p>
/// </li>
/// <li>
/// <p>For day of the week values, you can specify either integers <code>0</code> through
/// <code>6</code>, or alternative single values <code>SUN</code> through
/// <code>SAT</code>.</p>
/// </li>
/// <li>
/// <p>The minute, month, and year must be specified by <code>*</code>.</p>
/// </li>
/// <li>
/// <p>The hour value must be one or a multiple range, for example, <code>0-4</code> or
/// <code>0-4,20-23</code>.</p>
/// </li>
/// <li>
/// <p>Each hour range must be >= 2 hours, for example, <code>0-2</code> or
/// <code>20-23</code>.</p>
/// </li>
/// <li>
/// <p>The event window must be >= 4 hours. The combined total time ranges in the event
/// window must be >= 4 hours.</p>
/// </li>
/// </ul>
/// <p>For more information about cron expressions, see <a href="https://en.wikipedia.org/wiki/Cron">cron</a> on the <i>Wikipedia
/// website</i>.</p>
pub fn set_cron_expression(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_cron_expression(input);
self
}
}
/// Fluent builder constructing a request to `ModifyInstanceMetadataOptions`.
///
/// <p>Modify the instance metadata parameters on a running or stopped instance. When you
/// modify the parameters on a stopped instance, they are applied when the instance is
/// started. When you modify the parameters on a running instance, the API responds with a
/// state of “pending”. After the parameter modifications are successfully applied to the
/// instance, the state of the modifications changes from “pending” to “applied” in
/// subsequent describe-instances API calls. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a>
/// in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyInstanceMetadataOptions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_instance_metadata_options_input::Builder,
}
impl<C, M, R> ModifyInstanceMetadataOptions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyInstanceMetadataOptions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyInstanceMetadataOptionsOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyInstanceMetadataOptionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyInstanceMetadataOptionsInputOperationOutputAlias,
crate::output::ModifyInstanceMetadataOptionsOutput,
crate::error::ModifyInstanceMetadataOptionsError,
crate::input::ModifyInstanceMetadataOptionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The state of token usage for your instance metadata requests. If the parameter is not
/// specified in the request, the default state is <code>optional</code>.</p>
/// <p>If the state is <code>optional</code>, you can choose to retrieve instance metadata
/// with or without a signed token header on your request. If you retrieve the IAM role
/// credentials without a token, the version 1.0 role credentials are returned. If you
/// retrieve the IAM role credentials using a valid signed token, the version 2.0 role
/// credentials are returned.</p>
/// <p>If the state is <code>required</code>, you must send a signed token header with any
/// instance metadata retrieval requests. In this state, retrieving the IAM role credential
/// always returns the version 2.0 credentials; the version 1.0 credentials are not
/// available.</p>
pub fn http_tokens(mut self, inp: crate::model::HttpTokensState) -> Self {
self.inner = self.inner.http_tokens(inp);
self
}
/// <p>The state of token usage for your instance metadata requests. If the parameter is not
/// specified in the request, the default state is <code>optional</code>.</p>
/// <p>If the state is <code>optional</code>, you can choose to retrieve instance metadata
/// with or without a signed token header on your request. If you retrieve the IAM role
/// credentials without a token, the version 1.0 role credentials are returned. If you
/// retrieve the IAM role credentials using a valid signed token, the version 2.0 role
/// credentials are returned.</p>
/// <p>If the state is <code>required</code>, you must send a signed token header with any
/// instance metadata retrieval requests. In this state, retrieving the IAM role credential
/// always returns the version 2.0 credentials; the version 1.0 credentials are not
/// available.</p>
pub fn set_http_tokens(
mut self,
input: std::option::Option<crate::model::HttpTokensState>,
) -> Self {
self.inner = self.inner.set_http_tokens(input);
self
}
/// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the
/// number, the further instance metadata requests can travel. If no parameter is specified, the existing state is maintained.</p>
/// <p>Possible values: Integers from 1 to 64</p>
pub fn http_put_response_hop_limit(mut self, inp: i32) -> Self {
self.inner = self.inner.http_put_response_hop_limit(inp);
self
}
/// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the
/// number, the further instance metadata requests can travel. If no parameter is specified, the existing state is maintained.</p>
/// <p>Possible values: Integers from 1 to 64</p>
pub fn set_http_put_response_hop_limit(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_http_put_response_hop_limit(input);
self
}
/// <p>This parameter enables or disables the HTTP metadata endpoint on your instances. If
/// the parameter is not specified, the existing state is maintained.</p>
/// <note>
/// <p>If you specify a value of <code>disabled</code>, you will not be able to access your
/// instance metadata.</p>
/// </note>
pub fn http_endpoint(mut self, inp: crate::model::InstanceMetadataEndpointState) -> Self {
self.inner = self.inner.http_endpoint(inp);
self
}
/// <p>This parameter enables or disables the HTTP metadata endpoint on your instances. If
/// the parameter is not specified, the existing state is maintained.</p>
/// <note>
/// <p>If you specify a value of <code>disabled</code>, you will not be able to access your
/// instance metadata.</p>
/// </note>
pub fn set_http_endpoint(
mut self,
input: std::option::Option<crate::model::InstanceMetadataEndpointState>,
) -> Self {
self.inner = self.inner.set_http_endpoint(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
pub fn http_protocol_ipv6(
mut self,
inp: crate::model::InstanceMetadataProtocolState,
) -> Self {
self.inner = self.inner.http_protocol_ipv6(inp);
self
}
/// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
pub fn set_http_protocol_ipv6(
mut self,
input: std::option::Option<crate::model::InstanceMetadataProtocolState>,
) -> Self {
self.inner = self.inner.set_http_protocol_ipv6(input);
self
}
}
/// Fluent builder constructing a request to `ModifyInstancePlacement`.
///
/// <p>Modifies the placement attributes for a specified instance. You can do the
/// following:</p>
/// <ul>
/// <li>
/// <p>Modify the affinity between an instance and a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html">Dedicated
/// Host</a>. When affinity is set to <code>host</code> and the instance is
/// not associated with a specific Dedicated Host, the next time the instance is
/// launched, it is automatically associated with the host on which it lands. If the
/// instance is restarted or rebooted, this relationship persists.</p>
/// </li>
/// <li>
/// <p>Change the Dedicated Host with which an instance is associated.</p>
/// </li>
/// <li>
/// <p>Change the instance tenancy of an instance.</p>
/// </li>
/// <li>
/// <p>Move an instance to or from a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">placement
/// group</a>.</p>
/// </li>
/// </ul>
/// <p>At least one attribute for affinity, host ID, tenancy, or placement group name must
/// be specified in the request. Affinity and tenancy can be modified in the same
/// request.</p>
/// <p>To modify the host ID, tenancy, placement group, or partition for an instance, the
/// instance must be in the <code>stopped</code> state.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyInstancePlacement<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_instance_placement_input::Builder,
}
impl<C, M, R> ModifyInstancePlacement<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyInstancePlacement`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyInstancePlacementOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyInstancePlacementError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyInstancePlacementInputOperationOutputAlias,
crate::output::ModifyInstancePlacementOutput,
crate::error::ModifyInstancePlacementError,
crate::input::ModifyInstancePlacementInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The affinity setting for the instance.</p>
pub fn affinity(mut self, inp: crate::model::Affinity) -> Self {
self.inner = self.inner.affinity(inp);
self
}
/// <p>The affinity setting for the instance.</p>
pub fn set_affinity(mut self, input: std::option::Option<crate::model::Affinity>) -> Self {
self.inner = self.inner.set_affinity(input);
self
}
/// <p>The name of the placement group in which to place the instance. For spread placement
/// groups, the instance must have a tenancy of <code>default</code>. For cluster and
/// partition placement groups, the instance must have a tenancy of <code>default</code> or
/// <code>dedicated</code>.</p>
/// <p>To remove an instance from a placement group, specify an empty string
/// ("").</p>
pub fn group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_name(inp);
self
}
/// <p>The name of the placement group in which to place the instance. For spread placement
/// groups, the instance must have a tenancy of <code>default</code>. For cluster and
/// partition placement groups, the instance must have a tenancy of <code>default</code> or
/// <code>dedicated</code>.</p>
/// <p>To remove an instance from a placement group, specify an empty string
/// ("").</p>
pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_name(input);
self
}
/// <p>The ID of the Dedicated Host with which to associate the instance.</p>
pub fn host_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.host_id(inp);
self
}
/// <p>The ID of the Dedicated Host with which to associate the instance.</p>
pub fn set_host_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_host_id(input);
self
}
/// <p>The ID of the instance that you are modifying.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance that you are modifying.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The tenancy for the instance.</p>
///
/// <note>
/// <p>For T3 instances, you can't change the tenancy from <code>dedicated</code>
/// to <code>host</code>, or from <code>host</code> to <code>dedicated</code>.
/// Attempting to make one of these unsupported tenancy changes results in the
/// <code>InvalidTenancy</code> error code.</p>
/// </note>
pub fn tenancy(mut self, inp: crate::model::HostTenancy) -> Self {
self.inner = self.inner.tenancy(inp);
self
}
/// <p>The tenancy for the instance.</p>
///
/// <note>
/// <p>For T3 instances, you can't change the tenancy from <code>dedicated</code>
/// to <code>host</code>, or from <code>host</code> to <code>dedicated</code>.
/// Attempting to make one of these unsupported tenancy changes results in the
/// <code>InvalidTenancy</code> error code.</p>
/// </note>
pub fn set_tenancy(
mut self,
input: std::option::Option<crate::model::HostTenancy>,
) -> Self {
self.inner = self.inner.set_tenancy(input);
self
}
/// <p>Reserved for future use.</p>
pub fn partition_number(mut self, inp: i32) -> Self {
self.inner = self.inner.partition_number(inp);
self
}
/// <p>Reserved for future use.</p>
pub fn set_partition_number(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_partition_number(input);
self
}
/// <p>The ARN of the host resource group in which to place the instance.</p>
pub fn host_resource_group_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.host_resource_group_arn(inp);
self
}
/// <p>The ARN of the host resource group in which to place the instance.</p>
pub fn set_host_resource_group_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_host_resource_group_arn(input);
self
}
}
/// Fluent builder constructing a request to `ModifyLaunchTemplate`.
///
/// <p>Modifies a launch template. You can specify which version of the launch template to
/// set as the default version. When launching an instance, the default version applies when
/// a launch template version is not specified.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyLaunchTemplate<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_launch_template_input::Builder,
}
impl<C, M, R> ModifyLaunchTemplate<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyLaunchTemplate`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyLaunchTemplateOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyLaunchTemplateError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyLaunchTemplateInputOperationOutputAlias,
crate::output::ModifyLaunchTemplateOutput,
crate::error::ModifyLaunchTemplateError,
crate::input::ModifyLaunchTemplateInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
/// <p>Constraint: Maximum 128 ASCII characters.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
/// <p>Constraint: Maximum 128 ASCII characters.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>The ID of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn launch_template_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_id(inp);
self
}
/// <p>The ID of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn set_launch_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_launch_template_id(input);
self
}
/// <p>The name of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn launch_template_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_template_name(inp);
self
}
/// <p>The name of the launch template. You must specify either the launch template ID or
/// launch template name in the request.</p>
pub fn set_launch_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_launch_template_name(input);
self
}
/// <p>The version number of the launch template to set as the default version.</p>
pub fn default_version(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.default_version(inp);
self
}
/// <p>The version number of the launch template to set as the default version.</p>
pub fn set_default_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_default_version(input);
self
}
}
/// Fluent builder constructing a request to `ModifyManagedPrefixList`.
///
/// <p>Modifies the specified managed prefix list.</p>
/// <p>Adding or removing entries in a prefix list creates a new version of the prefix list.
/// Changing the name of the prefix list does not affect the version.</p>
/// <p>If you specify a current version number that does not match the true current version
/// number, the request fails.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyManagedPrefixList<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_managed_prefix_list_input::Builder,
}
impl<C, M, R> ModifyManagedPrefixList<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyManagedPrefixList`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyManagedPrefixListOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyManagedPrefixListError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyManagedPrefixListInputOperationOutputAlias,
crate::output::ModifyManagedPrefixListOutput,
crate::error::ModifyManagedPrefixListError,
crate::input::ModifyManagedPrefixListInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the prefix list.</p>
pub fn prefix_list_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix_list_id(inp);
self
}
/// <p>The ID of the prefix list.</p>
pub fn set_prefix_list_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_prefix_list_id(input);
self
}
/// <p>The current version of the prefix list.</p>
pub fn current_version(mut self, inp: i64) -> Self {
self.inner = self.inner.current_version(inp);
self
}
/// <p>The current version of the prefix list.</p>
pub fn set_current_version(mut self, input: std::option::Option<i64>) -> Self {
self.inner = self.inner.set_current_version(input);
self
}
/// <p>A name for the prefix list.</p>
pub fn prefix_list_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix_list_name(inp);
self
}
/// <p>A name for the prefix list.</p>
pub fn set_prefix_list_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_prefix_list_name(input);
self
}
/// Appends an item to `AddEntries`.
///
/// To override the contents of this collection use [`set_add_entries`](Self::set_add_entries).
///
/// <p>One or more entries to add to the prefix list.</p>
pub fn add_entries(mut self, inp: impl Into<crate::model::AddPrefixListEntry>) -> Self {
self.inner = self.inner.add_entries(inp);
self
}
/// <p>One or more entries to add to the prefix list.</p>
pub fn set_add_entries(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AddPrefixListEntry>>,
) -> Self {
self.inner = self.inner.set_add_entries(input);
self
}
/// Appends an item to `RemoveEntries`.
///
/// To override the contents of this collection use [`set_remove_entries`](Self::set_remove_entries).
///
/// <p>One or more entries to remove from the prefix list.</p>
pub fn remove_entries(
mut self,
inp: impl Into<crate::model::RemovePrefixListEntry>,
) -> Self {
self.inner = self.inner.remove_entries(inp);
self
}
/// <p>One or more entries to remove from the prefix list.</p>
pub fn set_remove_entries(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::RemovePrefixListEntry>>,
) -> Self {
self.inner = self.inner.set_remove_entries(input);
self
}
/// <p>The maximum number of entries for the prefix list. You cannot modify the entries
/// of a prefix list and modify the size of a prefix list at the same time.</p>
/// <p>If any of the resources that reference the prefix list cannot support the new
/// maximum size, the modify operation fails. Check the state message for the IDs of
/// the first ten resources that do not support the new maximum size.</p>
pub fn max_entries(mut self, inp: i32) -> Self {
self.inner = self.inner.max_entries(inp);
self
}
/// <p>The maximum number of entries for the prefix list. You cannot modify the entries
/// of a prefix list and modify the size of a prefix list at the same time.</p>
/// <p>If any of the resources that reference the prefix list cannot support the new
/// maximum size, the modify operation fails. Check the state message for the IDs of
/// the first ten resources that do not support the new maximum size.</p>
pub fn set_max_entries(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_entries(input);
self
}
}
/// Fluent builder constructing a request to `ModifyNetworkInterfaceAttribute`.
///
/// <p>Modifies the specified network interface attribute. You can specify only one
/// attribute at a time. You can use this action to attach and detach security groups from
/// an existing EC2 instance.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyNetworkInterfaceAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_network_interface_attribute_input::Builder,
}
impl<C, M, R> ModifyNetworkInterfaceAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyNetworkInterfaceAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyNetworkInterfaceAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyNetworkInterfaceAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyNetworkInterfaceAttributeInputOperationOutputAlias,
crate::output::ModifyNetworkInterfaceAttributeOutput,
crate::error::ModifyNetworkInterfaceAttributeError,
crate::input::ModifyNetworkInterfaceAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Information about the interface attachment. If modifying the 'delete on termination' attribute, you must specify the ID of the interface attachment.</p>
pub fn attachment(mut self, inp: crate::model::NetworkInterfaceAttachmentChanges) -> Self {
self.inner = self.inner.attachment(inp);
self
}
/// <p>Information about the interface attachment. If modifying the 'delete on termination' attribute, you must specify the ID of the interface attachment.</p>
pub fn set_attachment(
mut self,
input: std::option::Option<crate::model::NetworkInterfaceAttachmentChanges>,
) -> Self {
self.inner = self.inner.set_attachment(input);
self
}
/// <p>A description for the network interface.</p>
pub fn description(mut self, inp: crate::model::AttributeValue) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for the network interface.</p>
pub fn set_description(
mut self,
input: std::option::Option<crate::model::AttributeValue>,
) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `Groups`.
///
/// To override the contents of this collection use [`set_groups`](Self::set_groups).
///
/// <p>Changes the security groups for the network interface. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.</p>
pub fn groups(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.groups(inp);
self
}
/// <p>Changes the security groups for the network interface. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.</p>
pub fn set_groups(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_groups(input);
self
}
/// <p>The ID of the network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of the network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
/// <p>Enable or disable source/destination checks, which ensure that the instance
/// is either the source or the destination of any traffic that it receives.
/// If the value is <code>true</code>, source/destination checks are enabled;
/// otherwise, they are disabled. The default value is <code>true</code>.
/// You must disable source/destination checks if the instance runs services
/// such as network address translation, routing, or firewalls.</p>
pub fn source_dest_check(mut self, inp: crate::model::AttributeBooleanValue) -> Self {
self.inner = self.inner.source_dest_check(inp);
self
}
/// <p>Enable or disable source/destination checks, which ensure that the instance
/// is either the source or the destination of any traffic that it receives.
/// If the value is <code>true</code>, source/destination checks are enabled;
/// otherwise, they are disabled. The default value is <code>true</code>.
/// You must disable source/destination checks if the instance runs services
/// such as network address translation, routing, or firewalls.</p>
pub fn set_source_dest_check(
mut self,
input: std::option::Option<crate::model::AttributeBooleanValue>,
) -> Self {
self.inner = self.inner.set_source_dest_check(input);
self
}
}
/// Fluent builder constructing a request to `ModifyReservedInstances`.
///
/// <p>Modifies the Availability Zone, instance count, instance type, or network platform
/// (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved Instances to be
/// modified must be identical, except for Availability Zone, network platform, and instance
/// type.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html">Modifying Reserved
/// Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyReservedInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_reserved_instances_input::Builder,
}
impl<C, M, R> ModifyReservedInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyReservedInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyReservedInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyReservedInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyReservedInstancesInputOperationOutputAlias,
crate::output::ModifyReservedInstancesOutput,
crate::error::ModifyReservedInstancesError,
crate::input::ModifyReservedInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `ReservedInstancesIds`.
///
/// To override the contents of this collection use [`set_reserved_instances_ids`](Self::set_reserved_instances_ids).
///
/// <p>The IDs of the Reserved Instances to modify.</p>
pub fn reserved_instances_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.reserved_instances_ids(inp);
self
}
/// <p>The IDs of the Reserved Instances to modify.</p>
pub fn set_reserved_instances_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_reserved_instances_ids(input);
self
}
/// <p>A unique, case-sensitive token you provide to ensure idempotency of your modification request. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>A unique, case-sensitive token you provide to ensure idempotency of your modification request. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// Appends an item to `TargetConfigurations`.
///
/// To override the contents of this collection use [`set_target_configurations`](Self::set_target_configurations).
///
/// <p>The configuration settings for the Reserved Instances to modify.</p>
pub fn target_configurations(
mut self,
inp: impl Into<crate::model::ReservedInstancesConfiguration>,
) -> Self {
self.inner = self.inner.target_configurations(inp);
self
}
/// <p>The configuration settings for the Reserved Instances to modify.</p>
pub fn set_target_configurations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ReservedInstancesConfiguration>>,
) -> Self {
self.inner = self.inner.set_target_configurations(input);
self
}
}
/// Fluent builder constructing a request to `ModifySecurityGroupRules`.
///
/// <p>Modifies the rules of a security group.</p>
#[derive(std::fmt::Debug)]
pub struct ModifySecurityGroupRules<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_security_group_rules_input::Builder,
}
impl<C, M, R> ModifySecurityGroupRules<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifySecurityGroupRules`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifySecurityGroupRulesOutput,
aws_smithy_http::result::SdkError<crate::error::ModifySecurityGroupRulesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifySecurityGroupRulesInputOperationOutputAlias,
crate::output::ModifySecurityGroupRulesOutput,
crate::error::ModifySecurityGroupRulesError,
crate::input::ModifySecurityGroupRulesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the security group.</p>
pub fn group_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_id(inp);
self
}
/// <p>The ID of the security group.</p>
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_id(input);
self
}
/// Appends an item to `SecurityGroupRules`.
///
/// To override the contents of this collection use [`set_security_group_rules`](Self::set_security_group_rules).
///
/// <p>Information about the security group properties to update.</p>
pub fn security_group_rules(
mut self,
inp: impl Into<crate::model::SecurityGroupRuleUpdate>,
) -> Self {
self.inner = self.inner.security_group_rules(inp);
self
}
/// <p>Information about the security group properties to update.</p>
pub fn set_security_group_rules(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::SecurityGroupRuleUpdate>>,
) -> Self {
self.inner = self.inner.set_security_group_rules(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifySnapshotAttribute`.
///
/// <p>Adds or removes permission settings for the specified snapshot. You may add or remove
/// specified Amazon Web Services account IDs from a snapshot's list of create volume permissions, but you cannot
/// do both in a single operation. If you need to both add and remove account IDs for a snapshot,
/// you must use multiple operations. You can make up to 500 modifications to a snapshot in a single operation.</p>
/// <p>Encrypted snapshots and snapshots with Amazon Web Services Marketplace product codes cannot be made
/// public. Snapshots encrypted with your default KMS key cannot be shared with other accounts.</p>
/// <p>For more information about modifying snapshot permissions, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html">Share a snapshot</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifySnapshotAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_snapshot_attribute_input::Builder,
}
impl<C, M, R> ModifySnapshotAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifySnapshotAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifySnapshotAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ModifySnapshotAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifySnapshotAttributeInputOperationOutputAlias,
crate::output::ModifySnapshotAttributeOutput,
crate::error::ModifySnapshotAttributeError,
crate::input::ModifySnapshotAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The snapshot attribute to modify. Only volume creation permissions can be modified.</p>
pub fn attribute(mut self, inp: crate::model::SnapshotAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The snapshot attribute to modify. Only volume creation permissions can be modified.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::SnapshotAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <p>A JSON representation of the snapshot attribute modification.</p>
pub fn create_volume_permission(
mut self,
inp: crate::model::CreateVolumePermissionModifications,
) -> Self {
self.inner = self.inner.create_volume_permission(inp);
self
}
/// <p>A JSON representation of the snapshot attribute modification.</p>
pub fn set_create_volume_permission(
mut self,
input: std::option::Option<crate::model::CreateVolumePermissionModifications>,
) -> Self {
self.inner = self.inner.set_create_volume_permission(input);
self
}
/// Appends an item to `GroupNames`.
///
/// To override the contents of this collection use [`set_group_names`](Self::set_group_names).
///
/// <p>The group to modify for the snapshot.</p>
pub fn group_names(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_names(inp);
self
}
/// <p>The group to modify for the snapshot.</p>
pub fn set_group_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_group_names(input);
self
}
/// <p>The type of operation to perform to the attribute.</p>
pub fn operation_type(mut self, inp: crate::model::OperationType) -> Self {
self.inner = self.inner.operation_type(inp);
self
}
/// <p>The type of operation to perform to the attribute.</p>
pub fn set_operation_type(
mut self,
input: std::option::Option<crate::model::OperationType>,
) -> Self {
self.inner = self.inner.set_operation_type(input);
self
}
/// <p>The ID of the snapshot.</p>
pub fn snapshot_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.snapshot_id(inp);
self
}
/// <p>The ID of the snapshot.</p>
pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_snapshot_id(input);
self
}
/// Appends an item to `UserIds`.
///
/// To override the contents of this collection use [`set_user_ids`](Self::set_user_ids).
///
/// <p>The account ID to modify for the snapshot.</p>
pub fn user_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.user_ids(inp);
self
}
/// <p>The account ID to modify for the snapshot.</p>
pub fn set_user_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_user_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifySpotFleetRequest`.
///
/// <p>Modifies the specified Spot Fleet request.</p>
/// <p>You can only modify a Spot Fleet request of type <code>maintain</code>.</p>
/// <p>While the Spot Fleet request is being modified, it is in the <code>modifying</code>
/// state.</p>
/// <p>To scale up your Spot Fleet, increase its target capacity. The Spot Fleet launches the
/// additional Spot Instances according to the allocation strategy for the Spot Fleet
/// request. If the allocation strategy is <code>lowestPrice</code>, the Spot Fleet launches
/// instances using the Spot Instance pool with the lowest price. If the allocation strategy
/// is <code>diversified</code>, the Spot Fleet distributes the instances across the Spot
/// Instance pools. If the allocation strategy is <code>capacityOptimized</code>, Spot Fleet
/// launches instances from Spot Instance pools with optimal capacity for the number of instances
/// that are launching.</p>
/// <p>To scale down your Spot Fleet, decrease its target capacity. First, the Spot Fleet
/// cancels any open requests that exceed the new target capacity. You can request that the
/// Spot Fleet terminate Spot Instances until the size of the fleet no longer exceeds the
/// new target capacity. If the allocation strategy is <code>lowestPrice</code>, the Spot
/// Fleet terminates the instances with the highest price per unit. If the allocation
/// strategy is <code>capacityOptimized</code>, the Spot Fleet terminates the instances in
/// the Spot Instance pools that have the least available Spot Instance capacity. If the allocation
/// strategy is <code>diversified</code>, the Spot Fleet terminates instances across the
/// Spot Instance pools. Alternatively, you can request that the Spot Fleet keep the fleet
/// at its current size, but not replace any Spot Instances that are interrupted or that you
/// terminate manually.</p>
/// <p>If you are finished with your Spot Fleet for now, but will use it again later, you can
/// set the target capacity to 0.</p>
#[derive(std::fmt::Debug)]
pub struct ModifySpotFleetRequest<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_spot_fleet_request_input::Builder,
}
impl<C, M, R> ModifySpotFleetRequest<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifySpotFleetRequest`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifySpotFleetRequestOutput,
aws_smithy_http::result::SdkError<crate::error::ModifySpotFleetRequestError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifySpotFleetRequestInputOperationOutputAlias,
crate::output::ModifySpotFleetRequestOutput,
crate::error::ModifySpotFleetRequestError,
crate::input::ModifySpotFleetRequestInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Indicates whether running Spot Instances should be terminated if the target capacity
/// of the Spot Fleet request is decreased below the current size of the Spot Fleet.</p>
pub fn excess_capacity_termination_policy(
mut self,
inp: crate::model::ExcessCapacityTerminationPolicy,
) -> Self {
self.inner = self.inner.excess_capacity_termination_policy(inp);
self
}
/// <p>Indicates whether running Spot Instances should be terminated if the target capacity
/// of the Spot Fleet request is decreased below the current size of the Spot Fleet.</p>
pub fn set_excess_capacity_termination_policy(
mut self,
input: std::option::Option<crate::model::ExcessCapacityTerminationPolicy>,
) -> Self {
self.inner = self.inner.set_excess_capacity_termination_policy(input);
self
}
/// Appends an item to `LaunchTemplateConfigs`.
///
/// To override the contents of this collection use [`set_launch_template_configs`](Self::set_launch_template_configs).
///
/// <p>The launch template and overrides. You can only use this parameter if you specified a
/// launch template (<code>LaunchTemplateConfigs</code>) in your Spot Fleet request. If you
/// specified <code>LaunchSpecifications</code> in your Spot Fleet request, then omit this
/// parameter.</p>
pub fn launch_template_configs(
mut self,
inp: impl Into<crate::model::LaunchTemplateConfig>,
) -> Self {
self.inner = self.inner.launch_template_configs(inp);
self
}
/// <p>The launch template and overrides. You can only use this parameter if you specified a
/// launch template (<code>LaunchTemplateConfigs</code>) in your Spot Fleet request. If you
/// specified <code>LaunchSpecifications</code> in your Spot Fleet request, then omit this
/// parameter.</p>
pub fn set_launch_template_configs(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::LaunchTemplateConfig>>,
) -> Self {
self.inner = self.inner.set_launch_template_configs(input);
self
}
/// <p>The ID of the Spot Fleet request.</p>
pub fn spot_fleet_request_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.spot_fleet_request_id(inp);
self
}
/// <p>The ID of the Spot Fleet request.</p>
pub fn set_spot_fleet_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_spot_fleet_request_id(input);
self
}
/// <p>The size of the fleet.</p>
pub fn target_capacity(mut self, inp: i32) -> Self {
self.inner = self.inner.target_capacity(inp);
self
}
/// <p>The size of the fleet.</p>
pub fn set_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_target_capacity(input);
self
}
/// <p>The number of On-Demand Instances in the fleet.</p>
pub fn on_demand_target_capacity(mut self, inp: i32) -> Self {
self.inner = self.inner.on_demand_target_capacity(inp);
self
}
/// <p>The number of On-Demand Instances in the fleet.</p>
pub fn set_on_demand_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_on_demand_target_capacity(input);
self
}
/// <p>Reserved.</p>
pub fn context(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.context(inp);
self
}
/// <p>Reserved.</p>
pub fn set_context(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_context(input);
self
}
}
/// Fluent builder constructing a request to `ModifySubnetAttribute`.
///
/// <p>Modifies a subnet attribute. You can only modify one attribute at a time.</p>
#[derive(std::fmt::Debug)]
pub struct ModifySubnetAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_subnet_attribute_input::Builder,
}
impl<C, M, R> ModifySubnetAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifySubnetAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifySubnetAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ModifySubnetAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifySubnetAttributeInputOperationOutputAlias,
crate::output::ModifySubnetAttributeOutput,
crate::error::ModifySubnetAttributeError,
crate::input::ModifySubnetAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specify <code>true</code> to indicate that network interfaces created in the
/// specified subnet should be assigned an IPv6 address. This includes a network interface
/// that's created when launching an instance into the subnet (the instance therefore
/// receives an IPv6 address). </p>
/// <p>If you enable the IPv6 addressing feature for your subnet, your network interface
/// or instance only receives an IPv6 address if it's created using version
/// <code>2016-11-15</code> or later of the Amazon EC2 API.</p>
pub fn assign_ipv6_address_on_creation(
mut self,
inp: crate::model::AttributeBooleanValue,
) -> Self {
self.inner = self.inner.assign_ipv6_address_on_creation(inp);
self
}
/// <p>Specify <code>true</code> to indicate that network interfaces created in the
/// specified subnet should be assigned an IPv6 address. This includes a network interface
/// that's created when launching an instance into the subnet (the instance therefore
/// receives an IPv6 address). </p>
/// <p>If you enable the IPv6 addressing feature for your subnet, your network interface
/// or instance only receives an IPv6 address if it's created using version
/// <code>2016-11-15</code> or later of the Amazon EC2 API.</p>
pub fn set_assign_ipv6_address_on_creation(
mut self,
input: std::option::Option<crate::model::AttributeBooleanValue>,
) -> Self {
self.inner = self.inner.set_assign_ipv6_address_on_creation(input);
self
}
/// <p>Specify <code>true</code> to indicate that network interfaces attached to instances created in the
/// specified subnet should be assigned a public IPv4 address.</p>
pub fn map_public_ip_on_launch(mut self, inp: crate::model::AttributeBooleanValue) -> Self {
self.inner = self.inner.map_public_ip_on_launch(inp);
self
}
/// <p>Specify <code>true</code> to indicate that network interfaces attached to instances created in the
/// specified subnet should be assigned a public IPv4 address.</p>
pub fn set_map_public_ip_on_launch(
mut self,
input: std::option::Option<crate::model::AttributeBooleanValue>,
) -> Self {
self.inner = self.inner.set_map_public_ip_on_launch(input);
self
}
/// <p>The ID of the subnet.</p>
pub fn subnet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_id(inp);
self
}
/// <p>The ID of the subnet.</p>
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_subnet_id(input);
self
}
/// <p>Specify <code>true</code> to indicate that network interfaces attached to instances created in the
/// specified subnet should be assigned a customer-owned IPv4 address.</p>
/// <p>When this value is <code>true</code>, you must specify the customer-owned IP pool using <code>CustomerOwnedIpv4Pool</code>.</p>
pub fn map_customer_owned_ip_on_launch(
mut self,
inp: crate::model::AttributeBooleanValue,
) -> Self {
self.inner = self.inner.map_customer_owned_ip_on_launch(inp);
self
}
/// <p>Specify <code>true</code> to indicate that network interfaces attached to instances created in the
/// specified subnet should be assigned a customer-owned IPv4 address.</p>
/// <p>When this value is <code>true</code>, you must specify the customer-owned IP pool using <code>CustomerOwnedIpv4Pool</code>.</p>
pub fn set_map_customer_owned_ip_on_launch(
mut self,
input: std::option::Option<crate::model::AttributeBooleanValue>,
) -> Self {
self.inner = self.inner.set_map_customer_owned_ip_on_launch(input);
self
}
/// <p>The customer-owned IPv4 address pool associated with the subnet.</p>
/// <p>You must set this value when you specify <code>true</code> for <code>MapCustomerOwnedIpOnLaunch</code>.</p>
pub fn customer_owned_ipv4_pool(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.customer_owned_ipv4_pool(inp);
self
}
/// <p>The customer-owned IPv4 address pool associated with the subnet.</p>
/// <p>You must set this value when you specify <code>true</code> for <code>MapCustomerOwnedIpOnLaunch</code>.</p>
pub fn set_customer_owned_ipv4_pool(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_customer_owned_ipv4_pool(input);
self
}
}
/// Fluent builder constructing a request to `ModifyTrafficMirrorFilterNetworkServices`.
///
/// <p>Allows or restricts mirroring network services.</p>
/// <p> By default, Amazon DNS network services are not eligible for Traffic Mirror. Use <code>AddNetworkServices</code> to add network services to a Traffic Mirror filter. When a network service is added to the Traffic Mirror filter, all traffic related to that network service will be mirrored.
/// When you no longer want to mirror network services, use <code>RemoveNetworkServices</code> to remove the network services from the Traffic Mirror filter.
/// </p>
#[derive(std::fmt::Debug)]
pub struct ModifyTrafficMirrorFilterNetworkServices<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_traffic_mirror_filter_network_services_input::Builder,
}
impl<C, M, R> ModifyTrafficMirrorFilterNetworkServices<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyTrafficMirrorFilterNetworkServices`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyTrafficMirrorFilterNetworkServicesOutput,
aws_smithy_http::result::SdkError<
crate::error::ModifyTrafficMirrorFilterNetworkServicesError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyTrafficMirrorFilterNetworkServicesInputOperationOutputAlias,
crate::output::ModifyTrafficMirrorFilterNetworkServicesOutput,
crate::error::ModifyTrafficMirrorFilterNetworkServicesError,
crate::input::ModifyTrafficMirrorFilterNetworkServicesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Traffic Mirror filter.</p>
pub fn traffic_mirror_filter_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_filter_id(inp);
self
}
/// <p>The ID of the Traffic Mirror filter.</p>
pub fn set_traffic_mirror_filter_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_filter_id(input);
self
}
/// Appends an item to `AddNetworkServices`.
///
/// To override the contents of this collection use [`set_add_network_services`](Self::set_add_network_services).
///
/// <p>The network service, for example Amazon DNS, that you want to mirror.</p>
pub fn add_network_services(
mut self,
inp: impl Into<crate::model::TrafficMirrorNetworkService>,
) -> Self {
self.inner = self.inner.add_network_services(inp);
self
}
/// <p>The network service, for example Amazon DNS, that you want to mirror.</p>
pub fn set_add_network_services(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TrafficMirrorNetworkService>>,
) -> Self {
self.inner = self.inner.set_add_network_services(input);
self
}
/// Appends an item to `RemoveNetworkServices`.
///
/// To override the contents of this collection use [`set_remove_network_services`](Self::set_remove_network_services).
///
/// <p>The network service, for example Amazon DNS, that you no longer want to mirror.</p>
pub fn remove_network_services(
mut self,
inp: impl Into<crate::model::TrafficMirrorNetworkService>,
) -> Self {
self.inner = self.inner.remove_network_services(inp);
self
}
/// <p>The network service, for example Amazon DNS, that you no longer want to mirror.</p>
pub fn set_remove_network_services(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TrafficMirrorNetworkService>>,
) -> Self {
self.inner = self.inner.set_remove_network_services(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyTrafficMirrorFilterRule`.
///
/// <p>Modifies the specified Traffic Mirror rule.</p>
/// <p>
/// <code>DestinationCidrBlock</code> and <code>SourceCidrBlock</code> must both be an IPv4
/// range or an IPv6 range.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyTrafficMirrorFilterRule<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_traffic_mirror_filter_rule_input::Builder,
}
impl<C, M, R> ModifyTrafficMirrorFilterRule<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyTrafficMirrorFilterRule`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyTrafficMirrorFilterRuleOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyTrafficMirrorFilterRuleError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyTrafficMirrorFilterRuleInputOperationOutputAlias,
crate::output::ModifyTrafficMirrorFilterRuleOutput,
crate::error::ModifyTrafficMirrorFilterRuleError,
crate::input::ModifyTrafficMirrorFilterRuleInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Traffic Mirror rule.</p>
pub fn traffic_mirror_filter_rule_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.traffic_mirror_filter_rule_id(inp);
self
}
/// <p>The ID of the Traffic Mirror rule.</p>
pub fn set_traffic_mirror_filter_rule_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_filter_rule_id(input);
self
}
/// <p>The type of traffic to assign to the rule.</p>
pub fn traffic_direction(mut self, inp: crate::model::TrafficDirection) -> Self {
self.inner = self.inner.traffic_direction(inp);
self
}
/// <p>The type of traffic to assign to the rule.</p>
pub fn set_traffic_direction(
mut self,
input: std::option::Option<crate::model::TrafficDirection>,
) -> Self {
self.inner = self.inner.set_traffic_direction(input);
self
}
/// <p>The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given
/// direction. The rules are processed in ascending order by rule number.</p>
pub fn rule_number(mut self, inp: i32) -> Self {
self.inner = self.inner.rule_number(inp);
self
}
/// <p>The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given
/// direction. The rules are processed in ascending order by rule number.</p>
pub fn set_rule_number(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_rule_number(input);
self
}
/// <p>The action to assign to the rule.</p>
pub fn rule_action(mut self, inp: crate::model::TrafficMirrorRuleAction) -> Self {
self.inner = self.inner.rule_action(inp);
self
}
/// <p>The action to assign to the rule.</p>
pub fn set_rule_action(
mut self,
input: std::option::Option<crate::model::TrafficMirrorRuleAction>,
) -> Self {
self.inner = self.inner.set_rule_action(input);
self
}
/// <p>The destination ports that are associated with the Traffic Mirror rule.</p>
pub fn destination_port_range(
mut self,
inp: crate::model::TrafficMirrorPortRangeRequest,
) -> Self {
self.inner = self.inner.destination_port_range(inp);
self
}
/// <p>The destination ports that are associated with the Traffic Mirror rule.</p>
pub fn set_destination_port_range(
mut self,
input: std::option::Option<crate::model::TrafficMirrorPortRangeRequest>,
) -> Self {
self.inner = self.inner.set_destination_port_range(input);
self
}
/// <p>The port range to assign to the Traffic Mirror rule.</p>
pub fn source_port_range(
mut self,
inp: crate::model::TrafficMirrorPortRangeRequest,
) -> Self {
self.inner = self.inner.source_port_range(inp);
self
}
/// <p>The port range to assign to the Traffic Mirror rule.</p>
pub fn set_source_port_range(
mut self,
input: std::option::Option<crate::model::TrafficMirrorPortRangeRequest>,
) -> Self {
self.inner = self.inner.set_source_port_range(input);
self
}
/// <p>The protocol, for example TCP, to assign to the Traffic Mirror rule.</p>
pub fn protocol(mut self, inp: i32) -> Self {
self.inner = self.inner.protocol(inp);
self
}
/// <p>The protocol, for example TCP, to assign to the Traffic Mirror rule.</p>
pub fn set_protocol(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_protocol(input);
self
}
/// <p>The destination CIDR block to assign to the Traffic Mirror rule.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The destination CIDR block to assign to the Traffic Mirror rule.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <p>The source CIDR block to assign to the Traffic Mirror rule.</p>
pub fn source_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_cidr_block(inp);
self
}
/// <p>The source CIDR block to assign to the Traffic Mirror rule.</p>
pub fn set_source_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_cidr_block(input);
self
}
/// <p>The description to assign to the Traffic Mirror rule.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>The description to assign to the Traffic Mirror rule.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// Appends an item to `RemoveFields`.
///
/// To override the contents of this collection use [`set_remove_fields`](Self::set_remove_fields).
///
/// <p>The properties that you want to remove from the Traffic Mirror filter rule.</p>
/// <p>When you remove a property from a Traffic Mirror filter rule, the property is set to the default.</p>
pub fn remove_fields(
mut self,
inp: impl Into<crate::model::TrafficMirrorFilterRuleField>,
) -> Self {
self.inner = self.inner.remove_fields(inp);
self
}
/// <p>The properties that you want to remove from the Traffic Mirror filter rule.</p>
/// <p>When you remove a property from a Traffic Mirror filter rule, the property is set to the default.</p>
pub fn set_remove_fields(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TrafficMirrorFilterRuleField>>,
) -> Self {
self.inner = self.inner.set_remove_fields(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyTrafficMirrorSession`.
///
/// <p>Modifies a Traffic Mirror session.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyTrafficMirrorSession<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_traffic_mirror_session_input::Builder,
}
impl<C, M, R> ModifyTrafficMirrorSession<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyTrafficMirrorSession`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyTrafficMirrorSessionOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyTrafficMirrorSessionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyTrafficMirrorSessionInputOperationOutputAlias,
crate::output::ModifyTrafficMirrorSessionOutput,
crate::error::ModifyTrafficMirrorSessionError,
crate::input::ModifyTrafficMirrorSessionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Traffic Mirror session.</p>
pub fn traffic_mirror_session_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_session_id(inp);
self
}
/// <p>The ID of the Traffic Mirror session.</p>
pub fn set_traffic_mirror_session_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_session_id(input);
self
}
/// <p>The Traffic Mirror target. The target must be in the same VPC as the source, or have a VPC peering connection with the source.</p>
pub fn traffic_mirror_target_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_target_id(inp);
self
}
/// <p>The Traffic Mirror target. The target must be in the same VPC as the source, or have a VPC peering connection with the source.</p>
pub fn set_traffic_mirror_target_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_target_id(input);
self
}
/// <p>The ID of the Traffic Mirror filter.</p>
pub fn traffic_mirror_filter_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.traffic_mirror_filter_id(inp);
self
}
/// <p>The ID of the Traffic Mirror filter.</p>
pub fn set_traffic_mirror_filter_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_traffic_mirror_filter_id(input);
self
}
/// <p>The number of bytes in each packet to mirror. These are bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet.</p>
pub fn packet_length(mut self, inp: i32) -> Self {
self.inner = self.inner.packet_length(inp);
self
}
/// <p>The number of bytes in each packet to mirror. These are bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet.</p>
pub fn set_packet_length(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_packet_length(input);
self
}
/// <p>The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.</p>
/// <p>Valid values are 1-32766.</p>
pub fn session_number(mut self, inp: i32) -> Self {
self.inner = self.inner.session_number(inp);
self
}
/// <p>The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.</p>
/// <p>Valid values are 1-32766.</p>
pub fn set_session_number(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_session_number(input);
self
}
/// <p>The virtual network ID of the Traffic Mirror session.</p>
pub fn virtual_network_id(mut self, inp: i32) -> Self {
self.inner = self.inner.virtual_network_id(inp);
self
}
/// <p>The virtual network ID of the Traffic Mirror session.</p>
pub fn set_virtual_network_id(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_virtual_network_id(input);
self
}
/// <p>The description to assign to the Traffic Mirror session.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>The description to assign to the Traffic Mirror session.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// Appends an item to `RemoveFields`.
///
/// To override the contents of this collection use [`set_remove_fields`](Self::set_remove_fields).
///
/// <p>The properties that you want to remove from the Traffic Mirror session.</p>
/// <p>When you remove a property from a Traffic Mirror session, the property is set to the default.</p>
pub fn remove_fields(
mut self,
inp: impl Into<crate::model::TrafficMirrorSessionField>,
) -> Self {
self.inner = self.inner.remove_fields(inp);
self
}
/// <p>The properties that you want to remove from the Traffic Mirror session.</p>
/// <p>When you remove a property from a Traffic Mirror session, the property is set to the default.</p>
pub fn set_remove_fields(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TrafficMirrorSessionField>>,
) -> Self {
self.inner = self.inner.set_remove_fields(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyTransitGateway`.
///
/// <p>Modifies the specified transit gateway. When you modify a transit gateway, the modified options are applied to new transit gateway attachments only. Your existing transit gateway attachments are not modified.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyTransitGateway<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_transit_gateway_input::Builder,
}
impl<C, M, R> ModifyTransitGateway<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyTransitGateway`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyTransitGatewayOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyTransitGatewayError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyTransitGatewayInputOperationOutputAlias,
crate::output::ModifyTransitGatewayOutput,
crate::error::ModifyTransitGatewayError,
crate::input::ModifyTransitGatewayInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway.</p>
pub fn transit_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.transit_gateway_id(inp);
self
}
/// <p>The ID of the transit gateway.</p>
pub fn set_transit_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_id(input);
self
}
/// <p>The description for the transit gateway.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>The description for the transit gateway.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>The options to modify.</p>
pub fn options(mut self, inp: crate::model::ModifyTransitGatewayOptions) -> Self {
self.inner = self.inner.options(inp);
self
}
/// <p>The options to modify.</p>
pub fn set_options(
mut self,
input: std::option::Option<crate::model::ModifyTransitGatewayOptions>,
) -> Self {
self.inner = self.inner.set_options(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyTransitGatewayPrefixListReference`.
///
/// <p>Modifies a reference (route) to a prefix list in a specified transit gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyTransitGatewayPrefixListReference<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_transit_gateway_prefix_list_reference_input::Builder,
}
impl<C, M, R> ModifyTransitGatewayPrefixListReference<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyTransitGatewayPrefixListReference`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyTransitGatewayPrefixListReferenceOutput,
aws_smithy_http::result::SdkError<
crate::error::ModifyTransitGatewayPrefixListReferenceError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyTransitGatewayPrefixListReferenceInputOperationOutputAlias,
crate::output::ModifyTransitGatewayPrefixListReferenceOutput,
crate::error::ModifyTransitGatewayPrefixListReferenceError,
crate::input::ModifyTransitGatewayPrefixListReferenceInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the transit gateway route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// <p>The ID of the prefix list.</p>
pub fn prefix_list_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix_list_id(inp);
self
}
/// <p>The ID of the prefix list.</p>
pub fn set_prefix_list_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_prefix_list_id(input);
self
}
/// <p>The ID of the attachment to which traffic is routed.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment to which traffic is routed.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <p>Indicates whether to drop traffic that matches this route.</p>
pub fn blackhole(mut self, inp: bool) -> Self {
self.inner = self.inner.blackhole(inp);
self
}
/// <p>Indicates whether to drop traffic that matches this route.</p>
pub fn set_blackhole(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_blackhole(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyTransitGatewayVpcAttachment`.
///
/// <p>Modifies the specified VPC attachment.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyTransitGatewayVpcAttachment<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_transit_gateway_vpc_attachment_input::Builder,
}
impl<C, M, R> ModifyTransitGatewayVpcAttachment<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyTransitGatewayVpcAttachment`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyTransitGatewayVpcAttachmentOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyTransitGatewayVpcAttachmentError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyTransitGatewayVpcAttachmentInputOperationOutputAlias,
crate::output::ModifyTransitGatewayVpcAttachmentOutput,
crate::error::ModifyTransitGatewayVpcAttachmentError,
crate::input::ModifyTransitGatewayVpcAttachmentInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// Appends an item to `AddSubnetIds`.
///
/// To override the contents of this collection use [`set_add_subnet_ids`](Self::set_add_subnet_ids).
///
/// <p>The IDs of one or more subnets to add. You can specify at most one subnet per Availability Zone.</p>
pub fn add_subnet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.add_subnet_ids(inp);
self
}
/// <p>The IDs of one or more subnets to add. You can specify at most one subnet per Availability Zone.</p>
pub fn set_add_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_add_subnet_ids(input);
self
}
/// Appends an item to `RemoveSubnetIds`.
///
/// To override the contents of this collection use [`set_remove_subnet_ids`](Self::set_remove_subnet_ids).
///
/// <p>The IDs of one or more subnets to remove.</p>
pub fn remove_subnet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.remove_subnet_ids(inp);
self
}
/// <p>The IDs of one or more subnets to remove.</p>
pub fn set_remove_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_remove_subnet_ids(input);
self
}
/// <p>The new VPC attachment options.</p>
pub fn options(
mut self,
inp: crate::model::ModifyTransitGatewayVpcAttachmentRequestOptions,
) -> Self {
self.inner = self.inner.options(inp);
self
}
/// <p>The new VPC attachment options.</p>
pub fn set_options(
mut self,
input: std::option::Option<
crate::model::ModifyTransitGatewayVpcAttachmentRequestOptions,
>,
) -> Self {
self.inner = self.inner.set_options(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVolume`.
///
/// <p>You can modify several parameters of an existing EBS volume, including volume size, volume
/// type, and IOPS capacity. If your EBS volume is attached to a current-generation EC2 instance
/// type, you might be able to apply these changes without stopping the instance or detaching the
/// volume from it. For more information about modifying EBS volumes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modify-volume.html">Amazon EBS Elastic Volumes</a> (Linux instances)
/// or <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-modify-volume.html">Amazon EBS Elastic Volumes</a> (Windows instances).</p>
/// <p>When you complete a resize operation on your volume, you need to extend the volume's
/// file-system size to take advantage of the new storage capacity. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#recognize-expanded-volume-linux">Extend a Linux file system</a> or
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html#recognize-expanded-volume-windows">Extend a Windows file system</a>.</p>
/// <p> You can use CloudWatch Events to check the status of a modification to an EBS volume. For
/// information about CloudWatch Events, see the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/">Amazon CloudWatch Events User Guide</a>. You can also track the status of a
/// modification using <a>DescribeVolumesModifications</a>. For information
/// about tracking status changes using either method, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-modifications.html">Monitor the progress of volume modifications</a>.</p>
/// <p>With previous-generation instance types, resizing an EBS volume might require detaching and
/// reattaching the volume or stopping and restarting the instance.</p>
/// <p>If you reach the maximum volume modification rate per volume limit, you must wait
/// at least six hours before applying further modifications to the affected EBS volume.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyVolume<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_volume_input::Builder,
}
impl<C, M, R> ModifyVolume<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVolume`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVolumeOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyVolumeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVolumeInputOperationOutputAlias,
crate::output::ModifyVolumeOutput,
crate::error::ModifyVolumeError,
crate::input::ModifyVolumeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the volume.</p>
pub fn volume_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.volume_id(inp);
self
}
/// <p>The ID of the volume.</p>
pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_volume_id(input);
self
}
/// <p>The target size of the volume, in GiB. The target volume size must be greater than or
/// equal to the existing size of the volume.</p>
/// <p>The following are the supported volumes sizes for each volume type:</p>
/// <ul>
/// <li>
/// <p>
/// <code>gp2</code> and <code>gp3</code>: 1-16,384</p>
/// </li>
/// <li>
/// <p>
/// <code>io1</code> and <code>io2</code>: 4-16,384</p>
/// </li>
/// <li>
/// <p>
/// <code>st1</code> and <code>sc1</code>: 125-16,384</p>
/// </li>
/// <li>
/// <p>
/// <code>standard</code>: 1-1,024</p>
/// </li>
/// </ul>
/// <p>Default: The existing size is retained.</p>
pub fn size(mut self, inp: i32) -> Self {
self.inner = self.inner.size(inp);
self
}
/// <p>The target size of the volume, in GiB. The target volume size must be greater than or
/// equal to the existing size of the volume.</p>
/// <p>The following are the supported volumes sizes for each volume type:</p>
/// <ul>
/// <li>
/// <p>
/// <code>gp2</code> and <code>gp3</code>: 1-16,384</p>
/// </li>
/// <li>
/// <p>
/// <code>io1</code> and <code>io2</code>: 4-16,384</p>
/// </li>
/// <li>
/// <p>
/// <code>st1</code> and <code>sc1</code>: 125-16,384</p>
/// </li>
/// <li>
/// <p>
/// <code>standard</code>: 1-1,024</p>
/// </li>
/// </ul>
/// <p>Default: The existing size is retained.</p>
pub fn set_size(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_size(input);
self
}
/// <p>The target EBS volume type of the volume. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>Default: The existing type is retained.</p>
pub fn volume_type(mut self, inp: crate::model::VolumeType) -> Self {
self.inner = self.inner.volume_type(inp);
self
}
/// <p>The target EBS volume type of the volume. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>Default: The existing type is retained.</p>
pub fn set_volume_type(
mut self,
input: std::option::Option<crate::model::VolumeType>,
) -> Self {
self.inner = self.inner.set_volume_type(input);
self
}
/// <p>The target IOPS rate of the volume. This parameter is valid only for <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes.</p>
/// <p>The following are the supported values for each volume type:</p>
/// <ul>
/// <li>
/// <p>
/// <code>gp3</code>: 3,000-16,000 IOPS</p>
/// </li>
/// <li>
/// <p>
/// <code>io1</code>: 100-64,000 IOPS</p>
/// </li>
/// <li>
/// <p>
/// <code>io2</code>: 100-64,000 IOPS</p>
/// </li>
/// </ul>
/// <p>Default: The existing value is retained if you keep the same volume type. If you change
/// the volume type to <code>io1</code>, <code>io2</code>, or <code>gp3</code>, the default is 3,000.</p>
pub fn iops(mut self, inp: i32) -> Self {
self.inner = self.inner.iops(inp);
self
}
/// <p>The target IOPS rate of the volume. This parameter is valid only for <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes.</p>
/// <p>The following are the supported values for each volume type:</p>
/// <ul>
/// <li>
/// <p>
/// <code>gp3</code>: 3,000-16,000 IOPS</p>
/// </li>
/// <li>
/// <p>
/// <code>io1</code>: 100-64,000 IOPS</p>
/// </li>
/// <li>
/// <p>
/// <code>io2</code>: 100-64,000 IOPS</p>
/// </li>
/// </ul>
/// <p>Default: The existing value is retained if you keep the same volume type. If you change
/// the volume type to <code>io1</code>, <code>io2</code>, or <code>gp3</code>, the default is 3,000.</p>
pub fn set_iops(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_iops(input);
self
}
/// <p>The target throughput of the volume, in MiB/s. This parameter is valid only for <code>gp3</code> volumes.
/// The maximum value is 1,000.</p>
/// <p>Default: The existing value is retained if the source and target volume type is <code>gp3</code>.
/// Otherwise, the default value is 125.</p>
/// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
pub fn throughput(mut self, inp: i32) -> Self {
self.inner = self.inner.throughput(inp);
self
}
/// <p>The target throughput of the volume, in MiB/s. This parameter is valid only for <code>gp3</code> volumes.
/// The maximum value is 1,000.</p>
/// <p>Default: The existing value is retained if the source and target volume type is <code>gp3</code>.
/// Otherwise, the default value is 125.</p>
/// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
pub fn set_throughput(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_throughput(input);
self
}
/// <p>Specifies whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the
/// volume to up to 16 <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">
/// Nitro-based instances</a> in the same Availability Zone. This parameter is
/// supported with <code>io1</code> and <code>io2</code> volumes only. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html">
/// Amazon EBS Multi-Attach</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn multi_attach_enabled(mut self, inp: bool) -> Self {
self.inner = self.inner.multi_attach_enabled(inp);
self
}
/// <p>Specifies whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the
/// volume to up to 16 <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">
/// Nitro-based instances</a> in the same Availability Zone. This parameter is
/// supported with <code>io1</code> and <code>io2</code> volumes only. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html">
/// Amazon EBS Multi-Attach</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_multi_attach_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_multi_attach_enabled(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVolumeAttribute`.
///
/// <p>Modifies a volume attribute.</p>
/// <p>By default, all I/O operations for the volume are suspended when the data on the volume is
/// determined to be potentially inconsistent, to prevent undetectable, latent data corruption.
/// The I/O access to the volume can be resumed by first enabling I/O access and then checking the
/// data consistency on your volume.</p>
/// <p>You can change the default behavior to resume I/O operations. We recommend that you change
/// this only for boot volumes or for volumes that are stateless or disposable.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyVolumeAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_volume_attribute_input::Builder,
}
impl<C, M, R> ModifyVolumeAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVolumeAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVolumeAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyVolumeAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVolumeAttributeInputOperationOutputAlias,
crate::output::ModifyVolumeAttributeOutput,
crate::error::ModifyVolumeAttributeError,
crate::input::ModifyVolumeAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Indicates whether the volume should be auto-enabled for I/O operations.</p>
pub fn auto_enable_io(mut self, inp: crate::model::AttributeBooleanValue) -> Self {
self.inner = self.inner.auto_enable_io(inp);
self
}
/// <p>Indicates whether the volume should be auto-enabled for I/O operations.</p>
pub fn set_auto_enable_io(
mut self,
input: std::option::Option<crate::model::AttributeBooleanValue>,
) -> Self {
self.inner = self.inner.set_auto_enable_io(input);
self
}
/// <p>The ID of the volume.</p>
pub fn volume_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.volume_id(inp);
self
}
/// <p>The ID of the volume.</p>
pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_volume_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVpcAttribute`.
///
/// <p>Modifies the specified attribute of the specified VPC.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyVpcAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_vpc_attribute_input::Builder,
}
impl<C, M, R> ModifyVpcAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVpcAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVpcAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyVpcAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVpcAttributeInputOperationOutputAlias,
crate::output::ModifyVpcAttributeOutput,
crate::error::ModifyVpcAttributeError,
crate::input::ModifyVpcAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.</p>
pub fn enable_dns_hostnames(mut self, inp: crate::model::AttributeBooleanValue) -> Self {
self.inner = self.inner.enable_dns_hostnames(inp);
self
}
/// <p>Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.</p>
pub fn set_enable_dns_hostnames(
mut self,
input: std::option::Option<crate::model::AttributeBooleanValue>,
) -> Self {
self.inner = self.inner.set_enable_dns_hostnames(input);
self
}
/// <p>Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to
/// the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP
/// address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon
/// provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is
/// not enabled.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.</p>
pub fn enable_dns_support(mut self, inp: crate::model::AttributeBooleanValue) -> Self {
self.inner = self.inner.enable_dns_support(inp);
self
}
/// <p>Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to
/// the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP
/// address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon
/// provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is
/// not enabled.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.</p>
pub fn set_enable_dns_support(
mut self,
input: std::option::Option<crate::model::AttributeBooleanValue>,
) -> Self {
self.inner = self.inner.set_enable_dns_support(input);
self
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVpcEndpoint`.
///
/// <p>Modifies attributes of a specified VPC endpoint. The attributes that you can modify
/// depend on the type of VPC endpoint (interface, gateway, or Gateway Load Balancer). For more information, see
/// <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html">VPC
/// Endpoints</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyVpcEndpoint<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_vpc_endpoint_input::Builder,
}
impl<C, M, R> ModifyVpcEndpoint<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVpcEndpoint`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVpcEndpointOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyVpcEndpointError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVpcEndpointInputOperationOutputAlias,
crate::output::ModifyVpcEndpointOutput,
crate::error::ModifyVpcEndpointError,
crate::input::ModifyVpcEndpointInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the endpoint.</p>
pub fn vpc_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_endpoint_id(inp);
self
}
/// <p>The ID of the endpoint.</p>
pub fn set_vpc_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpc_endpoint_id(input);
self
}
/// <p>(Gateway endpoint) Specify <code>true</code> to reset the policy document to the
/// default policy. The default policy allows full access to the service.</p>
pub fn reset_policy(mut self, inp: bool) -> Self {
self.inner = self.inner.reset_policy(inp);
self
}
/// <p>(Gateway endpoint) Specify <code>true</code> to reset the policy document to the
/// default policy. The default policy allows full access to the service.</p>
pub fn set_reset_policy(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_reset_policy(input);
self
}
/// <p>(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must
/// be in valid JSON format.</p>
pub fn policy_document(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.policy_document(inp);
self
}
/// <p>(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must
/// be in valid JSON format.</p>
pub fn set_policy_document(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_policy_document(input);
self
}
/// Appends an item to `AddRouteTableIds`.
///
/// To override the contents of this collection use [`set_add_route_table_ids`](Self::set_add_route_table_ids).
///
/// <p>(Gateway endpoint) One or more route tables IDs to associate with the endpoint.</p>
pub fn add_route_table_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.add_route_table_ids(inp);
self
}
/// <p>(Gateway endpoint) One or more route tables IDs to associate with the endpoint.</p>
pub fn set_add_route_table_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_add_route_table_ids(input);
self
}
/// Appends an item to `RemoveRouteTableIds`.
///
/// To override the contents of this collection use [`set_remove_route_table_ids`](Self::set_remove_route_table_ids).
///
/// <p>(Gateway endpoint) One or more route table IDs to disassociate from the endpoint.</p>
pub fn remove_route_table_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.remove_route_table_ids(inp);
self
}
/// <p>(Gateway endpoint) One or more route table IDs to disassociate from the endpoint.</p>
pub fn set_remove_route_table_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_remove_route_table_ids(input);
self
}
/// Appends an item to `AddSubnetIds`.
///
/// To override the contents of this collection use [`set_add_subnet_ids`](Self::set_add_subnet_ids).
///
/// <p>(Interface and Gateway Load Balancer endpoints) One or more subnet IDs in which to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.</p>
pub fn add_subnet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.add_subnet_ids(inp);
self
}
/// <p>(Interface and Gateway Load Balancer endpoints) One or more subnet IDs in which to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.</p>
pub fn set_add_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_add_subnet_ids(input);
self
}
/// Appends an item to `RemoveSubnetIds`.
///
/// To override the contents of this collection use [`set_remove_subnet_ids`](Self::set_remove_subnet_ids).
///
/// <p>(Interface endpoint) One or more subnets IDs in which to remove the endpoint.</p>
pub fn remove_subnet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.remove_subnet_ids(inp);
self
}
/// <p>(Interface endpoint) One or more subnets IDs in which to remove the endpoint.</p>
pub fn set_remove_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_remove_subnet_ids(input);
self
}
/// Appends an item to `AddSecurityGroupIds`.
///
/// To override the contents of this collection use [`set_add_security_group_ids`](Self::set_add_security_group_ids).
///
/// <p>(Interface endpoint) One or more security group IDs to associate with the network interface.</p>
pub fn add_security_group_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.add_security_group_ids(inp);
self
}
/// <p>(Interface endpoint) One or more security group IDs to associate with the network interface.</p>
pub fn set_add_security_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_add_security_group_ids(input);
self
}
/// Appends an item to `RemoveSecurityGroupIds`.
///
/// To override the contents of this collection use [`set_remove_security_group_ids`](Self::set_remove_security_group_ids).
///
/// <p>(Interface endpoint) One or more security group IDs to disassociate from the network interface.</p>
pub fn remove_security_group_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.remove_security_group_ids(inp);
self
}
/// <p>(Interface endpoint) One or more security group IDs to disassociate from the network interface.</p>
pub fn set_remove_security_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_remove_security_group_ids(input);
self
}
/// <p>(Interface endpoint) Indicates whether a private hosted zone is associated with the
/// VPC.</p>
pub fn private_dns_enabled(mut self, inp: bool) -> Self {
self.inner = self.inner.private_dns_enabled(inp);
self
}
/// <p>(Interface endpoint) Indicates whether a private hosted zone is associated with the
/// VPC.</p>
pub fn set_private_dns_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_private_dns_enabled(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVpcEndpointConnectionNotification`.
///
/// <p>Modifies a connection notification for VPC endpoint or VPC endpoint service. You
/// can change the SNS topic for the notification, or the events for which to be notified. </p>
#[derive(std::fmt::Debug)]
pub struct ModifyVpcEndpointConnectionNotification<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_vpc_endpoint_connection_notification_input::Builder,
}
impl<C, M, R> ModifyVpcEndpointConnectionNotification<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVpcEndpointConnectionNotification`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVpcEndpointConnectionNotificationOutput,
aws_smithy_http::result::SdkError<
crate::error::ModifyVpcEndpointConnectionNotificationError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVpcEndpointConnectionNotificationInputOperationOutputAlias,
crate::output::ModifyVpcEndpointConnectionNotificationOutput,
crate::error::ModifyVpcEndpointConnectionNotificationError,
crate::input::ModifyVpcEndpointConnectionNotificationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the notification.</p>
pub fn connection_notification_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connection_notification_id(inp);
self
}
/// <p>The ID of the notification.</p>
pub fn set_connection_notification_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connection_notification_id(input);
self
}
/// <p>The ARN for the SNS topic for the notification.</p>
pub fn connection_notification_arn(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connection_notification_arn(inp);
self
}
/// <p>The ARN for the SNS topic for the notification.</p>
pub fn set_connection_notification_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connection_notification_arn(input);
self
}
/// Appends an item to `ConnectionEvents`.
///
/// To override the contents of this collection use [`set_connection_events`](Self::set_connection_events).
///
/// <p>One or more events for the endpoint. Valid values are <code>Accept</code>,
/// <code>Connect</code>, <code>Delete</code>, and <code>Reject</code>.</p>
pub fn connection_events(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connection_events(inp);
self
}
/// <p>One or more events for the endpoint. Valid values are <code>Accept</code>,
/// <code>Connect</code>, <code>Delete</code>, and <code>Reject</code>.</p>
pub fn set_connection_events(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_connection_events(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVpcEndpointServiceConfiguration`.
///
/// <p>Modifies the attributes of your VPC endpoint service configuration. You can change the
/// Network Load Balancers or Gateway Load Balancers for your service, and you can specify whether acceptance is
/// required for requests to connect to your endpoint service through an interface VPC
/// endpoint.</p>
/// <p>If you set or modify the private DNS name, you must prove that you own the private DNS
/// domain name. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-services-dns-validation.html">VPC Endpoint Service
/// Private DNS Name Verification</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyVpcEndpointServiceConfiguration<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_vpc_endpoint_service_configuration_input::Builder,
}
impl<C, M, R> ModifyVpcEndpointServiceConfiguration<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVpcEndpointServiceConfiguration`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVpcEndpointServiceConfigurationOutput,
aws_smithy_http::result::SdkError<
crate::error::ModifyVpcEndpointServiceConfigurationError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVpcEndpointServiceConfigurationInputOperationOutputAlias,
crate::output::ModifyVpcEndpointServiceConfigurationOutput,
crate::error::ModifyVpcEndpointServiceConfigurationError,
crate::input::ModifyVpcEndpointServiceConfigurationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the service.</p>
pub fn service_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(inp);
self
}
/// <p>The ID of the service.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
/// <p>(Interface endpoint configuration) The private DNS name to assign to the endpoint service.</p>
pub fn private_dns_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.private_dns_name(inp);
self
}
/// <p>(Interface endpoint configuration) The private DNS name to assign to the endpoint service.</p>
pub fn set_private_dns_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_private_dns_name(input);
self
}
/// <p>(Interface endpoint configuration) Removes the private DNS name of the endpoint service.</p>
pub fn remove_private_dns_name(mut self, inp: bool) -> Self {
self.inner = self.inner.remove_private_dns_name(inp);
self
}
/// <p>(Interface endpoint configuration) Removes the private DNS name of the endpoint service.</p>
pub fn set_remove_private_dns_name(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_remove_private_dns_name(input);
self
}
/// <p>Indicates whether requests to create an endpoint to your service must be accepted.</p>
pub fn acceptance_required(mut self, inp: bool) -> Self {
self.inner = self.inner.acceptance_required(inp);
self
}
/// <p>Indicates whether requests to create an endpoint to your service must be accepted.</p>
pub fn set_acceptance_required(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_acceptance_required(input);
self
}
/// Appends an item to `AddNetworkLoadBalancerArns`.
///
/// To override the contents of this collection use [`set_add_network_load_balancer_arns`](Self::set_add_network_load_balancer_arns).
///
/// <p>The Amazon Resource Names (ARNs) of Network Load Balancers to add to your service
/// configuration.</p>
pub fn add_network_load_balancer_arns(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.add_network_load_balancer_arns(inp);
self
}
/// <p>The Amazon Resource Names (ARNs) of Network Load Balancers to add to your service
/// configuration.</p>
pub fn set_add_network_load_balancer_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_add_network_load_balancer_arns(input);
self
}
/// Appends an item to `RemoveNetworkLoadBalancerArns`.
///
/// To override the contents of this collection use [`set_remove_network_load_balancer_arns`](Self::set_remove_network_load_balancer_arns).
///
/// <p>The Amazon Resource Names (ARNs) of Network Load Balancers to remove from your service
/// configuration.</p>
pub fn remove_network_load_balancer_arns(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.remove_network_load_balancer_arns(inp);
self
}
/// <p>The Amazon Resource Names (ARNs) of Network Load Balancers to remove from your service
/// configuration.</p>
pub fn set_remove_network_load_balancer_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_remove_network_load_balancer_arns(input);
self
}
/// Appends an item to `AddGatewayLoadBalancerArns`.
///
/// To override the contents of this collection use [`set_add_gateway_load_balancer_arns`](Self::set_add_gateway_load_balancer_arns).
///
/// <p>The Amazon Resource Names (ARNs) of Gateway Load Balancers to add to your service
/// configuration.</p>
pub fn add_gateway_load_balancer_arns(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.add_gateway_load_balancer_arns(inp);
self
}
/// <p>The Amazon Resource Names (ARNs) of Gateway Load Balancers to add to your service
/// configuration.</p>
pub fn set_add_gateway_load_balancer_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_add_gateway_load_balancer_arns(input);
self
}
/// Appends an item to `RemoveGatewayLoadBalancerArns`.
///
/// To override the contents of this collection use [`set_remove_gateway_load_balancer_arns`](Self::set_remove_gateway_load_balancer_arns).
///
/// <p>The Amazon Resource Names (ARNs) of Gateway Load Balancers to remove from your service
/// configuration.</p>
pub fn remove_gateway_load_balancer_arns(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.remove_gateway_load_balancer_arns(inp);
self
}
/// <p>The Amazon Resource Names (ARNs) of Gateway Load Balancers to remove from your service
/// configuration.</p>
pub fn set_remove_gateway_load_balancer_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_remove_gateway_load_balancer_arns(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVpcEndpointServicePermissions`.
///
/// <p>Modifies the permissions for your <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html">VPC endpoint service</a>. You can add or remove permissions for service consumers (IAM users,
/// IAM roles, and Amazon Web Services accounts) to connect to your endpoint service.</p>
/// <p>If you grant permissions to all principals, the service is public. Any users who know the name of a
/// public service can send a request to attach an endpoint. If the service does not require manual approval,
/// attachments are automatically approved.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyVpcEndpointServicePermissions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_vpc_endpoint_service_permissions_input::Builder,
}
impl<C, M, R> ModifyVpcEndpointServicePermissions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVpcEndpointServicePermissions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVpcEndpointServicePermissionsOutput,
aws_smithy_http::result::SdkError<
crate::error::ModifyVpcEndpointServicePermissionsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVpcEndpointServicePermissionsInputOperationOutputAlias,
crate::output::ModifyVpcEndpointServicePermissionsOutput,
crate::error::ModifyVpcEndpointServicePermissionsError,
crate::input::ModifyVpcEndpointServicePermissionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the service.</p>
pub fn service_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(inp);
self
}
/// <p>The ID of the service.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
/// Appends an item to `AddAllowedPrincipals`.
///
/// To override the contents of this collection use [`set_add_allowed_principals`](Self::set_add_allowed_principals).
///
/// <p>The Amazon Resource Names (ARN) of one or more principals.
/// Permissions are granted to the principals in this list.
/// To grant permissions to all principals, specify an asterisk (*).</p>
pub fn add_allowed_principals(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.add_allowed_principals(inp);
self
}
/// <p>The Amazon Resource Names (ARN) of one or more principals.
/// Permissions are granted to the principals in this list.
/// To grant permissions to all principals, specify an asterisk (*).</p>
pub fn set_add_allowed_principals(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_add_allowed_principals(input);
self
}
/// Appends an item to `RemoveAllowedPrincipals`.
///
/// To override the contents of this collection use [`set_remove_allowed_principals`](Self::set_remove_allowed_principals).
///
/// <p>The Amazon Resource Names (ARN) of one or more principals.
/// Permissions are revoked for principals in this list.</p>
pub fn remove_allowed_principals(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.remove_allowed_principals(inp);
self
}
/// <p>The Amazon Resource Names (ARN) of one or more principals.
/// Permissions are revoked for principals in this list.</p>
pub fn set_remove_allowed_principals(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_remove_allowed_principals(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVpcPeeringConnectionOptions`.
///
/// <p>Modifies the VPC peering connection options on one side of a VPC peering connection. You can do the following:</p>
/// <ul>
/// <li>
/// <p>Enable/disable communication over the peering connection between an EC2-Classic instance that's linked to your VPC (using ClassicLink) and instances in the peer VPC.</p>
/// </li>
/// <li>
/// <p>Enable/disable communication over the peering connection between instances in your VPC and an EC2-Classic instance that's linked to the peer VPC.</p>
/// </li>
/// <li>
/// <p>Enable/disable the ability to resolve public DNS hostnames to private IP
/// addresses when queried from instances in the peer VPC.</p>
/// </li>
/// </ul>
/// <p>If the peered VPCs are in the same Amazon Web Services account, you can enable DNS resolution
/// for queries from the local VPC. This ensures that queries from the local VPC resolve to private IP
/// addresses in the peer VPC. This option is not available if the peered VPCs are in different
/// different Amazon Web Services accounts or different Regions. For peered VPCs in different
/// Amazon Web Services accounts, each Amazon Web Services account owner must initiate a separate request
/// to modify the peering connection options. For inter-region peering connections, you must use the
/// Region for the requester VPC to modify the requester VPC peering options and the Region for the
/// accepter VPC to modify the accepter VPC peering options. To verify which VPCs are the accepter and
/// the requester for a VPC peering connection, use the <a>DescribeVpcPeeringConnections</a> command.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyVpcPeeringConnectionOptions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_vpc_peering_connection_options_input::Builder,
}
impl<C, M, R> ModifyVpcPeeringConnectionOptions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVpcPeeringConnectionOptions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVpcPeeringConnectionOptionsOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyVpcPeeringConnectionOptionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVpcPeeringConnectionOptionsInputOperationOutputAlias,
crate::output::ModifyVpcPeeringConnectionOptionsOutput,
crate::error::ModifyVpcPeeringConnectionOptionsError,
crate::input::ModifyVpcPeeringConnectionOptionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The VPC peering connection options for the accepter VPC.</p>
pub fn accepter_peering_connection_options(
mut self,
inp: crate::model::PeeringConnectionOptionsRequest,
) -> Self {
self.inner = self.inner.accepter_peering_connection_options(inp);
self
}
/// <p>The VPC peering connection options for the accepter VPC.</p>
pub fn set_accepter_peering_connection_options(
mut self,
input: std::option::Option<crate::model::PeeringConnectionOptionsRequest>,
) -> Self {
self.inner = self.inner.set_accepter_peering_connection_options(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The VPC peering connection options for the requester VPC.</p>
pub fn requester_peering_connection_options(
mut self,
inp: crate::model::PeeringConnectionOptionsRequest,
) -> Self {
self.inner = self.inner.requester_peering_connection_options(inp);
self
}
/// <p>The VPC peering connection options for the requester VPC.</p>
pub fn set_requester_peering_connection_options(
mut self,
input: std::option::Option<crate::model::PeeringConnectionOptionsRequest>,
) -> Self {
self.inner = self.inner.set_requester_peering_connection_options(input);
self
}
/// <p>The ID of the VPC peering connection.</p>
pub fn vpc_peering_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_peering_connection_id(inp);
self
}
/// <p>The ID of the VPC peering connection.</p>
pub fn set_vpc_peering_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpc_peering_connection_id(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVpcTenancy`.
///
/// <p>Modifies the instance tenancy attribute of the specified VPC. You can change the
/// instance tenancy attribute of a VPC to <code>default</code> only. You cannot change the
/// instance tenancy attribute to <code>dedicated</code>.</p>
/// <p>After you modify the tenancy of the VPC, any new instances that you launch into the
/// VPC have a tenancy of <code>default</code>, unless you specify otherwise during launch.
/// The tenancy of any existing instances in the VPC is not affected.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html">Dedicated Instances</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyVpcTenancy<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_vpc_tenancy_input::Builder,
}
impl<C, M, R> ModifyVpcTenancy<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVpcTenancy`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVpcTenancyOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyVpcTenancyError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVpcTenancyInputOperationOutputAlias,
crate::output::ModifyVpcTenancyOutput,
crate::error::ModifyVpcTenancyError,
crate::input::ModifyVpcTenancyInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_id(inp);
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc_id(input);
self
}
/// <p>The instance tenancy attribute for the VPC. </p>
pub fn instance_tenancy(mut self, inp: crate::model::VpcTenancy) -> Self {
self.inner = self.inner.instance_tenancy(inp);
self
}
/// <p>The instance tenancy attribute for the VPC. </p>
pub fn set_instance_tenancy(
mut self,
input: std::option::Option<crate::model::VpcTenancy>,
) -> Self {
self.inner = self.inner.set_instance_tenancy(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVpnConnection`.
///
/// <p>Modifies the customer gateway or the target gateway of an Amazon Web Services Site-to-Site VPN connection. To
/// modify the target gateway, the following migration options are available:</p>
/// <ul>
/// <li>
/// <p>An existing virtual private gateway to a new virtual private gateway</p>
/// </li>
/// <li>
/// <p>An existing virtual private gateway to a transit gateway</p>
/// </li>
/// <li>
/// <p>An existing transit gateway to a new transit gateway</p>
/// </li>
/// <li>
/// <p>An existing transit gateway to a virtual private gateway</p>
/// </li>
/// </ul>
/// <p>Before you perform the migration to the new gateway, you must configure the new
/// gateway. Use <a>CreateVpnGateway</a> to create a virtual private gateway, or
/// <a>CreateTransitGateway</a> to create a transit gateway.</p>
/// <p>This step is required when you migrate from a virtual private gateway with static
/// routes to a transit gateway. </p>
/// <p>You must delete the static routes before you migrate to the new gateway.</p>
///
/// <p>Keep a copy of the static route before you delete it. You will need to add back these
/// routes to the transit gateway after the VPN connection migration is complete.</p>
///
/// <p>After you migrate to the new gateway, you might need to modify your VPC route table.
/// Use <a>CreateRoute</a> and <a>DeleteRoute</a> to make the changes
/// described in <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/modify-vpn-target.html#step-update-routing">Update VPC route
/// tables</a> in the <i>Amazon Web Services Site-to-Site VPN User Guide</i>.</p>
/// <p>When the new gateway is a transit gateway, modify the transit gateway route table to
/// allow traffic between the VPC and the Amazon Web Services Site-to-Site VPN connection.
/// Use <a>CreateTransitGatewayRoute</a> to add the routes.</p>
/// <p> If you deleted VPN static routes, you must add the static routes to the transit
/// gateway route table.</p>
/// <p>After you perform this operation, the VPN endpoint's IP addresses on the Amazon Web Services side and the tunnel options remain intact. Your Amazon Web Services Site-to-Site VPN connection will
/// be temporarily unavailable for a brief period while we provision the new
/// endpoints.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyVpnConnection<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_vpn_connection_input::Builder,
}
impl<C, M, R> ModifyVpnConnection<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVpnConnection`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVpnConnectionOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyVpnConnectionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVpnConnectionInputOperationOutputAlias,
crate::output::ModifyVpnConnectionOutput,
crate::error::ModifyVpnConnectionError,
crate::input::ModifyVpnConnectionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the VPN connection.</p>
pub fn vpn_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_connection_id(inp);
self
}
/// <p>The ID of the VPN connection.</p>
pub fn set_vpn_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_connection_id(input);
self
}
/// <p>The ID of the transit gateway.</p>
pub fn transit_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.transit_gateway_id(inp);
self
}
/// <p>The ID of the transit gateway.</p>
pub fn set_transit_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_id(input);
self
}
/// <p>The ID of the customer gateway at your end of the VPN connection.</p>
pub fn customer_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.customer_gateway_id(inp);
self
}
/// <p>The ID of the customer gateway at your end of the VPN connection.</p>
pub fn set_customer_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_customer_gateway_id(input);
self
}
/// <p>The ID of the virtual private gateway at the Amazon Web Services side of the VPN
/// connection.</p>
pub fn vpn_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_gateway_id(inp);
self
}
/// <p>The ID of the virtual private gateway at the Amazon Web Services side of the VPN
/// connection.</p>
pub fn set_vpn_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_gateway_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVpnConnectionOptions`.
///
/// <p>Modifies the connection options for your Site-to-Site VPN connection.</p>
/// <p>When you modify the VPN connection options, the VPN endpoint IP addresses on the
/// Amazon Web Services side do not change, and the tunnel options do not change. Your
/// VPN connection will be temporarily unavailable for a brief period while the VPN
/// connection is updated.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyVpnConnectionOptions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_vpn_connection_options_input::Builder,
}
impl<C, M, R> ModifyVpnConnectionOptions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVpnConnectionOptions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVpnConnectionOptionsOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyVpnConnectionOptionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVpnConnectionOptionsInputOperationOutputAlias,
crate::output::ModifyVpnConnectionOptionsOutput,
crate::error::ModifyVpnConnectionOptionsError,
crate::input::ModifyVpnConnectionOptionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Site-to-Site VPN connection. </p>
pub fn vpn_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_connection_id(inp);
self
}
/// <p>The ID of the Site-to-Site VPN connection. </p>
pub fn set_vpn_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_connection_id(input);
self
}
/// <p>The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
/// <p>Default: <code>0.0.0.0/0</code>
/// </p>
pub fn local_ipv4_network_cidr(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.local_ipv4_network_cidr(inp);
self
}
/// <p>The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
/// <p>Default: <code>0.0.0.0/0</code>
/// </p>
pub fn set_local_ipv4_network_cidr(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_local_ipv4_network_cidr(input);
self
}
/// <p>The IPv4 CIDR on the Amazon Web Services side of the VPN connection.</p>
/// <p>Default: <code>0.0.0.0/0</code>
/// </p>
pub fn remote_ipv4_network_cidr(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.remote_ipv4_network_cidr(inp);
self
}
/// <p>The IPv4 CIDR on the Amazon Web Services side of the VPN connection.</p>
/// <p>Default: <code>0.0.0.0/0</code>
/// </p>
pub fn set_remote_ipv4_network_cidr(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_remote_ipv4_network_cidr(input);
self
}
/// <p>The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
/// <p>Default: <code>::/0</code>
/// </p>
pub fn local_ipv6_network_cidr(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.local_ipv6_network_cidr(inp);
self
}
/// <p>The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
/// <p>Default: <code>::/0</code>
/// </p>
pub fn set_local_ipv6_network_cidr(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_local_ipv6_network_cidr(input);
self
}
/// <p>The IPv6 CIDR on the Amazon Web Services side of the VPN connection.</p>
/// <p>Default: <code>::/0</code>
/// </p>
pub fn remote_ipv6_network_cidr(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.remote_ipv6_network_cidr(inp);
self
}
/// <p>The IPv6 CIDR on the Amazon Web Services side of the VPN connection.</p>
/// <p>Default: <code>::/0</code>
/// </p>
pub fn set_remote_ipv6_network_cidr(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_remote_ipv6_network_cidr(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVpnTunnelCertificate`.
///
/// <p>Modifies the VPN tunnel endpoint certificate.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyVpnTunnelCertificate<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_vpn_tunnel_certificate_input::Builder,
}
impl<C, M, R> ModifyVpnTunnelCertificate<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVpnTunnelCertificate`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVpnTunnelCertificateOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyVpnTunnelCertificateError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVpnTunnelCertificateInputOperationOutputAlias,
crate::output::ModifyVpnTunnelCertificateOutput,
crate::error::ModifyVpnTunnelCertificateError,
crate::input::ModifyVpnTunnelCertificateInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Amazon Web Services Site-to-Site VPN connection.</p>
pub fn vpn_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_connection_id(inp);
self
}
/// <p>The ID of the Amazon Web Services Site-to-Site VPN connection.</p>
pub fn set_vpn_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_connection_id(input);
self
}
/// <p>The external IP address of the VPN tunnel.</p>
pub fn vpn_tunnel_outside_ip_address(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.vpn_tunnel_outside_ip_address(inp);
self
}
/// <p>The external IP address of the VPN tunnel.</p>
pub fn set_vpn_tunnel_outside_ip_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_tunnel_outside_ip_address(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ModifyVpnTunnelOptions`.
///
/// <p>Modifies the options for a VPN tunnel in an Amazon Web Services Site-to-Site VPN connection. You can modify
/// multiple options for a tunnel in a single request, but you can only modify one tunnel at
/// a time. For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPNTunnels.html">Site-to-Site VPN tunnel options for your Site-to-Site VPN
/// connection</a> in the <i>Amazon Web Services Site-to-Site VPN User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ModifyVpnTunnelOptions<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::modify_vpn_tunnel_options_input::Builder,
}
impl<C, M, R> ModifyVpnTunnelOptions<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ModifyVpnTunnelOptions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ModifyVpnTunnelOptionsOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyVpnTunnelOptionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ModifyVpnTunnelOptionsInputOperationOutputAlias,
crate::output::ModifyVpnTunnelOptionsOutput,
crate::error::ModifyVpnTunnelOptionsError,
crate::input::ModifyVpnTunnelOptionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Amazon Web Services Site-to-Site VPN connection.</p>
pub fn vpn_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpn_connection_id(inp);
self
}
/// <p>The ID of the Amazon Web Services Site-to-Site VPN connection.</p>
pub fn set_vpn_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_connection_id(input);
self
}
/// <p>The external IP address of the VPN tunnel.</p>
pub fn vpn_tunnel_outside_ip_address(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.vpn_tunnel_outside_ip_address(inp);
self
}
/// <p>The external IP address of the VPN tunnel.</p>
pub fn set_vpn_tunnel_outside_ip_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpn_tunnel_outside_ip_address(input);
self
}
/// <p>The tunnel options to modify.</p>
pub fn tunnel_options(
mut self,
inp: crate::model::ModifyVpnTunnelOptionsSpecification,
) -> Self {
self.inner = self.inner.tunnel_options(inp);
self
}
/// <p>The tunnel options to modify.</p>
pub fn set_tunnel_options(
mut self,
input: std::option::Option<crate::model::ModifyVpnTunnelOptionsSpecification>,
) -> Self {
self.inner = self.inner.set_tunnel_options(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `MonitorInstances`.
///
/// <p>Enables detailed monitoring for a running instance. Otherwise, basic monitoring is
/// enabled. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html">Monitoring your instances and
/// volumes</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// <p>To disable detailed monitoring, see .</p>
#[derive(std::fmt::Debug)]
pub struct MonitorInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::monitor_instances_input::Builder,
}
impl<C, M, R> MonitorInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `MonitorInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::MonitorInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::MonitorInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::MonitorInstancesInputOperationOutputAlias,
crate::output::MonitorInstancesOutput,
crate::error::MonitorInstancesError,
crate::input::MonitorInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `InstanceIds`.
///
/// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
///
/// <p>The IDs of the instances.</p>
pub fn instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_ids(inp);
self
}
/// <p>The IDs of the instances.</p>
pub fn set_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instance_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `MoveAddressToVpc`.
///
/// <p>Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC platform. The
/// Elastic IP address must be allocated to your account for more than 24 hours, and it must not
/// be associated with an instance. After the Elastic IP address is moved, it is no longer
/// available for use in the EC2-Classic platform, unless you move it back using the
/// <a>RestoreAddressToClassic</a> request. You cannot move an Elastic IP address that was
/// originally allocated for use in the EC2-VPC platform to the EC2-Classic platform. </p>
#[derive(std::fmt::Debug)]
pub struct MoveAddressToVpc<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::move_address_to_vpc_input::Builder,
}
impl<C, M, R> MoveAddressToVpc<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `MoveAddressToVpc`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::MoveAddressToVpcOutput,
aws_smithy_http::result::SdkError<crate::error::MoveAddressToVpcError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::MoveAddressToVpcInputOperationOutputAlias,
crate::output::MoveAddressToVpcOutput,
crate::error::MoveAddressToVpcError,
crate::input::MoveAddressToVpcInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The Elastic IP address.</p>
pub fn public_ip(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.public_ip(inp);
self
}
/// <p>The Elastic IP address.</p>
pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_public_ip(input);
self
}
}
/// Fluent builder constructing a request to `ProvisionByoipCidr`.
///
/// <p>Provisions an IPv4 or IPv6 address range for use with your Amazon Web Services resources through bring your own IP
/// addresses (BYOIP) and creates a corresponding address pool. After the address range is
/// provisioned, it is ready to be advertised using <a>AdvertiseByoipCidr</a>.</p>
/// <p>Amazon Web Services verifies that you own the address range and are authorized to advertise it.
/// You must ensure that the address range is registered to you and that you created an
/// RPKI ROA to authorize Amazon ASNs 16509 and 14618 to advertise the address range.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html">Bring your own IP addresses (BYOIP)</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <p>Provisioning an address range is an asynchronous operation, so the call returns immediately,
/// but the address range is not ready to use until its status changes from <code>pending-provision</code>
/// to <code>provisioned</code>. To monitor the status of an address range, use <a>DescribeByoipCidrs</a>.
/// To allocate an Elastic IP address from your IPv4 address pool, use <a>AllocateAddress</a>
/// with either the specific address from the address pool or the ID of the address pool.</p>
#[derive(std::fmt::Debug)]
pub struct ProvisionByoipCidr<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::provision_byoip_cidr_input::Builder,
}
impl<C, M, R> ProvisionByoipCidr<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ProvisionByoipCidr`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ProvisionByoipCidrOutput,
aws_smithy_http::result::SdkError<crate::error::ProvisionByoipCidrError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ProvisionByoipCidrInputOperationOutputAlias,
crate::output::ProvisionByoipCidrOutput,
crate::error::ProvisionByoipCidrError,
crate::input::ProvisionByoipCidrInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The public IPv4 or IPv6 address range, in CIDR notation. The most specific IPv4 prefix that you can
/// specify is /24. The most specific IPv6 prefix you can specify is /56. The address range cannot overlap with another address range that you've
/// brought to this or another Region.</p>
pub fn cidr(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr(inp);
self
}
/// <p>The public IPv4 or IPv6 address range, in CIDR notation. The most specific IPv4 prefix that you can
/// specify is /24. The most specific IPv6 prefix you can specify is /56. The address range cannot overlap with another address range that you've
/// brought to this or another Region.</p>
pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr(input);
self
}
/// <p>A signed document that proves that you are authorized to bring the specified IP address
/// range to Amazon using BYOIP.</p>
pub fn cidr_authorization_context(
mut self,
inp: crate::model::CidrAuthorizationContext,
) -> Self {
self.inner = self.inner.cidr_authorization_context(inp);
self
}
/// <p>A signed document that proves that you are authorized to bring the specified IP address
/// range to Amazon using BYOIP.</p>
pub fn set_cidr_authorization_context(
mut self,
input: std::option::Option<crate::model::CidrAuthorizationContext>,
) -> Self {
self.inner = self.inner.set_cidr_authorization_context(input);
self
}
/// <p>(IPv6 only) Indicate whether the address range will be publicly advertised to the
/// internet.</p>
/// <p>Default: true</p>
pub fn publicly_advertisable(mut self, inp: bool) -> Self {
self.inner = self.inner.publicly_advertisable(inp);
self
}
/// <p>(IPv6 only) Indicate whether the address range will be publicly advertised to the
/// internet.</p>
/// <p>Default: true</p>
pub fn set_publicly_advertisable(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_publicly_advertisable(input);
self
}
/// <p>A description for the address range and the address pool.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for the address range and the address pool.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `PoolTagSpecifications`.
///
/// To override the contents of this collection use [`set_pool_tag_specifications`](Self::set_pool_tag_specifications).
///
/// <p>The tags to apply to the address pool.</p>
pub fn pool_tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.pool_tag_specifications(inp);
self
}
/// <p>The tags to apply to the address pool.</p>
pub fn set_pool_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_pool_tag_specifications(input);
self
}
/// <para>Reserved.</para>
pub fn multi_region(mut self, inp: bool) -> Self {
self.inner = self.inner.multi_region(inp);
self
}
/// <para>Reserved.</para>
pub fn set_multi_region(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_multi_region(input);
self
}
}
/// Fluent builder constructing a request to `PurchaseHostReservation`.
///
/// <p>Purchase a reservation with configurations that match those of your Dedicated Host.
/// You must have active Dedicated Hosts in your account before you purchase a reservation.
/// This action results in the specified reservation being purchased and charged to your
/// account.</p>
#[derive(std::fmt::Debug)]
pub struct PurchaseHostReservation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::purchase_host_reservation_input::Builder,
}
impl<C, M, R> PurchaseHostReservation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `PurchaseHostReservation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::PurchaseHostReservationOutput,
aws_smithy_http::result::SdkError<crate::error::PurchaseHostReservationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::PurchaseHostReservationInputOperationOutputAlias,
crate::output::PurchaseHostReservationOutput,
crate::error::PurchaseHostReservationError,
crate::input::PurchaseHostReservationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>The currency in which the <code>totalUpfrontPrice</code>, <code>LimitPrice</code>,
/// and <code>totalHourlyPrice</code> amounts are specified. At this time, the only
/// supported currency is <code>USD</code>.</p>
pub fn currency_code(mut self, inp: crate::model::CurrencyCodeValues) -> Self {
self.inner = self.inner.currency_code(inp);
self
}
/// <p>The currency in which the <code>totalUpfrontPrice</code>, <code>LimitPrice</code>,
/// and <code>totalHourlyPrice</code> amounts are specified. At this time, the only
/// supported currency is <code>USD</code>.</p>
pub fn set_currency_code(
mut self,
input: std::option::Option<crate::model::CurrencyCodeValues>,
) -> Self {
self.inner = self.inner.set_currency_code(input);
self
}
/// Appends an item to `HostIdSet`.
///
/// To override the contents of this collection use [`set_host_id_set`](Self::set_host_id_set).
///
/// <p>The IDs of the Dedicated Hosts with which the reservation will be associated.</p>
pub fn host_id_set(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.host_id_set(inp);
self
}
/// <p>The IDs of the Dedicated Hosts with which the reservation will be associated.</p>
pub fn set_host_id_set(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_host_id_set(input);
self
}
/// <p>The specified limit is checked against the total upfront cost of the reservation
/// (calculated as the offering's upfront cost multiplied by the host count). If the total
/// upfront cost is greater than the specified price limit, the request fails. This is used
/// to ensure that the purchase does not exceed the expected upfront cost of the purchase.
/// At this time, the only supported currency is <code>USD</code>. For example, to indicate
/// a limit price of USD 100, specify 100.00.</p>
pub fn limit_price(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.limit_price(inp);
self
}
/// <p>The specified limit is checked against the total upfront cost of the reservation
/// (calculated as the offering's upfront cost multiplied by the host count). If the total
/// upfront cost is greater than the specified price limit, the request fails. This is used
/// to ensure that the purchase does not exceed the expected upfront cost of the purchase.
/// At this time, the only supported currency is <code>USD</code>. For example, to indicate
/// a limit price of USD 100, specify 100.00.</p>
pub fn set_limit_price(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_limit_price(input);
self
}
/// <p>The ID of the offering.</p>
pub fn offering_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.offering_id(inp);
self
}
/// <p>The ID of the offering.</p>
pub fn set_offering_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_offering_id(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the Dedicated Host Reservation during purchase.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the Dedicated Host Reservation during purchase.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
}
/// Fluent builder constructing a request to `PurchaseReservedInstancesOffering`.
///
/// <p>Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower
/// hourly rate compared to On-Demand instance pricing.</p>
/// <p>Use <a>DescribeReservedInstancesOfferings</a> to get a list of Reserved Instance offerings
/// that match your specifications. After you've purchased a Reserved Instance, you can check for your
/// new Reserved Instance with <a>DescribeReservedInstances</a>.</p>
/// <p>To queue a purchase for a future date and time, specify a purchase time. If you do not specify a
/// purchase time, the default is the current time.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html">Reserved Instances</a> and
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved Instance Marketplace</a>
/// in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct PurchaseReservedInstancesOffering<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::purchase_reserved_instances_offering_input::Builder,
}
impl<C, M, R> PurchaseReservedInstancesOffering<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `PurchaseReservedInstancesOffering`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::PurchaseReservedInstancesOfferingOutput,
aws_smithy_http::result::SdkError<crate::error::PurchaseReservedInstancesOfferingError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::PurchaseReservedInstancesOfferingInputOperationOutputAlias,
crate::output::PurchaseReservedInstancesOfferingOutput,
crate::error::PurchaseReservedInstancesOfferingError,
crate::input::PurchaseReservedInstancesOfferingInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The number of Reserved Instances to purchase.</p>
pub fn instance_count(mut self, inp: i32) -> Self {
self.inner = self.inner.instance_count(inp);
self
}
/// <p>The number of Reserved Instances to purchase.</p>
pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_instance_count(input);
self
}
/// <p>The ID of the Reserved Instance offering to purchase.</p>
pub fn reserved_instances_offering_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.reserved_instances_offering_id(inp);
self
}
/// <p>The ID of the Reserved Instance offering to purchase.</p>
pub fn set_reserved_instances_offering_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_reserved_instances_offering_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.</p>
pub fn limit_price(mut self, inp: crate::model::ReservedInstanceLimitPrice) -> Self {
self.inner = self.inner.limit_price(inp);
self
}
/// <p>Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.</p>
pub fn set_limit_price(
mut self,
input: std::option::Option<crate::model::ReservedInstanceLimitPrice>,
) -> Self {
self.inner = self.inner.set_limit_price(input);
self
}
/// <p>The time at which to purchase the Reserved Instance, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
pub fn purchase_time(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.purchase_time(inp);
self
}
/// <p>The time at which to purchase the Reserved Instance, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
pub fn set_purchase_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_purchase_time(input);
self
}
}
/// Fluent builder constructing a request to `PurchaseScheduledInstances`.
///
/// <p>Purchases the Scheduled Instances with the specified schedule.</p>
/// <p>Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour for a one-year term.
/// Before you can purchase a Scheduled Instance, you must call <a>DescribeScheduledInstanceAvailability</a>
/// to check for available schedules and obtain a purchase token. After you purchase a Scheduled Instance,
/// you must call <a>RunScheduledInstances</a> during each scheduled time period.</p>
/// <p>After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase.</p>
#[derive(std::fmt::Debug)]
pub struct PurchaseScheduledInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::purchase_scheduled_instances_input::Builder,
}
impl<C, M, R> PurchaseScheduledInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `PurchaseScheduledInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::PurchaseScheduledInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::PurchaseScheduledInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::PurchaseScheduledInstancesInputOperationOutputAlias,
crate::output::PurchaseScheduledInstancesOutput,
crate::error::PurchaseScheduledInstancesError,
crate::input::PurchaseScheduledInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Unique, case-sensitive identifier that ensures the idempotency of the request.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that ensures the idempotency of the request.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `PurchaseRequests`.
///
/// To override the contents of this collection use [`set_purchase_requests`](Self::set_purchase_requests).
///
/// <p>The purchase requests.</p>
pub fn purchase_requests(mut self, inp: impl Into<crate::model::PurchaseRequest>) -> Self {
self.inner = self.inner.purchase_requests(inp);
self
}
/// <p>The purchase requests.</p>
pub fn set_purchase_requests(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PurchaseRequest>>,
) -> Self {
self.inner = self.inner.set_purchase_requests(input);
self
}
}
/// Fluent builder constructing a request to `RebootInstances`.
///
/// <p>Requests a reboot of the specified instances. This operation is asynchronous; it only
/// queues a request to reboot the specified instances. The operation succeeds if the
/// instances are valid and belong to you. Requests to reboot terminated instances are
/// ignored.</p>
/// <p>If an instance does not cleanly shut down within a few minutes, Amazon EC2 performs a
/// hard reboot.</p>
/// <p>For more information about troubleshooting, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html">Getting console output and
/// rebooting instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct RebootInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reboot_instances_input::Builder,
}
impl<C, M, R> RebootInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RebootInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RebootInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::RebootInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RebootInstancesInputOperationOutputAlias,
crate::output::RebootInstancesOutput,
crate::error::RebootInstancesError,
crate::input::RebootInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `InstanceIds`.
///
/// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
///
/// <p>The instance IDs.</p>
pub fn instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_ids(inp);
self
}
/// <p>The instance IDs.</p>
pub fn set_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instance_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `RegisterImage`.
///
/// <p>Registers an AMI. When you're creating an AMI, this is the final step you must complete
/// before you can launch an instance from the AMI. For more information about creating AMIs, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html">Creating your
/// own AMIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// <note>
/// <p>For Amazon EBS-backed instances, <a>CreateImage</a> creates and registers
/// the AMI in a single request, so you don't have to register the AMI yourself.</p>
/// </note>
///
/// <p>If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration.
/// If you make changes to an image, deregister the previous image and register the new image.</p>
///
/// <p>
/// <b>Register a snapshot of a root device volume</b>
/// </p>
/// <p>You can use <code>RegisterImage</code> to create an Amazon EBS-backed Linux AMI from
/// a snapshot of a root device volume. You specify the snapshot using a block device mapping.
/// You can't set the encryption state of the volume using the block device mapping. If the
/// snapshot is encrypted, or encryption by default is enabled, the root volume of an instance
/// launched from the AMI is encrypted.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot">Create a Linux AMI from a snapshot</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html">Use encryption with Amazon EBS-backed AMIs</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
///
/// <p>
/// <b>Amazon Web Services Marketplace product codes</b>
/// </p>
/// <p>If any snapshots have Amazon Web Services Marketplace product codes, they are copied to the new
/// AMI.</p>
/// <p>Windows and some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE
/// Linux Enterprise Server (SLES), use the Amazon EC2 billing product code associated with an AMI to
/// verify the subscription status for package updates. To create a new AMI for operating systems
/// that require a billing product code, instead of registering the AMI, do the following to
/// preserve the billing product code association:</p>
/// <ol>
/// <li>
/// <p>Launch an instance from an existing AMI with that billing product code.</p>
/// </li>
/// <li>
/// <p>Customize the instance.</p>
/// </li>
/// <li>
/// <p>Create an AMI from the instance using <a>CreateImage</a>.</p>
/// </li>
/// </ol>
/// <p>If you purchase a Reserved Instance to apply to an On-Demand Instance that was launched
/// from an AMI with a billing product code, make sure that the Reserved Instance has the matching
/// billing product code. If you purchase a Reserved Instance without the matching billing product
/// code, the Reserved Instance will not be applied to the On-Demand Instance. For information
/// about how to obtain the platform details and billing information of an AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understanding AMI
/// billing</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct RegisterImage<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::register_image_input::Builder,
}
impl<C, M, R> RegisterImage<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RegisterImage`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RegisterImageOutput,
aws_smithy_http::result::SdkError<crate::error::RegisterImageError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RegisterImageInputOperationOutputAlias,
crate::output::RegisterImageOutput,
crate::error::RegisterImageError,
crate::input::RegisterImageInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the
/// <code>aws-exec-read</code> canned access control list (ACL) to ensure that it can be accessed
/// by Amazon EC2. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl">Canned ACLs</a> in the
/// <i>Amazon S3 Service Developer Guide</i>.</p>
pub fn image_location(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.image_location(inp);
self
}
/// <p>The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the
/// <code>aws-exec-read</code> canned access control list (ACL) to ensure that it can be accessed
/// by Amazon EC2. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl">Canned ACLs</a> in the
/// <i>Amazon S3 Service Developer Guide</i>.</p>
pub fn set_image_location(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_image_location(input);
self
}
/// <p>The architecture of the AMI.</p>
/// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>.
/// For instance store-backed AMIs, the architecture specified in the manifest file.</p>
pub fn architecture(mut self, inp: crate::model::ArchitectureValues) -> Self {
self.inner = self.inner.architecture(inp);
self
}
/// <p>The architecture of the AMI.</p>
/// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>.
/// For instance store-backed AMIs, the architecture specified in the manifest file.</p>
pub fn set_architecture(
mut self,
input: std::option::Option<crate::model::ArchitectureValues>,
) -> Self {
self.inner = self.inner.set_architecture(input);
self
}
/// Appends an item to `BlockDeviceMappings`.
///
/// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
///
/// <p>The block device mapping entries.</p>
/// <p>If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption state of the volume.</p>
/// <p>If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region
/// of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost
/// only. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami">
/// Amazon EBS local snapshots on Outposts</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn block_device_mappings(
mut self,
inp: impl Into<crate::model::BlockDeviceMapping>,
) -> Self {
self.inner = self.inner.block_device_mappings(inp);
self
}
/// <p>The block device mapping entries.</p>
/// <p>If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption state of the volume.</p>
/// <p>If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region
/// of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost
/// only. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami">
/// Amazon EBS local snapshots on Outposts</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_block_device_mappings(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
) -> Self {
self.inner = self.inner.set_block_device_mappings(input);
self
}
/// <p>A description for your AMI.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>A description for your AMI.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Set to <code>true</code> to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.</p>
/// <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p>
pub fn ena_support(mut self, inp: bool) -> Self {
self.inner = self.inner.ena_support(inp);
self
}
/// <p>Set to <code>true</code> to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.</p>
/// <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p>
pub fn set_ena_support(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_ena_support(input);
self
}
/// <p>The ID of the kernel.</p>
pub fn kernel_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.kernel_id(inp);
self
}
/// <p>The ID of the kernel.</p>
pub fn set_kernel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_kernel_id(input);
self
}
/// <p>A name for your AMI.</p>
/// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
pub fn name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(inp);
self
}
/// <p>A name for your AMI.</p>
/// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// Appends an item to `BillingProducts`.
///
/// To override the contents of this collection use [`set_billing_products`](Self::set_billing_products).
///
/// <p>The billing product codes. Your account must be authorized to specify billing product codes. Otherwise,
/// you can use the Amazon Web Services Marketplace to bill for the use of an AMI.</p>
pub fn billing_products(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.billing_products(inp);
self
}
/// <p>The billing product codes. Your account must be authorized to specify billing product codes. Otherwise,
/// you can use the Amazon Web Services Marketplace to bill for the use of an AMI.</p>
pub fn set_billing_products(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_billing_products(input);
self
}
/// <p>The ID of the RAM disk.</p>
pub fn ramdisk_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ramdisk_id(inp);
self
}
/// <p>The ID of the RAM disk.</p>
pub fn set_ramdisk_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_ramdisk_id(input);
self
}
/// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
pub fn root_device_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.root_device_name(inp);
self
}
/// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
pub fn set_root_device_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_root_device_name(input);
self
}
/// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.</p>
/// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
/// <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p>
pub fn sriov_net_support(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.sriov_net_support(inp);
self
}
/// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.</p>
/// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
/// <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p>
pub fn set_sriov_net_support(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_sriov_net_support(input);
self
}
/// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
/// <p>Default: <code>paravirtual</code>
/// </p>
pub fn virtualization_type(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.virtualization_type(inp);
self
}
/// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
/// <p>Default: <code>paravirtual</code>
/// </p>
pub fn set_virtualization_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_virtualization_type(input);
self
}
/// <p>The boot mode of the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn boot_mode(mut self, inp: crate::model::BootModeValues) -> Self {
self.inner = self.inner.boot_mode(inp);
self
}
/// <p>The boot mode of the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
pub fn set_boot_mode(
mut self,
input: std::option::Option<crate::model::BootModeValues>,
) -> Self {
self.inner = self.inner.set_boot_mode(input);
self
}
}
/// Fluent builder constructing a request to `RegisterInstanceEventNotificationAttributes`.
///
/// <p>Registers a set of tag keys to include in scheduled event notifications for your resources.
/// </p>
/// <p>To remove tags, use .</p>
#[derive(std::fmt::Debug)]
pub struct RegisterInstanceEventNotificationAttributes<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::register_instance_event_notification_attributes_input::Builder,
}
impl<C, M, R> RegisterInstanceEventNotificationAttributes<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RegisterInstanceEventNotificationAttributes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RegisterInstanceEventNotificationAttributesOutput,
aws_smithy_http::result::SdkError<
crate::error::RegisterInstanceEventNotificationAttributesError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RegisterInstanceEventNotificationAttributesInputOperationOutputAlias,
crate::output::RegisterInstanceEventNotificationAttributesOutput,
crate::error::RegisterInstanceEventNotificationAttributesError,
crate::input::RegisterInstanceEventNotificationAttributesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Information about the tag keys to register.</p>
pub fn instance_tag_attribute(
mut self,
inp: crate::model::RegisterInstanceTagAttributeRequest,
) -> Self {
self.inner = self.inner.instance_tag_attribute(inp);
self
}
/// <p>Information about the tag keys to register.</p>
pub fn set_instance_tag_attribute(
mut self,
input: std::option::Option<crate::model::RegisterInstanceTagAttributeRequest>,
) -> Self {
self.inner = self.inner.set_instance_tag_attribute(input);
self
}
}
/// Fluent builder constructing a request to `RegisterTransitGatewayMulticastGroupMembers`.
///
/// <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 information about
/// supported instances, see <a href="https://docs.aws.amazon.com/vpc/latest/tgw/transit-gateway-limits.html#multicast-limits">Multicast
/// Consideration</a> in <i>Amazon VPC Transit Gateways</i>.</p>
/// <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>
#[derive(std::fmt::Debug)]
pub struct RegisterTransitGatewayMulticastGroupMembers<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::register_transit_gateway_multicast_group_members_input::Builder,
}
impl<C, M, R> RegisterTransitGatewayMulticastGroupMembers<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RegisterTransitGatewayMulticastGroupMembers`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RegisterTransitGatewayMulticastGroupMembersOutput,
aws_smithy_http::result::SdkError<
crate::error::RegisterTransitGatewayMulticastGroupMembersError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RegisterTransitGatewayMulticastGroupMembersInputOperationOutputAlias,
crate::output::RegisterTransitGatewayMulticastGroupMembersOutput,
crate::error::RegisterTransitGatewayMulticastGroupMembersError,
crate::input::RegisterTransitGatewayMulticastGroupMembersInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn transit_gateway_multicast_domain_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_multicast_domain_id(inp);
self
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn set_transit_gateway_multicast_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_multicast_domain_id(input);
self
}
/// <p>The IP address assigned to the transit gateway multicast group.</p>
pub fn group_ip_address(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_ip_address(inp);
self
}
/// <p>The IP address assigned to the transit gateway multicast group.</p>
pub fn set_group_ip_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_group_ip_address(input);
self
}
/// Appends an item to `NetworkInterfaceIds`.
///
/// To override the contents of this collection use [`set_network_interface_ids`](Self::set_network_interface_ids).
///
/// <p>The group members' network interface IDs to register with the transit gateway multicast group.</p>
pub fn network_interface_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_ids(inp);
self
}
/// <p>The group members' network interface IDs to register with the transit gateway multicast group.</p>
pub fn set_network_interface_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_network_interface_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `RegisterTransitGatewayMulticastGroupSources`.
///
/// <p>Registers sources (network interfaces) with the specified transit gateway multicast group.</p>
/// <p>A multicast source is a network interface attached to a supported instance that sends
/// multicast traffic. For information about supported instances, see <a href="https://docs.aws.amazon.com/vpc/latest/tgw/transit-gateway-limits.html#multicast-limits">Multicast
/// Considerations</a> in <i>Amazon VPC Transit Gateways</i>.</p>
/// <p>After you add the source, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SearchTransitGatewayMulticastGroups.html">SearchTransitGatewayMulticastGroups</a> to verify that the source was added to the multicast
/// group.</p>
#[derive(std::fmt::Debug)]
pub struct RegisterTransitGatewayMulticastGroupSources<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::register_transit_gateway_multicast_group_sources_input::Builder,
}
impl<C, M, R> RegisterTransitGatewayMulticastGroupSources<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RegisterTransitGatewayMulticastGroupSources`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RegisterTransitGatewayMulticastGroupSourcesOutput,
aws_smithy_http::result::SdkError<
crate::error::RegisterTransitGatewayMulticastGroupSourcesError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RegisterTransitGatewayMulticastGroupSourcesInputOperationOutputAlias,
crate::output::RegisterTransitGatewayMulticastGroupSourcesOutput,
crate::error::RegisterTransitGatewayMulticastGroupSourcesError,
crate::input::RegisterTransitGatewayMulticastGroupSourcesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn transit_gateway_multicast_domain_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_multicast_domain_id(inp);
self
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn set_transit_gateway_multicast_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_multicast_domain_id(input);
self
}
/// <p>The IP address assigned to the transit gateway multicast group.</p>
pub fn group_ip_address(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_ip_address(inp);
self
}
/// <p>The IP address assigned to the transit gateway multicast group.</p>
pub fn set_group_ip_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_group_ip_address(input);
self
}
/// Appends an item to `NetworkInterfaceIds`.
///
/// To override the contents of this collection use [`set_network_interface_ids`](Self::set_network_interface_ids).
///
/// <p>The group sources' network interface IDs to register with the transit gateway multicast group.</p>
pub fn network_interface_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_ids(inp);
self
}
/// <p>The group sources' network interface IDs to register with the transit gateway multicast group.</p>
pub fn set_network_interface_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_network_interface_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `RejectTransitGatewayMulticastDomainAssociations`.
///
/// <p>Rejects a request to associate cross-account subnets with a transit gateway multicast domain.</p>
#[derive(std::fmt::Debug)]
pub struct RejectTransitGatewayMulticastDomainAssociations<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reject_transit_gateway_multicast_domain_associations_input::Builder,
}
impl<C, M, R> RejectTransitGatewayMulticastDomainAssociations<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RejectTransitGatewayMulticastDomainAssociations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(self) -> std::result::Result<crate::output::RejectTransitGatewayMulticastDomainAssociationsOutput, aws_smithy_http::result::SdkError<crate::error::RejectTransitGatewayMulticastDomainAssociationsError>>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<crate::input::RejectTransitGatewayMulticastDomainAssociationsInputOperationOutputAlias,
crate::output::RejectTransitGatewayMulticastDomainAssociationsOutput,
crate::error::RejectTransitGatewayMulticastDomainAssociationsError,
crate::input::RejectTransitGatewayMulticastDomainAssociationsInputOperationRetryAlias>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn transit_gateway_multicast_domain_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_multicast_domain_id(inp);
self
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn set_transit_gateway_multicast_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_multicast_domain_id(input);
self
}
/// <p>The ID of the transit gateway attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the transit gateway attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// Appends an item to `SubnetIds`.
///
/// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
///
/// <p>The IDs of the subnets to associate with the transit gateway multicast domain.</p>
pub fn subnet_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_ids(inp);
self
}
/// <p>The IDs of the subnets to associate with the transit gateway multicast domain.</p>
pub fn set_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_subnet_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `RejectTransitGatewayPeeringAttachment`.
///
/// <p>Rejects a transit gateway peering attachment request.</p>
#[derive(std::fmt::Debug)]
pub struct RejectTransitGatewayPeeringAttachment<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reject_transit_gateway_peering_attachment_input::Builder,
}
impl<C, M, R> RejectTransitGatewayPeeringAttachment<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RejectTransitGatewayPeeringAttachment`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RejectTransitGatewayPeeringAttachmentOutput,
aws_smithy_http::result::SdkError<
crate::error::RejectTransitGatewayPeeringAttachmentError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RejectTransitGatewayPeeringAttachmentInputOperationOutputAlias,
crate::output::RejectTransitGatewayPeeringAttachmentOutput,
crate::error::RejectTransitGatewayPeeringAttachmentError,
crate::input::RejectTransitGatewayPeeringAttachmentInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway peering attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the transit gateway peering attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `RejectTransitGatewayVpcAttachment`.
///
/// <p>Rejects a request to attach a VPC to a transit gateway.</p>
/// <p>The VPC attachment must be in the <code>pendingAcceptance</code> state.
/// Use <a>DescribeTransitGatewayVpcAttachments</a> to view your pending VPC attachment requests.
/// Use <a>AcceptTransitGatewayVpcAttachment</a> to accept a VPC attachment request.</p>
#[derive(std::fmt::Debug)]
pub struct RejectTransitGatewayVpcAttachment<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reject_transit_gateway_vpc_attachment_input::Builder,
}
impl<C, M, R> RejectTransitGatewayVpcAttachment<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RejectTransitGatewayVpcAttachment`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RejectTransitGatewayVpcAttachmentOutput,
aws_smithy_http::result::SdkError<crate::error::RejectTransitGatewayVpcAttachmentError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RejectTransitGatewayVpcAttachmentInputOperationOutputAlias,
crate::output::RejectTransitGatewayVpcAttachmentOutput,
crate::error::RejectTransitGatewayVpcAttachmentError,
crate::input::RejectTransitGatewayVpcAttachmentInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `RejectVpcEndpointConnections`.
///
/// <p>Rejects one or more VPC endpoint connection requests to your VPC endpoint
/// service.</p>
#[derive(std::fmt::Debug)]
pub struct RejectVpcEndpointConnections<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reject_vpc_endpoint_connections_input::Builder,
}
impl<C, M, R> RejectVpcEndpointConnections<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RejectVpcEndpointConnections`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RejectVpcEndpointConnectionsOutput,
aws_smithy_http::result::SdkError<crate::error::RejectVpcEndpointConnectionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RejectVpcEndpointConnectionsInputOperationOutputAlias,
crate::output::RejectVpcEndpointConnectionsOutput,
crate::error::RejectVpcEndpointConnectionsError,
crate::input::RejectVpcEndpointConnectionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the service.</p>
pub fn service_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(inp);
self
}
/// <p>The ID of the service.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
/// Appends an item to `VpcEndpointIds`.
///
/// To override the contents of this collection use [`set_vpc_endpoint_ids`](Self::set_vpc_endpoint_ids).
///
/// <p>The IDs of one or more VPC endpoints.</p>
pub fn vpc_endpoint_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_endpoint_ids(inp);
self
}
/// <p>The IDs of one or more VPC endpoints.</p>
pub fn set_vpc_endpoint_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_vpc_endpoint_ids(input);
self
}
}
/// Fluent builder constructing a request to `RejectVpcPeeringConnection`.
///
/// <p>Rejects a VPC peering connection request. The VPC peering connection must be in the
/// <code>pending-acceptance</code> state. Use the <a>DescribeVpcPeeringConnections</a> request
/// to view your outstanding VPC peering connection requests. To delete an active VPC peering
/// connection, or to delete a VPC peering connection request that you initiated, use <a>DeleteVpcPeeringConnection</a>.</p>
#[derive(std::fmt::Debug)]
pub struct RejectVpcPeeringConnection<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reject_vpc_peering_connection_input::Builder,
}
impl<C, M, R> RejectVpcPeeringConnection<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RejectVpcPeeringConnection`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RejectVpcPeeringConnectionOutput,
aws_smithy_http::result::SdkError<crate::error::RejectVpcPeeringConnectionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RejectVpcPeeringConnectionInputOperationOutputAlias,
crate::output::RejectVpcPeeringConnectionOutput,
crate::error::RejectVpcPeeringConnectionError,
crate::input::RejectVpcPeeringConnectionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the VPC peering connection.</p>
pub fn vpc_peering_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_peering_connection_id(inp);
self
}
/// <p>The ID of the VPC peering connection.</p>
pub fn set_vpc_peering_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpc_peering_connection_id(input);
self
}
}
/// Fluent builder constructing a request to `ReleaseAddress`.
///
/// <p>Releases the specified Elastic IP address.</p>
/// <p>[EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it
/// from any instance that it's associated with. To disassociate an Elastic IP address without
/// releasing it, use <a>DisassociateAddress</a>.</p>
/// <p>[Nondefault VPC] You must use <a>DisassociateAddress</a> to disassociate the Elastic IP address
/// before you can release it. Otherwise, Amazon EC2 returns an error (<code>InvalidIPAddress.InUse</code>).</p>
/// <p>After releasing an Elastic IP address, it is released to the IP address pool.
/// Be sure to update your DNS records and any servers or devices that communicate with the address.
/// If you attempt to release an Elastic IP address that you already released, you'll get an
/// <code>AuthFailure</code> error if the address is already allocated to another Amazon Web Services account.</p>
/// <p>[EC2-VPC] After you release an Elastic IP address for use in a VPC, you might be able to recover it.
/// For more information, see <a>AllocateAddress</a>.</p>
#[derive(std::fmt::Debug)]
pub struct ReleaseAddress<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::release_address_input::Builder,
}
impl<C, M, R> ReleaseAddress<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ReleaseAddress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ReleaseAddressOutput,
aws_smithy_http::result::SdkError<crate::error::ReleaseAddressError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ReleaseAddressInputOperationOutputAlias,
crate::output::ReleaseAddressOutput,
crate::error::ReleaseAddressError,
crate::input::ReleaseAddressInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>[EC2-VPC] The allocation ID. Required for EC2-VPC.</p>
pub fn allocation_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.allocation_id(inp);
self
}
/// <p>[EC2-VPC] The allocation ID. Required for EC2-VPC.</p>
pub fn set_allocation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_allocation_id(input);
self
}
/// <p>[EC2-Classic] The Elastic IP address. Required for EC2-Classic.</p>
pub fn public_ip(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.public_ip(inp);
self
}
/// <p>[EC2-Classic] The Elastic IP address. Required for EC2-Classic.</p>
pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_public_ip(input);
self
}
/// <p>The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises
/// IP addresses.</p>
/// <p>If you provide an incorrect network border group, you receive an <code>InvalidAddress.NotFound</code> error.</p>
/// <p>You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 classic, you
/// receive an <code>InvalidParameterCombination</code> error.</p>
pub fn network_border_group(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_border_group(inp);
self
}
/// <p>The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises
/// IP addresses.</p>
/// <p>If you provide an incorrect network border group, you receive an <code>InvalidAddress.NotFound</code> error.</p>
/// <p>You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 classic, you
/// receive an <code>InvalidParameterCombination</code> error.</p>
pub fn set_network_border_group(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_border_group(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ReleaseHosts`.
///
/// <p>When you no longer want to use an On-Demand Dedicated Host it can be released.
/// On-Demand billing is stopped and the host goes into <code>released</code> state. The
/// host ID of Dedicated Hosts that have been released can no longer be specified in another
/// request, for example, to modify the host. You must stop or terminate all instances on a
/// host before it can be released.</p>
/// <p>When Dedicated Hosts are released, it may take some time for them to stop counting
/// toward your limit and you may receive capacity errors when trying to allocate new
/// Dedicated Hosts. Wait a few minutes and then try again.</p>
/// <p>Released hosts still appear in a <a>DescribeHosts</a> response.</p>
#[derive(std::fmt::Debug)]
pub struct ReleaseHosts<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::release_hosts_input::Builder,
}
impl<C, M, R> ReleaseHosts<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ReleaseHosts`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ReleaseHostsOutput,
aws_smithy_http::result::SdkError<crate::error::ReleaseHostsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ReleaseHostsInputOperationOutputAlias,
crate::output::ReleaseHostsOutput,
crate::error::ReleaseHostsError,
crate::input::ReleaseHostsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `HostIds`.
///
/// To override the contents of this collection use [`set_host_ids`](Self::set_host_ids).
///
/// <p>The IDs of the Dedicated Hosts to release.</p>
pub fn host_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.host_ids(inp);
self
}
/// <p>The IDs of the Dedicated Hosts to release.</p>
pub fn set_host_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_host_ids(input);
self
}
}
/// Fluent builder constructing a request to `ReplaceIamInstanceProfileAssociation`.
///
/// <p>Replaces an IAM instance profile for the specified running instance. You can use
/// this action to change the IAM instance profile that's associated with an instance
/// without having to disassociate the existing IAM instance profile first.</p>
/// <p>Use <a>DescribeIamInstanceProfileAssociations</a> to get the association
/// ID.</p>
#[derive(std::fmt::Debug)]
pub struct ReplaceIamInstanceProfileAssociation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::replace_iam_instance_profile_association_input::Builder,
}
impl<C, M, R> ReplaceIamInstanceProfileAssociation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ReplaceIamInstanceProfileAssociation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ReplaceIamInstanceProfileAssociationOutput,
aws_smithy_http::result::SdkError<
crate::error::ReplaceIamInstanceProfileAssociationError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ReplaceIamInstanceProfileAssociationInputOperationOutputAlias,
crate::output::ReplaceIamInstanceProfileAssociationOutput,
crate::error::ReplaceIamInstanceProfileAssociationError,
crate::input::ReplaceIamInstanceProfileAssociationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The IAM instance profile.</p>
pub fn iam_instance_profile(
mut self,
inp: crate::model::IamInstanceProfileSpecification,
) -> Self {
self.inner = self.inner.iam_instance_profile(inp);
self
}
/// <p>The IAM instance profile.</p>
pub fn set_iam_instance_profile(
mut self,
input: std::option::Option<crate::model::IamInstanceProfileSpecification>,
) -> Self {
self.inner = self.inner.set_iam_instance_profile(input);
self
}
/// <p>The ID of the existing IAM instance profile association.</p>
pub fn association_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_id(inp);
self
}
/// <p>The ID of the existing IAM instance profile association.</p>
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_association_id(input);
self
}
}
/// Fluent builder constructing a request to `ReplaceNetworkAclAssociation`.
///
/// <p>Changes which network ACL a subnet is associated with. By default when you create a
/// subnet, it's automatically associated with the default network ACL. For more
/// information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html">Network
/// ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
/// <p>This is an idempotent operation.</p>
#[derive(std::fmt::Debug)]
pub struct ReplaceNetworkAclAssociation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::replace_network_acl_association_input::Builder,
}
impl<C, M, R> ReplaceNetworkAclAssociation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ReplaceNetworkAclAssociation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ReplaceNetworkAclAssociationOutput,
aws_smithy_http::result::SdkError<crate::error::ReplaceNetworkAclAssociationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ReplaceNetworkAclAssociationInputOperationOutputAlias,
crate::output::ReplaceNetworkAclAssociationOutput,
crate::error::ReplaceNetworkAclAssociationError,
crate::input::ReplaceNetworkAclAssociationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the current association between the original network ACL and the subnet.</p>
pub fn association_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_id(inp);
self
}
/// <p>The ID of the current association between the original network ACL and the subnet.</p>
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_association_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the new network ACL to associate with the subnet.</p>
pub fn network_acl_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_acl_id(inp);
self
}
/// <p>The ID of the new network ACL to associate with the subnet.</p>
pub fn set_network_acl_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_acl_id(input);
self
}
}
/// Fluent builder constructing a request to `ReplaceNetworkAclEntry`.
///
/// <p>Replaces an entry (rule) in a network ACL. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html">Network ACLs</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ReplaceNetworkAclEntry<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::replace_network_acl_entry_input::Builder,
}
impl<C, M, R> ReplaceNetworkAclEntry<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ReplaceNetworkAclEntry`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ReplaceNetworkAclEntryOutput,
aws_smithy_http::result::SdkError<crate::error::ReplaceNetworkAclEntryError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ReplaceNetworkAclEntryInputOperationOutputAlias,
crate::output::ReplaceNetworkAclEntryOutput,
crate::error::ReplaceNetworkAclEntryError,
crate::input::ReplaceNetworkAclEntryInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The IPv4 network range to allow or deny, in CIDR notation (for example
/// <code>172.16.0.0/24</code>).</p>
pub fn cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr_block(inp);
self
}
/// <p>The IPv4 network range to allow or deny, in CIDR notation (for example
/// <code>172.16.0.0/24</code>).</p>
pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr_block(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Indicates whether to replace the egress rule.</p>
/// <p>Default: If no value is specified, we replace the ingress rule.</p>
pub fn egress(mut self, inp: bool) -> Self {
self.inner = self.inner.egress(inp);
self
}
/// <p>Indicates whether to replace the egress rule.</p>
/// <p>Default: If no value is specified, we replace the ingress rule.</p>
pub fn set_egress(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_egress(input);
self
}
/// <p>ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol
/// 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.</p>
pub fn icmp_type_code(mut self, inp: crate::model::IcmpTypeCode) -> Self {
self.inner = self.inner.icmp_type_code(inp);
self
}
/// <p>ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol
/// 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.</p>
pub fn set_icmp_type_code(
mut self,
input: std::option::Option<crate::model::IcmpTypeCode>,
) -> Self {
self.inner = self.inner.set_icmp_type_code(input);
self
}
/// <p>The IPv6 network range to allow or deny, in CIDR notation (for example
/// <code>2001:bd8:1234:1a00::/64</code>).</p>
pub fn ipv6_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv6_cidr_block(inp);
self
}
/// <p>The IPv6 network range to allow or deny, in CIDR notation (for example
/// <code>2001:bd8:1234:1a00::/64</code>).</p>
pub fn set_ipv6_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_ipv6_cidr_block(input);
self
}
/// <p>The ID of the ACL.</p>
pub fn network_acl_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_acl_id(inp);
self
}
/// <p>The ID of the ACL.</p>
pub fn set_network_acl_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_acl_id(input);
self
}
/// <p>TCP or UDP protocols: The range of ports the rule applies to.
/// Required if specifying protocol 6 (TCP) or 17 (UDP).</p>
pub fn port_range(mut self, inp: crate::model::PortRange) -> Self {
self.inner = self.inner.port_range(inp);
self
}
/// <p>TCP or UDP protocols: The range of ports the rule applies to.
/// Required if specifying protocol 6 (TCP) or 17 (UDP).</p>
pub fn set_port_range(
mut self,
input: std::option::Option<crate::model::PortRange>,
) -> Self {
self.inner = self.inner.set_port_range(input);
self
}
/// <p>The protocol number. A value of "-1" means all protocols. If you specify "-1" or a
/// protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is
/// allowed, regardless of any ports or ICMP types or codes that you specify. If you specify
/// protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and
/// codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6)
/// and specify an IPv6 CIDR block, you must specify an ICMP type and code.</p>
pub fn protocol(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.protocol(inp);
self
}
/// <p>The protocol number. A value of "-1" means all protocols. If you specify "-1" or a
/// protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is
/// allowed, regardless of any ports or ICMP types or codes that you specify. If you specify
/// protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and
/// codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6)
/// and specify an IPv6 CIDR block, you must specify an ICMP type and code.</p>
pub fn set_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_protocol(input);
self
}
/// <p>Indicates whether to allow or deny the traffic that matches the rule.</p>
pub fn rule_action(mut self, inp: crate::model::RuleAction) -> Self {
self.inner = self.inner.rule_action(inp);
self
}
/// <p>Indicates whether to allow or deny the traffic that matches the rule.</p>
pub fn set_rule_action(
mut self,
input: std::option::Option<crate::model::RuleAction>,
) -> Self {
self.inner = self.inner.set_rule_action(input);
self
}
/// <p>The rule number of the entry to replace.</p>
pub fn rule_number(mut self, inp: i32) -> Self {
self.inner = self.inner.rule_number(inp);
self
}
/// <p>The rule number of the entry to replace.</p>
pub fn set_rule_number(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_rule_number(input);
self
}
}
/// Fluent builder constructing a request to `ReplaceRoute`.
///
/// <p>Replaces an existing route within a route table in a VPC. You must provide only one of
/// the following: internet gateway, virtual private gateway, NAT instance, NAT gateway, VPC
/// peering connection, network interface, egress-only internet gateway, or transit
/// gateway.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route tables</a> in the
/// <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ReplaceRoute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::replace_route_input::Builder,
}
impl<C, M, R> ReplaceRoute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ReplaceRoute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ReplaceRouteOutput,
aws_smithy_http::result::SdkError<crate::error::ReplaceRouteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ReplaceRouteInputOperationOutputAlias,
crate::output::ReplaceRouteOutput,
crate::error::ReplaceRouteError,
crate::input::ReplaceRouteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The IPv4 CIDR address block used for the destination match. The value that you
/// provide must match the CIDR of an existing route in the table.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The IPv4 CIDR address block used for the destination match. The value that you
/// provide must match the CIDR of an existing route in the table.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <p>The IPv6 CIDR address block used for the destination match. The value that you
/// provide must match the CIDR of an existing route in the table.</p>
pub fn destination_ipv6_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_ipv6_cidr_block(inp);
self
}
/// <p>The IPv6 CIDR address block used for the destination match. The value that you
/// provide must match the CIDR of an existing route in the table.</p>
pub fn set_destination_ipv6_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_ipv6_cidr_block(input);
self
}
/// <p>The ID of the prefix list for the route.</p>
pub fn destination_prefix_list_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_prefix_list_id(inp);
self
}
/// <p>The ID of the prefix list for the route.</p>
pub fn set_destination_prefix_list_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_prefix_list_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
pub fn vpc_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_endpoint_id(inp);
self
}
/// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
pub fn set_vpc_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpc_endpoint_id(input);
self
}
/// <p>[IPv6 traffic only] The ID of an egress-only internet gateway.</p>
pub fn egress_only_internet_gateway_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.egress_only_internet_gateway_id(inp);
self
}
/// <p>[IPv6 traffic only] The ID of an egress-only internet gateway.</p>
pub fn set_egress_only_internet_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_egress_only_internet_gateway_id(input);
self
}
/// <p>The ID of an internet gateway or virtual private gateway.</p>
pub fn gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.gateway_id(inp);
self
}
/// <p>The ID of an internet gateway or virtual private gateway.</p>
pub fn set_gateway_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_gateway_id(input);
self
}
/// <p>The ID of a NAT instance in your VPC.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of a NAT instance in your VPC.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>Specifies whether to reset the local route to its default target (<code>local</code>).</p>
pub fn local_target(mut self, inp: bool) -> Self {
self.inner = self.inner.local_target(inp);
self
}
/// <p>Specifies whether to reset the local route to its default target (<code>local</code>).</p>
pub fn set_local_target(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_local_target(input);
self
}
/// <p>[IPv4 traffic only] The ID of a NAT gateway.</p>
pub fn nat_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.nat_gateway_id(inp);
self
}
/// <p>[IPv4 traffic only] The ID of a NAT gateway.</p>
pub fn set_nat_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_nat_gateway_id(input);
self
}
/// <p>The ID of a transit gateway.</p>
pub fn transit_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.transit_gateway_id(inp);
self
}
/// <p>The ID of a transit gateway.</p>
pub fn set_transit_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_id(input);
self
}
/// <p>The ID of the local gateway.</p>
pub fn local_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.local_gateway_id(inp);
self
}
/// <p>The ID of the local gateway.</p>
pub fn set_local_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_local_gateway_id(input);
self
}
/// <p>[IPv4 traffic only] The ID of a carrier gateway.</p>
pub fn carrier_gateway_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.carrier_gateway_id(inp);
self
}
/// <p>[IPv4 traffic only] The ID of a carrier gateway.</p>
pub fn set_carrier_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_carrier_gateway_id(input);
self
}
/// <p>The ID of a network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of a network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
/// <p>The ID of the route table.</p>
pub fn route_table_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.route_table_id(inp);
self
}
/// <p>The ID of the route table.</p>
pub fn set_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_route_table_id(input);
self
}
/// <p>The ID of a VPC peering connection.</p>
pub fn vpc_peering_connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc_peering_connection_id(inp);
self
}
/// <p>The ID of a VPC peering connection.</p>
pub fn set_vpc_peering_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_vpc_peering_connection_id(input);
self
}
}
/// Fluent builder constructing a request to `ReplaceRouteTableAssociation`.
///
/// <p>Changes the route table associated with a given subnet, internet gateway, or virtual private gateway in a VPC. After the operation
/// completes, the subnet or gateway uses the routes in the new route table. For more
/// information about route tables, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route
/// tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
/// <p>You can also use this operation to change which table is the main route table in the VPC. Specify the main route table's association ID and the route table ID of the new main route table.</p>
#[derive(std::fmt::Debug)]
pub struct ReplaceRouteTableAssociation<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::replace_route_table_association_input::Builder,
}
impl<C, M, R> ReplaceRouteTableAssociation<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ReplaceRouteTableAssociation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ReplaceRouteTableAssociationOutput,
aws_smithy_http::result::SdkError<crate::error::ReplaceRouteTableAssociationError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ReplaceRouteTableAssociationInputOperationOutputAlias,
crate::output::ReplaceRouteTableAssociationOutput,
crate::error::ReplaceRouteTableAssociationError,
crate::input::ReplaceRouteTableAssociationInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The association ID.</p>
pub fn association_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.association_id(inp);
self
}
/// <p>The association ID.</p>
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_association_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the new route table to associate with the subnet.</p>
pub fn route_table_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.route_table_id(inp);
self
}
/// <p>The ID of the new route table to associate with the subnet.</p>
pub fn set_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_route_table_id(input);
self
}
}
/// Fluent builder constructing a request to `ReplaceTransitGatewayRoute`.
///
/// <p>Replaces the specified route in the specified transit gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct ReplaceTransitGatewayRoute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::replace_transit_gateway_route_input::Builder,
}
impl<C, M, R> ReplaceTransitGatewayRoute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ReplaceTransitGatewayRoute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ReplaceTransitGatewayRouteOutput,
aws_smithy_http::result::SdkError<crate::error::ReplaceTransitGatewayRouteError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ReplaceTransitGatewayRouteInputOperationOutputAlias,
crate::output::ReplaceTransitGatewayRouteOutput,
crate::error::ReplaceTransitGatewayRouteError,
crate::input::ReplaceTransitGatewayRouteInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The CIDR range used for the destination match. Routing decisions are based on the most specific match.</p>
pub fn destination_cidr_block(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.destination_cidr_block(inp);
self
}
/// <p>The CIDR range used for the destination match. Routing decisions are based on the most specific match.</p>
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_destination_cidr_block(input);
self
}
/// <p>The ID of the route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// <p>The ID of the attachment.</p>
pub fn transit_gateway_attachment_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_attachment_id(inp);
self
}
/// <p>The ID of the attachment.</p>
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_attachment_id(input);
self
}
/// <p>Indicates whether traffic matching this route is to be dropped.</p>
pub fn blackhole(mut self, inp: bool) -> Self {
self.inner = self.inner.blackhole(inp);
self
}
/// <p>Indicates whether traffic matching this route is to be dropped.</p>
pub fn set_blackhole(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_blackhole(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ReportInstanceStatus`.
///
/// <p>Submits feedback about the status of an instance. The instance must be in the
/// <code>running</code> state. If your experience with the instance differs from the
/// instance status returned by <a>DescribeInstanceStatus</a>, use <a>ReportInstanceStatus</a> to report your experience with the instance. Amazon
/// EC2 collects this information to improve the accuracy of status checks.</p>
/// <p>Use of this action does not change the value returned by <a>DescribeInstanceStatus</a>.</p>
#[derive(std::fmt::Debug)]
pub struct ReportInstanceStatus<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::report_instance_status_input::Builder,
}
impl<C, M, R> ReportInstanceStatus<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ReportInstanceStatus`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ReportInstanceStatusOutput,
aws_smithy_http::result::SdkError<crate::error::ReportInstanceStatusError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ReportInstanceStatusInputOperationOutputAlias,
crate::output::ReportInstanceStatusOutput,
crate::error::ReportInstanceStatusError,
crate::input::ReportInstanceStatusInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Descriptive text about the health state of your instance.</p>
pub fn description(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(inp);
self
}
/// <p>Descriptive text about the health state of your instance.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The time at which the reported instance health state ended.</p>
pub fn end_time(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.end_time(inp);
self
}
/// <p>The time at which the reported instance health state ended.</p>
pub fn set_end_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_end_time(input);
self
}
/// Appends an item to `Instances`.
///
/// To override the contents of this collection use [`set_instances`](Self::set_instances).
///
/// <p>The instances.</p>
pub fn instances(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instances(inp);
self
}
/// <p>The instances.</p>
pub fn set_instances(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instances(input);
self
}
/// Appends an item to `ReasonCodes`.
///
/// To override the contents of this collection use [`set_reason_codes`](Self::set_reason_codes).
///
/// <p>The reason codes that describe the health state of your instance.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-stuck-in-state</code>: My instance is stuck in a state.</p>
/// </li>
/// <li>
/// <p>
/// <code>unresponsive</code>: My instance is unresponsive.</p>
/// </li>
/// <li>
/// <p>
/// <code>not-accepting-credentials</code>: My instance is not accepting my
/// credentials.</p>
/// </li>
/// <li>
/// <p>
/// <code>password-not-available</code>: A password is not available for my
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>performance-network</code>: My instance is experiencing performance
/// problems that I believe are network related.</p>
/// </li>
/// <li>
/// <p>
/// <code>performance-instance-store</code>: My instance is experiencing performance
/// problems that I believe are related to the instance stores.</p>
/// </li>
/// <li>
/// <p>
/// <code>performance-ebs-volume</code>: My instance is experiencing performance
/// problems that I believe are related to an EBS volume.</p>
/// </li>
/// <li>
/// <p>
/// <code>performance-other</code>: My instance is experiencing performance
/// problems.</p>
/// </li>
/// <li>
/// <p>
/// <code>other</code>: [explain using the description parameter]</p>
/// </li>
/// </ul>
pub fn reason_codes(
mut self,
inp: impl Into<crate::model::ReportInstanceReasonCodes>,
) -> Self {
self.inner = self.inner.reason_codes(inp);
self
}
/// <p>The reason codes that describe the health state of your instance.</p>
/// <ul>
/// <li>
/// <p>
/// <code>instance-stuck-in-state</code>: My instance is stuck in a state.</p>
/// </li>
/// <li>
/// <p>
/// <code>unresponsive</code>: My instance is unresponsive.</p>
/// </li>
/// <li>
/// <p>
/// <code>not-accepting-credentials</code>: My instance is not accepting my
/// credentials.</p>
/// </li>
/// <li>
/// <p>
/// <code>password-not-available</code>: A password is not available for my
/// instance.</p>
/// </li>
/// <li>
/// <p>
/// <code>performance-network</code>: My instance is experiencing performance
/// problems that I believe are network related.</p>
/// </li>
/// <li>
/// <p>
/// <code>performance-instance-store</code>: My instance is experiencing performance
/// problems that I believe are related to the instance stores.</p>
/// </li>
/// <li>
/// <p>
/// <code>performance-ebs-volume</code>: My instance is experiencing performance
/// problems that I believe are related to an EBS volume.</p>
/// </li>
/// <li>
/// <p>
/// <code>performance-other</code>: My instance is experiencing performance
/// problems.</p>
/// </li>
/// <li>
/// <p>
/// <code>other</code>: [explain using the description parameter]</p>
/// </li>
/// </ul>
pub fn set_reason_codes(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ReportInstanceReasonCodes>>,
) -> Self {
self.inner = self.inner.set_reason_codes(input);
self
}
/// <p>The time at which the reported instance health state began.</p>
pub fn start_time(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.start_time(inp);
self
}
/// <p>The time at which the reported instance health state began.</p>
pub fn set_start_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_start_time(input);
self
}
/// <p>The status of all instances listed.</p>
pub fn status(mut self, inp: crate::model::ReportStatusType) -> Self {
self.inner = self.inner.status(inp);
self
}
/// <p>The status of all instances listed.</p>
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ReportStatusType>,
) -> Self {
self.inner = self.inner.set_status(input);
self
}
}
/// Fluent builder constructing a request to `RequestSpotFleet`.
///
/// <p>Creates a Spot Fleet request.</p>
/// <p>The Spot Fleet request specifies the total target capacity and the On-Demand target
/// capacity. Amazon EC2 calculates the difference between the total capacity and On-Demand
/// capacity, and launches the difference as Spot capacity.</p>
/// <p>You can submit a single request that includes multiple launch specifications that vary
/// by instance type, AMI, Availability Zone, or subnet.</p>
/// <p>By default, the Spot Fleet requests Spot Instances in the Spot Instance pool where the
/// price per unit is the lowest. Each launch specification can include its own instance
/// weighting that reflects the value of the instance type to your application
/// workload.</p>
/// <p>Alternatively, you can specify that the Spot Fleet distribute the target capacity
/// across the Spot pools included in its launch specifications. By ensuring that the Spot
/// Instances in your Spot Fleet are in different Spot pools, you can improve the
/// availability of your fleet.</p>
/// <p>You can specify tags for the Spot Fleet request and instances launched by the fleet.
/// You cannot tag other resource types in a Spot Fleet request because only the
/// <code>spot-fleet-request</code> and <code>instance</code> resource types are
/// supported.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html">Spot Fleet requests</a>
/// in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
#[derive(std::fmt::Debug)]
pub struct RequestSpotFleet<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::request_spot_fleet_input::Builder,
}
impl<C, M, R> RequestSpotFleet<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RequestSpotFleet`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RequestSpotFleetOutput,
aws_smithy_http::result::SdkError<crate::error::RequestSpotFleetError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RequestSpotFleetInputOperationOutputAlias,
crate::output::RequestSpotFleetOutput,
crate::error::RequestSpotFleetError,
crate::input::RequestSpotFleetInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The configuration for the Spot Fleet request.</p>
pub fn spot_fleet_request_config(
mut self,
inp: crate::model::SpotFleetRequestConfigData,
) -> Self {
self.inner = self.inner.spot_fleet_request_config(inp);
self
}
/// <p>The configuration for the Spot Fleet request.</p>
pub fn set_spot_fleet_request_config(
mut self,
input: std::option::Option<crate::model::SpotFleetRequestConfigData>,
) -> Self {
self.inner = self.inner.set_spot_fleet_request_config(input);
self
}
}
/// Fluent builder constructing a request to `RequestSpotInstances`.
///
/// <p>Creates a Spot Instance request.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html">Spot Instance requests</a> in
/// the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
#[derive(std::fmt::Debug)]
pub struct RequestSpotInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::request_spot_instances_input::Builder,
}
impl<C, M, R> RequestSpotInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RequestSpotInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RequestSpotInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::RequestSpotInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RequestSpotInstancesInputOperationOutputAlias,
crate::output::RequestSpotInstancesOutput,
crate::error::RequestSpotInstancesError,
crate::input::RequestSpotInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The user-specified name for a logical grouping of requests.</p>
/// <p>When you specify an Availability Zone group in a Spot Instance request, all Spot
/// Instances in the request are launched in the same Availability Zone. Instance proximity
/// is maintained with this parameter, but the choice of Availability Zone is not. The group
/// applies only to requests for Spot Instances of the same instance type. Any additional
/// Spot Instance requests that are specified with the same Availability Zone group name are
/// launched in that same Availability Zone, as long as at least one instance from the group
/// is still active.</p>
/// <p>If there is no active instance running in the Availability Zone group that you specify
/// for a new Spot Instance request (all instances are terminated, the request is expired,
/// or the maximum price you specified falls below current Spot price), then Amazon EC2 launches
/// the instance in any Availability Zone where the constraint can be met. Consequently, the
/// subsequent set of Spot Instances could be placed in a different zone from the original
/// request, even if you specified the same Availability Zone group.</p>
/// <p>Default: Instances are launched in any available Availability Zone.</p>
pub fn availability_zone_group(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.availability_zone_group(inp);
self
}
/// <p>The user-specified name for a logical grouping of requests.</p>
/// <p>When you specify an Availability Zone group in a Spot Instance request, all Spot
/// Instances in the request are launched in the same Availability Zone. Instance proximity
/// is maintained with this parameter, but the choice of Availability Zone is not. The group
/// applies only to requests for Spot Instances of the same instance type. Any additional
/// Spot Instance requests that are specified with the same Availability Zone group name are
/// launched in that same Availability Zone, as long as at least one instance from the group
/// is still active.</p>
/// <p>If there is no active instance running in the Availability Zone group that you specify
/// for a new Spot Instance request (all instances are terminated, the request is expired,
/// or the maximum price you specified falls below current Spot price), then Amazon EC2 launches
/// the instance in any Availability Zone where the constraint can be met. Consequently, the
/// subsequent set of Spot Instances could be placed in a different zone from the original
/// request, even if you specified the same Availability Zone group.</p>
/// <p>Default: Instances are launched in any available Availability Zone.</p>
pub fn set_availability_zone_group(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_availability_zone_group(input);
self
}
/// <p>Deprecated.</p>
pub fn block_duration_minutes(mut self, inp: i32) -> Self {
self.inner = self.inner.block_duration_minutes(inp);
self
}
/// <p>Deprecated.</p>
pub fn set_block_duration_minutes(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_block_duration_minutes(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to Ensure
/// Idempotency</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to Ensure
/// Idempotency</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The maximum number of Spot Instances to launch.</p>
/// <p>Default: 1</p>
pub fn instance_count(mut self, inp: i32) -> Self {
self.inner = self.inner.instance_count(inp);
self
}
/// <p>The maximum number of Spot Instances to launch.</p>
/// <p>Default: 1</p>
pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_instance_count(input);
self
}
/// <p>The instance launch group. Launch groups are Spot Instances that launch together and
/// terminate together.</p>
/// <p>Default: Instances are launched and terminated individually</p>
pub fn launch_group(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.launch_group(inp);
self
}
/// <p>The instance launch group. Launch groups are Spot Instances that launch together and
/// terminate together.</p>
/// <p>Default: Instances are launched and terminated individually</p>
pub fn set_launch_group(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_launch_group(input);
self
}
/// <p>The launch specification.</p>
pub fn launch_specification(
mut self,
inp: crate::model::RequestSpotLaunchSpecification,
) -> Self {
self.inner = self.inner.launch_specification(inp);
self
}
/// <p>The launch specification.</p>
pub fn set_launch_specification(
mut self,
input: std::option::Option<crate::model::RequestSpotLaunchSpecification>,
) -> Self {
self.inner = self.inner.set_launch_specification(input);
self
}
/// <p>The maximum price per hour that you are willing to pay for a Spot Instance. The
/// default is the On-Demand price.</p>
pub fn spot_price(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.spot_price(inp);
self
}
/// <p>The maximum price per hour that you are willing to pay for a Spot Instance. The
/// default is the On-Demand price.</p>
pub fn set_spot_price(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_spot_price(input);
self
}
/// <p>The Spot Instance request type.</p>
/// <p>Default: <code>one-time</code>
/// </p>
pub fn r#type(mut self, inp: crate::model::SpotInstanceType) -> Self {
self.inner = self.inner.r#type(inp);
self
}
/// <p>The Spot Instance request type.</p>
/// <p>Default: <code>one-time</code>
/// </p>
pub fn set_type(
mut self,
input: std::option::Option<crate::model::SpotInstanceType>,
) -> Self {
self.inner = self.inner.set_type(input);
self
}
/// <p>The start date of the request. If this is a one-time request, the request becomes
/// active at this date and time and remains active until all instances launch, the request
/// expires, or the request is canceled. If the request is persistent, the request becomes
/// active at this date and time and remains active until it expires or is canceled.</p>
/// <p>The specified start date and time cannot be equal to the current date and time. You
/// must specify a start date and time that occurs after the current date and time.</p>
pub fn valid_from(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.valid_from(inp);
self
}
/// <p>The start date of the request. If this is a one-time request, the request becomes
/// active at this date and time and remains active until all instances launch, the request
/// expires, or the request is canceled. If the request is persistent, the request becomes
/// active at this date and time and remains active until it expires or is canceled.</p>
/// <p>The specified start date and time cannot be equal to the current date and time. You
/// must specify a start date and time that occurs after the current date and time.</p>
pub fn set_valid_from(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_valid_from(input);
self
}
/// <p>The end date of the request, in UTC format
/// (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
/// <ul>
/// <li>
/// <p>For a persistent request, the request remains active until the
/// <code>ValidUntil</code> date and time is reached. Otherwise, the request
/// remains active until you cancel it. </p>
/// </li>
/// <li>
/// <p>For a one-time request, the request remains active until all instances launch,
/// the request is canceled, or the <code>ValidUntil</code> date and time is
/// reached. By default, the request is valid for 7 days from the date the request
/// was created.</p>
/// </li>
/// </ul>
pub fn valid_until(mut self, inp: aws_smithy_types::Instant) -> Self {
self.inner = self.inner.valid_until(inp);
self
}
/// <p>The end date of the request, in UTC format
/// (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
/// <ul>
/// <li>
/// <p>For a persistent request, the request remains active until the
/// <code>ValidUntil</code> date and time is reached. Otherwise, the request
/// remains active until you cancel it. </p>
/// </li>
/// <li>
/// <p>For a one-time request, the request remains active until all instances launch,
/// the request is canceled, or the <code>ValidUntil</code> date and time is
/// reached. By default, the request is valid for 7 days from the date the request
/// was created.</p>
/// </li>
/// </ul>
pub fn set_valid_until(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.inner = self.inner.set_valid_until(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The key-value pair for tagging the Spot Instance request on creation. The value for
/// <code>ResourceType</code> must be <code>spot-instances-request</code>, otherwise the
/// Spot Instance request fails. To tag the Spot Instance request after it has been created,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>. </p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The key-value pair for tagging the Spot Instance request on creation. The value for
/// <code>ResourceType</code> must be <code>spot-instances-request</code>, otherwise the
/// Spot Instance request fails. To tag the Spot Instance request after it has been created,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>. </p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
pub fn instance_interruption_behavior(
mut self,
inp: crate::model::InstanceInterruptionBehavior,
) -> Self {
self.inner = self.inner.instance_interruption_behavior(inp);
self
}
/// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
pub fn set_instance_interruption_behavior(
mut self,
input: std::option::Option<crate::model::InstanceInterruptionBehavior>,
) -> Self {
self.inner = self.inner.set_instance_interruption_behavior(input);
self
}
}
/// Fluent builder constructing a request to `ResetAddressAttribute`.
///
/// <p>Resets the attribute of the specified IP address. For requirements, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#Using_Elastic_Addressing_Reverse_DNS">Using reverse DNS for email applications</a>.</p>
#[derive(std::fmt::Debug)]
pub struct ResetAddressAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reset_address_attribute_input::Builder,
}
impl<C, M, R> ResetAddressAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ResetAddressAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ResetAddressAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ResetAddressAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ResetAddressAttributeInputOperationOutputAlias,
crate::output::ResetAddressAttributeOutput,
crate::error::ResetAddressAttributeError,
crate::input::ResetAddressAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>[EC2-VPC] The allocation ID.</p>
pub fn allocation_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.allocation_id(inp);
self
}
/// <p>[EC2-VPC] The allocation ID.</p>
pub fn set_allocation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_allocation_id(input);
self
}
/// <p>The attribute of the IP address.</p>
pub fn attribute(mut self, inp: crate::model::AddressAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The attribute of the IP address.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::AddressAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ResetEbsDefaultKmsKeyId`.
///
/// <p>Resets the default KMS key for EBS encryption for your account in this Region
/// to the Amazon Web Services managed KMS key for EBS.</p>
/// <p>After resetting the default KMS key to the Amazon Web Services managed KMS key, you can continue to encrypt by a
/// customer managed KMS key by specifying it when you create the volume. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS encryption</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ResetEbsDefaultKmsKeyId<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reset_ebs_default_kms_key_id_input::Builder,
}
impl<C, M, R> ResetEbsDefaultKmsKeyId<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ResetEbsDefaultKmsKeyId`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ResetEbsDefaultKmsKeyIdOutput,
aws_smithy_http::result::SdkError<crate::error::ResetEbsDefaultKmsKeyIdError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ResetEbsDefaultKmsKeyIdInputOperationOutputAlias,
crate::output::ResetEbsDefaultKmsKeyIdOutput,
crate::error::ResetEbsDefaultKmsKeyIdError,
crate::input::ResetEbsDefaultKmsKeyIdInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ResetFpgaImageAttribute`.
///
/// <p>Resets the specified attribute of the specified Amazon FPGA Image (AFI) to its default value.
/// You can only reset the load permission attribute.</p>
#[derive(std::fmt::Debug)]
pub struct ResetFpgaImageAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reset_fpga_image_attribute_input::Builder,
}
impl<C, M, R> ResetFpgaImageAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ResetFpgaImageAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ResetFpgaImageAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ResetFpgaImageAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ResetFpgaImageAttributeInputOperationOutputAlias,
crate::output::ResetFpgaImageAttributeOutput,
crate::error::ResetFpgaImageAttributeError,
crate::input::ResetFpgaImageAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the AFI.</p>
pub fn fpga_image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.fpga_image_id(inp);
self
}
/// <p>The ID of the AFI.</p>
pub fn set_fpga_image_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_fpga_image_id(input);
self
}
/// <p>The attribute.</p>
pub fn attribute(mut self, inp: crate::model::ResetFpgaImageAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The attribute.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::ResetFpgaImageAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
}
/// Fluent builder constructing a request to `ResetImageAttribute`.
///
/// <p>Resets an attribute of an AMI to its default value.</p>
#[derive(std::fmt::Debug)]
pub struct ResetImageAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reset_image_attribute_input::Builder,
}
impl<C, M, R> ResetImageAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ResetImageAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ResetImageAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ResetImageAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ResetImageAttributeInputOperationOutputAlias,
crate::output::ResetImageAttributeOutput,
crate::error::ResetImageAttributeError,
crate::input::ResetImageAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The attribute to reset (currently you can only reset the launch permission attribute).</p>
pub fn attribute(mut self, inp: crate::model::ResetImageAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The attribute to reset (currently you can only reset the launch permission attribute).</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::ResetImageAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <p>The ID of the AMI.</p>
pub fn image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.image_id(inp);
self
}
/// <p>The ID of the AMI.</p>
pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_image_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `ResetInstanceAttribute`.
///
/// <p>Resets an attribute of an instance to its default value. To reset the
/// <code>kernel</code> or <code>ramdisk</code>, the instance must be in a stopped
/// state. To reset the <code>sourceDestCheck</code>, the instance can be either running or
/// stopped.</p>
/// <p>The <code>sourceDestCheck</code> attribute controls whether source/destination
/// checking is enabled. The default value is <code>true</code>, which means checking is
/// enabled. This value must be <code>false</code> for a NAT instance to perform NAT. For
/// more information, see <a href="https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html">NAT Instances</a> in the
/// <i>Amazon VPC User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ResetInstanceAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reset_instance_attribute_input::Builder,
}
impl<C, M, R> ResetInstanceAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ResetInstanceAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ResetInstanceAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ResetInstanceAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ResetInstanceAttributeInputOperationOutputAlias,
crate::output::ResetInstanceAttributeOutput,
crate::error::ResetInstanceAttributeError,
crate::input::ResetInstanceAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The attribute to reset.</p>
/// <important>
/// <p>You can only reset the following attributes: <code>kernel</code> |
/// <code>ramdisk</code> | <code>sourceDestCheck</code>. To change an instance
/// attribute, use <a>ModifyInstanceAttribute</a>.</p>
/// </important>
pub fn attribute(mut self, inp: crate::model::InstanceAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The attribute to reset.</p>
/// <important>
/// <p>You can only reset the following attributes: <code>kernel</code> |
/// <code>ramdisk</code> | <code>sourceDestCheck</code>. To change an instance
/// attribute, use <a>ModifyInstanceAttribute</a>.</p>
/// </important>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::InstanceAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
}
/// Fluent builder constructing a request to `ResetNetworkInterfaceAttribute`.
///
/// <p>Resets a network interface attribute. You can specify only one attribute at a time.</p>
#[derive(std::fmt::Debug)]
pub struct ResetNetworkInterfaceAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reset_network_interface_attribute_input::Builder,
}
impl<C, M, R> ResetNetworkInterfaceAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ResetNetworkInterfaceAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ResetNetworkInterfaceAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ResetNetworkInterfaceAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ResetNetworkInterfaceAttributeInputOperationOutputAlias,
crate::output::ResetNetworkInterfaceAttributeOutput,
crate::error::ResetNetworkInterfaceAttributeError,
crate::input::ResetNetworkInterfaceAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of the network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
/// <p>The source/destination checking attribute. Resets the value to <code>true</code>.</p>
pub fn source_dest_check(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_dest_check(inp);
self
}
/// <p>The source/destination checking attribute. Resets the value to <code>true</code>.</p>
pub fn set_source_dest_check(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_dest_check(input);
self
}
}
/// Fluent builder constructing a request to `ResetSnapshotAttribute`.
///
/// <p>Resets permission settings for the specified snapshot.</p>
/// <p>For more information about modifying snapshot permissions, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html">Share a snapshot</a> in the
/// <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct ResetSnapshotAttribute<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::reset_snapshot_attribute_input::Builder,
}
impl<C, M, R> ResetSnapshotAttribute<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ResetSnapshotAttribute`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ResetSnapshotAttributeOutput,
aws_smithy_http::result::SdkError<crate::error::ResetSnapshotAttributeError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ResetSnapshotAttributeInputOperationOutputAlias,
crate::output::ResetSnapshotAttributeOutput,
crate::error::ResetSnapshotAttributeError,
crate::input::ResetSnapshotAttributeInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The attribute to reset. Currently, only the attribute for permission to create volumes can
/// be reset.</p>
pub fn attribute(mut self, inp: crate::model::SnapshotAttributeName) -> Self {
self.inner = self.inner.attribute(inp);
self
}
/// <p>The attribute to reset. Currently, only the attribute for permission to create volumes can
/// be reset.</p>
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::SnapshotAttributeName>,
) -> Self {
self.inner = self.inner.set_attribute(input);
self
}
/// <p>The ID of the snapshot.</p>
pub fn snapshot_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.snapshot_id(inp);
self
}
/// <p>The ID of the snapshot.</p>
pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_snapshot_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `RestoreAddressToClassic`.
///
/// <p>Restores an Elastic IP address that was previously moved to the EC2-VPC platform back to the EC2-Classic platform. You cannot move an Elastic IP address that was originally allocated for use in EC2-VPC. The Elastic IP address must not be associated with an instance or network interface.</p>
#[derive(std::fmt::Debug)]
pub struct RestoreAddressToClassic<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::restore_address_to_classic_input::Builder,
}
impl<C, M, R> RestoreAddressToClassic<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RestoreAddressToClassic`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RestoreAddressToClassicOutput,
aws_smithy_http::result::SdkError<crate::error::RestoreAddressToClassicError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RestoreAddressToClassicInputOperationOutputAlias,
crate::output::RestoreAddressToClassicOutput,
crate::error::RestoreAddressToClassicError,
crate::input::RestoreAddressToClassicInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The Elastic IP address.</p>
pub fn public_ip(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.public_ip(inp);
self
}
/// <p>The Elastic IP address.</p>
pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_public_ip(input);
self
}
}
/// Fluent builder constructing a request to `RestoreManagedPrefixListVersion`.
///
/// <p>Restores the entries from a previous version of a managed prefix list to a new version of the prefix list.</p>
#[derive(std::fmt::Debug)]
pub struct RestoreManagedPrefixListVersion<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::restore_managed_prefix_list_version_input::Builder,
}
impl<C, M, R> RestoreManagedPrefixListVersion<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RestoreManagedPrefixListVersion`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RestoreManagedPrefixListVersionOutput,
aws_smithy_http::result::SdkError<crate::error::RestoreManagedPrefixListVersionError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RestoreManagedPrefixListVersionInputOperationOutputAlias,
crate::output::RestoreManagedPrefixListVersionOutput,
crate::error::RestoreManagedPrefixListVersionError,
crate::input::RestoreManagedPrefixListVersionInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the prefix list.</p>
pub fn prefix_list_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.prefix_list_id(inp);
self
}
/// <p>The ID of the prefix list.</p>
pub fn set_prefix_list_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_prefix_list_id(input);
self
}
/// <p>The version to restore.</p>
pub fn previous_version(mut self, inp: i64) -> Self {
self.inner = self.inner.previous_version(inp);
self
}
/// <p>The version to restore.</p>
pub fn set_previous_version(mut self, input: std::option::Option<i64>) -> Self {
self.inner = self.inner.set_previous_version(input);
self
}
/// <p>The current version number for the prefix list.</p>
pub fn current_version(mut self, inp: i64) -> Self {
self.inner = self.inner.current_version(inp);
self
}
/// <p>The current version number for the prefix list.</p>
pub fn set_current_version(mut self, input: std::option::Option<i64>) -> Self {
self.inner = self.inner.set_current_version(input);
self
}
}
/// Fluent builder constructing a request to `RevokeClientVpnIngress`.
///
/// <p>Removes an ingress authorization rule from a Client VPN endpoint. </p>
#[derive(std::fmt::Debug)]
pub struct RevokeClientVpnIngress<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::revoke_client_vpn_ingress_input::Builder,
}
impl<C, M, R> RevokeClientVpnIngress<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RevokeClientVpnIngress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RevokeClientVpnIngressOutput,
aws_smithy_http::result::SdkError<crate::error::RevokeClientVpnIngressError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RevokeClientVpnIngressInputOperationOutputAlias,
crate::output::RevokeClientVpnIngressOutput,
crate::error::RevokeClientVpnIngressError,
crate::input::RevokeClientVpnIngressInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint with which the authorization rule is associated.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint with which the authorization rule is associated.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <p>The IPv4 address range, in CIDR notation, of the network for which access is being removed.</p>
pub fn target_network_cidr(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.target_network_cidr(inp);
self
}
/// <p>The IPv4 address range, in CIDR notation, of the network for which access is being removed.</p>
pub fn set_target_network_cidr(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_target_network_cidr(input);
self
}
/// <p>The ID of the Active Directory group for which to revoke access. </p>
pub fn access_group_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.access_group_id(inp);
self
}
/// <p>The ID of the Active Directory group for which to revoke access. </p>
pub fn set_access_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_access_group_id(input);
self
}
/// <p>Indicates whether access should be revoked for all clients.</p>
pub fn revoke_all_groups(mut self, inp: bool) -> Self {
self.inner = self.inner.revoke_all_groups(inp);
self
}
/// <p>Indicates whether access should be revoked for all clients.</p>
pub fn set_revoke_all_groups(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_revoke_all_groups(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `RevokeSecurityGroupEgress`.
///
/// <p>[VPC only] Removes the specified outbound (egress) rules from a security group for EC2-VPC.
/// This action does not apply to security groups for use in EC2-Classic.</p>
///
/// <p>You can specify rules using either rule IDs or security group rule properties. If you use
/// rule properties, the values that you specify (for example, ports) must match the existing rule's
/// values exactly. Each rule has a protocol, from and to ports, and destination (CIDR range,
/// security group, or prefix list). For the TCP and UDP protocols, you must also specify the
/// destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type
/// and code. If the security group rule has a description, you do not need to specify the description
/// to revoke the rule.</p>
/// <p>[Default VPC] If the values you specify do not match the existing rule's values, no error is
/// returned, and the output describes the security group rules that were not revoked.</p>
/// <p>Amazon Web Services recommends that you describe the security group to verify that the rules were removed.</p>
///
/// <p>Rule changes are propagated to instances within the security group as quickly as possible. However,
/// a small delay might occur.</p>
#[derive(std::fmt::Debug)]
pub struct RevokeSecurityGroupEgress<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::revoke_security_group_egress_input::Builder,
}
impl<C, M, R> RevokeSecurityGroupEgress<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RevokeSecurityGroupEgress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RevokeSecurityGroupEgressOutput,
aws_smithy_http::result::SdkError<crate::error::RevokeSecurityGroupEgressError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RevokeSecurityGroupEgressInputOperationOutputAlias,
crate::output::RevokeSecurityGroupEgressOutput,
crate::error::RevokeSecurityGroupEgressError,
crate::input::RevokeSecurityGroupEgressInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the security group.</p>
pub fn group_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_id(inp);
self
}
/// <p>The ID of the security group.</p>
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_id(input);
self
}
/// Appends an item to `IpPermissions`.
///
/// To override the contents of this collection use [`set_ip_permissions`](Self::set_ip_permissions).
///
/// <p>The sets of IP permissions. You can't specify a destination security group and a CIDR IP address range in the same set of permissions.</p>
pub fn ip_permissions(mut self, inp: impl Into<crate::model::IpPermission>) -> Self {
self.inner = self.inner.ip_permissions(inp);
self
}
/// <p>The sets of IP permissions. You can't specify a destination security group and a CIDR IP address range in the same set of permissions.</p>
pub fn set_ip_permissions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::IpPermission>>,
) -> Self {
self.inner = self.inner.set_ip_permissions(input);
self
}
/// Appends an item to `SecurityGroupRuleIds`.
///
/// To override the contents of this collection use [`set_security_group_rule_ids`](Self::set_security_group_rule_ids).
///
/// <p>The IDs of the security group rules.</p>
pub fn security_group_rule_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.security_group_rule_ids(inp);
self
}
/// <p>The IDs of the security group rules.</p>
pub fn set_security_group_rule_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_security_group_rule_ids(input);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the CIDR.</p>
pub fn cidr_ip(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr_ip(inp);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the CIDR.</p>
pub fn set_cidr_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr_ip(input);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the port.</p>
pub fn from_port(mut self, inp: i32) -> Self {
self.inner = self.inner.from_port(inp);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the port.</p>
pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_from_port(input);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the protocol name or
/// number.</p>
pub fn ip_protocol(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ip_protocol(inp);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the protocol name or
/// number.</p>
pub fn set_ip_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_ip_protocol(input);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the port.</p>
pub fn to_port(mut self, inp: i32) -> Self {
self.inner = self.inner.to_port(inp);
self
}
/// <p>Not supported. Use a set of IP permissions to specify the port.</p>
pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_to_port(input);
self
}
/// <p>Not supported. Use a set of IP permissions to specify a
/// destination security group.</p>
pub fn source_security_group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_security_group_name(inp);
self
}
/// <p>Not supported. Use a set of IP permissions to specify a
/// destination security group.</p>
pub fn set_source_security_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_security_group_name(input);
self
}
/// <p>Not supported. Use a set of IP permissions to specify a destination security
/// group.</p>
pub fn source_security_group_owner_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.source_security_group_owner_id(inp);
self
}
/// <p>Not supported. Use a set of IP permissions to specify a destination security
/// group.</p>
pub fn set_source_security_group_owner_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_security_group_owner_id(input);
self
}
}
/// Fluent builder constructing a request to `RevokeSecurityGroupIngress`.
///
/// <p>Removes the specified inbound (ingress) rules from a security group.</p>
///
/// <p>You can specify rules using either rule IDs or security group rule properties. If you use
/// rule properties, the values that you specify (for example, ports) must match the existing rule's
/// values exactly. Each rule has a protocol, from and to ports, and source (CIDR range,
/// security group, or prefix list). For the TCP and UDP protocols, you must also specify the
/// destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type
/// and code. If the security group rule has a description, you do not need to specify the description
/// to revoke the rule.</p>
/// <p>[EC2-Classic, default VPC] If the values you specify do not match the existing rule's values, no error is
/// returned, and the output describes the security group rules that were not revoked.</p>
/// <p>Amazon Web Services recommends that you describe the security group to verify that the rules were removed.</p>
///
/// <p>Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.</p>
#[derive(std::fmt::Debug)]
pub struct RevokeSecurityGroupIngress<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::revoke_security_group_ingress_input::Builder,
}
impl<C, M, R> RevokeSecurityGroupIngress<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RevokeSecurityGroupIngress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RevokeSecurityGroupIngressOutput,
aws_smithy_http::result::SdkError<crate::error::RevokeSecurityGroupIngressError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RevokeSecurityGroupIngressInputOperationOutputAlias,
crate::output::RevokeSecurityGroupIngressOutput,
crate::error::RevokeSecurityGroupIngressError,
crate::input::RevokeSecurityGroupIngressInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The CIDR IP address range. You can't specify this parameter when specifying a source security group.</p>
pub fn cidr_ip(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr_ip(inp);
self
}
/// <p>The CIDR IP address range. You can't specify this parameter when specifying a source security group.</p>
pub fn set_cidr_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr_ip(input);
self
}
/// <p>The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number,
/// use <code>-1</code> to specify all ICMP types.</p>
pub fn from_port(mut self, inp: i32) -> Self {
self.inner = self.inner.from_port(inp);
self
}
/// <p>The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number,
/// use <code>-1</code> to specify all ICMP types.</p>
pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_from_port(input);
self
}
/// <p>The ID of the security group. You must specify either the security group ID or the
/// security group name in the request. For security groups in a nondefault VPC, you must
/// specify the security group ID.</p>
pub fn group_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_id(inp);
self
}
/// <p>The ID of the security group. You must specify either the security group ID or the
/// security group name in the request. For security groups in a nondefault VPC, you must
/// specify the security group ID.</p>
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_id(input);
self
}
/// <p>[EC2-Classic, default VPC] The name of the security group. You must specify either the
/// security group ID or the security group name in the request.</p>
pub fn group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_name(inp);
self
}
/// <p>[EC2-Classic, default VPC] The name of the security group. You must specify either the
/// security group ID or the security group name in the request.</p>
pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_name(input);
self
}
/// Appends an item to `IpPermissions`.
///
/// To override the contents of this collection use [`set_ip_permissions`](Self::set_ip_permissions).
///
/// <p>The sets of IP permissions. You can't specify a source security group and a CIDR IP address range in the same set of permissions.</p>
pub fn ip_permissions(mut self, inp: impl Into<crate::model::IpPermission>) -> Self {
self.inner = self.inner.ip_permissions(inp);
self
}
/// <p>The sets of IP permissions. You can't specify a source security group and a CIDR IP address range in the same set of permissions.</p>
pub fn set_ip_permissions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::IpPermission>>,
) -> Self {
self.inner = self.inner.set_ip_permissions(input);
self
}
/// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>) or number
/// (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>).
/// Use <code>-1</code> to specify all.</p>
pub fn ip_protocol(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ip_protocol(inp);
self
}
/// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>) or number
/// (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>).
/// Use <code>-1</code> to specify all.</p>
pub fn set_ip_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_ip_protocol(input);
self
}
/// <p>[EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. For EC2-VPC, the source security group must be in the same VPC. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.</p>
pub fn source_security_group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.source_security_group_name(inp);
self
}
/// <p>[EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. For EC2-VPC, the source security group must be in the same VPC. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.</p>
pub fn set_source_security_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_security_group_name(input);
self
}
/// <p>[EC2-Classic] The Amazon Web Services account ID of the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.</p>
pub fn source_security_group_owner_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.source_security_group_owner_id(inp);
self
}
/// <p>[EC2-Classic] The Amazon Web Services account ID of the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.</p>
pub fn set_source_security_group_owner_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_source_security_group_owner_id(input);
self
}
/// <p>The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number,
/// use <code>-1</code> to specify all ICMP codes for the ICMP type.</p>
pub fn to_port(mut self, inp: i32) -> Self {
self.inner = self.inner.to_port(inp);
self
}
/// <p>The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number,
/// use <code>-1</code> to specify all ICMP codes for the ICMP type.</p>
pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_to_port(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `SecurityGroupRuleIds`.
///
/// To override the contents of this collection use [`set_security_group_rule_ids`](Self::set_security_group_rule_ids).
///
/// <p>The IDs of the security group rules.</p>
pub fn security_group_rule_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.security_group_rule_ids(inp);
self
}
/// <p>The IDs of the security group rules.</p>
pub fn set_security_group_rule_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_security_group_rule_ids(input);
self
}
}
/// Fluent builder constructing a request to `RunInstances`.
///
/// <p>Launches the specified number of instances using an AMI for which you have
/// permissions.</p>
/// <p>You can specify a number of options, or leave the default options. The following rules
/// apply:</p>
/// <ul>
/// <li>
/// <p>[EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from
/// your default VPC for you. If you don't have a default VPC, you must specify a
/// subnet ID in the request.</p>
/// </li>
/// <li>
/// <p>[EC2-Classic] If don't specify an Availability Zone, we choose one for
/// you.</p>
/// </li>
/// <li>
/// <p>Some instance types must be launched into a VPC. If you do not have a default
/// VPC, or if you do not specify a subnet ID, the request fails. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html#vpc-only-instance-types">Instance types available only in a VPC</a>.</p>
/// </li>
/// <li>
/// <p>[EC2-VPC] All instances have a network interface with a primary private IPv4
/// address. If you don't specify this address, we choose one from the IPv4 range of
/// your subnet.</p>
/// </li>
/// <li>
/// <p>Not all instance types support IPv6 addresses. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance
/// types</a>.</p>
/// </li>
/// <li>
/// <p>If you don't specify a security group ID, we use the default security group.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html">Security
/// groups</a>.</p>
/// </li>
/// <li>
/// <p>If any of the AMIs have a product code attached for which the user has not
/// subscribed, the request fails.</p>
/// </li>
/// </ul>
/// <p>You can create a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html">launch template</a>,
/// which is a resource that contains the parameters to launch an instance. When you launch
/// an instance using <a>RunInstances</a>, you can specify the launch template
/// instead of specifying the launch parameters.</p>
/// <p>To ensure faster instance launches, break up large requests into smaller batches. For
/// example, create five separate launch requests for 100 instances each instead of one
/// launch request for 500 instances.</p>
/// <p>An instance is ready for you to use when it's in the <code>running</code> state. You
/// can check the state of your instance using <a>DescribeInstances</a>. You can
/// tag instances and EBS volumes during launch, after launch, or both. For more
/// information, see <a>CreateTags</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging your Amazon EC2
/// resources</a>.</p>
/// <p>Linux instances have access to the public key of the key pair at boot. You can use
/// this key to provide secure access to the instance. Amazon EC2 public images use this
/// feature to provide secure access without passwords. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html">Key
/// pairs</a>.</p>
/// <p>For troubleshooting, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html">What to do if
/// an instance immediately terminates</a>, and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html">Troubleshooting connecting to your instance</a>.</p>
#[derive(std::fmt::Debug)]
pub struct RunInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::run_instances_input::Builder,
}
impl<C, M, R> RunInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RunInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RunInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::RunInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RunInstancesInputOperationOutputAlias,
crate::output::RunInstancesOutput,
crate::error::RunInstancesError,
crate::input::RunInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `BlockDeviceMappings`.
///
/// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
///
/// <p>The block device mapping, which defines the EBS volumes and instance store
/// volumes to attach to the instance at launch. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block device mappings</a>
/// in the <i>Amazon EC2 User Guide</i>.</p>
pub fn block_device_mappings(
mut self,
inp: impl Into<crate::model::BlockDeviceMapping>,
) -> Self {
self.inner = self.inner.block_device_mappings(inp);
self
}
/// <p>The block device mapping, which defines the EBS volumes and instance store
/// volumes to attach to the instance at launch. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block device mappings</a>
/// in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_block_device_mappings(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
) -> Self {
self.inner = self.inner.set_block_device_mappings(input);
self
}
/// <p>The ID of the AMI. An AMI ID is required to launch an instance and must be
/// specified here or in a launch template.</p>
pub fn image_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.image_id(inp);
self
}
/// <p>The ID of the AMI. An AMI ID is required to launch an instance and must be
/// specified here or in a launch template.</p>
pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_image_id(input);
self
}
/// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
/// <p>Default: <code>m1.small</code>
/// </p>
pub fn instance_type(mut self, inp: crate::model::InstanceType) -> Self {
self.inner = self.inner.instance_type(inp);
self
}
/// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
/// <p>Default: <code>m1.small</code>
/// </p>
pub fn set_instance_type(
mut self,
input: std::option::Option<crate::model::InstanceType>,
) -> Self {
self.inner = self.inner.set_instance_type(input);
self
}
/// <p>[EC2-VPC] The number of IPv6 addresses to associate with the primary network
/// interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You
/// cannot specify this option and the option to assign specific IPv6 addresses in the same
/// request. You can specify this option if you've specified a minimum number of instances
/// to launch.</p>
/// <p>You cannot specify this option and the network interfaces option in the same
/// request.</p>
pub fn ipv6_address_count(mut self, inp: i32) -> Self {
self.inner = self.inner.ipv6_address_count(inp);
self
}
/// <p>[EC2-VPC] The number of IPv6 addresses to associate with the primary network
/// interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You
/// cannot specify this option and the option to assign specific IPv6 addresses in the same
/// request. You can specify this option if you've specified a minimum number of instances
/// to launch.</p>
/// <p>You cannot specify this option and the network interfaces option in the same
/// request.</p>
pub fn set_ipv6_address_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_ipv6_address_count(input);
self
}
/// Appends an item to `Ipv6Addresses`.
///
/// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
///
/// <p>[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the
/// primary network interface. You cannot specify this option and the option to assign a
/// number of IPv6 addresses in the same request. You cannot specify this option if you've
/// specified a minimum number of instances to launch.</p>
/// <p>You cannot specify this option and the network interfaces option in the same
/// request.</p>
pub fn ipv6_addresses(mut self, inp: impl Into<crate::model::InstanceIpv6Address>) -> Self {
self.inner = self.inner.ipv6_addresses(inp);
self
}
/// <p>[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the
/// primary network interface. You cannot specify this option and the option to assign a
/// number of IPv6 addresses in the same request. You cannot specify this option if you've
/// specified a minimum number of instances to launch.</p>
/// <p>You cannot specify this option and the network interfaces option in the same
/// request.</p>
pub fn set_ipv6_addresses(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Address>>,
) -> Self {
self.inner = self.inner.set_ipv6_addresses(input);
self
}
/// <p>The ID of the kernel.</p>
/// <important>
/// <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
/// </important>
pub fn kernel_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.kernel_id(inp);
self
}
/// <p>The ID of the kernel.</p>
/// <important>
/// <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
/// </important>
pub fn set_kernel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_kernel_id(input);
self
}
/// <p>The name of the key pair. You can create a key pair using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> or
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p>
/// <important>
/// <p>If you do not specify a key pair, you can't connect to the instance unless you
/// choose an AMI that is configured to allow users another way to log in.</p>
/// </important>
pub fn key_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.key_name(inp);
self
}
/// <p>The name of the key pair. You can create a key pair using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> or
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p>
/// <important>
/// <p>If you do not specify a key pair, you can't connect to the instance unless you
/// choose an AMI that is configured to allow users another way to log in.</p>
/// </important>
pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_key_name(input);
self
}
/// <p>The maximum number of instances to launch. If you specify more instances than Amazon
/// EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible
/// number of instances above <code>MinCount</code>.</p>
/// <p>Constraints: Between 1 and the maximum number you're allowed for the specified
/// instance type. For more information about the default limits, and how to request an
/// increase, see <a href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How many instances can I
/// run in Amazon EC2</a> in the Amazon EC2 FAQ.</p>
pub fn max_count(mut self, inp: i32) -> Self {
self.inner = self.inner.max_count(inp);
self
}
/// <p>The maximum number of instances to launch. If you specify more instances than Amazon
/// EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible
/// number of instances above <code>MinCount</code>.</p>
/// <p>Constraints: Between 1 and the maximum number you're allowed for the specified
/// instance type. For more information about the default limits, and how to request an
/// increase, see <a href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How many instances can I
/// run in Amazon EC2</a> in the Amazon EC2 FAQ.</p>
pub fn set_max_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_count(input);
self
}
/// <p>The minimum number of instances to launch. If you specify a minimum that is more
/// instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2
/// launches no instances.</p>
/// <p>Constraints: Between 1 and the maximum number you're allowed for the specified
/// instance type. For more information about the default limits, and how to request an
/// increase, see <a href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How many instances can I
/// run in Amazon EC2</a> in the Amazon EC2 General FAQ.</p>
pub fn min_count(mut self, inp: i32) -> Self {
self.inner = self.inner.min_count(inp);
self
}
/// <p>The minimum number of instances to launch. If you specify a minimum that is more
/// instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2
/// launches no instances.</p>
/// <p>Constraints: Between 1 and the maximum number you're allowed for the specified
/// instance type. For more information about the default limits, and how to request an
/// increase, see <a href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How many instances can I
/// run in Amazon EC2</a> in the Amazon EC2 General FAQ.</p>
pub fn set_min_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_min_count(input);
self
}
/// <p>Specifies whether detailed monitoring is enabled for the instance.</p>
pub fn monitoring(mut self, inp: crate::model::RunInstancesMonitoringEnabled) -> Self {
self.inner = self.inner.monitoring(inp);
self
}
/// <p>Specifies whether detailed monitoring is enabled for the instance.</p>
pub fn set_monitoring(
mut self,
input: std::option::Option<crate::model::RunInstancesMonitoringEnabled>,
) -> Self {
self.inner = self.inner.set_monitoring(input);
self
}
/// <p>The placement for the instance.</p>
pub fn placement(mut self, inp: crate::model::Placement) -> Self {
self.inner = self.inner.placement(inp);
self
}
/// <p>The placement for the instance.</p>
pub fn set_placement(
mut self,
input: std::option::Option<crate::model::Placement>,
) -> Self {
self.inner = self.inner.set_placement(input);
self
}
/// <p>The ID of the RAM disk to select. Some kernels require additional drivers at launch.
/// Check the kernel requirements for information about whether you need to specify a RAM
/// disk. To find kernel requirements, go to the Amazon Web Services Resource Center and search for the
/// kernel ID.</p>
/// <important>
/// <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
/// </important>
pub fn ramdisk_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ramdisk_id(inp);
self
}
/// <p>The ID of the RAM disk to select. Some kernels require additional drivers at launch.
/// Check the kernel requirements for information about whether you need to specify a RAM
/// disk. To find kernel requirements, go to the Amazon Web Services Resource Center and search for the
/// kernel ID.</p>
/// <important>
/// <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
/// </important>
pub fn set_ramdisk_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_ramdisk_id(input);
self
}
/// Appends an item to `SecurityGroupIds`.
///
/// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
///
/// <p>The IDs of the security groups. You can create a security group using
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>.</p>
/// <p>If you specify a network interface, you must specify any security groups as part of the network interface.</p>
pub fn security_group_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.security_group_ids(inp);
self
}
/// <p>The IDs of the security groups. You can create a security group using
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>.</p>
/// <p>If you specify a network interface, you must specify any security groups as part of the network interface.</p>
pub fn set_security_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_security_group_ids(input);
self
}
/// Appends an item to `SecurityGroups`.
///
/// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
///
/// <p>[EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you
/// must use security group IDs instead.</p>
/// <p>If you specify a network interface, you must specify any security groups as part of
/// the network interface.</p>
/// <p>Default: Amazon EC2 uses the default security group.</p>
pub fn security_groups(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.security_groups(inp);
self
}
/// <p>[EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you
/// must use security group IDs instead.</p>
/// <p>If you specify a network interface, you must specify any security groups as part of
/// the network interface.</p>
/// <p>Default: Amazon EC2 uses the default security group.</p>
pub fn set_security_groups(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_security_groups(input);
self
}
/// <p>[EC2-VPC] The ID of the subnet to launch the instance into.</p>
/// <p>If you specify a network interface, you must specify any subnets as part of the network interface.</p>
pub fn subnet_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.subnet_id(inp);
self
}
/// <p>[EC2-VPC] The ID of the subnet to launch the instance into.</p>
/// <p>If you specify a network interface, you must specify any subnets as part of the network interface.</p>
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_subnet_id(input);
self
}
/// <p>The user data to make available to the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Running commands
/// on your Linux instance at launch</a> (Linux) and <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data">Adding User Data</a> (Windows). If you are using a command line tool,
/// base64-encoding is performed for you, and you can load the text from a file. Otherwise,
/// you must provide base64-encoded text. User data is limited to 16 KB.</p>
pub fn user_data(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.user_data(inp);
self
}
/// <p>The user data to make available to the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Running commands
/// on your Linux instance at launch</a> (Linux) and <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data">Adding User Data</a> (Windows). If you are using a command line tool,
/// base64-encoding is performed for you, and you can load the text from a file. Otherwise,
/// you must provide base64-encoded text. User data is limited to 16 KB.</p>
pub fn set_user_data(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_user_data(input);
self
}
/// <p>Reserved.</p>
pub fn additional_info(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.additional_info(inp);
self
}
/// <p>Reserved.</p>
pub fn set_additional_info(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_additional_info(input);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the
/// request. If you do not specify a client token, a randomly generated token is used for the
/// request to ensure idempotency.</p>
///
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
/// <p>Constraints: Maximum 64 ASCII characters</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the
/// request. If you do not specify a client token, a randomly generated token is used for the
/// request to ensure idempotency.</p>
///
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// Idempotency</a>.</p>
/// <p>Constraints: Maximum 64 ASCII characters</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>If you set this parameter to <code>true</code>, you can't terminate the instance using
/// the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch,
/// use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html">ModifyInstanceAttribute</a>.
/// Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to
/// <code>terminate</code>, you can terminate the instance by running the shutdown
/// command from the instance.</p>
/// <p>Default: <code>false</code>
/// </p>
pub fn disable_api_termination(mut self, inp: bool) -> Self {
self.inner = self.inner.disable_api_termination(inp);
self
}
/// <p>If you set this parameter to <code>true</code>, you can't terminate the instance using
/// the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch,
/// use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html">ModifyInstanceAttribute</a>.
/// Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to
/// <code>terminate</code>, you can terminate the instance by running the shutdown
/// command from the instance.</p>
/// <p>Default: <code>false</code>
/// </p>
pub fn set_disable_api_termination(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_disable_api_termination(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization
/// provides dedicated throughput to Amazon EBS and an optimized configuration stack to
/// provide optimal Amazon EBS I/O performance. This optimization isn't available with all
/// instance types. Additional usage charges apply when using an EBS-optimized
/// instance.</p>
/// <p>Default: <code>false</code>
/// </p>
pub fn ebs_optimized(mut self, inp: bool) -> Self {
self.inner = self.inner.ebs_optimized(inp);
self
}
/// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization
/// provides dedicated throughput to Amazon EBS and an optimized configuration stack to
/// provide optimal Amazon EBS I/O performance. This optimization isn't available with all
/// instance types. Additional usage charges apply when using an EBS-optimized
/// instance.</p>
/// <p>Default: <code>false</code>
/// </p>
pub fn set_ebs_optimized(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_ebs_optimized(input);
self
}
/// <p>The name or Amazon Resource Name (ARN) of an IAM instance profile.</p>
pub fn iam_instance_profile(
mut self,
inp: crate::model::IamInstanceProfileSpecification,
) -> Self {
self.inner = self.inner.iam_instance_profile(inp);
self
}
/// <p>The name or Amazon Resource Name (ARN) of an IAM instance profile.</p>
pub fn set_iam_instance_profile(
mut self,
input: std::option::Option<crate::model::IamInstanceProfileSpecification>,
) -> Self {
self.inner = self.inner.set_iam_instance_profile(input);
self
}
/// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the
/// instance (using the operating system command for system shutdown).</p>
/// <p>Default: <code>stop</code>
/// </p>
pub fn instance_initiated_shutdown_behavior(
mut self,
inp: crate::model::ShutdownBehavior,
) -> Self {
self.inner = self.inner.instance_initiated_shutdown_behavior(inp);
self
}
/// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the
/// instance (using the operating system command for system shutdown).</p>
/// <p>Default: <code>stop</code>
/// </p>
pub fn set_instance_initiated_shutdown_behavior(
mut self,
input: std::option::Option<crate::model::ShutdownBehavior>,
) -> Self {
self.inner = self.inner.set_instance_initiated_shutdown_behavior(input);
self
}
/// Appends an item to `NetworkInterfaces`.
///
/// To override the contents of this collection use [`set_network_interfaces`](Self::set_network_interfaces).
///
/// <p>The network interfaces to associate with the instance. If you specify a network interface,
/// you must specify any security groups and subnets as part of the network interface.</p>
pub fn network_interfaces(
mut self,
inp: impl Into<crate::model::InstanceNetworkInterfaceSpecification>,
) -> Self {
self.inner = self.inner.network_interfaces(inp);
self
}
/// <p>The network interfaces to associate with the instance. If you specify a network interface,
/// you must specify any security groups and subnets as part of the network interface.</p>
pub fn set_network_interfaces(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::InstanceNetworkInterfaceSpecification>,
>,
) -> Self {
self.inner = self.inner.set_network_interfaces(input);
self
}
/// <p>[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address
/// range of the subnet.</p>
/// <p>Only one private IP address can be designated as primary. You can't specify this
/// option if you've specified the option to designate a private IP address as the primary
/// IP address in a network interface specification. You cannot specify this option if
/// you're launching more than one instance in the request.</p>
/// <p>You cannot specify this option and the network interfaces option in the same
/// request.</p>
pub fn private_ip_address(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.private_ip_address(inp);
self
}
/// <p>[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address
/// range of the subnet.</p>
/// <p>Only one private IP address can be designated as primary. You can't specify this
/// option if you've specified the option to designate a private IP address as the primary
/// IP address in a network interface specification. You cannot specify this option if
/// you're launching more than one instance in the request.</p>
/// <p>You cannot specify this option and the network interfaces option in the same
/// request.</p>
pub fn set_private_ip_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_private_ip_address(input);
self
}
/// Appends an item to `ElasticGpuSpecification`.
///
/// To override the contents of this collection use [`set_elastic_gpu_specification`](Self::set_elastic_gpu_specification).
///
/// <p>An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that
/// you can attach to your Windows instance to accelerate the graphics performance of your
/// applications. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html">Amazon EC2 Elastic
/// GPUs</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn elastic_gpu_specification(
mut self,
inp: impl Into<crate::model::ElasticGpuSpecification>,
) -> Self {
self.inner = self.inner.elastic_gpu_specification(inp);
self
}
/// <p>An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that
/// you can attach to your Windows instance to accelerate the graphics performance of your
/// applications. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html">Amazon EC2 Elastic
/// GPUs</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_elastic_gpu_specification(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ElasticGpuSpecification>>,
) -> Self {
self.inner = self.inner.set_elastic_gpu_specification(input);
self
}
/// Appends an item to `ElasticInferenceAccelerators`.
///
/// To override the contents of this collection use [`set_elastic_inference_accelerators`](Self::set_elastic_inference_accelerators).
///
/// <p>An elastic inference accelerator to associate with the instance. Elastic inference
/// accelerators are a resource you can attach to your Amazon EC2 instances to accelerate
/// your Deep Learning (DL) inference workloads.</p>
/// <p>You cannot specify accelerators from different generations in the same request.</p>
pub fn elastic_inference_accelerators(
mut self,
inp: impl Into<crate::model::ElasticInferenceAccelerator>,
) -> Self {
self.inner = self.inner.elastic_inference_accelerators(inp);
self
}
/// <p>An elastic inference accelerator to associate with the instance. Elastic inference
/// accelerators are a resource you can attach to your Amazon EC2 instances to accelerate
/// your Deep Learning (DL) inference workloads.</p>
/// <p>You cannot specify accelerators from different generations in the same request.</p>
pub fn set_elastic_inference_accelerators(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ElasticInferenceAccelerator>>,
) -> Self {
self.inner = self.inner.set_elastic_inference_accelerators(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the resources during launch. You can only tag instances and
/// volumes on launch. The specified tags are applied to all instances or volumes that are
/// created during launch. To tag a resource after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply to the resources during launch. You can only tag instances and
/// volumes on launch. The specified tags are applied to all instances or volumes that are
/// created during launch. To tag a resource after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>The launch template to use to launch the instances. Any parameters that you specify in
/// <a>RunInstances</a> override the same parameters in the launch template.
/// You can specify either the name or ID of a launch template, but not both.</p>
pub fn launch_template(mut self, inp: crate::model::LaunchTemplateSpecification) -> Self {
self.inner = self.inner.launch_template(inp);
self
}
/// <p>The launch template to use to launch the instances. Any parameters that you specify in
/// <a>RunInstances</a> override the same parameters in the launch template.
/// You can specify either the name or ID of a launch template, but not both.</p>
pub fn set_launch_template(
mut self,
input: std::option::Option<crate::model::LaunchTemplateSpecification>,
) -> Self {
self.inner = self.inner.set_launch_template(input);
self
}
/// <p>The market (purchasing) option for the instances.</p>
/// <p>For <a>RunInstances</a>, persistent Spot Instance requests are
/// only supported when <b>InstanceInterruptionBehavior</b> is set
/// to either <code>hibernate</code> or <code>stop</code>.</p>
pub fn instance_market_options(
mut self,
inp: crate::model::InstanceMarketOptionsRequest,
) -> Self {
self.inner = self.inner.instance_market_options(inp);
self
}
/// <p>The market (purchasing) option for the instances.</p>
/// <p>For <a>RunInstances</a>, persistent Spot Instance requests are
/// only supported when <b>InstanceInterruptionBehavior</b> is set
/// to either <code>hibernate</code> or <code>stop</code>.</p>
pub fn set_instance_market_options(
mut self,
input: std::option::Option<crate::model::InstanceMarketOptionsRequest>,
) -> Self {
self.inner = self.inner.set_instance_market_options(input);
self
}
/// <p>The credit option for CPU usage of the burstable performance instance. Valid values
/// are <code>standard</code> and <code>unlimited</code>. To change this attribute after
/// launch, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html">
/// ModifyInstanceCreditSpecification</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable
/// performance instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// <p>Default: <code>standard</code> (T2 instances) or <code>unlimited</code> (T3/T3a
/// instances)</p>
///
/// <p>For T3 instances with <code>host</code> tenancy, only <code>standard</code> is
/// supported.</p>
pub fn credit_specification(
mut self,
inp: crate::model::CreditSpecificationRequest,
) -> Self {
self.inner = self.inner.credit_specification(inp);
self
}
/// <p>The credit option for CPU usage of the burstable performance instance. Valid values
/// are <code>standard</code> and <code>unlimited</code>. To change this attribute after
/// launch, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html">
/// ModifyInstanceCreditSpecification</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable
/// performance instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// <p>Default: <code>standard</code> (T2 instances) or <code>unlimited</code> (T3/T3a
/// instances)</p>
///
/// <p>For T3 instances with <code>host</code> tenancy, only <code>standard</code> is
/// supported.</p>
pub fn set_credit_specification(
mut self,
input: std::option::Option<crate::model::CreditSpecificationRequest>,
) -> Self {
self.inner = self.inner.set_credit_specification(input);
self
}
/// <p>The CPU options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing CPU options</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn cpu_options(mut self, inp: crate::model::CpuOptionsRequest) -> Self {
self.inner = self.inner.cpu_options(inp);
self
}
/// <p>The CPU options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing CPU options</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_cpu_options(
mut self,
input: std::option::Option<crate::model::CpuOptionsRequest>,
) -> Self {
self.inner = self.inner.set_cpu_options(input);
self
}
/// <p>Information about the Capacity Reservation targeting option. If you do not specify this parameter, the
/// instance's Capacity Reservation preference defaults to <code>open</code>, which enables
/// it to run in any open Capacity Reservation that has matching attributes (instance type,
/// platform, Availability Zone).</p>
pub fn capacity_reservation_specification(
mut self,
inp: crate::model::CapacityReservationSpecification,
) -> Self {
self.inner = self.inner.capacity_reservation_specification(inp);
self
}
/// <p>Information about the Capacity Reservation targeting option. If you do not specify this parameter, the
/// instance's Capacity Reservation preference defaults to <code>open</code>, which enables
/// it to run in any open Capacity Reservation that has matching attributes (instance type,
/// platform, Availability Zone).</p>
pub fn set_capacity_reservation_specification(
mut self,
input: std::option::Option<crate::model::CapacityReservationSpecification>,
) -> Self {
self.inner = self.inner.set_capacity_reservation_specification(input);
self
}
/// <p>Indicates whether an instance is enabled for hibernation. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate
/// your instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// <p>You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same instance.</p>
pub fn hibernation_options(mut self, inp: crate::model::HibernationOptionsRequest) -> Self {
self.inner = self.inner.hibernation_options(inp);
self
}
/// <p>Indicates whether an instance is enabled for hibernation. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate
/// your instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// <p>You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same instance.</p>
pub fn set_hibernation_options(
mut self,
input: std::option::Option<crate::model::HibernationOptionsRequest>,
) -> Self {
self.inner = self.inner.set_hibernation_options(input);
self
}
/// Appends an item to `LicenseSpecifications`.
///
/// To override the contents of this collection use [`set_license_specifications`](Self::set_license_specifications).
///
/// <p>The license configurations.</p>
pub fn license_specifications(
mut self,
inp: impl Into<crate::model::LicenseConfigurationRequest>,
) -> Self {
self.inner = self.inner.license_specifications(inp);
self
}
/// <p>The license configurations.</p>
pub fn set_license_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::LicenseConfigurationRequest>>,
) -> Self {
self.inner = self.inner.set_license_specifications(input);
self
}
/// <p>The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a>.</p>
pub fn metadata_options(
mut self,
inp: crate::model::InstanceMetadataOptionsRequest,
) -> Self {
self.inner = self.inner.metadata_options(inp);
self
}
/// <p>The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a>.</p>
pub fn set_metadata_options(
mut self,
input: std::option::Option<crate::model::InstanceMetadataOptionsRequest>,
) -> Self {
self.inner = self.inner.set_metadata_options(input);
self
}
/// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information,
/// see <a href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html">
/// What is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro Enclaves User Guide</i>.</p>
/// <p>You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.</p>
pub fn enclave_options(mut self, inp: crate::model::EnclaveOptionsRequest) -> Self {
self.inner = self.inner.enclave_options(inp);
self
}
/// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information,
/// see <a href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html">
/// What is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro Enclaves User Guide</i>.</p>
/// <p>You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.</p>
pub fn set_enclave_options(
mut self,
input: std::option::Option<crate::model::EnclaveOptionsRequest>,
) -> Self {
self.inner = self.inner.set_enclave_options(input);
self
}
}
/// Fluent builder constructing a request to `RunScheduledInstances`.
///
/// <p>Launches the specified Scheduled Instances.</p>
/// <p>Before you can launch a Scheduled Instance, you must purchase it and obtain an identifier using <a>PurchaseScheduledInstances</a>.</p>
/// <p>You must launch a Scheduled Instance during its scheduled time period. You can't stop or reboot a Scheduled Instance,
/// but you can terminate it as needed. If you terminate a Scheduled Instance before the current scheduled time period ends,
/// you can launch it again after a few minutes. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-scheduled-instances.html">Scheduled Instances</a>
/// in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct RunScheduledInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::run_scheduled_instances_input::Builder,
}
impl<C, M, R> RunScheduledInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RunScheduledInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RunScheduledInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::RunScheduledInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RunScheduledInstancesInputOperationOutputAlias,
crate::output::RunScheduledInstancesOutput,
crate::error::RunScheduledInstancesError,
crate::input::RunScheduledInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Unique, case-sensitive identifier that ensures the idempotency of the request.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that ensures the idempotency of the request.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The number of instances.</p>
/// <p>Default: 1</p>
pub fn instance_count(mut self, inp: i32) -> Self {
self.inner = self.inner.instance_count(inp);
self
}
/// <p>The number of instances.</p>
/// <p>Default: 1</p>
pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_instance_count(input);
self
}
/// <p>The launch specification. You must match the instance type, Availability Zone,
/// network, and platform of the schedule that you purchased.</p>
pub fn launch_specification(
mut self,
inp: crate::model::ScheduledInstancesLaunchSpecification,
) -> Self {
self.inner = self.inner.launch_specification(inp);
self
}
/// <p>The launch specification. You must match the instance type, Availability Zone,
/// network, and platform of the schedule that you purchased.</p>
pub fn set_launch_specification(
mut self,
input: std::option::Option<crate::model::ScheduledInstancesLaunchSpecification>,
) -> Self {
self.inner = self.inner.set_launch_specification(input);
self
}
/// <p>The Scheduled Instance ID.</p>
pub fn scheduled_instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.scheduled_instance_id(inp);
self
}
/// <p>The Scheduled Instance ID.</p>
pub fn set_scheduled_instance_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_scheduled_instance_id(input);
self
}
}
/// Fluent builder constructing a request to `SearchLocalGatewayRoutes`.
///
/// <p>Searches for routes in the specified local gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct SearchLocalGatewayRoutes<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::search_local_gateway_routes_input::Builder,
}
impl<C, M, R> SearchLocalGatewayRoutes<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `SearchLocalGatewayRoutes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::SearchLocalGatewayRoutesOutput,
aws_smithy_http::result::SdkError<crate::error::SearchLocalGatewayRoutesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::SearchLocalGatewayRoutesInputOperationOutputAlias,
crate::output::SearchLocalGatewayRoutesOutput,
crate::error::SearchLocalGatewayRoutesError,
crate::input::SearchLocalGatewayRoutesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the local gateway route table.</p>
pub fn local_gateway_route_table_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.local_gateway_route_table_id(inp);
self
}
/// <p>The ID of the local gateway route table.</p>
pub fn set_local_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_local_gateway_route_table_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters.</p>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters.</p>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `SearchTransitGatewayMulticastGroups`.
///
/// <p>Searches one or more transit gateway multicast groups and returns the group membership information.</p>
#[derive(std::fmt::Debug)]
pub struct SearchTransitGatewayMulticastGroups<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::search_transit_gateway_multicast_groups_input::Builder,
}
impl<C, M, R> SearchTransitGatewayMulticastGroups<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `SearchTransitGatewayMulticastGroups`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::SearchTransitGatewayMulticastGroupsOutput,
aws_smithy_http::result::SdkError<
crate::error::SearchTransitGatewayMulticastGroupsError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::SearchTransitGatewayMulticastGroupsInputOperationOutputAlias,
crate::output::SearchTransitGatewayMulticastGroupsOutput,
crate::error::SearchTransitGatewayMulticastGroupsError,
crate::input::SearchTransitGatewayMulticastGroupsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn transit_gateway_multicast_domain_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_multicast_domain_id(inp);
self
}
/// <p>The ID of the transit gateway multicast domain.</p>
pub fn set_transit_gateway_multicast_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_multicast_domain_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>group-ip-address</code> - The IP address of the transit gateway multicast group.</p>
/// </li>
/// <li>
/// <p>
/// <code>is-group-member</code> - The resource is a group member. Valid values are <code>true</code> | <code>false</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>is-group-source</code> - The resource is a group source. Valid values are <code>true</code> | <code>false</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>member-type</code> - The member type. Valid values are <code>igmp</code> | <code>static</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-type</code> - The type of resource. Valid values are <code>vpc</code> | <code>vpn</code> | <code>direct-connect-gateway</code> | <code>tgw-peering</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>source-type</code> - The source type. Valid values are <code>igmp</code> | <code>static</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The id of the transit gateway attachment.</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>group-ip-address</code> - The IP address of the transit gateway multicast group.</p>
/// </li>
/// <li>
/// <p>
/// <code>is-group-member</code> - The resource is a group member. Valid values are <code>true</code> | <code>false</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>is-group-source</code> - The resource is a group source. Valid values are <code>true</code> | <code>false</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>member-type</code> - The member type. Valid values are <code>igmp</code> | <code>static</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-id</code> - The ID of the resource.</p>
/// </li>
/// <li>
/// <p>
/// <code>resource-type</code> - The type of resource. Valid values are <code>vpc</code> | <code>vpn</code> | <code>direct-connect-gateway</code> | <code>tgw-peering</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>source-type</code> - The source type. Valid values are <code>igmp</code> | <code>static</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>subnet-id</code> - The ID of the subnet.</p>
/// </li>
/// <li>
/// <p>
/// <code>transit-gateway-attachment-id</code> - The id of the transit gateway attachment.</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of results to return with a single call.
/// To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>The token for the next page of results.</p>
pub fn next_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(inp);
self
}
/// <p>The token for the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `SearchTransitGatewayRoutes`.
///
/// <p>Searches for routes in the specified transit gateway route table.</p>
#[derive(std::fmt::Debug)]
pub struct SearchTransitGatewayRoutes<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::search_transit_gateway_routes_input::Builder,
}
impl<C, M, R> SearchTransitGatewayRoutes<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `SearchTransitGatewayRoutes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::SearchTransitGatewayRoutesOutput,
aws_smithy_http::result::SdkError<crate::error::SearchTransitGatewayRoutesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::SearchTransitGatewayRoutesInputOperationOutputAlias,
crate::output::SearchTransitGatewayRoutesOutput,
crate::error::SearchTransitGatewayRoutesError,
crate::input::SearchTransitGatewayRoutesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the transit gateway route table.</p>
pub fn transit_gateway_route_table_id(
mut self,
inp: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.transit_gateway_route_table_id(inp);
self
}
/// <p>The ID of the transit gateway route table.</p>
pub fn set_transit_gateway_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_transit_gateway_route_table_id(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>attachment.transit-gateway-attachment-id</code>- The id of the transit gateway attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.resource-id</code> - The resource id of the transit gateway attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.resource-type</code> - The attachment resource type. Valid values
/// are <code>vpc</code> | <code>vpn</code> | <code>direct-connect-gateway</code> |
/// <code>peering</code> | <code>connect</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>prefix-list-id</code> - The ID of the prefix list.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.exact-match</code> - The exact match of the specified filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.longest-prefix-match</code> - The longest prefix that matches the route.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.subnet-of-match</code> - The routes with a subnet that match the specified CIDR filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.supernet-of-match</code> - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the route (<code>active</code> | <code>blackhole</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of route (<code>propagated</code> |
/// <code>static</code>).</p>
/// </li>
/// </ul>
pub fn filters(mut self, inp: impl Into<crate::model::Filter>) -> Self {
self.inner = self.inner.filters(inp);
self
}
/// <p>One or more filters. The possible values are:</p>
/// <ul>
/// <li>
/// <p>
/// <code>attachment.transit-gateway-attachment-id</code>- The id of the transit gateway attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.resource-id</code> - The resource id of the transit gateway attachment.</p>
/// </li>
/// <li>
/// <p>
/// <code>attachment.resource-type</code> - The attachment resource type. Valid values
/// are <code>vpc</code> | <code>vpn</code> | <code>direct-connect-gateway</code> |
/// <code>peering</code> | <code>connect</code>.</p>
/// </li>
/// <li>
/// <p>
/// <code>prefix-list-id</code> - The ID of the prefix list.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.exact-match</code> - The exact match of the specified filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.longest-prefix-match</code> - The longest prefix that matches the route.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.subnet-of-match</code> - The routes with a subnet that match the specified CIDR filter.</p>
/// </li>
/// <li>
/// <p>
/// <code>route-search.supernet-of-match</code> - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.</p>
/// </li>
/// <li>
/// <p>
/// <code>state</code> - The state of the route (<code>active</code> | <code>blackhole</code>).</p>
/// </li>
/// <li>
/// <p>
/// <code>type</code> - The type of route (<code>propagated</code> |
/// <code>static</code>).</p>
/// </li>
/// </ul>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
/// <p>The maximum number of routes to return.</p>
pub fn max_results(mut self, inp: i32) -> Self {
self.inner = self.inner.max_results(inp);
self
}
/// <p>The maximum number of routes to return.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `SendDiagnosticInterrupt`.
///
/// <p>Sends a diagnostic interrupt to the specified Amazon EC2 instance to trigger a
/// <i>kernel panic</i> (on Linux instances), or a
/// <i>blue screen</i>/<i>stop error</i> (on Windows
/// instances). For instances based on Intel and AMD processors, the interrupt is
/// received as a <i>non-maskable interrupt</i> (NMI).</p>
///
/// <p>In general, the operating system crashes and reboots when a kernel panic or stop
/// error is triggered. The operating system can also be configured to perform diagnostic
/// tasks, such as generating a memory dump file, loading a secondary kernel, or
/// obtaining a call trace.</p>
///
/// <p>Before sending a diagnostic interrupt to your instance, ensure that its operating
/// system is configured to perform the required diagnostic tasks.</p>
///
/// <p>For more information about configuring your operating system to generate a crash dump
/// when a kernel panic or stop error occurs, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/diagnostic-interrupt.html">Send a diagnostic interrupt</a> (Linux instances) or <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/diagnostic-interrupt.html">Send a Diagnostic Interrupt</a> (Windows instances).</p>
#[derive(std::fmt::Debug)]
pub struct SendDiagnosticInterrupt<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::send_diagnostic_interrupt_input::Builder,
}
impl<C, M, R> SendDiagnosticInterrupt<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `SendDiagnosticInterrupt`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::SendDiagnosticInterruptOutput,
aws_smithy_http::result::SdkError<crate::error::SendDiagnosticInterruptError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::SendDiagnosticInterruptInputOperationOutputAlias,
crate::output::SendDiagnosticInterruptOutput,
crate::error::SendDiagnosticInterruptError,
crate::input::SendDiagnosticInterruptInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the instance.</p>
pub fn instance_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(inp);
self
}
/// <p>The ID of the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `StartInstances`.
///
/// <p>Starts an Amazon EBS-backed instance that you've previously stopped.</p>
/// <p>Instances that use Amazon EBS volumes as their root devices can be quickly stopped and
/// started. When an instance is stopped, the compute resources are released and you are not
/// billed for instance usage. However, your root partition Amazon EBS volume remains and
/// continues to persist your data, and you are charged for Amazon EBS volume usage. You can
/// restart your instance at any time. Every time you start your instance, Amazon EC2
/// charges a one-minute minimum for instance usage, and thereafter charges per second for
/// instance usage.</p>
/// <p>Before stopping an instance, make sure it is in a state from which it can be
/// restarted. Stopping an instance does not preserve data stored in RAM.</p>
/// <p>Performing this operation on an instance that uses an instance store as its root
/// device returns an error.</p>
///
/// <p>If you attempt to start a T3 instance with <code>host</code> tenancy and the <code>unlimted</code>
/// CPU credit option, the request fails. The <code>unlimited</code> CPU credit option is not
/// supported on Dedicated Hosts. Before you start the instance, either change its CPU credit
/// option to <code>standard</code>, or change its tenancy to <code>default</code> or <code>dedicated</code>.</p>
///
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html">Stopping instances</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct StartInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::start_instances_input::Builder,
}
impl<C, M, R> StartInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `StartInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::StartInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::StartInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::StartInstancesInputOperationOutputAlias,
crate::output::StartInstancesOutput,
crate::error::StartInstancesError,
crate::input::StartInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `InstanceIds`.
///
/// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
///
/// <p>The IDs of the instances.</p>
pub fn instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_ids(inp);
self
}
/// <p>The IDs of the instances.</p>
pub fn set_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instance_ids(input);
self
}
/// <p>Reserved.</p>
pub fn additional_info(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.additional_info(inp);
self
}
/// <p>Reserved.</p>
pub fn set_additional_info(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_additional_info(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `StartNetworkInsightsAnalysis`.
///
/// <p>Starts analyzing the specified path. If the path is reachable, the
/// operation returns the shortest feasible path.</p>
#[derive(std::fmt::Debug)]
pub struct StartNetworkInsightsAnalysis<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::start_network_insights_analysis_input::Builder,
}
impl<C, M, R> StartNetworkInsightsAnalysis<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `StartNetworkInsightsAnalysis`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::StartNetworkInsightsAnalysisOutput,
aws_smithy_http::result::SdkError<crate::error::StartNetworkInsightsAnalysisError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::StartNetworkInsightsAnalysisInputOperationOutputAlias,
crate::output::StartNetworkInsightsAnalysisOutput,
crate::error::StartNetworkInsightsAnalysisError,
crate::input::StartNetworkInsightsAnalysisInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the path.</p>
pub fn network_insights_path_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_insights_path_id(inp);
self
}
/// <p>The ID of the path.</p>
pub fn set_network_insights_path_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_insights_path_id(input);
self
}
/// Appends an item to `FilterInArns`.
///
/// To override the contents of this collection use [`set_filter_in_arns`](Self::set_filter_in_arns).
///
/// <p>The Amazon Resource Names (ARN) of the resources that the path must traverse.</p>
pub fn filter_in_arns(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.filter_in_arns(inp);
self
}
/// <p>The Amazon Resource Names (ARN) of the resources that the path must traverse.</p>
pub fn set_filter_in_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_filter_in_arns(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// Appends an item to `TagSpecifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply.</p>
pub fn tag_specifications(
mut self,
inp: impl Into<crate::model::TagSpecification>,
) -> Self {
self.inner = self.inner.tag_specifications(inp);
self
}
/// <p>The tags to apply.</p>
pub fn set_tag_specifications(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
) -> Self {
self.inner = self.inner.set_tag_specifications(input);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn client_token(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(inp);
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure idempotency</a>.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `StartVpcEndpointServicePrivateDnsVerification`.
///
/// <p>Initiates the verification process to prove that the service provider owns the private
/// DNS name domain for the endpoint service.</p>
/// <p>The service provider must successfully perform the verification before the consumer can use the name to access the service.</p>
/// <p>Before the service provider runs this command, they must add a record to the DNS server. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-services-dns-validation.html#add-dns-txt-record">Adding a TXT Record to Your Domain's DNS Server </a> in the <i>Amazon VPC User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct StartVpcEndpointServicePrivateDnsVerification<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::start_vpc_endpoint_service_private_dns_verification_input::Builder,
}
impl<C, M, R> StartVpcEndpointServicePrivateDnsVerification<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `StartVpcEndpointServicePrivateDnsVerification`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(self) -> std::result::Result<crate::output::StartVpcEndpointServicePrivateDnsVerificationOutput, aws_smithy_http::result::SdkError<crate::error::StartVpcEndpointServicePrivateDnsVerificationError>>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<crate::input::StartVpcEndpointServicePrivateDnsVerificationInputOperationOutputAlias,
crate::output::StartVpcEndpointServicePrivateDnsVerificationOutput,
crate::error::StartVpcEndpointServicePrivateDnsVerificationError,
crate::input::StartVpcEndpointServicePrivateDnsVerificationInputOperationRetryAlias>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the endpoint service.</p>
pub fn service_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(inp);
self
}
/// <p>The ID of the endpoint service.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
}
/// Fluent builder constructing a request to `StopInstances`.
///
/// <p>Stops an Amazon EBS-backed instance.</p>
/// <p>You can use the Stop action to hibernate an instance if the instance is <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#enabling-hibernation">enabled for
/// hibernation</a> and it meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites">hibernation
/// prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the
/// <i>Amazon EC2 User Guide</i>.</p>
/// <p>We don't charge usage for a stopped instance, or data transfer fees; however, your
/// root partition Amazon EBS volume remains and continues to persist your data, and you are
/// charged for Amazon EBS volume usage. Every time you start your instance, Amazon EC2
/// charges a one-minute minimum for instance usage, and thereafter charges per second for
/// instance usage.</p>
/// <p>You can't stop or hibernate instance store-backed instances. You can't use the Stop
/// action to hibernate Spot Instances, but you can specify that Amazon EC2 should hibernate
/// Spot Instances when they are interrupted. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html#hibernate-spot-instances">Hibernating interrupted Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// <p>When you stop or hibernate an instance, we shut it down. You can restart your instance
/// at any time. Before stopping or hibernating an instance, make sure it is in a state from
/// which it can be restarted. Stopping an instance does not preserve data stored in RAM,
/// but hibernating an instance does preserve data stored in RAM. If an instance cannot
/// hibernate successfully, a normal shutdown occurs.</p>
/// <p>Stopping and hibernating an instance is different to rebooting or terminating it. For
/// example, when you stop or hibernate an instance, the root device and any other devices
/// attached to the instance persist. When you terminate an instance, the root device and
/// any other devices attached during the instance launch are automatically deleted. For
/// more information about the differences between rebooting, stopping, hibernating, and
/// terminating instances, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html">Instance lifecycle</a>
/// in the <i>Amazon EC2 User Guide</i>.</p>
/// <p>When you stop an instance, we attempt to shut it down forcibly after a short while. If
/// your instance appears stuck in the stopping state after a period of time, there may be
/// an issue with the underlying host computer. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html">Troubleshooting
/// stopping your instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct StopInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::stop_instances_input::Builder,
}
impl<C, M, R> StopInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `StopInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::StopInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::StopInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::StopInstancesInputOperationOutputAlias,
crate::output::StopInstancesOutput,
crate::error::StopInstancesError,
crate::input::StopInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `InstanceIds`.
///
/// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
///
/// <p>The IDs of the instances.</p>
pub fn instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_ids(inp);
self
}
/// <p>The IDs of the instances.</p>
pub fn set_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instance_ids(input);
self
}
/// <p>Hibernates the instance if the instance was enabled for hibernation at launch. If the
/// instance cannot hibernate successfully, a normal shutdown occurs. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate
/// your instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// <p> Default: <code>false</code>
/// </p>
pub fn hibernate(mut self, inp: bool) -> Self {
self.inner = self.inner.hibernate(inp);
self
}
/// <p>Hibernates the instance if the instance was enabled for hibernation at launch. If the
/// instance cannot hibernate successfully, a normal shutdown occurs. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate
/// your instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// <p> Default: <code>false</code>
/// </p>
pub fn set_hibernate(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_hibernate(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>Forces the instances to stop. The instances do not have an opportunity to flush file
/// system caches or file system metadata. If you use this option, you must perform file
/// system check and repair procedures. This option is not recommended for Windows
/// instances.</p>
/// <p>Default: <code>false</code>
/// </p>
pub fn force(mut self, inp: bool) -> Self {
self.inner = self.inner.force(inp);
self
}
/// <p>Forces the instances to stop. The instances do not have an opportunity to flush file
/// system caches or file system metadata. If you use this option, you must perform file
/// system check and repair procedures. This option is not recommended for Windows
/// instances.</p>
/// <p>Default: <code>false</code>
/// </p>
pub fn set_force(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_force(input);
self
}
}
/// Fluent builder constructing a request to `TerminateClientVpnConnections`.
///
/// <p>Terminates active Client VPN endpoint connections. This action can be used to terminate a specific client connection, or up to five connections established by a specific user.</p>
#[derive(std::fmt::Debug)]
pub struct TerminateClientVpnConnections<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::terminate_client_vpn_connections_input::Builder,
}
impl<C, M, R> TerminateClientVpnConnections<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `TerminateClientVpnConnections`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::TerminateClientVpnConnectionsOutput,
aws_smithy_http::result::SdkError<crate::error::TerminateClientVpnConnectionsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::TerminateClientVpnConnectionsInputOperationOutputAlias,
crate::output::TerminateClientVpnConnectionsOutput,
crate::error::TerminateClientVpnConnectionsError,
crate::input::TerminateClientVpnConnectionsInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the Client VPN endpoint to which the client is connected.</p>
pub fn client_vpn_endpoint_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_vpn_endpoint_id(inp);
self
}
/// <p>The ID of the Client VPN endpoint to which the client is connected.</p>
pub fn set_client_vpn_endpoint_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_vpn_endpoint_id(input);
self
}
/// <p>The ID of the client connection to be terminated.</p>
pub fn connection_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connection_id(inp);
self
}
/// <p>The ID of the client connection to be terminated.</p>
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connection_id(input);
self
}
/// <p>The name of the user who initiated the connection. Use this option to terminate all active connections for
/// the specified user. This option can only be used if the user has established up to five connections.</p>
pub fn username(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.username(inp);
self
}
/// <p>The name of the user who initiated the connection. Use this option to terminate all active connections for
/// the specified user. This option can only be used if the user has established up to five connections.</p>
pub fn set_username(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_username(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `TerminateInstances`.
///
/// <p>Shuts down the specified instances. This operation is idempotent; if you terminate an
/// instance more than once, each call succeeds. </p>
///
/// <p>If you specify multiple instances and the request fails (for example, because of a
/// single incorrect instance ID), none of the instances are terminated.</p>
///
/// <p>If you terminate multiple instances across multiple Availability Zones, and one or more
/// of the specified instances are enabled for termination protection, the request fails with
/// the following results:</p>
/// <ul>
/// <li>
/// <p>The specified instances that are in the same Availability Zone as the protected
/// instance are not terminated.</p>
/// </li>
/// <li>
/// <p>The specified instances that are in different Availability Zones, where no other
/// specified instances are protected, are successfully terminated.</p>
/// </li>
/// </ul>
///
/// <p>For example, say you have the following instances:</p>
/// <ul>
/// <li>
/// <p>Instance A: <code>us-east-1a</code>; Not protected</p>
/// </li>
/// <li>
/// <p>Instance B: <code>us-east-1a</code>; Not protected</p>
/// </li>
/// <li>
/// <p>Instance C: <code>us-east-1b</code>; Protected</p>
/// </li>
/// <li>
/// <p>Instance D: <code>us-east-1b</code>; not protected</p>
/// </li>
/// </ul>
/// <p>If you attempt to terminate all of these instances in the same request, the request reports
/// failure with the following results:</p>
/// <ul>
/// <li>
/// <p>Instance A and Instance B are successfully terminated because none of the specified
/// instances in <code>us-east-1a</code> are enabled for termination protection.</p>
/// </li>
/// <li>
/// <p>Instance C and Instance D fail to terminate because at least one of the specified
/// instances in <code>us-east-1b</code> (Instance C) is enabled for termination protection.</p>
/// </li>
/// </ul>
///
///
/// <p>Terminated instances remain visible after termination (for approximately one
/// hour).</p>
/// <p>By default, Amazon EC2 deletes all EBS volumes that were attached when the instance
/// launched. Volumes attached after instance launch continue running.</p>
/// <p>You can stop, start, and terminate EBS-backed instances. You can only terminate
/// instance store-backed instances. What happens to an instance differs if you stop it or
/// terminate it. For example, when you stop an instance, the root device and any other
/// devices attached to the instance persist. When you terminate an instance, any attached
/// EBS volumes with the <code>DeleteOnTermination</code> block device mapping parameter set
/// to <code>true</code> are automatically deleted. For more information about the
/// differences between stopping and terminating instances, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html">Instance lifecycle</a>
/// in the <i>Amazon EC2 User Guide</i>.</p>
/// <p>For more information about troubleshooting, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html">Troubleshooting terminating your instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct TerminateInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::terminate_instances_input::Builder,
}
impl<C, M, R> TerminateInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `TerminateInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::TerminateInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::TerminateInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::TerminateInstancesInputOperationOutputAlias,
crate::output::TerminateInstancesOutput,
crate::error::TerminateInstancesError,
crate::input::TerminateInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `InstanceIds`.
///
/// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
///
/// <p>The IDs of the instances.</p>
/// <p>Constraints: Up to 1000 instance IDs. We recommend breaking up this request into
/// smaller batches.</p>
pub fn instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_ids(inp);
self
}
/// <p>The IDs of the instances.</p>
/// <p>Constraints: Up to 1000 instance IDs. We recommend breaking up this request into
/// smaller batches.</p>
pub fn set_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instance_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `UnassignIpv6Addresses`.
///
/// <p>Unassigns one or more IPv6 addresses IPv4 Prefix Delegation prefixes from a network interface.</p>
#[derive(std::fmt::Debug)]
pub struct UnassignIpv6Addresses<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::unassign_ipv6_addresses_input::Builder,
}
impl<C, M, R> UnassignIpv6Addresses<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `UnassignIpv6Addresses`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UnassignIpv6AddressesOutput,
aws_smithy_http::result::SdkError<crate::error::UnassignIpv6AddressesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::UnassignIpv6AddressesInputOperationOutputAlias,
crate::output::UnassignIpv6AddressesOutput,
crate::error::UnassignIpv6AddressesError,
crate::input::UnassignIpv6AddressesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `Ipv6Addresses`.
///
/// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
///
/// <p>The IPv6 addresses to unassign from the network interface.</p>
pub fn ipv6_addresses(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv6_addresses(inp);
self
}
/// <p>The IPv6 addresses to unassign from the network interface.</p>
pub fn set_ipv6_addresses(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_ipv6_addresses(input);
self
}
/// Appends an item to `Ipv6Prefixes`.
///
/// To override the contents of this collection use [`set_ipv6_prefixes`](Self::set_ipv6_prefixes).
///
/// <p>One or more IPv6 prefixes to unassign from the network interface.</p>
pub fn ipv6_prefixes(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv6_prefixes(inp);
self
}
/// <p>One or more IPv6 prefixes to unassign from the network interface.</p>
pub fn set_ipv6_prefixes(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_ipv6_prefixes(input);
self
}
/// <p>The ID of the network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of the network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
}
/// Fluent builder constructing a request to `UnassignPrivateIpAddresses`.
///
/// <p>Unassigns one or more secondary private IP addresses, or IPv4 Prefix Delegation prefixes from a network interface.</p>
#[derive(std::fmt::Debug)]
pub struct UnassignPrivateIpAddresses<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::unassign_private_ip_addresses_input::Builder,
}
impl<C, M, R> UnassignPrivateIpAddresses<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `UnassignPrivateIpAddresses`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UnassignPrivateIpAddressesOutput,
aws_smithy_http::result::SdkError<crate::error::UnassignPrivateIpAddressesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::UnassignPrivateIpAddressesInputOperationOutputAlias,
crate::output::UnassignPrivateIpAddressesOutput,
crate::error::UnassignPrivateIpAddressesError,
crate::input::UnassignPrivateIpAddressesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The ID of the network interface.</p>
pub fn network_interface_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.network_interface_id(inp);
self
}
/// <p>The ID of the network interface.</p>
pub fn set_network_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_network_interface_id(input);
self
}
/// Appends an item to `PrivateIpAddresses`.
///
/// To override the contents of this collection use [`set_private_ip_addresses`](Self::set_private_ip_addresses).
///
/// <p>The secondary private IP addresses to unassign from the network interface. You can specify this option multiple times to unassign more than one IP address.</p>
pub fn private_ip_addresses(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.private_ip_addresses(inp);
self
}
/// <p>The secondary private IP addresses to unassign from the network interface. You can specify this option multiple times to unassign more than one IP address.</p>
pub fn set_private_ip_addresses(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_private_ip_addresses(input);
self
}
/// Appends an item to `Ipv4Prefixes`.
///
/// To override the contents of this collection use [`set_ipv4_prefixes`](Self::set_ipv4_prefixes).
///
/// <p>The IPv4 prefixes to unassign from the network interface.</p>
pub fn ipv4_prefixes(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.ipv4_prefixes(inp);
self
}
/// <p>The IPv4 prefixes to unassign from the network interface.</p>
pub fn set_ipv4_prefixes(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_ipv4_prefixes(input);
self
}
}
/// Fluent builder constructing a request to `UnmonitorInstances`.
///
/// <p>Disables detailed monitoring for a running instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html">Monitoring
/// your instances and volumes</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[derive(std::fmt::Debug)]
pub struct UnmonitorInstances<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::unmonitor_instances_input::Builder,
}
impl<C, M, R> UnmonitorInstances<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `UnmonitorInstances`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UnmonitorInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::UnmonitorInstancesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::UnmonitorInstancesInputOperationOutputAlias,
crate::output::UnmonitorInstancesOutput,
crate::error::UnmonitorInstancesError,
crate::input::UnmonitorInstancesInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `InstanceIds`.
///
/// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
///
/// <p>The IDs of the instances.</p>
pub fn instance_ids(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_ids(inp);
self
}
/// <p>The IDs of the instances.</p>
pub fn set_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instance_ids(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
/// Fluent builder constructing a request to `UpdateSecurityGroupRuleDescriptionsEgress`.
///
/// <p>[VPC only] Updates the description of an egress (outbound) security group rule. You
/// can replace an existing description, or add a description to a rule that did not have one
/// previously. You can remove a description for a security group rule by omitting the
/// description parameter in the request.</p>
#[derive(std::fmt::Debug)]
pub struct UpdateSecurityGroupRuleDescriptionsEgress<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::update_security_group_rule_descriptions_egress_input::Builder,
}
impl<C, M, R> UpdateSecurityGroupRuleDescriptionsEgress<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `UpdateSecurityGroupRuleDescriptionsEgress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UpdateSecurityGroupRuleDescriptionsEgressOutput,
aws_smithy_http::result::SdkError<
crate::error::UpdateSecurityGroupRuleDescriptionsEgressError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::UpdateSecurityGroupRuleDescriptionsEgressInputOperationOutputAlias,
crate::output::UpdateSecurityGroupRuleDescriptionsEgressOutput,
crate::error::UpdateSecurityGroupRuleDescriptionsEgressError,
crate::input::UpdateSecurityGroupRuleDescriptionsEgressInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the security group. You must specify either the security group ID or the
/// security group name in the request. For security groups in a nondefault VPC, you must
/// specify the security group ID.</p>
pub fn group_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_id(inp);
self
}
/// <p>The ID of the security group. You must specify either the security group ID or the
/// security group name in the request. For security groups in a nondefault VPC, you must
/// specify the security group ID.</p>
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_id(input);
self
}
/// <p>[Default VPC] The name of the security group. You must specify either the security group
/// ID or the security group name in the request.</p>
pub fn group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_name(inp);
self
}
/// <p>[Default VPC] The name of the security group. You must specify either the security group
/// ID or the security group name in the request.</p>
pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_name(input);
self
}
/// Appends an item to `IpPermissions`.
///
/// To override the contents of this collection use [`set_ip_permissions`](Self::set_ip_permissions).
///
/// <p>The IP permissions for the security group rule. You must specify either the IP permissions
/// or the description.</p>
pub fn ip_permissions(mut self, inp: impl Into<crate::model::IpPermission>) -> Self {
self.inner = self.inner.ip_permissions(inp);
self
}
/// <p>The IP permissions for the security group rule. You must specify either the IP permissions
/// or the description.</p>
pub fn set_ip_permissions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::IpPermission>>,
) -> Self {
self.inner = self.inner.set_ip_permissions(input);
self
}
/// Appends an item to `SecurityGroupRuleDescriptions`.
///
/// To override the contents of this collection use [`set_security_group_rule_descriptions`](Self::set_security_group_rule_descriptions).
///
/// <p>The description for the egress security group rules. You must specify either the
/// description or the IP permissions.</p>
pub fn security_group_rule_descriptions(
mut self,
inp: impl Into<crate::model::SecurityGroupRuleDescription>,
) -> Self {
self.inner = self.inner.security_group_rule_descriptions(inp);
self
}
/// <p>The description for the egress security group rules. You must specify either the
/// description or the IP permissions.</p>
pub fn set_security_group_rule_descriptions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::SecurityGroupRuleDescription>>,
) -> Self {
self.inner = self.inner.set_security_group_rule_descriptions(input);
self
}
}
/// Fluent builder constructing a request to `UpdateSecurityGroupRuleDescriptionsIngress`.
///
/// <p>Updates the description of an ingress (inbound) security group rule. You can replace an
/// existing description, or add a description to a rule that did not have one previously.
/// You can remove a description for a security group rule by omitting the description
/// parameter in the request.</p>
#[derive(std::fmt::Debug)]
pub struct UpdateSecurityGroupRuleDescriptionsIngress<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::update_security_group_rule_descriptions_ingress_input::Builder,
}
impl<C, M, R> UpdateSecurityGroupRuleDescriptionsIngress<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `UpdateSecurityGroupRuleDescriptionsIngress`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UpdateSecurityGroupRuleDescriptionsIngressOutput,
aws_smithy_http::result::SdkError<
crate::error::UpdateSecurityGroupRuleDescriptionsIngressError,
>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::UpdateSecurityGroupRuleDescriptionsIngressInputOperationOutputAlias,
crate::output::UpdateSecurityGroupRuleDescriptionsIngressOutput,
crate::error::UpdateSecurityGroupRuleDescriptionsIngressError,
crate::input::UpdateSecurityGroupRuleDescriptionsIngressInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
/// <p>The ID of the security group. You must specify either the security group ID or the
/// security group name in the request. For security groups in a nondefault VPC, you must
/// specify the security group ID.</p>
pub fn group_id(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_id(inp);
self
}
/// <p>The ID of the security group. You must specify either the security group ID or the
/// security group name in the request. For security groups in a nondefault VPC, you must
/// specify the security group ID.</p>
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_id(input);
self
}
/// <p>[EC2-Classic, default VPC] The name of the security group. You must specify either the
/// security group ID or the security group name in the request.</p>
pub fn group_name(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.group_name(inp);
self
}
/// <p>[EC2-Classic, default VPC] The name of the security group. You must specify either the
/// security group ID or the security group name in the request.</p>
pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_group_name(input);
self
}
/// Appends an item to `IpPermissions`.
///
/// To override the contents of this collection use [`set_ip_permissions`](Self::set_ip_permissions).
///
/// <p>The IP permissions for the security group rule. You must specify either IP permissions
/// or a description.</p>
pub fn ip_permissions(mut self, inp: impl Into<crate::model::IpPermission>) -> Self {
self.inner = self.inner.ip_permissions(inp);
self
}
/// <p>The IP permissions for the security group rule. You must specify either IP permissions
/// or a description.</p>
pub fn set_ip_permissions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::IpPermission>>,
) -> Self {
self.inner = self.inner.set_ip_permissions(input);
self
}
/// Appends an item to `SecurityGroupRuleDescriptions`.
///
/// To override the contents of this collection use [`set_security_group_rule_descriptions`](Self::set_security_group_rule_descriptions).
///
/// <p>[VPC only] The description for the ingress security group rules. You must specify either
/// a description or IP permissions.</p>
pub fn security_group_rule_descriptions(
mut self,
inp: impl Into<crate::model::SecurityGroupRuleDescription>,
) -> Self {
self.inner = self.inner.security_group_rule_descriptions(inp);
self
}
/// <p>[VPC only] The description for the ingress security group rules. You must specify either
/// a description or IP permissions.</p>
pub fn set_security_group_rule_descriptions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::SecurityGroupRuleDescription>>,
) -> Self {
self.inner = self.inner.set_security_group_rule_descriptions(input);
self
}
}
/// Fluent builder constructing a request to `WithdrawByoipCidr`.
///
/// <p>Stops advertising an address range that is provisioned as an address pool.</p>
/// <p>You can perform this operation at most once every 10 seconds, even if you specify different
/// address ranges each time.</p>
/// <p>It can take a few minutes before traffic to the specified addresses stops routing to Amazon Web Services
/// because of BGP propagation delays.</p>
#[derive(std::fmt::Debug)]
pub struct WithdrawByoipCidr<
C = aws_smithy_client::erase::DynConnector,
M = aws_hyper::AwsMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::withdraw_byoip_cidr_input::Builder,
}
impl<C, M, R> WithdrawByoipCidr<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `WithdrawByoipCidr`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::WithdrawByoipCidrOutput,
aws_smithy_http::result::SdkError<crate::error::WithdrawByoipCidrError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::WithdrawByoipCidrInputOperationOutputAlias,
crate::output::WithdrawByoipCidrOutput,
crate::error::WithdrawByoipCidrError,
crate::input::WithdrawByoipCidrInputOperationRetryAlias,
>,
{
let input = self.inner.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
let op = input.make_operation(&self.handle.conf).map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The address range, in CIDR notation.</p>
pub fn cidr(mut self, inp: impl Into<std::string::String>) -> Self {
self.inner = self.inner.cidr(inp);
self
}
/// <p>The address range, in CIDR notation.</p>
pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_cidr(input);
self
}
/// <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>
pub fn dry_run(mut self, inp: bool) -> Self {
self.inner = self.inner.dry_run(inp);
self
}
/// <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>
pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_dry_run(input);
self
}
}
}
impl<C> Client<C, aws_hyper::AwsMiddleware, aws_smithy_client::retry::Standard> {
/// Creates a client with the given service config and connector override.
pub fn from_conf_conn(conf: crate::Config, conn: C) -> Self {
let retry_config = conf.retry_config.as_ref().cloned().unwrap_or_default();
let client = aws_hyper::Client::new(conn).with_retry_config(retry_config.into());
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
}
impl
Client<
aws_smithy_client::erase::DynConnector,
aws_hyper::AwsMiddleware,
aws_smithy_client::retry::Standard,
>
{
/// Creates a new client from a shared config.
#[cfg(any(feature = "rustls", feature = "native-tls"))]
pub fn new(config: &aws_types::config::Config) -> Self {
Self::from_conf(config.into())
}
/// Creates a new client from the service [`Config`](crate::Config).
#[cfg(any(feature = "rustls", feature = "native-tls"))]
pub fn from_conf(conf: crate::Config) -> Self {
let retry_config = conf.retry_config.as_ref().cloned().unwrap_or_default();
let client = aws_hyper::Client::https().with_retry_config(retry_config.into());
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
}