ECS Task State Change

This is emitted when an ECS task changes state. See AWS documentation for more information on when this might be emitted.

Primary Model

pydantic model botocraft.eventbridge.ecs.ECSTaskStateChangeEvent[source]

Bases: EventBridgeEvent, ECSTaskStateChangeEvent

EventBridge event for ECS task state change.

Show JSON schema
{
   "title": "ECSTaskStateChangeEvent",
   "description": "EventBridge event for ECS task state change.",
   "type": "object",
   "properties": {
      "detail": {
         "$ref": "#/$defs/ECSTaskStateChange"
      },
      "detail-type": {
         "title": "Detail-Type",
         "type": "string"
      },
      "resources": {
         "items": {
            "type": "string"
         },
         "title": "Resources",
         "type": "array"
      },
      "id": {
         "title": "Id",
         "type": "string"
      },
      "source": {
         "title": "Source",
         "type": "string"
      },
      "time": {
         "format": "date-time",
         "title": "Time",
         "type": "string"
      },
      "region": {
         "title": "Region",
         "type": "string"
      },
      "version": {
         "title": "Version",
         "type": "string"
      },
      "account": {
         "title": "Account",
         "type": "string"
      },
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      }
   },
   "$defs": {
      "AttachmentDetails": {
         "description": "Details of the attachment, used to represent the details of an attachment in\nthe context of an ECS task state change event.",
         "properties": {
            "id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Id"
            },
            "type": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Type"
            },
            "status": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Status"
            },
            "details": {
               "items": {
                  "$ref": "#/$defs/Details"
               },
               "title": "Details",
               "type": "array"
            }
         },
         "title": "AttachmentDetails",
         "type": "object"
      },
      "AttributesDetails": {
         "description": "The details of an attribute in the context of an ECS task state change event.",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Name"
            },
            "value": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Value"
            }
         },
         "title": "AttributesDetails",
         "type": "object"
      },
      "ContainerDetails": {
         "description": "Details about a container in the task definition in the context of an ECS\ntask state change event.",
         "properties": {
            "image": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Image"
            },
            "imageDigest": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Imagedigest"
            },
            "networkInterfaces": {
               "items": {
                  "$ref": "#/$defs/NetworkInterfaceDetails"
               },
               "title": "Networkinterfaces",
               "type": "array"
            },
            "networkBindings": {
               "items": {
                  "$ref": "#/$defs/NetworkBindingDetails"
               },
               "title": "Networkbindings",
               "type": "array"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memory"
            },
            "memoryReservation": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memoryreservation"
            },
            "taskArn": {
               "title": "Taskarn",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "exitCode": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Exitcode"
            },
            "cpu": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Cpu"
            },
            "containerArn": {
               "title": "Containerarn",
               "type": "string"
            },
            "lastStatus": {
               "title": "Laststatus",
               "type": "string"
            },
            "runtimeId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Runtimeid"
            },
            "reason": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Reason"
            },
            "gpuIds": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Gpuids"
            }
         },
         "required": [
            "taskArn",
            "name",
            "containerArn",
            "lastStatus"
         ],
         "title": "ContainerDetails",
         "type": "object"
      },
      "Details": {
         "description": "A details of a :py:class:`AttachmentDetails` object in the context of\na ECS task state change event.",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Name"
            },
            "value": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Value"
            }
         },
         "title": "Details",
         "type": "object"
      },
      "ECSTaskStateChange": {
         "description": "The main details of the ECS task state change event.  This is the ``detail``\nfield.  in the json of the event.",
         "properties": {
            "overrides": {
               "$ref": "#/$defs/Overrides"
            },
            "executionStoppedAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Executionstoppedat"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memory"
            },
            "attachments": {
               "items": {
                  "$ref": "#/$defs/AttachmentDetails"
               },
               "title": "Attachments",
               "type": "array"
            },
            "attributes": {
               "items": {
                  "$ref": "#/$defs/AttributesDetails"
               },
               "title": "Attributes",
               "type": "array"
            },
            "pullStartedAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Pullstartedat"
            },
            "taskArn": {
               "title": "Taskarn",
               "type": "string"
            },
            "startedAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Startedat"
            },
            "createdAt": {
               "format": "date-time",
               "title": "Createdat",
               "type": "string"
            },
            "clusterArn": {
               "title": "Clusterarn",
               "type": "string"
            },
            "connectivity": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Connectivity"
            },
            "platformVersion": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Platformversion"
            },
            "containerInstanceArn": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Containerinstancearn"
            },
            "launchType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtype"
            },
            "group": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Group"
            },
            "updatedAt": {
               "format": "date-time",
               "title": "Updatedat",
               "type": "string"
            },
            "stopCode": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Stopcode"
            },
            "pullStoppedAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Pullstoppedat"
            },
            "connectivityAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Connectivityat"
            },
            "startedBy": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Startedby"
            },
            "cpu": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Cpu"
            },
            "version": {
               "title": "Version",
               "type": "number"
            },
            "stoppingAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Stoppingat"
            },
            "stoppedAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Stoppedat"
            },
            "taskDefinitionArn": {
               "title": "Taskdefinitionarn",
               "type": "string"
            },
            "stoppedReason": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Stoppedreason"
            },
            "containers": {
               "items": {
                  "$ref": "#/$defs/ContainerDetails"
               },
               "title": "Containers",
               "type": "array"
            },
            "desiredStatus": {
               "title": "Desiredstatus",
               "type": "string"
            },
            "lastStatus": {
               "title": "Laststatus",
               "type": "string"
            },
            "availabilityZone": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Availabilityzone"
            }
         },
         "required": [
            "overrides",
            "taskArn",
            "createdAt",
            "clusterArn",
            "updatedAt",
            "version",
            "taskDefinitionArn",
            "desiredStatus",
            "lastStatus"
         ],
         "title": "ECSTaskStateChange",
         "type": "object"
      },
      "Environment": {
         "additionalProperties": {
            "type": "string"
         },
         "title": "Environment",
         "type": "object"
      },
      "NetworkBindingDetails": {
         "description": "Network binding details in the context of an ECS task state change event.",
         "properties": {
            "bindIP": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Bindip"
            },
            "protocol": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Protocol"
            },
            "containerPort": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Containerport"
            },
            "hostPort": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Hostport"
            }
         },
         "title": "NetworkBindingDetails",
         "type": "object"
      },
      "NetworkInterfaceDetails": {
         "description": "The details of a network interface in the context of an ECS task state change event.",
         "properties": {
            "privateIpv4Address": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Privateipv4Address"
            },
            "ipv6Address": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ipv6Address"
            },
            "attachmentId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Attachmentid"
            }
         },
         "title": "NetworkInterfaceDetails",
         "type": "object"
      },
      "Overrides": {
         "description": "Overrides to the task definition in the context of an ECS task state change\nevent.  These are specified in the ``RunTask`` API call.",
         "properties": {
            "containerOverrides": {
               "items": {
                  "$ref": "#/$defs/OverridesItem"
               },
               "title": "Containeroverrides",
               "type": "array"
            }
         },
         "title": "Overrides",
         "type": "object"
      },
      "OverridesItem": {
         "description": "Overrides for a single container in the task definition.",
         "properties": {
            "environment": {
               "items": {
                  "$ref": "#/$defs/Environment"
               },
               "title": "Environment",
               "type": "array"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memory"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "cpu": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Cpu"
            },
            "command": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Command"
            }
         },
         "required": [
            "name"
         ],
         "title": "OverridesItem",
         "type": "object"
      }
   },
   "required": [
      "detail",
      "detail-type",
      "resources",
      "id",
      "source",
      "time",
      "region",
      "version",
      "account"
   ]
}

