#[non_exhaustive]
pub struct ClusterBuilder { /* private fields */ }
Expand description

A builder for Cluster.

Implementations§

source§

impl ClusterBuilder

source

pub fn cluster_arn(self, input: impl Into<String>) -> Self

The Amazon Resource Name (ARN) that identifies the cluster. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.

source

pub fn set_cluster_arn(self, input: Option<String>) -> Self

The Amazon Resource Name (ARN) that identifies the cluster. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.

source

pub fn get_cluster_arn(&self) -> &Option<String>

The Amazon Resource Name (ARN) that identifies the cluster. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.

source

pub fn cluster_name(self, input: impl Into<String>) -> Self

A user-generated string that you use to identify your cluster.

source

pub fn set_cluster_name(self, input: Option<String>) -> Self

A user-generated string that you use to identify your cluster.

source

pub fn get_cluster_name(&self) -> &Option<String>

A user-generated string that you use to identify your cluster.

source

pub fn configuration(self, input: ClusterConfiguration) -> Self

The execute command configuration for the cluster.

source

pub fn set_configuration(self, input: Option<ClusterConfiguration>) -> Self

The execute command configuration for the cluster.

source

pub fn get_configuration(&self) -> &Option<ClusterConfiguration>

The execute command configuration for the cluster.

source

pub fn status(self, input: impl Into<String>) -> Self

The status of the cluster. The following are the possible states that are returned.

ACTIVE

The cluster is ready to accept tasks and if applicable you can register container instances with the cluster.

PROVISIONING

The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being created.

DEPROVISIONING

The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being deleted.

FAILED

The cluster has capacity providers that are associated with it and the resources needed for the capacity provider have failed to create.

INACTIVE

The cluster has been deleted. Clusters with an INACTIVE status may remain discoverable in your account for a period of time. However, this behavior is subject to change in the future. We don't recommend that you rely on INACTIVE clusters persisting.

source

pub fn set_status(self, input: Option<String>) -> Self

The status of the cluster. The following are the possible states that are returned.

ACTIVE

The cluster is ready to accept tasks and if applicable you can register container instances with the cluster.

PROVISIONING

The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being created.

DEPROVISIONING

The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being deleted.

FAILED

The cluster has capacity providers that are associated with it and the resources needed for the capacity provider have failed to create.

INACTIVE

The cluster has been deleted. Clusters with an INACTIVE status may remain discoverable in your account for a period of time. However, this behavior is subject to change in the future. We don't recommend that you rely on INACTIVE clusters persisting.

source

pub fn get_status(&self) -> &Option<String>

The status of the cluster. The following are the possible states that are returned.

ACTIVE

The cluster is ready to accept tasks and if applicable you can register container instances with the cluster.

PROVISIONING

The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being created.

DEPROVISIONING

The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being deleted.

FAILED

The cluster has capacity providers that are associated with it and the resources needed for the capacity provider have failed to create.

INACTIVE

The cluster has been deleted. Clusters with an INACTIVE status may remain discoverable in your account for a period of time. However, this behavior is subject to change in the future. We don't recommend that you rely on INACTIVE clusters persisting.

source

pub fn registered_container_instances_count(self, input: i32) -> Self

The number of container instances registered into the cluster. This includes container instances in both ACTIVE and DRAINING status.

source

pub fn set_registered_container_instances_count( self, input: Option<i32> ) -> Self

The number of container instances registered into the cluster. This includes container instances in both ACTIVE and DRAINING status.

source

pub fn get_registered_container_instances_count(&self) -> &Option<i32>

The number of container instances registered into the cluster. This includes container instances in both ACTIVE and DRAINING status.

source

pub fn running_tasks_count(self, input: i32) -> Self

The number of tasks in the cluster that are in the RUNNING state.

source

pub fn set_running_tasks_count(self, input: Option<i32>) -> Self

The number of tasks in the cluster that are in the RUNNING state.

source

pub fn get_running_tasks_count(&self) -> &Option<i32>

The number of tasks in the cluster that are in the RUNNING state.

source

pub fn pending_tasks_count(self, input: i32) -> Self

The number of tasks in the cluster that are in the PENDING state.

source

pub fn set_pending_tasks_count(self, input: Option<i32>) -> Self

The number of tasks in the cluster that are in the PENDING state.

source

pub fn get_pending_tasks_count(&self) -> &Option<i32>

The number of tasks in the cluster that are in the PENDING state.

source

pub fn active_services_count(self, input: i32) -> Self

The number of services that are running on the cluster in an ACTIVE state. You can view these services with ListServices.

source

pub fn set_active_services_count(self, input: Option<i32>) -> Self

The number of services that are running on the cluster in an ACTIVE state. You can view these services with ListServices.

source

pub fn get_active_services_count(&self) -> &Option<i32>

The number of services that are running on the cluster in an ACTIVE state. You can view these services with ListServices.

source

pub fn statistics(self, input: KeyValuePair) -> Self

Appends an item to statistics.

To override the contents of this collection use set_statistics.

Additional information about your clusters that are separated by launch type. They include the following:

  • runningEC2TasksCount

  • RunningFargateTasksCount

  • pendingEC2TasksCount

  • pendingFargateTasksCount

  • activeEC2ServiceCount

  • activeFargateServiceCount

  • drainingEC2ServiceCount

  • drainingFargateServiceCount

source

pub fn set_statistics(self, input: Option<Vec<KeyValuePair>>) -> Self

Additional information about your clusters that are separated by launch type. They include the following:

  • runningEC2TasksCount

  • RunningFargateTasksCount

  • pendingEC2TasksCount

  • pendingFargateTasksCount

  • activeEC2ServiceCount

  • activeFargateServiceCount

  • drainingEC2ServiceCount

  • drainingFargateServiceCount

