Struct aws_sdk_ecs::types::TaskSet

source ·
#[non_exhaustive]
pub struct TaskSet {
Show 24 fields pub id: Option<String>, pub task_set_arn: Option<String>, pub service_arn: Option<String>, pub cluster_arn: Option<String>, pub started_by: Option<String>, pub external_id: Option<String>, pub status: Option<String>, pub task_definition: Option<String>, pub computed_desired_count: i32, pub pending_count: i32, pub running_count: i32, pub created_at: Option<DateTime>, pub updated_at: Option<DateTime>, pub launch_type: Option<LaunchType>, pub capacity_provider_strategy: Option<Vec<CapacityProviderStrategyItem>>, pub platform_version: Option<String>, pub platform_family: Option<String>, pub network_configuration: Option<NetworkConfiguration>, pub load_balancers: Option<Vec<LoadBalancer>>, pub service_registries: Option<Vec<ServiceRegistry>>, pub scale: Option<Scale>, pub stability_status: Option<StabilityStatus>, pub stability_status_at: Option<DateTime>, pub tags: Option<Vec<Tag>>,
}
Expand description

Information about a set of Amazon ECS tasks in either an CodeDeploy or an EXTERNAL deployment. An Amazon ECS task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§id: Option<String>

The ID of the task set.

§task_set_arn: Option<String>

The Amazon Resource Name (ARN) of the task set.

§service_arn: Option<String>

The Amazon Resource Name (ARN) of the service the task set exists in.

§cluster_arn: Option<String>

The Amazon Resource Name (ARN) of the cluster that the service that hosts the task set exists in.

§started_by: Option<String>

The tag specified when a task set is started. If an CodeDeploy deployment created the task set, the startedBy parameter is CODE_DEPLOY. If an external deployment created the task set, the startedBy field isn't used.

§external_id: Option<String>

The external ID associated with the task set.

If an CodeDeploy deployment created a task set, the externalId parameter contains the CodeDeploy deployment ID.

If a task set is created for an external deployment and is associated with a service discovery registry, the externalId parameter contains the ECS_TASK_SET_EXTERNAL_ID Cloud Map attribute.

§status: Option<String>

The status of the task set. The following describes each state.

PRIMARY

The task set is serving production traffic.

ACTIVE

The task set isn't serving production traffic.

DRAINING

The tasks in the task set are being stopped, and their corresponding targets are being deregistered from their target group.

§task_definition: Option<String>

The task definition that the task set is using.

§computed_desired_count: i32

The computed desired count for the task set. This is calculated by multiplying the service's desiredCount by the task set's scale percentage. The result is always rounded up. For example, if the computed desired count is 1.2, it rounds up to 2 tasks.

§pending_count: i32

The number of tasks in the task set that are in the PENDING status during a deployment. A task in the PENDING state is preparing to enter the RUNNING state. A task set enters the PENDING status when it launches for the first time or when it's restarted after being in the STOPPED state.

§running_count: i32

The number of tasks in the task set that are in the RUNNING status during a deployment. A task in the RUNNING state is running and ready for use.

§created_at: Option<DateTime>

The Unix timestamp for the time when the task set was created.

§updated_at: Option<DateTime>

The Unix timestamp for the time when the task set was last updated.

§launch_type: Option<LaunchType>

The launch type the tasks in the task set are using. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.

§capacity_provider_strategy: Option<Vec<CapacityProviderStrategyItem>>

The capacity provider strategy that are associated with the task set.

§platform_version: Option<String>

The Fargate platform version where the tasks in the task set are running. A platform version is only specified for tasks run on Fargate. For more information, see Fargate platform versions in the Amazon Elastic Container Service Developer Guide.

§platform_family: Option<String>

The operating system that your tasks in the set are running on. A platform family is specified only for tasks that use the Fargate launch type.

All tasks in the set must have the same value.

§network_configuration: Option<NetworkConfiguration>

The network configuration for the task set.

§load_balancers: Option<Vec<LoadBalancer>>

Details on a load balancer that are used with a task set.

§service_registries: Option<Vec<ServiceRegistry>>

The details for the service discovery registries to assign to this task set. For more information, see Service discovery.

§scale: Option<Scale>

A floating-point percentage of your desired number of tasks to place and keep running in the task set.

§stability_status: Option<StabilityStatus>

The stability status. This indicates whether the task set has reached a steady state. If the following conditions are met, the task set are in STEADY_STATE:

  • The task runningCount is equal to the computedDesiredCount.

  • The pendingCount is 0.

  • There are no tasks that are running on container instances in the DRAINING status.

  • All tasks are reporting a healthy status from the load balancers, service discovery, and container health checks.

If any of those conditions aren't met, the stability status returns STABILIZING.

§stability_status_at: Option<DateTime>

The Unix timestamp for the time when the task set stability status was retrieved.

§tags: Option<Vec<Tag>>