Fields:
field account: str [Required]

The account the event was generated in

field detail: ECSTaskStateChange [Required]

Where the meat of the event is

field detail_type: str [Required] (alias 'detail-type')

The human readable name of the event

field id: str [Required]

The ID of the event

field region: str [Required]

The region the event was generated in

field resources: list[str] [Required]

The resources the event applies to. This will be a list of ARNs

field source: str [Required]

The source of the event, e.g. “aws.ecs”

field time: datetime [Required]

The time the event was generated, in UTC

field version: str [Required]

The version of the schema for the event

classmethod construct(_fields_set: set[str] | None = None, **values: Any) Self
classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

model_copy(*, update: Mapping[str, Any] | None = None, deep: bool = False) Self
!!! abstract “Usage Documentation”

[model_copy](../concepts/serialization.md#model_copy)

Returns a copy of the model.

!!! note

The underlying instance’s [__dict__][object.__dict__] attribute is copied. This might have unexpected side effects if you store anything in it, on top of the model fields (e.g. the value of [cached properties][functools.cached_property]).

Parameters:
  • update – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep – Set to True to make a deep copy of the model.

Returns:

New model instance.

model_dump_json(*, indent: int | None = None, include: set[int] | set[str] | Mapping[int, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | Mapping[str, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | None = None, exclude: set[int] | set[str] | Mapping[int, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | Mapping[str, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | None = None, context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, round_trip: bool = False, warnings: bool | Literal['none', 'warn', 'error'] = True, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False) str
!!! abstract “Usage Documentation”

[model_dump_json](../concepts/serialization.md#modelmodel_dump_json)

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output.

  • exclude – Field(s) to exclude from the JSON output.

  • context – Additional context to pass to the serializer.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].

  • warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].

  • fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.

  • serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.

Returns:

A JSON string representation of the model.

classmethod model_validate(obj: Any, *, strict: bool | None = None, from_attributes: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate a pydantic model instance.

Parameters:
  • obj – The object to validate.

  • strict – Whether to enforce types strictly.

  • from_attributes – Whether to extract data from object attributes.

  • context – Additional context to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Raises:

ValidationError – If the object could not be validated.

Returns:

The validated model instance.

classmethod model_validate_json(json_data: str | bytes | bytearray, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self
!!! abstract “Usage Documentation”

[JSON Parsing](../concepts/json.md#json-parsing)

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data – The JSON data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

Raises:

ValidationError – If json_data is not a JSON string or the object could not be validated.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

classmethod parse_file(path: str | Path, *, content_type: str | None = None, encoding: str = 'utf8', proto: DeprecatedParseProtocol | None = None, allow_pickle: bool = False) Self
classmethod parse_obj(obj: Any) Self
classmethod parse_raw(b: str | bytes, *, content_type: str | None = None, encoding: str = 'utf8', proto: DeprecatedParseProtocol | None = None, allow_pickle: bool = False) Self
property architecture: str

Get the architecture of the task from the event.

property cluster: Cluster

Get the cluster name from the event.

property container_instance: ContainerInstance | None

Get the container instance ARN from the event.

property is_fargate: bool

Check if the task is a Fargate task.

session: Any | None = FieldInfo(annotation=Union[Any, NoneType], required=False, default=None, exclude=True)
property task: str

Get the task ARN from the event.

property task_definition: TaskDefinition

Get the TaskDefinition object from the event.

Raw Event Models from AWS Schema

pydantic model botocraft.eventbridge.raw.ecs.task_state_change.AttachmentDetails[source]

Bases: BaseModel

Details of the attachment, used to represent the details of an attachment in the context of an ECS task state change event.

Show JSON schema
{
   "title": "AttachmentDetails",
   "description": "Details of the attachment, used to represent the details of an attachment in\nthe context of an ECS task state change event.",
   "type": "object",
   "properties": {
      "id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Id"
      },
      "type": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Type"
      },
      "status": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Status"
      },
      "details": {
         "items": {
            "$ref": "#/$defs/Details"
         },
         "title": "Details",
         "type": "array"
      }
   },
   "$defs": {
      "Details": {
         "description": "A details of a :py:class:`AttachmentDetails` object in the context of\na ECS task state change event.",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Name"
            },
            "value": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Value"
            }
         },
         "title": "Details",
         "type": "object"
      }
   }
}

Fields:
field details: list[Details] [Optional]

The details of the attachment

field id: str | None = None

The attachment ID

field status: str | None = None

The status of the attachment

field type: str | None = None

The type of the attachment

pydantic model botocraft.eventbridge.raw.ecs.task_state_change.AttributesDetails[source]

Bases: BaseModel

The details of an attribute in the context of an ECS task state change event.

Show JSON schema
{
   "title": "AttributesDetails",
   "description": "The details of an attribute in the context of an ECS task state change event.",
   "type": "object",
   "properties": {
      "name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Name"
      },
      "value": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Value"
      }
   }
}

