Struct aws_sdk_m2::input::create_environment_input::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for CreateEnvironmentInput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn instance_type(self, input: impl Into<String>) -> Self
pub fn instance_type(self, input: impl Into<String>) -> Self
The type of instance for the environment.
sourcepub fn set_instance_type(self, input: Option<String>) -> Self
pub fn set_instance_type(self, input: Option<String>) -> Self
The type of instance for the environment.
sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
The description of the environment.
sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
The description of the environment.
sourcepub fn engine_type(self, input: EngineType) -> Self
pub fn engine_type(self, input: EngineType) -> Self
The engine type for the environment.
sourcepub fn set_engine_type(self, input: Option<EngineType>) -> Self
pub fn set_engine_type(self, input: Option<EngineType>) -> Self
The engine type for the environment.
sourcepub fn engine_version(self, input: impl Into<String>) -> Self
pub fn engine_version(self, input: impl Into<String>) -> Self
The version of the engine type for the environment.
sourcepub fn set_engine_version(self, input: Option<String>) -> Self
pub fn set_engine_version(self, input: Option<String>) -> Self
The version of the engine type for the environment.
sourcepub fn subnet_ids(self, input: impl Into<String>) -> Self
pub fn subnet_ids(self, input: impl Into<String>) -> Self
Appends an item to subnet_ids.
To override the contents of this collection use set_subnet_ids.
The list of subnets associated with the VPC for this environment.
sourcepub fn set_subnet_ids(self, input: Option<Vec<String>>) -> Self
pub fn set_subnet_ids(self, input: Option<Vec<String>>) -> Self
The list of subnets associated with the VPC for this environment.
sourcepub fn security_group_ids(self, input: impl Into<String>) -> Self
pub fn security_group_ids(self, input: impl Into<String>) -> Self
Appends an item to security_group_ids.
To override the contents of this collection use set_security_group_ids.
The list of security groups for the VPC associated with this environment.
sourcepub fn set_security_group_ids(self, input: Option<Vec<String>>) -> Self
pub fn set_security_group_ids(self, input: Option<Vec<String>>) -> Self
The list of security groups for the VPC associated with this environment.
sourcepub fn storage_configurations(self, input: StorageConfiguration) -> Self
pub fn storage_configurations(self, input: StorageConfiguration) -> Self
Appends an item to storage_configurations.
To override the contents of this collection use set_storage_configurations.
Optional. The storage configurations for this environment.
sourcepub fn set_storage_configurations(
self,
input: Option<Vec<StorageConfiguration>>
) -> Self
pub fn set_storage_configurations(
self,
input: Option<Vec<StorageConfiguration>>
) -> Self
Optional. The storage configurations for this environment.
sourcepub fn publicly_accessible(self, input: bool) -> Self
pub fn publicly_accessible(self, input: bool) -> Self
Specifies whether the environment is publicly accessible.
sourcepub fn set_publicly_accessible(self, input: Option<bool>) -> Self
pub fn set_publicly_accessible(self, input: Option<bool>) -> Self
Specifies whether the environment is publicly accessible.
sourcepub fn high_availability_config(self, input: HighAvailabilityConfig) -> Self
pub fn high_availability_config(self, input: HighAvailabilityConfig) -> Self
The details of a high availability configuration for this runtime environment.
sourcepub fn set_high_availability_config(
self,
input: Option<HighAvailabilityConfig>
) -> Self
pub fn set_high_availability_config(
self,
input: Option<HighAvailabilityConfig>
) -> Self
The details of a high availability configuration for this runtime environment.
Adds a key-value pair to tags.
To override the contents of this collection use set_tags.
The tags for the environment.
sourcepub fn preferred_maintenance_window(self, input: impl Into<String>) -> Self
pub fn preferred_maintenance_window(self, input: impl Into<String>) -> Self
Configures a desired maintenance window for the environment. If you do not provide a value, a random system-generated value will be assigned.
sourcepub fn set_preferred_maintenance_window(self, input: Option<String>) -> Self
pub fn set_preferred_maintenance_window(self, input: Option<String>) -> Self
Configures a desired maintenance window for the environment. If you do not provide a value, a random system-generated value will be assigned.
sourcepub fn client_token(self, input: impl Into<String>) -> Self
pub fn client_token(self, input: impl Into<String>) -> Self
Unique, case-sensitive identifier you provide to ensure the idempotency of the request to create an environment. The service generates the clientToken when the API call is triggered. The token expires after one hour, so if you retry the API within this timeframe with the same clientToken, you will get the same response. The service also handles deleting the clientToken after it expires.
sourcepub fn set_client_token(self, input: Option<String>) -> Self
pub fn set_client_token(self, input: Option<String>) -> Self
Unique, case-sensitive identifier you provide to ensure the idempotency of the request to create an environment. The service generates the clientToken when the API call is triggered. The token expires after one hour, so if you retry the API within this timeframe with the same clientToken, you will get the same response. The service also handles deleting the clientToken after it expires.
sourcepub fn build(self) -> Result<CreateEnvironmentInput, BuildError>
pub fn build(self) -> Result<CreateEnvironmentInput, BuildError>
Consumes the builder and constructs a CreateEnvironmentInput.
Examples found in repository?
1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::CreateEnvironment,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::CreateEnvironmentError>,
> {
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::CreateEnvironmentOutput,
aws_smithy_http::result::SdkError<crate::error::CreateEnvironmentError>,
> {
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
}