pub struct Builder { /* private fields */ }
Expand description

A builder for CreateFleetInput.

Implementations§

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Examples found in repository?
src/client.rs (line 15971)
15970
15971
15972
15973
        pub fn dry_run(mut self, input: bool) -> Self {
            self.inner = self.inner.dry_run(input);
            self
        }

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Examples found in repository?
src/client.rs (line 15976)
15975
15976
15977
15978
        pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_dry_run(input);
            self
        }

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

Examples found in repository?
src/client.rs (line 15981)
15980
15981
15982
15983
        pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.client_token(input.into());
            self
        }

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

Examples found in repository?
src/client.rs (line 15986)
15985
15986
15987
15988
        pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_client_token(input);
            self
        }

Describes the configuration of Spot Instances in an EC2 Fleet.

Examples found in repository?
src/client.rs (line 15991)
15990
15991
15992
15993
        pub fn spot_options(mut self, input: crate::model::SpotOptionsRequest) -> Self {
            self.inner = self.inner.spot_options(input);
            self
        }

Describes the configuration of Spot Instances in an EC2 Fleet.

Examples found in repository?
src/client.rs (line 15999)
15995
15996
15997
15998
15999
16000
16001
        pub fn set_spot_options(
            mut self,
            input: std::option::Option<crate::model::SpotOptionsRequest>,
        ) -> Self {
            self.inner = self.inner.set_spot_options(input);
            self
        }

Describes the configuration of On-Demand Instances in an EC2 Fleet.

Examples found in repository?
src/client.rs (line 16004)
16003
16004
16005
16006
        pub fn on_demand_options(mut self, input: crate::model::OnDemandOptionsRequest) -> Self {
            self.inner = self.inner.on_demand_options(input);
            self
        }

Describes the configuration of On-Demand Instances in an EC2 Fleet.

Examples found in repository?
src/client.rs (line 16012)
16008
16009
16010
16011
16012
16013
16014
        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
        }

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.

Examples found in repository?
src/client.rs (line 16020)
16016
16017
16018
16019
16020
16021
16022
        pub fn excess_capacity_termination_policy(
            mut self,
            input: crate::model::FleetExcessCapacityTerminationPolicy,
        ) -> Self {
            self.inner = self.inner.excess_capacity_termination_policy(input);
            self
        }

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.

Examples found in repository?
src/client.rs (line 16028)
16024
16025
16026
16027
16028
16029
16030
        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 launch_template_configs.

To override the contents of this collection use set_launch_template_configs.

The configuration for the EC2 Fleet.

Examples found in repository?
src/client.rs (line 16040)
16036
16037
16038
16039
16040
16041
16042
        pub fn launch_template_configs(
            mut self,
            input: crate::model::FleetLaunchTemplateConfigRequest,
        ) -> Self {
            self.inner = self.inner.launch_template_configs(input);
            self
        }

The configuration for the EC2 Fleet.

Examples found in repository?
src/client.rs (line 16050)
16044
16045
16046
16047
16048
16049
16050
16051
16052
        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
        }

The number of units to request.

Examples found in repository?
src/client.rs (line 16058)
16054
16055
16056
16057
16058
16059
16060
        pub fn target_capacity_specification(
            mut self,
            input: crate::model::TargetCapacitySpecificationRequest,
        ) -> Self {
            self.inner = self.inner.target_capacity_specification(input);
            self
        }

The number of units to request.

Examples found in repository?
src/client.rs (line 16066)
16062
16063
16064
16065
16066
16067
16068
        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
        }

Indicates whether running instances should be terminated when the EC2 Fleet expires.

Examples found in repository?
src/client.rs (line 16071)
16070
16071
16072
16073
        pub fn terminate_instances_with_expiration(mut self, input: bool) -> Self {
            self.inner = self.inner.terminate_instances_with_expiration(input);
            self
        }

Indicates whether running instances should be terminated when the EC2 Fleet expires.

Examples found in repository?
src/client.rs (line 16079)
16075
16076
16077
16078
16079
16080
16081
        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
        }

The fleet type. The default value is maintain.

  • maintain - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.

  • request - 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.

  • instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.

For more information, see EC2 Fleet request types in the Amazon EC2 User Guide.

Examples found in repository?
src/client.rs (line 16090)
16089
16090
16091
16092
        pub fn r#type(mut self, input: crate::model::FleetType) -> Self {
            self.inner = self.inner.r#type(input);
            self
        }

The fleet type. The default value is maintain.

  • maintain - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.

  • request - 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.

  • instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.

For more information, see EC2 Fleet request types in the Amazon EC2 User Guide.

Examples found in repository?
src/client.rs (line 16101)
16100
16101
16102
16103
        pub fn set_type(mut self, input: std::option::Option<crate::model::FleetType>) -> Self {
            self.inner = self.inner.set_type(input);
            self
        }

The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.

Examples found in repository?
src/client.rs (line 16106)
16105
16106
16107
16108
        pub fn valid_from(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.inner = self.inner.valid_from(input);
            self
        }

The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.

Examples found in repository?
src/client.rs (line 16114)
16110
16111
16112
16113
16114
16115
16116
        pub fn set_valid_from(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.inner = self.inner.set_valid_from(input);
            self
        }

The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). 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.

Examples found in repository?
src/client.rs (line 16119)
16118
16119
16120
16121
        pub fn valid_until(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.inner = self.inner.valid_until(input);
            self
        }

The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). 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.

Examples found in repository?
src/client.rs (line 16127)
16123
16124
16125
16126
16127
16128
16129
        pub fn set_valid_until(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.inner = self.inner.set_valid_until(input);
            self
        }

Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type maintain. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide.

Examples found in repository?
src/client.rs (line 16132)
16131
16132
16133
16134
        pub fn replace_unhealthy_instances(mut self, input: bool) -> Self {
            self.inner = self.inner.replace_unhealthy_instances(input);
            self
        }

Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type maintain. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide.

Examples found in repository?
src/client.rs (line 16137)
16136
16137
16138
16139
        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 tag_specifications.

To override the contents of this collection use set_tag_specifications.

The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tagging your resources.

If the fleet type is instant, specify a resource type of fleet to tag the fleet or instance to tag the instances at launch.

If the fleet type is maintain or request, specify a resource type of fleet to tag the fleet. You cannot specify a resource type of instance. To tag instances at launch, specify the tags in a launch template.

Examples found in repository?
src/client.rs (line 16148)
16147
16148
16149
16150
        pub fn tag_specifications(mut self, input: crate::model::TagSpecification) -> Self {
            self.inner = self.inner.tag_specifications(input);
            self
        }

The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tagging your resources.

If the fleet type is instant, specify a resource type of fleet to tag the fleet or instance to tag the instances at launch.

If the fleet type is maintain or request, specify a resource type of fleet to tag the fleet. You cannot specify a resource type of instance. To tag instances at launch, specify the tags in a launch template.

Examples found in repository?
src/client.rs (line 16158)
16154
16155
16156
16157
16158
16159
16160
        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
        }

Reserved.

Examples found in repository?
src/client.rs (line 16163)
16162
16163
16164
16165
        pub fn context(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.context(input.into());
            self
        }

Reserved.

Examples found in repository?
src/client.rs (line 16168)
16167
16168
16169
16170
        pub fn set_context(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_context(input);
            self
        }

Consumes the builder and constructs a CreateFleetInput.

Examples found in repository?
src/client.rs (line 15938)
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateFleet,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateFleetError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [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>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more