Fields:
field name: str | None = None

The name of the attribute

field value: str | None = None

The value of the attribute

pydantic model botocraft.eventbridge.raw.ecs.task_state_change.ContainerDetails[source]

Bases: BaseModel

Details about a container in the task definition in the context of an ECS task state change event.

Show JSON schema
{
   "title": "ContainerDetails",
   "description": "Details about a container in the task definition in the context of an ECS\ntask state change event.",
   "type": "object",
   "properties": {
      "image": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Image"
      },
      "imageDigest": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Imagedigest"
      },
      "networkInterfaces": {
         "items": {
            "$ref": "#/$defs/NetworkInterfaceDetails"
         },
         "title": "Networkinterfaces",
         "type": "array"
      },
      "networkBindings": {
         "items": {
            "$ref": "#/$defs/NetworkBindingDetails"
         },
         "title": "Networkbindings",
         "type": "array"
      },
      "memory": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Memory"
      },
      "memoryReservation": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Memoryreservation"
      },
      "taskArn": {
         "title": "Taskarn",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "exitCode": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Exitcode"
      },
      "cpu": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Cpu"
      },
      "containerArn": {
         "title": "Containerarn",
         "type": "string"
      },
      "lastStatus": {
         "title": "Laststatus",
         "type": "string"
      },
      "runtimeId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Runtimeid"
      },
      "reason": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Reason"
      },
      "gpuIds": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Gpuids"
      }
   },
   "$defs": {
      "NetworkBindingDetails": {
         "description": "Network binding details in the context of an ECS task state change event.",
         "properties": {
            "bindIP": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Bindip"
            },
            "protocol": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Protocol"
            },
            "containerPort": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Containerport"
            },
            "hostPort": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Hostport"
            }
         },
         "title": "NetworkBindingDetails",
         "type": "object"
      },
      "NetworkInterfaceDetails": {
         "description": "The details of a network interface in the context of an ECS task state change event.",
         "properties": {
            "privateIpv4Address": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Privateipv4Address"
            },
            "ipv6Address": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ipv6Address"
            },
            "attachmentId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Attachmentid"
            }
         },
         "title": "NetworkInterfaceDetails",
         "type": "object"
      }
   },
   "required": [
      "taskArn",
      "name",
      "containerArn",
      "lastStatus"
   ]
}