source

pub fn get_statistics(&self) -> &Option<Vec<KeyValuePair>>

Additional information about your clusters that are separated by launch type. They include the following:

  • runningEC2TasksCount

  • RunningFargateTasksCount

  • pendingEC2TasksCount

  • pendingFargateTasksCount

  • activeEC2ServiceCount

  • activeFargateServiceCount

  • drainingEC2ServiceCount

  • drainingFargateServiceCount

source

pub fn tags(self, input: Tag) -> Self

Appends an item to tags.

To override the contents of this collection use set_tags.

The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.

The following basic restrictions apply to tags:

  • Maximum number of tags per resource - 50

  • For each resource, each tag key must be unique, and each tag key can have only one value.

  • Maximum key length - 128 Unicode characters in UTF-8

  • Maximum value length - 256 Unicode characters in UTF-8

  • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

  • Tag keys and values are case-sensitive.

  • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

source

pub fn set_tags(self, input: Option<Vec<Tag>>) -> Self

The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.

The following basic restrictions apply to tags:

  • Maximum number of tags per resource - 50

  • For each resource, each tag key must be unique, and each tag key can have only one value.

  • Maximum key length - 128 Unicode characters in UTF-8

  • Maximum value length - 256 Unicode characters in UTF-8

  • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

  • Tag keys and values are case-sensitive.

  • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

source

pub fn get_tags(&self) -> &Option<Vec<Tag>>

The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.

The following basic restrictions apply to tags:

  • Maximum number of tags per resource - 50

  • For each resource, each tag key must be unique, and each tag key can have only one value.

  • Maximum key length - 128 Unicode characters in UTF-8

  • Maximum value length - 256 Unicode characters in UTF-8

  • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

  • Tag keys and values are case-sensitive.

  • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

source

pub fn settings(self, input: ClusterSetting) -> Self

Appends an item to settings.

To override the contents of this collection use set_settings.

The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for a cluster.

source

pub fn set_settings(self, input: Option<Vec<ClusterSetting>>) -> Self

The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for a cluster.

source

pub fn get_settings(&self) -> &Option<Vec<ClusterSetting>>

The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for a cluster.

source

pub fn capacity_providers(self, input: impl Into<String>) -> Self

Appends an item to capacity_providers.

To override the contents of this collection use set_capacity_providers.

The capacity providers associated with the cluster.

source

pub fn set_capacity_providers(self, input: Option<Vec<String>>) -> Self

The capacity providers associated with the cluster.

source

pub fn get_capacity_providers(&self) -> &Option<Vec<String>>

The capacity providers associated with the cluster.

source

pub fn default_capacity_provider_strategy( self, input: CapacityProviderStrategyItem ) -> Self

Appends an item to default_capacity_provider_strategy.

To override the contents of this collection use set_default_capacity_provider_strategy.

The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

source

pub fn set_default_capacity_provider_strategy( self, input: Option<Vec<CapacityProviderStrategyItem>> ) -> Self

The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

source

pub fn get_default_capacity_provider_strategy( &self ) -> &Option<Vec<CapacityProviderStrategyItem>>

The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

source

pub fn attachments(self, input: Attachment) -> Self

Appends an item to attachments.

To override the contents of this collection use set_attachments.

The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.

source

pub fn set_attachments(self, input: Option<Vec<Attachment>>) -> Self

The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.

source

pub fn get_attachments(&self) -> &Option<Vec<Attachment>>

The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.

source

pub fn attachments_status(self, input: impl Into<String>) -> Self

The status of the capacity providers associated with the cluster. The following are the states that are returned.

UPDATE_IN_PROGRESS

The available capacity providers for the cluster are updating.

UPDATE_COMPLETE

The capacity providers have successfully updated.

UPDATE_FAILED

The capacity provider updates failed.

source

pub fn set_attachments_status(self, input: Option<String>) -> Self

The status of the capacity providers associated with the cluster. The following are the states that are returned.

UPDATE_IN_PROGRESS

The available capacity providers for the cluster are updating.

UPDATE_COMPLETE

The capacity providers have successfully updated.

UPDATE_FAILED

The capacity provider updates failed.

source

pub fn get_attachments_status(&self) -> &Option<String>

The status of the capacity providers associated with the cluster. The following are the states that are returned.

UPDATE_IN_PROGRESS

The available capacity providers for the cluster are updating.

UPDATE_COMPLETE

The capacity providers have successfully updated.

UPDATE_FAILED

The capacity provider updates failed.

source

pub fn service_connect_defaults( self, input: ClusterServiceConnectDefaults ) -> Self

Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the enabled parameter to true in the ServiceConnectConfiguration. You can set the namespace of each service individually in the ServiceConnectConfiguration to override this default parameter.

Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.

source

pub fn set_service_connect_defaults( self, input: Option<ClusterServiceConnectDefaults> ) -> Self

Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the enabled parameter to true in the ServiceConnectConfiguration. You can set the namespace of each service individually in the ServiceConnectConfiguration to override this default parameter.

Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.

source

pub fn get_service_connect_defaults( &self ) -> &Option<ClusterServiceConnectDefaults>

Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the enabled parameter to true in the ServiceConnectConfiguration. You can set the namespace of each service individually in the ServiceConnectConfiguration to override this default parameter.

Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.

source

pub fn build(self) -> Cluster

Consumes the builder and constructs a Cluster.

Trait Implementations§

source§

impl Clone for ClusterBuilder

source§

fn clone(&self) -> ClusterBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ClusterBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ClusterBuilder

source§

fn default() -> ClusterBuilder

Returns the “default value” for a type. Read more
source§

impl PartialEq for ClusterBuilder

source§

fn eq(&self, other: &ClusterBuilder) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for ClusterBuilder

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more