The metadata that you apply to the task set 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.

Implementations§

source§

impl TaskSet

source

pub fn id(&self) -> Option<&str>

The ID of the task set.

source

pub fn task_set_arn(&self) -> Option<&str>

The Amazon Resource Name (ARN) of the task set.

source

pub fn service_arn(&self) -> Option<&str>

The Amazon Resource Name (ARN) of the service the task set exists in.

source

pub fn cluster_arn(&self) -> Option<&str>

The Amazon Resource Name (ARN) of the cluster that the service that hosts the task set exists in.

source

pub fn started_by(&self) -> Option<&str>

The tag specified when a task set is started. If an CodeDeploy deployment created the task set, the startedBy parameter is CODE_DEPLOY. If an external deployment created the task set, the startedBy field isn't used.

source

pub fn external_id(&self) -> Option<&str>

The external ID associated with the task set.

If an CodeDeploy deployment created a task set, the externalId parameter contains the CodeDeploy deployment ID.

If a task set is created for an external deployment and is associated with a service discovery registry, the externalId parameter contains the ECS_TASK_SET_EXTERNAL_ID Cloud Map attribute.

source

pub fn status(&self) -> Option<&str>

The status of the task set. The following describes each state.

PRIMARY

The task set is serving production traffic.

ACTIVE

The task set isn't serving production traffic.

DRAINING

The tasks in the task set are being stopped, and their corresponding targets are being deregistered from their target group.

source

pub fn task_definition(&self) -> Option<&str>

The task definition that the task set is using.

source

pub fn computed_desired_count(&self) -> i32

The computed desired count for the task set. This is calculated by multiplying the service's desiredCount by the task set's scale percentage. The result is always rounded up. For example, if the computed desired count is 1.2, it rounds up to 2 tasks.

source

pub fn pending_count(&self) -> i32

The number of tasks in the task set that are in the PENDING status during a deployment. A task in the PENDING state is preparing to enter the RUNNING state. A task set enters the PENDING status when it launches for the first time or when it's restarted after being in the STOPPED state.

source

pub fn running_count(&self) -> i32

The number of tasks in the task set that are in the RUNNING status during a deployment. A task in the RUNNING state is running and ready for use.

source

pub fn created_at(&self) -> Option<&DateTime>

The Unix timestamp for the time when the task set was created.

source

pub fn updated_at(&self) -> Option<&DateTime>

The Unix timestamp for the time when the task set was last updated.

source

pub fn launch_type(&self) -> Option<&LaunchType>

The launch type the tasks in the task set are using. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.

source

pub fn capacity_provider_strategy( &self ) -> Option<&[CapacityProviderStrategyItem]>

The capacity provider strategy that are associated with the task set.

source

pub fn platform_version(&self) -> Option<&str>

The Fargate platform version where the tasks in the task set are running. A platform version is only specified for tasks run on Fargate. For more information, see Fargate platform versions in the Amazon Elastic Container Service Developer Guide.

source

pub fn platform_family(&self) -> Option<&str>

The operating system that your tasks in the set are running on. A platform family is specified only for tasks that use the Fargate launch type.

All tasks in the set must have the same value.

source

pub fn network_configuration(&self) -> Option<&NetworkConfiguration>

The network configuration for the task set.

source

pub fn load_balancers(&self) -> Option<&[LoadBalancer]>

Details on a load balancer that are used with a task set.

source

pub fn service_registries(&self) -> Option<&[ServiceRegistry]>

The details for the service discovery registries to assign to this task set. For more information, see Service discovery.

source

pub fn scale(&self) -> Option<&Scale>

A floating-point percentage of your desired number of tasks to place and keep running in the task set.

source

pub fn stability_status(&self) -> Option<&StabilityStatus>

The stability status. This indicates whether the task set has reached a steady state. If the following conditions are met, the task set are in STEADY_STATE:

  • The task runningCount is equal to the computedDesiredCount.

  • The pendingCount is 0.

  • There are no tasks that are running on container instances in the DRAINING status.

  • All tasks are reporting a healthy status from the load balancers, service discovery, and container health checks.

If any of those conditions aren't met, the stability status returns STABILIZING.

source

pub fn stability_status_at(&self) -> Option<&DateTime>

The Unix timestamp for the time when the task set stability status was retrieved.

source

pub fn tags(&self) -> Option<&[Tag]>

The metadata that you apply to the task set 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§

impl TaskSet

source

pub fn builder() -> TaskSetBuilder

Creates a new builder-style object to manufacture TaskSet.

Trait Implementations§

source§

impl Clone for TaskSet

source§

fn clone(&self) -> TaskSet

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 TaskSet

source§

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

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

impl PartialEq<TaskSet> for TaskSet

source§

fn eq(&self, other: &TaskSet) -> 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 TaskSet

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere 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 Twhere 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 Twhere 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