Fields:
field containerArn: str [Required]

The ARN of the container

field cpu: str | None = None

The maximum amount of CPU allowed to the container

field exitCode: float | None = None

The exit code of the container if it has stopped

field gpuIds: list[str] | None = None

A list of GPU IDs that the container is using

field image: str | None = None

The full URL for the image used to run the container

field imageDigest: str | None = None

The digest of the image used to run the container

field lastStatus: str [Required]

The last status of the container

field memory: str | None = None

The minimum amount of memory required to the container

field memoryReservation: str | None = None

The maximum amount of memory allowed to the container

field name: str [Required]

The name of the container

field networkBindings: list[NetworkBindingDetails] [Optional]

The list of network bindings for the container

field networkInterfaces: list[NetworkInterfaceDetails] [Optional]

The list of network interfaces attached to the container

field reason: str | None = None

The reason why the container has lastStatus

field runtimeId: str | None = None

The runtime ID of the container

field taskArn: str [Required]

The ARN of the task that the container is part of

pydantic model botocraft.eventbridge.raw.ecs.task_state_change.Details[source]

Bases: BaseModel

A details of a AttachmentDetails object in the context of a ECS task state change event.

Show JSON schema
{
   "title": "Details",
   "description": "A details of a :py:class:`AttachmentDetails` object in the context of\na ECS task state change event.",
   "type": "object",
   "properties": {
      "name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Name"
      },
      "value": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Value"
      }
   }
}

Fields:
field name: str | None = None

The name of the detail

field value: str | None = None

The value of the detail

pydantic model botocraft.eventbridge.raw.ecs.task_state_change.ECSTaskStateChange[source]

Bases: BaseModel

The main details of the ECS task state change event. This is the detail field. in the json of the event.

