using System; using System.Collections.Generic; namespace Amazon.Lambda.CloudWatchEvents.ECSEvents { /// /// Details on a task in a cluster. /// https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Task.html /// public class Task { /// /// The Elastic Network Adapter associated with the task if the task uses the awsvpc network mode. /// public List Attachments { get; set; } /// /// The attributes of the task. /// public List Attributes { get; set; } /// /// The availability zone of the task. /// public string AvailabilityZone { get; set; } /// /// The capacity provider associated with the task. /// public string CapacityProviderName { get; set; } /// /// The ARN of the cluster that hosts the task. /// public string ClusterArn { get; set; } /// /// The connectivity status of a task. /// public string Connectivity { get; set; } /// /// The Unix time stamp for when the task last went into CONNECTED status. /// public DateTime ConnectivityAt { get; set; } /// /// The ARN of the container instances that host the task. /// public string ContainerInstanceArn { get; set; } /// /// The containers associated with the task. /// public List Containers { get; set; } /// /// The number of CPU units used by the task. It can be expressed as an integer using CPU units, /// for example 1024, or as a string using vCPUs, for example 1 vCPU or 1 vcpu, in a task definition. /// String values are converted to an integer indicating the CPU units when the task definition is registered. /// See https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Task.html for extra info. /// public string Cpu { get; set; } /// /// The Unix time stamp for when the task was created (the task entered the PENDING state). /// public DateTime CreatedAt { get; set; } /// /// The desired status of the task. For more information, /// see Task Lifecycle: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_life_cycle.html. /// public string DesiredStatus { get; set; } /// /// Whether or not execute command functionality is enabled for this task. If true, this enables execute command functionality on all containers in the task. /// public bool EnableExecuteCommand { get; set; } /// /// The ephemeral storage settings for the task. /// public EphemeralStorage EphemeralStorage { get; set; } /// /// The Unix time stamp for when the task execution stopped. /// public DateTime ExecutionStoppedAt { get; set; } /// /// The name of the task group associated with the task. /// public string Group { get; set; } /// /// The health status for the task, which is determined by the health of the essential containers in the task. /// If all essential containers in the task are reporting as HEALTHY, then the task status also /// reports as HEALTHY. If any essential containers in the task are reporting as UNHEALTHY or UNKNOWN, /// then the task status also reports as UNHEALTHY or UNKNOWN, accordingly. /// See https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Task.html for extra info. /// public string HealthStatus { get; set; } /// /// The Elastic Inference accelerator associated with the task. /// public List InferenceAccelerators { get; set; } /// /// The last known status of the task. For more information, /// see Task Lifecycle: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_life_cycle.html. /// public string LastStatus { get; set; } /// /// The launch type on which your task is running. /// public string LaunchType { get; set; } /// /// The amount of memory (in MiB) used by the task. It can be expressed as an integer using MiB, /// for example 1024, or as a string using GB, for example 1GB or 1 GB, in a task definition. /// String values are converted to an integer indicating the MiB when the task definition is registered. /// See https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Task.html for extra info. /// public string Memory { get; set; } /// /// One or more container overrides. /// public TaskOverride Overrides { get; set; } /// /// The platform version on which your task is running. For more information, /// see AWS Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide. /// https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html /// public string PlatformVersion { get; set; } /// /// The Unix time stamp for when the container image pull began. /// public DateTime PullStartedAt { get; set; } /// /// The Unix time stamp for when the container image pull completed. /// public DateTime PullStoppedAt { get; set; } /// /// The Unix time stamp for when the task started (the task /// transitioned from the PENDING state to the RUNNING state). /// public DateTime StartedAt { get; set; } /// /// The tag specified when a task is started. If the task is started by an Amazon ECS service, /// then the startedBy parameter contains the deployment ID of the service that starts it. /// public string StartedBy { get; set; } /// /// The stop code indicating why a task was stopped. The stoppedReason may contain additional details. /// public string StopCode { get; set; } /// /// The Unix time stamp for when the task stops (transitions from the RUNNING state to STOPPED). /// public DateTime StoppedAt { get; set; } /// /// The reason that the task was stopped. /// public string StoppedReason { get; set; } /// /// The Unix timestamp for when the task stops (transitions from the RUNNING state to STOPPED). /// public DateTime StoppingAt { get; set; } /// /// The metadata that you apply to the task to help you categorize and organize them. Each tag consists /// of a key and an optional value, both of which you define. /// See https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Task.html for extra info. /// public List> Tags { get; set; } /// /// The Amazon Resource Name (ARN) of the task. /// public string TaskArn { get; set; } /// /// The ARN of the task definition that creates the task. /// public string TaskDefinitionArn { get; set; } /// /// The version counter for the task. Every time a task experiences a change that triggers a CloudWatch event, /// the version counter is incremented. If you are replicating your Amazon ECS task state with /// CloudWatch Events, you can compare the version of a task reported by the Amazon ECS APIs with /// the version reported in CloudWatch Events for the task (inside the detail object) to verify that /// the version in your event stream is current. /// public long Version { get; set; } // NOTE: The UpdatedAt property is not present in the Task object documentation but has been // added here for convenience. /// /// The Unix time stamp for when the service was last updated. /// public DateTime UpdatedAt { get; set; } } }