aws-sdk-ecs 1.128.0

AWS SDK for Amazon EC2 Container Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_express_gateway_service::_update_express_gateway_service_input::UpdateExpressGatewayServiceInputBuilder;

pub use crate::operation::update_express_gateway_service::_update_express_gateway_service_output::UpdateExpressGatewayServiceOutputBuilder;

impl crate::operation::update_express_gateway_service::builders::UpdateExpressGatewayServiceInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_express_gateway_service::UpdateExpressGatewayServiceOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_express_gateway_service::UpdateExpressGatewayServiceError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_express_gateway_service();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateExpressGatewayService`.
///
/// <p>Updates an existing Express service configuration. Modifies container settings, resource allocation, auto-scaling configuration, and other service parameters without recreating the service.</p>
/// <p>Amazon ECS creates a new service revision with updated configuration and performs a rolling deployment to replace existing tasks. The service remains available during updates, ensuring zero-downtime deployments.</p>
/// <p>Some parameters like the infrastructure role cannot be modified after service creation and require creating a new service.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateExpressGatewayServiceFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_express_gateway_service::builders::UpdateExpressGatewayServiceInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_express_gateway_service::UpdateExpressGatewayServiceOutput,
        crate::operation::update_express_gateway_service::UpdateExpressGatewayServiceError,
    > for UpdateExpressGatewayServiceFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_express_gateway_service::UpdateExpressGatewayServiceOutput,
            crate::operation::update_express_gateway_service::UpdateExpressGatewayServiceError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateExpressGatewayServiceFluentBuilder {
    /// Creates a new `UpdateExpressGatewayServiceFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the UpdateExpressGatewayService as a reference.
    pub fn as_input(&self) -> &crate::operation::update_express_gateway_service::builders::UpdateExpressGatewayServiceInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_express_gateway_service::UpdateExpressGatewayServiceOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_express_gateway_service::UpdateExpressGatewayServiceError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::update_express_gateway_service::UpdateExpressGatewayService::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_express_gateway_service::UpdateExpressGatewayService::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::update_express_gateway_service::UpdateExpressGatewayServiceOutput,
        crate::operation::update_express_gateway_service::UpdateExpressGatewayServiceError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Express service to update.</p>
    pub fn service_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.service_arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Express service to update.</p>
    pub fn set_service_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_service_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Express service to update.</p>
    pub fn get_service_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_service_arn()
    }
    /// <p>The Amazon Resource Name (ARN) of the task execution role for the Express service.</p>
    pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.execution_role_arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the task execution role for the Express service.</p>
    pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_execution_role_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the task execution role for the Express service.</p>
    pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_execution_role_arn()
    }
    /// <p>The path on the container for Application Load Balancer health checks.</p>
    pub fn health_check_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.health_check_path(input.into());
        self
    }
    /// <p>The path on the container for Application Load Balancer health checks.</p>
    pub fn set_health_check_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_health_check_path(input);
        self
    }
    /// <p>The path on the container for Application Load Balancer health checks.</p>
    pub fn get_health_check_path(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_health_check_path()
    }
    /// <p>The primary container configuration for the Express service.</p>
    pub fn primary_container(mut self, input: crate::types::ExpressGatewayContainer) -> Self {
        self.inner = self.inner.primary_container(input);
        self
    }
    /// <p>The primary container configuration for the Express service.</p>
    pub fn set_primary_container(mut self, input: ::std::option::Option<crate::types::ExpressGatewayContainer>) -> Self {
        self.inner = self.inner.set_primary_container(input);
        self
    }
    /// <p>The primary container configuration for the Express service.</p>
    pub fn get_primary_container(&self) -> &::std::option::Option<crate::types::ExpressGatewayContainer> {
        self.inner.get_primary_container()
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role for containers in this task.</p>
    pub fn task_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.task_role_arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role for containers in this task.</p>
    pub fn set_task_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_task_role_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role for containers in this task.</p>
    pub fn get_task_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_task_role_arn()
    }
    /// <p>The network configuration for the Express service tasks. By default, the network configuration for an Express service uses the default VPC.</p>
    pub fn network_configuration(mut self, input: crate::types::ExpressGatewayServiceNetworkConfiguration) -> Self {
        self.inner = self.inner.network_configuration(input);
        self
    }
    /// <p>The network configuration for the Express service tasks. By default, the network configuration for an Express service uses the default VPC.</p>
    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::ExpressGatewayServiceNetworkConfiguration>) -> Self {
        self.inner = self.inner.set_network_configuration(input);
        self
    }
    /// <p>The network configuration for the Express service tasks. By default, the network configuration for an Express service uses the default VPC.</p>
    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::ExpressGatewayServiceNetworkConfiguration> {
        self.inner.get_network_configuration()
    }
    /// <p>The number of CPU units used by the task.</p>
    pub fn cpu(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.cpu(input.into());
        self
    }
    /// <p>The number of CPU units used by the task.</p>
    pub fn set_cpu(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_cpu(input);
        self
    }
    /// <p>The number of CPU units used by the task.</p>
    pub fn get_cpu(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_cpu()
    }
    /// <p>The amount of memory (in MiB) used by the task.</p>
    pub fn memory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.memory(input.into());
        self
    }
    /// <p>The amount of memory (in MiB) used by the task.</p>
    pub fn set_memory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_memory(input);
        self
    }
    /// <p>The amount of memory (in MiB) used by the task.</p>
    pub fn get_memory(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_memory()
    }
    /// <p>The auto-scaling configuration for the Express service.</p>
    pub fn scaling_target(mut self, input: crate::types::ExpressGatewayScalingTarget) -> Self {
        self.inner = self.inner.scaling_target(input);
        self
    }
    /// <p>The auto-scaling configuration for the Express service.</p>
    pub fn set_scaling_target(mut self, input: ::std::option::Option<crate::types::ExpressGatewayScalingTarget>) -> Self {
        self.inner = self.inner.set_scaling_target(input);
        self
    }
    /// <p>The auto-scaling configuration for the Express service.</p>
    pub fn get_scaling_target(&self) -> &::std::option::Option<crate::types::ExpressGatewayScalingTarget> {
        self.inner.get_scaling_target()
    }
}