Show JSON schema
{
   "title": "ECSTaskStateChange",
   "description": "The main details of the ECS task state change event.  This is the ``detail``\nfield.  in the json of the event.",
   "type": "object",
   "properties": {
      "overrides": {
         "$ref": "#/$defs/Overrides"
      },
      "executionStoppedAt": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Executionstoppedat"
      },
      "memory": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Memory"
      },
      "attachments": {
         "items": {
            "$ref": "#/$defs/AttachmentDetails"
         },
         "title": "Attachments",
         "type": "array"
      },
      "attributes": {
         "items": {
            "$ref": "#/$defs/AttributesDetails"
         },
         "title": "Attributes",
         "type": "array"
      },
      "pullStartedAt": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Pullstartedat"
      },
      "taskArn": {
         "title": "Taskarn",
         "type": "string"
      },
      "startedAt": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Startedat"
      },
      "createdAt": {
         "format": "date-time",
         "title": "Createdat",
         "type": "string"
      },
      "clusterArn": {
         "title": "Clusterarn",
         "type": "string"
      },
      "connectivity": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Connectivity"
      },
      "platformVersion": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Platformversion"
      },
      "containerInstanceArn": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Containerinstancearn"
      },
      "launchType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Launchtype"
      },
      "group": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Group"
      },
      "updatedAt": {
         "format": "date-time",
         "title": "Updatedat",
         "type": "string"
      },
      "stopCode": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stopcode"
      },
      "pullStoppedAt": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Pullstoppedat"
      },
      "connectivityAt": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Connectivityat"
      },
      "startedBy": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Startedby"
      },
      "cpu": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Cpu"
      },
      "version": {
         "title": "Version",
         "type": "number"
      },
      "stoppingAt": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stoppingat"
      },
      "stoppedAt": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stoppedat"
      },
      "taskDefinitionArn": {
         "title": "Taskdefinitionarn",
         "type": "string"
      },
      "stoppedReason": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stoppedreason"
      },
      "containers": {
         "items": {
            "$ref": "#/$defs/ContainerDetails"
         },
         "title": "Containers",
         "type": "array"
      },
      "desiredStatus": {
         "title": "Desiredstatus",
         "type": "string"
      },
      "lastStatus": {
         "title": "Laststatus",
         "type": "string"
      },
      "availabilityZone": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Availabilityzone"
      }
   },
   "$defs": {
      "AttachmentDetails": {
         "description": "Details of the attachment, used to represent the details of an attachment in\nthe context of an ECS task state change event.",
         "properties": {
            "id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Id"
            },
            "type": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Type"
            },
            "status": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Status"
            },
            "details": {
               "items": {
                  "$ref": "#/$defs/Details"
               },
               "title": "Details",
               "type": "array"
            }
         },
         "title": "AttachmentDetails",
         "type": "object"
      },
      "AttributesDetails": {
         "description": "The details of an attribute in the context of an ECS task state change event.",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Name"
            },
            "value": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Value"
            }
         },
         "title": "AttributesDetails",
         "type": "object"
      },
      "ContainerDetails": {
         "description": "Details about a container in the task definition in the context of an ECS\ntask state change event.",
         "properties": {
            "image": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Image"
            },
            "imageDigest": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Imagedigest"
            },
            "networkInterfaces": {
               "items": {
                  "$ref": "#/$defs/NetworkInterfaceDetails"
               },
               "title": "Networkinterfaces",
               "type": "array"
            },
            "networkBindings": {
               "items": {
                  "$ref": "#/$defs/NetworkBindingDetails"
               },
               "title": "Networkbindings",
               "type": "array"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memory"
            },
            "memoryReservation": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memoryreservation"
            },
            "taskArn": {
               "title": "Taskarn",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "exitCode": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Exitcode"
            },
            "cpu": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Cpu"
            },
            "containerArn": {
               "title": "Containerarn",
               "type": "string"
            },
            "lastStatus": {
               "title": "Laststatus",
               "type": "string"
            },
            "runtimeId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Runtimeid"
            },
            "reason": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Reason"
            },
            "gpuIds": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Gpuids"
            }
         },
         "required": [
            "taskArn",
            "name",
            "containerArn",
            "lastStatus"
         ],
         "title": "ContainerDetails",
         "type": "object"
      },
      "Details": {
         "description": "A details of a :py:class:`AttachmentDetails` object in the context of\na ECS task state change event.",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Name"
            },
            "value": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Value"
            }
         },
         "title": "Details",
         "type": "object"
      },
      "Environment": {
         "additionalProperties": {
            "type": "string"
         },
         "title": "Environment",
         "type": "object"
      },
      "NetworkBindingDetails": {
         "description": "Network binding details in the context of an ECS task state change event.",
         "properties": {
            "bindIP": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Bindip"
            },
            "protocol": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Protocol"
            },
            "containerPort": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Containerport"
            },
            "hostPort": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Hostport"
            }
         },
         "title": "NetworkBindingDetails",
         "type": "object"
      },
      "NetworkInterfaceDetails": {
         "description": "The details of a network interface in the context of an ECS task state change event.",
         "properties": {
            "privateIpv4Address": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Privateipv4Address"
            },
            "ipv6Address": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ipv6Address"
            },
            "attachmentId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Attachmentid"
            }
         },
         "title": "NetworkInterfaceDetails",
         "type": "object"
      },
      "Overrides": {
         "description": "Overrides to the task definition in the context of an ECS task state change\nevent.  These are specified in the ``RunTask`` API call.",
         "properties": {
            "containerOverrides": {
               "items": {
                  "$ref": "#/$defs/OverridesItem"
               },
               "title": "Containeroverrides",
               "type": "array"
            }
         },
         "title": "Overrides",
         "type": "object"
      },
      "OverridesItem": {
         "description": "Overrides for a single container in the task definition.",
         "properties": {
            "environment": {
               "items": {
                  "$ref": "#/$defs/Environment"
               },
               "title": "Environment",
               "type": "array"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memory"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "cpu": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Cpu"
            },
            "command": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Command"
            }
         },
         "required": [
            "name"
         ],
         "title": "OverridesItem",
         "type": "object"
      }
   },
   "required": [
      "overrides",
      "taskArn",
      "createdAt",
      "clusterArn",
      "updatedAt",
      "version",
      "taskDefinitionArn",
      "desiredStatus",
      "lastStatus"
   ]
}

Fields:
field attachments: list[AttachmentDetails] [Optional]

A list of attachments to the task

field attributes: list[AttributesDetails] [Optional]

A list of attributes for the task

field availabilityZone: str | None = None

The availability zone the task is running in

field clusterArn: str [Required]

The ARN of the cluster the task is running in

field connectivity: str | None = None
field connectivityAt: datetime | None = None

The time connectivity was established, in UTC

field containerInstanceArn: str | None = None

The ARN of the container instance the task is running on, if any (Fargate tasks do not have a container instance)

field containers: list[ContainerDetails] [Optional]

The list of containers in the task

field cpu: str | None = None

The maximum amount of CPU allowed to the task

field createdAt: datetime [Required]

The time the task was created, in UTC

field desiredStatus: str [Required]

The desired status of the task

field executionStoppedAt: datetime | None = None

If the task is stopped, the time it was stopped in UTC

field group: str | None = None

? not sure what this is

field lastStatus: str [Required]

The current status of the task

field launchType: str | None = None

The launch type of the task (EC2 or Fargate)

field memory: str | None = None

The task maximum amount of memory

field overrides: Overrides [Required]

Container overrides

field platformVersion: str | None = None

The platform version of the ECS infrastructure

field pullStartedAt: datetime | None = None

The time the images for the started being pulled, in UTC

field pullStoppedAt: datetime | None = None

THe time the pulls of all the images for the task ended, in UTC

field startedAt: datetime | None = None

The time the task was started, in UTC

field startedBy: str | None = None

The ARN of the IAM role or user used that started the task

field stopCode: str | None = None

The AWS code describing why the task was stopped

field stoppedAt: datetime | None = None

The time the task was stopped, in UTC

field stoppedReason: str | None = None

The reason why the task was stopped

field stoppingAt: datetime | None = None

The time we received the stop task request, in UTC

field taskArn: str [Required]

The ARN of the task

field taskDefinitionArn: str [Required]

The ARN of the task definition used to start the task

field updatedAt: datetime [Required]

If the task was updated, the time it was updated in UTC

field version: float [Required]

? not sure what this is

pydantic model botocraft.eventbridge.raw.ecs.task_state_change.ECSTaskStateChangeEvent[source]

Bases: BaseModel

Show JSON schema
{
   "title": "ECSTaskStateChangeEvent",
   "type": "object",
   "properties": {
      "detail": {
         "$ref": "#/$defs/ECSTaskStateChange"
      },
      "detail-type": {
         "title": "Detail-Type",
         "type": "string"
      },
      "resources": {
         "items": {
            "type": "string"
         },
         "title": "Resources",
         "type": "array"
      },
      "id": {
         "title": "Id",
         "type": "string"
      },
      "source": {
         "title": "Source",
         "type": "string"
      },
      "time": {
         "format": "date-time",
         "title": "Time",
         "type": "string"
      },
      "region": {
         "title": "Region",
         "type": "string"
      },
      "version": {
         "title": "Version",
         "type": "string"
      },
      "account": {
         "title": "Account",
         "type": "string"
      }
   },
   "$defs": {
      "AttachmentDetails": {
         "description": "Details of the attachment, used to represent the details of an attachment in\nthe context of an ECS task state change event.",
         "properties": {
            "id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Id"
            },
            "type": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Type"
            },
            "status": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Status"
            },
            "details": {
               "items": {
                  "$ref": "#/$defs/Details"
               },
               "title": "Details",
               "type": "array"
            }
         },
         "title": "AttachmentDetails",
         "type": "object"
      },
      "AttributesDetails": {
         "description": "The details of an attribute in the context of an ECS task state change event.",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Name"
            },
            "value": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Value"
            }
         },
         "title": "AttributesDetails",
         "type": "object"
      },
      "ContainerDetails": {
         "description": "Details about a container in the task definition in the context of an ECS\ntask state change event.",
         "properties": {
            "image": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Image"
            },
            "imageDigest": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Imagedigest"
            },
            "networkInterfaces": {
               "items": {
                  "$ref": "#/$defs/NetworkInterfaceDetails"
               },
               "title": "Networkinterfaces",
               "type": "array"
            },
            "networkBindings": {
               "items": {
                  "$ref": "#/$defs/NetworkBindingDetails"
               },
               "title": "Networkbindings",
               "type": "array"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memory"
            },
            "memoryReservation": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memoryreservation"
            },
            "taskArn": {
               "title": "Taskarn",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "exitCode": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Exitcode"
            },
            "cpu": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Cpu"
            },
            "containerArn": {
               "title": "Containerarn",
               "type": "string"
            },
            "lastStatus": {
               "title": "Laststatus",
               "type": "string"
            },
            "runtimeId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Runtimeid"
            },
            "reason": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Reason"
            },
            "gpuIds": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Gpuids"
            }
         },
         "required": [
            "taskArn",
            "name",
            "containerArn",
            "lastStatus"
         ],
         "title": "ContainerDetails",
         "type": "object"
      },
      "Details": {
         "description": "A details of a :py:class:`AttachmentDetails` object in the context of\na ECS task state change event.",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Name"
            },
            "value": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Value"
            }
         },
         "title": "Details",
         "type": "object"
      },
      "ECSTaskStateChange": {
         "description": "The main details of the ECS task state change event.  This is the ``detail``\nfield.  in the json of the event.",
         "properties": {
            "overrides": {
               "$ref": "#/$defs/Overrides"
            },
            "executionStoppedAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Executionstoppedat"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memory"
            },
            "attachments": {
               "items": {
                  "$ref": "#/$defs/AttachmentDetails"
               },
               "title": "Attachments",
               "type": "array"
            },
            "attributes": {
               "items": {
                  "$ref": "#/$defs/AttributesDetails"
               },
               "title": "Attributes",
               "type": "array"
            },
            "pullStartedAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Pullstartedat"
            },
            "taskArn": {
               "title": "Taskarn",
               "type": "string"
            },
            "startedAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Startedat"
            },
            "createdAt": {
               "format": "date-time",
               "title": "Createdat",
               "type": "string"
            },
            "clusterArn": {
               "title": "Clusterarn",
               "type": "string"
            },
            "connectivity": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Connectivity"
            },
            "platformVersion": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Platformversion"
            },
            "containerInstanceArn": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Containerinstancearn"
            },
            "launchType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtype"
            },
            "group": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Group"
            },
            "updatedAt": {
               "format": "date-time",
               "title": "Updatedat",
               "type": "string"
            },
            "stopCode": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Stopcode"
            },
            "pullStoppedAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Pullstoppedat"
            },
            "connectivityAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Connectivityat"
            },
            "startedBy": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Startedby"
            },
            "cpu": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Cpu"
            },
            "version": {
               "title": "Version",
               "type": "number"
            },
            "stoppingAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Stoppingat"
            },
            "stoppedAt": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Stoppedat"
            },
            "taskDefinitionArn": {
               "title": "Taskdefinitionarn",
               "type": "string"
            },
            "stoppedReason": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Stoppedreason"
            },
            "containers": {
               "items": {
                  "$ref": "#/$defs/ContainerDetails"
               },
               "title": "Containers",
               "type": "array"
            },
            "desiredStatus": {
               "title": "Desiredstatus",
               "type": "string"
            },
            "lastStatus": {
               "title": "Laststatus",
               "type": "string"
            },
            "availabilityZone": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Availabilityzone"
            }
         },
         "required": [
            "overrides",
            "taskArn",
            "createdAt",
            "clusterArn",
            "updatedAt",
            "version",
            "taskDefinitionArn",
            "desiredStatus",
            "lastStatus"
         ],
         "title": "ECSTaskStateChange",
         "type": "object"
      },
      "Environment": {
         "additionalProperties": {
            "type": "string"
         },
         "title": "Environment",
         "type": "object"
      },
      "NetworkBindingDetails": {
         "description": "Network binding details in the context of an ECS task state change event.",
         "properties": {
            "bindIP": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Bindip"
            },
            "protocol": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Protocol"
            },
            "containerPort": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Containerport"
            },
            "hostPort": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Hostport"
            }
         },
         "title": "NetworkBindingDetails",
         "type": "object"
      },
      "NetworkInterfaceDetails": {
         "description": "The details of a network interface in the context of an ECS task state change event.",
         "properties": {
            "privateIpv4Address": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Privateipv4Address"
            },
            "ipv6Address": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ipv6Address"
            },
            "attachmentId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Attachmentid"
            }
         },
         "title": "NetworkInterfaceDetails",
         "type": "object"
      },
      "Overrides": {
         "description": "Overrides to the task definition in the context of an ECS task state change\nevent.  These are specified in the ``RunTask`` API call.",
         "properties": {
            "containerOverrides": {
               "items": {
                  "$ref": "#/$defs/OverridesItem"
               },
               "title": "Containeroverrides",
               "type": "array"
            }
         },
         "title": "Overrides",
         "type": "object"
      },
      "OverridesItem": {
         "description": "Overrides for a single container in the task definition.",
         "properties": {
            "environment": {
               "items": {
                  "$ref": "#/$defs/Environment"
               },
               "title": "Environment",
               "type": "array"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memory"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "cpu": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Cpu"
            },
            "command": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Command"
            }
         },
         "required": [
            "name"
         ],
         "title": "OverridesItem",
         "type": "object"
      }
   },
   "required": [
      "detail",
      "detail-type",
      "resources",
      "id",
      "source",
      "time",
      "region",
      "version",
      "account"
   ]
}

Fields:
field account: str [Required]

The account the event was generated in

field detail: ECSTaskStateChange [Required]

Where the meat of the event is

field detail_type: str [Required] (alias 'detail-type')

The human readable name of the event

field id: str [Required]

The ID of the event

field region: str [Required]

The region the event was generated in

field resources: list[str] [Required]

The resources the event applies to. This will be a list of ARNs

field source: str [Required]

The source of the event, e.g. “aws.ecs”

field time: datetime [Required]

The time the event was generated, in UTC

field version: str [Required]

The version of the schema for the event

pydantic model botocraft.eventbridge.raw.ecs.task_state_change.Environment[source]

Bases: RootModel[dict[str, str]]

Show JSON schema
{
   "title": "Environment",
   "type": "object",
   "additionalProperties": {
      "type": "string"
   }
}

Fields:

pydantic model botocraft.eventbridge.raw.ecs.task_state_change.NetworkBindingDetails[source]

Bases: BaseModel

Network binding details in the context of an ECS task state change event.

Show JSON schema
{
   "title": "NetworkBindingDetails",
   "description": "Network binding details in the context of an ECS task state change event.",
   "type": "object",
   "properties": {
      "bindIP": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Bindip"
      },
      "protocol": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Protocol"
      },
      "containerPort": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Containerport"
      },
      "hostPort": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Hostport"
      }
   }
}

Fields:
field bindIP: str | None = None

The host binding IP address

field containerPort: float | None = None

The container port

field hostPort: float | None = None

The host port

field protocol: str | None = None

The host binding protocol

pydantic model botocraft.eventbridge.raw.ecs.task_state_change.NetworkInterfaceDetails[source]

Bases: BaseModel

The details of a network interface in the context of an ECS task state change event.

Show JSON schema
{
   "title": "NetworkInterfaceDetails",
   "description": "The details of a network interface in the context of an ECS task state change event.",
   "type": "object",
   "properties": {
      "privateIpv4Address": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Privateipv4Address"
      },
      "ipv6Address": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ipv6Address"
      },
      "attachmentId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Attachmentid"
      }
   }
}

Fields:
field attachmentId: str | None = None

The attachment ID of the network interface

field ipv6Address: str | None = None
field privateIpv4Address: str | None = None

The private IPv4 address of the network interface

pydantic model botocraft.eventbridge.raw.ecs.task_state_change.Overrides[source]

Bases: BaseModel

Overrides to the task definition in the context of an ECS task state change event. These are specified in the RunTask API call.

Show JSON schema
{
   "title": "Overrides",
   "description": "Overrides to the task definition in the context of an ECS task state change\nevent.  These are specified in the ``RunTask`` API call.",
   "type": "object",
   "properties": {
      "containerOverrides": {
         "items": {
            "$ref": "#/$defs/OverridesItem"
         },
         "title": "Containeroverrides",
         "type": "array"
      }
   },
   "$defs": {
      "Environment": {
         "additionalProperties": {
            "type": "string"
         },
         "title": "Environment",
         "type": "object"
      },
      "OverridesItem": {
         "description": "Overrides for a single container in the task definition.",
         "properties": {
            "environment": {
               "items": {
                  "$ref": "#/$defs/Environment"
               },
               "title": "Environment",
               "type": "array"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memory"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "cpu": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Cpu"
            },
            "command": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Command"
            }
         },
         "required": [
            "name"
         ],
         "title": "OverridesItem",
         "type": "object"
      }
   }
}

Fields:
field containerOverrides: list[OverridesItem] [Optional]

Container overrides

pydantic model botocraft.eventbridge.raw.ecs.task_state_change.OverridesItem[source]

Bases: BaseModel

Overrides for a single container in the task definition.

Show JSON schema
{
   "title": "OverridesItem",
   "description": "Overrides for a single container in the task definition.",
   "type": "object",
   "properties": {
      "environment": {
         "items": {
            "$ref": "#/$defs/Environment"
         },
         "title": "Environment",
         "type": "array"
      },
      "memory": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Memory"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "cpu": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Cpu"
      },
      "command": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Command"
      }
   },
   "$defs": {
      "Environment": {
         "additionalProperties": {
            "type": "string"
         },
         "title": "Environment",
         "type": "object"
      }
   },
   "required": [
      "name"
   ]
}

Fields:
field command: list[str] | None = None

Overrides to container command

field cpu: float | None = None
field environment: list[Environment] [Optional]

Overrides to environment variables

field memory: float | None = None

Overrides to container memory

field name: str [Required]

The name of the container these overrides apply to