1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package types 4 5import ( 6 "time" 7) 8 9// An object representing a container instance or task attachment. 10type Attachment struct { 11 12 // Details of the attachment. For elastic network interfaces, this includes the 13 // network interface ID, the MAC address, the subnet ID, and the private IPv4 14 // address. 15 Details []KeyValuePair 16 17 // The unique identifier for the attachment. 18 Id *string 19 20 // The status of the attachment. Valid values are PRECREATED, CREATED, ATTACHING, 21 // ATTACHED, DETACHING, DETACHED, and DELETED. 22 Status *string 23 24 // The type of the attachment, such as ElasticNetworkInterface. 25 Type *string 26} 27 28// An object representing a change in state for a task attachment. 29type AttachmentStateChange struct { 30 31 // The Amazon Resource Name (ARN) of the attachment. 32 // 33 // This member is required. 34 AttachmentArn *string 35 36 // The status of the attachment. 37 // 38 // This member is required. 39 Status *string 40} 41 42// An attribute is a name-value pair associated with an Amazon ECS object. 43// Attributes enable you to extend the Amazon ECS data model by adding custom 44// metadata to your resources. For more information, see Attributes 45// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes) 46// in the Amazon Elastic Container Service Developer Guide. 47type Attribute struct { 48 49 // The name of the attribute. The name must contain between 1 and 128 characters 50 // and name may contain letters (uppercase and lowercase), numbers, hyphens, 51 // underscores, forward slashes, back slashes, or periods. 52 // 53 // This member is required. 54 Name *string 55 56 // The ID of the target. You can specify the short form ID for a resource or the 57 // full Amazon Resource Name (ARN). 58 TargetId *string 59 60 // The type of the target with which to attach the attribute. This parameter is 61 // required if you use the short form ID for a resource instead of the full ARN. 62 TargetType TargetType 63 64 // The value of the attribute. The value must contain between 1 and 128 characters 65 // and may contain letters (uppercase and lowercase), numbers, hyphens, 66 // underscores, periods, at signs (@), forward slashes, back slashes, colons, or 67 // spaces. The value cannot contain any leading or trailing whitespace. 68 Value *string 69} 70 71// The details of the Auto Scaling group for the capacity provider. 72type AutoScalingGroupProvider struct { 73 74 // The Amazon Resource Name (ARN) that identifies the Auto Scaling group. 75 // 76 // This member is required. 77 AutoScalingGroupArn *string 78 79 // The managed scaling settings for the Auto Scaling group capacity provider. 80 ManagedScaling *ManagedScaling 81 82 // The managed termination protection setting to use for the Auto Scaling group 83 // capacity provider. This determines whether the Auto Scaling group has managed 84 // termination protection. When using managed termination protection, managed 85 // scaling must also be used otherwise managed termination protection will not 86 // work. When managed termination protection is enabled, Amazon ECS prevents the 87 // Amazon EC2 instances in an Auto Scaling group that contain tasks from being 88 // terminated during a scale-in action. The Auto Scaling group and each instance in 89 // the Auto Scaling group must have instance protection from scale-in actions 90 // enabled as well. For more information, see Instance Protection 91 // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) 92 // in the AWS Auto Scaling User Guide. When managed termination protection is 93 // disabled, your Amazon EC2 instances are not protected from termination when the 94 // Auto Scaling group scales in. 95 ManagedTerminationProtection ManagedTerminationProtection 96} 97 98// The details of the Auto Scaling group capacity provider to update. 99type AutoScalingGroupProviderUpdate struct { 100 101 // The managed scaling settings for the Auto Scaling group capacity provider. 102 ManagedScaling *ManagedScaling 103 104 // The managed termination protection setting to use for the Auto Scaling group 105 // capacity provider. This determines whether the Auto Scaling group has managed 106 // termination protection. When using managed termination protection, managed 107 // scaling must also be used otherwise managed termination protection will not 108 // work. When managed termination protection is enabled, Amazon ECS prevents the 109 // Amazon EC2 instances in an Auto Scaling group that contain tasks from being 110 // terminated during a scale-in action. The Auto Scaling group and each instance in 111 // the Auto Scaling group must have instance protection from scale-in actions 112 // enabled as well. For more information, see Instance Protection 113 // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) 114 // in the AWS Auto Scaling User Guide. When managed termination protection is 115 // disabled, your Amazon EC2 instances are not protected from termination when the 116 // Auto Scaling group scales in. 117 ManagedTerminationProtection ManagedTerminationProtection 118} 119 120// An object representing the networking details for a task or service. 121type AwsVpcConfiguration struct { 122 123 // The IDs of the subnets associated with the task or service. There is a limit of 124 // 16 subnets that can be specified per AwsVpcConfiguration. All specified subnets 125 // must be from the same VPC. 126 // 127 // This member is required. 128 Subnets []string 129 130 // Whether the task's elastic network interface receives a public IP address. The 131 // default value is DISABLED. 132 AssignPublicIp AssignPublicIp 133 134 // The IDs of the security groups associated with the task or service. If you do 135 // not specify a security group, the default security group for the VPC is used. 136 // There is a limit of 5 security groups that can be specified per 137 // AwsVpcConfiguration. All specified security groups must be from the same VPC. 138 SecurityGroups []string 139} 140 141// The details of a capacity provider. 142type CapacityProvider struct { 143 144 // The Auto Scaling group settings for the capacity provider. 145 AutoScalingGroupProvider *AutoScalingGroupProvider 146 147 // The Amazon Resource Name (ARN) that identifies the capacity provider. 148 CapacityProviderArn *string 149 150 // The name of the capacity provider. 151 Name *string 152 153 // The current status of the capacity provider. Only capacity providers in an 154 // ACTIVE state can be used in a cluster. When a capacity provider is successfully 155 // deleted, it will have an INACTIVE status. 156 Status CapacityProviderStatus 157 158 // The metadata that you apply to the capacity provider to help you categorize and 159 // organize it. Each tag consists of a key and an optional value, both of which you 160 // define. The following basic restrictions apply to tags: 161 // 162 // * Maximum number of 163 // tags per resource - 50 164 // 165 // * For each resource, each tag key must be unique, and 166 // each tag key can have only one value. 167 // 168 // * Maximum key length - 128 Unicode 169 // characters in UTF-8 170 // 171 // * Maximum value length - 256 Unicode characters in UTF-8 172 // 173 // * 174 // If your tagging schema is used across multiple services and resources, remember 175 // that other services may have restrictions on allowed characters. Generally 176 // allowed characters are: letters, numbers, and spaces representable in UTF-8, and 177 // the following characters: + - = . _ : / @. 178 // 179 // * Tag keys and values are 180 // case-sensitive. 181 // 182 // * Do not use aws:, AWS:, or any upper or lowercase combination 183 // of such as a prefix for either keys or values as it is reserved for AWS use. You 184 // cannot edit or delete tag keys or values with this prefix. Tags with this prefix 185 // do not count against your tags per resource limit. 186 Tags []Tag 187 188 // The update status of the capacity provider. The following are the possible 189 // states that will be returned. DELETE_IN_PROGRESS The capacity provider is in the 190 // process of being deleted. DELETE_COMPLETE The capacity provider has been 191 // successfully deleted and will have an INACTIVE status. DELETE_FAILED The 192 // capacity provider was unable to be deleted. The update status reason will 193 // provide further details about why the delete failed. 194 UpdateStatus CapacityProviderUpdateStatus 195 196 // The update status reason. This provides further details about the update status 197 // for the capacity provider. 198 UpdateStatusReason *string 199} 200 201// The details of a capacity provider strategy. A capacity provider strategy can be 202// set when using the RunTask or CreateCluster APIs or as the default capacity 203// provider strategy for a cluster with the CreateCluster API. Only capacity 204// providers that are already associated with a cluster and have an ACTIVE or 205// UPDATING status can be used in a capacity provider strategy. The 206// PutClusterCapacityProviders API is used to associate a capacity provider with a 207// cluster. If specifying a capacity provider that uses an Auto Scaling group, the 208// capacity provider must already be created. New Auto Scaling group capacity 209// providers can be created with the CreateCapacityProvider API operation. To use a 210// AWS Fargate capacity provider, specify either the FARGATE or FARGATE_SPOT 211// capacity providers. The AWS Fargate capacity providers are available to all 212// accounts and only need to be associated with a cluster to be used in a capacity 213// provider strategy. 214type CapacityProviderStrategyItem struct { 215 216 // The short name of the capacity provider. 217 // 218 // This member is required. 219 CapacityProvider *string 220 221 // The base value designates how many tasks, at a minimum, to run on the specified 222 // capacity provider. Only one capacity provider in a capacity provider strategy 223 // can have a base defined. If no value is specified, the default value of 0 is 224 // used. 225 Base int32 226 227 // The weight value designates the relative percentage of the total number of tasks 228 // launched that should use the specified capacity provider. The weight value is 229 // taken into consideration after the base value, if defined, is satisfied. If no 230 // weight value is specified, the default value of 0 is used. When multiple 231 // capacity providers are specified within a capacity provider strategy, at least 232 // one of the capacity providers must have a weight value greater than zero and any 233 // capacity providers with a weight of 0 will not be used to place tasks. If you 234 // specify multiple capacity providers in a strategy that all have a weight of 0, 235 // any RunTask or CreateService actions using the capacity provider strategy will 236 // fail. An example scenario for using weights is defining a strategy that contains 237 // two capacity providers and both have a weight of 1, then when the base is 238 // satisfied, the tasks will be split evenly across the two capacity providers. 239 // Using that same logic, if you specify a weight of 1 for capacityProviderA and a 240 // weight of 4 for capacityProviderB, then for every one task that is run using 241 // capacityProviderA, four tasks would use capacityProviderB. 242 Weight int32 243} 244 245// A regional grouping of one or more container instances on which you can run task 246// requests. Each account receives a default cluster the first time you use the 247// Amazon ECS service, but you may also create other clusters. Clusters may contain 248// more than one instance type simultaneously. 249type Cluster struct { 250 251 // The number of services that are running on the cluster in an ACTIVE state. You 252 // can view these services with ListServices. 253 ActiveServicesCount int32 254 255 // The resources attached to a cluster. When using a capacity provider with a 256 // cluster, the Auto Scaling plan that is created will be returned as a cluster 257 // attachment. 258 Attachments []Attachment 259 260 // The status of the capacity providers associated with the cluster. The following 261 // are the states that will be returned: UPDATE_IN_PROGRESS The available capacity 262 // providers for the cluster are updating. This occurs when the Auto Scaling plan 263 // is provisioning or deprovisioning. UPDATE_COMPLETE The capacity providers have 264 // successfully updated. UPDATE_FAILED The capacity provider updates failed. 265 AttachmentsStatus *string 266 267 // The capacity providers associated with the cluster. 268 CapacityProviders []string 269 270 // The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains the 271 // arn:aws:ecs namespace, followed by the Region of the cluster, the AWS account ID 272 // of the cluster owner, the cluster namespace, and then the cluster name. For 273 // example, arn:aws:ecs:region:012345678910:cluster/test. 274 ClusterArn *string 275 276 // A user-generated string that you use to identify your cluster. 277 ClusterName *string 278 279 // The execute command configuration for the cluster. 280 Configuration *ClusterConfiguration 281 282 // The default capacity provider strategy for the cluster. When services or tasks 283 // are run in the cluster with no launch type or capacity provider strategy 284 // specified, the default capacity provider strategy is used. 285 DefaultCapacityProviderStrategy []CapacityProviderStrategyItem 286 287 // The number of tasks in the cluster that are in the PENDING state. 288 PendingTasksCount int32 289 290 // The number of container instances registered into the cluster. This includes 291 // container instances in both ACTIVE and DRAINING status. 292 RegisteredContainerInstancesCount int32 293 294 // The number of tasks in the cluster that are in the RUNNING state. 295 RunningTasksCount int32 296 297 // The settings for the cluster. This parameter indicates whether CloudWatch 298 // Container Insights is enabled or disabled for a cluster. 299 Settings []ClusterSetting 300 301 // Additional information about your clusters that are separated by launch type, 302 // including: 303 // 304 // * runningEC2TasksCount 305 // 306 // * RunningFargateTasksCount 307 // 308 // * 309 // pendingEC2TasksCount 310 // 311 // * pendingFargateTasksCount 312 // 313 // * activeEC2ServiceCount 314 // 315 // * 316 // activeFargateServiceCount 317 // 318 // * drainingEC2ServiceCount 319 // 320 // * 321 // drainingFargateServiceCount 322 Statistics []KeyValuePair 323 324 // The status of the cluster. The following are the possible states that will be 325 // returned. ACTIVE The cluster is ready to accept tasks and if applicable you can 326 // register container instances with the cluster. PROVISIONING The cluster has 327 // capacity providers associated with it and the resources needed for the capacity 328 // provider are being created. DEPROVISIONING The cluster has capacity providers 329 // associated with it and the resources needed for the capacity provider are being 330 // deleted. FAILED The cluster has capacity providers associated with it and the 331 // resources needed for the capacity provider have failed to create. INACTIVE The 332 // cluster has been deleted. Clusters with an INACTIVE status may remain 333 // discoverable in your account for a period of time. However, this behavior is 334 // subject to change in the future, so you should not rely on INACTIVE clusters 335 // persisting. 336 Status *string 337 338 // The metadata that you apply to the cluster to help you categorize and organize 339 // them. Each tag consists of a key and an optional value, both of which you 340 // define. The following basic restrictions apply to tags: 341 // 342 // * Maximum number of 343 // tags per resource - 50 344 // 345 // * For each resource, each tag key must be unique, and 346 // each tag key can have only one value. 347 // 348 // * Maximum key length - 128 Unicode 349 // characters in UTF-8 350 // 351 // * Maximum value length - 256 Unicode characters in UTF-8 352 // 353 // * 354 // If your tagging schema is used across multiple services and resources, remember 355 // that other services may have restrictions on allowed characters. Generally 356 // allowed characters are: letters, numbers, and spaces representable in UTF-8, and 357 // the following characters: + - = . _ : / @. 358 // 359 // * Tag keys and values are 360 // case-sensitive. 361 // 362 // * Do not use aws:, AWS:, or any upper or lowercase combination 363 // of such as a prefix for either keys or values as it is reserved for AWS use. You 364 // cannot edit or delete tag keys or values with this prefix. Tags with this prefix 365 // do not count against your tags per resource limit. 366 Tags []Tag 367} 368 369// The execute command configuration for the cluster. 370type ClusterConfiguration struct { 371 372 // The details of the execute command configuration. 373 ExecuteCommandConfiguration *ExecuteCommandConfiguration 374} 375 376// The settings to use when creating a cluster. This parameter is used to enable 377// CloudWatch Container Insights for a cluster. 378type ClusterSetting struct { 379 380 // The name of the cluster setting. The only supported value is containerInsights. 381 Name ClusterSettingName 382 383 // The value to set for the cluster setting. The supported values are enabled and 384 // disabled. If enabled is specified, CloudWatch Container Insights will be enabled 385 // for the cluster, otherwise it will be disabled unless the containerInsights 386 // account setting is enabled. If a cluster value is specified, it will override 387 // the containerInsights value set with PutAccountSetting or 388 // PutAccountSettingDefault. 389 Value *string 390} 391 392// A Docker container that is part of a task. 393type Container struct { 394 395 // The Amazon Resource Name (ARN) of the container. 396 ContainerArn *string 397 398 // The number of CPU units set for the container. The value will be 0 if no value 399 // was specified in the container definition when the task definition was 400 // registered. 401 Cpu *string 402 403 // The exit code returned from the container. 404 ExitCode *int32 405 406 // The IDs of each GPU assigned to the container. 407 GpuIds []string 408 409 // The health status of the container. If health checks are not configured for this 410 // container in its task definition, then it reports the health status as UNKNOWN. 411 HealthStatus HealthStatus 412 413 // The image used for the container. 414 Image *string 415 416 // The container image manifest digest. The imageDigest is only returned if the 417 // container is using an image hosted in Amazon ECR, otherwise it is omitted. 418 ImageDigest *string 419 420 // The last known status of the container. 421 LastStatus *string 422 423 // The details of any Amazon ECS managed agents associated with the container. 424 ManagedAgents []ManagedAgent 425 426 // The hard limit (in MiB) of memory set for the container. 427 Memory *string 428 429 // The soft limit (in MiB) of memory set for the container. 430 MemoryReservation *string 431 432 // The name of the container. 433 Name *string 434 435 // The network bindings associated with the container. 436 NetworkBindings []NetworkBinding 437 438 // The network interfaces associated with the container. 439 NetworkInterfaces []NetworkInterface 440 441 // A short (255 max characters) human-readable string to provide additional details 442 // about a running or stopped container. 443 Reason *string 444 445 // The ID of the Docker container. 446 RuntimeId *string 447 448 // The ARN of the task. 449 TaskArn *string 450} 451 452// Container definitions are used in task definitions to describe the different 453// containers that are launched as part of a task. 454type ContainerDefinition struct { 455 456 // The command that is passed to the container. This parameter maps to Cmd in the 457 // Create a container 458 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 459 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 460 // COMMAND parameter to docker run 461 // (https://docs.docker.com/engine/reference/run/#security-configuration). For more 462 // information, see https://docs.docker.com/engine/reference/builder/#cmd 463 // (https://docs.docker.com/engine/reference/builder/#cmd). If there are multiple 464 // arguments, each argument should be a separated string in the array. 465 Command []string 466 467 // The number of cpu units reserved for the container. This parameter maps to 468 // CpuShares in the Create a container 469 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 470 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 471 // --cpu-shares option to docker run 472 // (https://docs.docker.com/engine/reference/run/#security-configuration). This 473 // field is optional for tasks using the Fargate launch type, and the only 474 // requirement is that the total amount of CPU reserved for all containers within a 475 // task be lower than the task-level cpu value. You can determine the number of CPU 476 // units that are available per EC2 instance type by multiplying the vCPUs listed 477 // for that instance type on the Amazon EC2 Instances 478 // (http://aws.amazon.com/ec2/instance-types/) detail page by 1,024. Linux 479 // containers share unallocated CPU units with other containers on the container 480 // instance with the same ratio as their allocated amount. For example, if you run 481 // a single-container task on a single-core instance type with 512 CPU units 482 // specified for that container, and that is the only task running on the container 483 // instance, that container could use the full 1,024 CPU unit share at any given 484 // time. However, if you launched another copy of the same task on that container 485 // instance, each task would be guaranteed a minimum of 512 CPU units when needed, 486 // and each container could float to higher CPU usage if the other container was 487 // not using it, but if both tasks were 100% active all of the time, they would be 488 // limited to 512 CPU units. On Linux container instances, the Docker daemon on the 489 // container instance uses the CPU value to calculate the relative CPU share ratios 490 // for running containers. For more information, see CPU share constraint 491 // (https://docs.docker.com/engine/reference/run/#cpu-share-constraint) in the 492 // Docker documentation. The minimum valid CPU share value that the Linux kernel 493 // allows is 2. However, the CPU parameter is not required, and you can use CPU 494 // values below 2 in your container definitions. For CPU values below 2 (including 495 // null), the behavior varies based on your Amazon ECS container agent version: 496 // 497 // * 498 // Agent versions less than or equal to 1.1.0: Null and zero CPU values are passed 499 // to Docker as 0, which Docker then converts to 1,024 CPU shares. CPU values of 1 500 // are passed to Docker as 1, which the Linux kernel converts to two CPU shares. 501 // 502 // * 503 // Agent versions greater than or equal to 1.2.0: Null, zero, and CPU values of 1 504 // are passed to Docker as 2. 505 // 506 // On Windows container instances, the CPU limit is 507 // enforced as an absolute limit, or a quota. Windows containers only have access 508 // to the specified amount of CPU that is described in the task definition. A null 509 // or zero CPU value is passed to Docker as 0, which Windows interprets as 1% of 510 // one CPU. 511 Cpu int32 512 513 // The dependencies defined for container startup and shutdown. A container can 514 // contain multiple dependencies. When a dependency is defined for container 515 // startup, for container shutdown it is reversed. For tasks using the EC2 launch 516 // type, the container instances require at least version 1.26.0 of the container 517 // agent to enable container dependencies. However, we recommend using the latest 518 // container agent version. For information about checking your agent version and 519 // updating to the latest version, see Updating the Amazon ECS Container Agent 520 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) 521 // in the Amazon Elastic Container Service Developer Guide. If you are using an 522 // Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of 523 // the ecs-init package. If your container instances are launched from version 524 // 20190301 or later, then they contain the required versions of the container 525 // agent and ecs-init. For more information, see Amazon ECS-optimized Linux AMI 526 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) 527 // in the Amazon Elastic Container Service Developer Guide. For tasks using the 528 // Fargate launch type, the task or service requires platform version 1.3.0 or 529 // later. 530 DependsOn []ContainerDependency 531 532 // When this parameter is true, networking is disabled within the container. This 533 // parameter maps to NetworkDisabled in the Create a container 534 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 535 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/). This 536 // parameter is not supported for Windows containers. 537 DisableNetworking *bool 538 539 // A list of DNS search domains that are presented to the container. This parameter 540 // maps to DnsSearch in the Create a container 541 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 542 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 543 // --dns-search option to docker run 544 // (https://docs.docker.com/engine/reference/run/#security-configuration). This 545 // parameter is not supported for Windows containers. 546 DnsSearchDomains []string 547 548 // A list of DNS servers that are presented to the container. This parameter maps 549 // to Dns in the Create a container 550 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 551 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the --dns 552 // option to docker run 553 // (https://docs.docker.com/engine/reference/run/#security-configuration). This 554 // parameter is not supported for Windows containers. 555 DnsServers []string 556 557 // A key/value map of labels to add to the container. This parameter maps to Labels 558 // in the Create a container 559 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 560 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 561 // --label option to docker run 562 // (https://docs.docker.com/engine/reference/run/#security-configuration). This 563 // parameter requires version 1.18 of the Docker Remote API or greater on your 564 // container instance. To check the Docker Remote API version on your container 565 // instance, log in to your container instance and run the following command: sudo 566 // docker version --format '{{.Server.APIVersion}}' 567 DockerLabels map[string]string 568 569 // A list of strings to provide custom labels for SELinux and AppArmor multi-level 570 // security systems. This field is not valid for containers in tasks using the 571 // Fargate launch type. With Windows containers, this parameter can be used to 572 // reference a credential spec file when configuring a container for Active 573 // Directory authentication. For more information, see Using gMSAs for Windows 574 // Containers 575 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows-gmsa.html) 576 // in the Amazon Elastic Container Service Developer Guide. This parameter maps to 577 // SecurityOpt in the Create a container 578 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 579 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 580 // --security-opt option to docker run 581 // (https://docs.docker.com/engine/reference/run/#security-configuration). The 582 // Amazon ECS container agent running on a container instance must register with 583 // the ECS_SELINUX_CAPABLE=true or ECS_APPARMOR_CAPABLE=true environment variables 584 // before containers placed on that instance can use these security options. For 585 // more information, see Amazon ECS Container Agent Configuration 586 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) 587 // in the Amazon Elastic Container Service Developer Guide. For more information 588 // about valid values, see Docker Run Security Configuration 589 // (https://docs.docker.com/engine/reference/run/#security-configuration). Valid 590 // values: "no-new-privileges" | "apparmor:PROFILE" | "label:value" | 591 // "credentialspec:CredentialSpecFilePath" 592 DockerSecurityOptions []string 593 594 // Early versions of the Amazon ECS container agent do not properly handle 595 // entryPoint parameters. If you have problems using entryPoint, update your 596 // container agent or enter your commands and arguments as command array items 597 // instead. The entry point that is passed to the container. This parameter maps to 598 // Entrypoint in the Create a container 599 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 600 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 601 // --entrypoint option to docker run 602 // (https://docs.docker.com/engine/reference/run/#security-configuration). For more 603 // information, see https://docs.docker.com/engine/reference/builder/#entrypoint 604 // (https://docs.docker.com/engine/reference/builder/#entrypoint). 605 EntryPoint []string 606 607 // The environment variables to pass to a container. This parameter maps to Env in 608 // the Create a container 609 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 610 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the --env 611 // option to docker run 612 // (https://docs.docker.com/engine/reference/run/#security-configuration). We do 613 // not recommend using plaintext environment variables for sensitive information, 614 // such as credential data. 615 Environment []KeyValuePair 616 617 // A list of files containing the environment variables to pass to a container. 618 // This parameter maps to the --env-file option to docker run 619 // (https://docs.docker.com/engine/reference/run/#security-configuration). You can 620 // specify up to ten environment files. The file must have a .env file extension. 621 // Each line in an environment file should contain an environment variable in 622 // VARIABLE=VALUE format. Lines beginning with # are treated as comments and are 623 // ignored. For more information on the environment variable file syntax, see 624 // Declare default environment variables in file 625 // (https://docs.docker.com/compose/env-file/). If there are environment variables 626 // specified using the environment parameter in a container definition, they take 627 // precedence over the variables contained within an environment file. If multiple 628 // environment files are specified that contain the same variable, they are 629 // processed from the top down. It is recommended to use unique variable names. For 630 // more information, see Specifying Environment Variables 631 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html) 632 // in the Amazon Elastic Container Service Developer Guide. 633 EnvironmentFiles []EnvironmentFile 634 635 // If the essential parameter of a container is marked as true, and that container 636 // fails or stops for any reason, all other containers that are part of the task 637 // are stopped. If the essential parameter of a container is marked as false, then 638 // its failure does not affect the rest of the containers in a task. If this 639 // parameter is omitted, a container is assumed to be essential. All tasks must 640 // have at least one essential container. If you have an application that is 641 // composed of multiple containers, you should group containers that are used for a 642 // common purpose into components, and separate the different components into 643 // multiple task definitions. For more information, see Application Architecture 644 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html) 645 // in the Amazon Elastic Container Service Developer Guide. 646 Essential *bool 647 648 // A list of hostnames and IP address mappings to append to the /etc/hosts file on 649 // the container. This parameter maps to ExtraHosts in the Create a container 650 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 651 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 652 // --add-host option to docker run 653 // (https://docs.docker.com/engine/reference/run/#security-configuration). This 654 // parameter is not supported for Windows containers or tasks that use the awsvpc 655 // network mode. 656 ExtraHosts []HostEntry 657 658 // The FireLens configuration for the container. This is used to specify and 659 // configure a log router for container logs. For more information, see Custom Log 660 // Routing 661 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) 662 // in the Amazon Elastic Container Service Developer Guide. 663 FirelensConfiguration *FirelensConfiguration 664 665 // The container health check command and associated configuration parameters for 666 // the container. This parameter maps to HealthCheck in the Create a container 667 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 668 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 669 // HEALTHCHECK parameter of docker run 670 // (https://docs.docker.com/engine/reference/run/#security-configuration). 671 HealthCheck *HealthCheck 672 673 // The hostname to use for your container. This parameter maps to Hostname in the 674 // Create a container 675 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 676 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 677 // --hostname option to docker run 678 // (https://docs.docker.com/engine/reference/run/#security-configuration). The 679 // hostname parameter is not supported if you are using the awsvpc network mode. 680 Hostname *string 681 682 // The image used to start a container. This string is passed directly to the 683 // Docker daemon. Images in the Docker Hub registry are available by default. Other 684 // repositories are specified with either repository-url/image:tag or 685 // repository-url/image@digest . Up to 255 letters (uppercase and lowercase), 686 // numbers, hyphens, underscores, colons, periods, forward slashes, and number 687 // signs are allowed. This parameter maps to Image in the Create a container 688 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 689 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the IMAGE 690 // parameter of docker run 691 // (https://docs.docker.com/engine/reference/run/#security-configuration). 692 // 693 // * When 694 // a new task starts, the Amazon ECS container agent pulls the latest version of 695 // the specified image and tag for the container to use. However, subsequent 696 // updates to a repository image are not propagated to already running tasks. 697 // 698 // * 699 // Images in Amazon ECR repositories can be specified by either using the full 700 // registry/repository:tag or registry/repository@digest. For example, 701 // 012345678910.dkr.ecr..amazonaws.com/:latest or 702 // 012345678910.dkr.ecr..amazonaws.com/@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE. 703 // 704 // * 705 // Images in official repositories on Docker Hub use a single name (for example, 706 // ubuntu or mongo). 707 // 708 // * Images in other repositories on Docker Hub are qualified 709 // with an organization name (for example, amazon/amazon-ecs-agent). 710 // 711 // * Images in 712 // other online repositories are qualified further by a domain name (for example, 713 // quay.io/assemblyline/ubuntu). 714 Image *string 715 716 // When this parameter is true, this allows you to deploy containerized 717 // applications that require stdin or a tty to be allocated. This parameter maps to 718 // OpenStdin in the Create a container 719 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 720 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 721 // --interactive option to docker run 722 // (https://docs.docker.com/engine/reference/run/#security-configuration). 723 Interactive *bool 724 725 // The links parameter allows containers to communicate with each other without the 726 // need for port mappings. This parameter is only supported if the network mode of 727 // a task definition is bridge. The name:internalName construct is analogous to 728 // name:alias in Docker links. Up to 255 letters (uppercase and lowercase), 729 // numbers, underscores, and hyphens are allowed. For more information about 730 // linking Docker containers, go to Legacy container links 731 // (https://docs.docker.com/network/links/) in the Docker documentation. This 732 // parameter maps to Links in the Create a container 733 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 734 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the --link 735 // option to docker run 736 // (https://docs.docker.com/engine/reference/run/#security-configuration). This 737 // parameter is not supported for Windows containers. Containers that are 738 // collocated on a single container instance may be able to communicate with each 739 // other without requiring links or host port mappings. Network isolation is 740 // achieved on the container instance using security groups and VPC settings. 741 Links []string 742 743 // Linux-specific modifications that are applied to the container, such as Linux 744 // kernel capabilities. For more information see KernelCapabilities. This parameter 745 // is not supported for Windows containers. 746 LinuxParameters *LinuxParameters 747 748 // The log configuration specification for the container. This parameter maps to 749 // LogConfig in the Create a container 750 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 751 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 752 // --log-driver option to docker run 753 // (https://docs.docker.com/engine/reference/run/#security-configuration). By 754 // default, containers use the same logging driver that the Docker daemon uses. 755 // However the container may use a different logging driver than the Docker daemon 756 // by specifying a log driver with this parameter in the container definition. To 757 // use a different logging driver for a container, the log system must be 758 // configured properly on the container instance (or on a different log server for 759 // remote logging options). For more information on the options for different 760 // supported log drivers, see Configure logging drivers 761 // (https://docs.docker.com/engine/admin/logging/overview/) in the Docker 762 // documentation. Amazon ECS currently supports a subset of the logging drivers 763 // available to the Docker daemon (shown in the LogConfiguration data type). 764 // Additional log drivers may be available in future releases of the Amazon ECS 765 // container agent. This parameter requires version 1.18 of the Docker Remote API 766 // or greater on your container instance. To check the Docker Remote API version on 767 // your container instance, log in to your container instance and run the following 768 // command: sudo docker version --format '{{.Server.APIVersion}}' The Amazon ECS 769 // container agent running on a container instance must register the logging 770 // drivers available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS 771 // environment variable before containers placed on that instance can use these log 772 // configuration options. For more information, see Amazon ECS Container Agent 773 // Configuration 774 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) 775 // in the Amazon Elastic Container Service Developer Guide. 776 LogConfiguration *LogConfiguration 777 778 // The amount (in MiB) of memory to present to the container. If your container 779 // attempts to exceed the memory specified here, the container is killed. The total 780 // amount of memory reserved for all containers within a task must be lower than 781 // the task memory value, if one is specified. This parameter maps to Memory in the 782 // Create a container 783 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 784 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 785 // --memory option to docker run 786 // (https://docs.docker.com/engine/reference/run/#security-configuration). If using 787 // the Fargate launch type, this parameter is optional. If using the EC2 launch 788 // type, you must specify either a task-level memory value or a container-level 789 // memory value. If you specify both a container-level memory and memoryReservation 790 // value, memory must be greater than memoryReservation. If you specify 791 // memoryReservation, then that value is subtracted from the available memory 792 // resources for the container instance on which the container is placed. 793 // Otherwise, the value of memory is used. The Docker daemon reserves a minimum of 794 // 4 MiB of memory for a container, so you should not specify fewer than 4 MiB of 795 // memory for your containers. 796 Memory *int32 797 798 // The soft limit (in MiB) of memory to reserve for the container. When system 799 // memory is under heavy contention, Docker attempts to keep the container memory 800 // to this soft limit. However, your container can consume more memory when it 801 // needs to, up to either the hard limit specified with the memory parameter (if 802 // applicable), or all of the available memory on the container instance, whichever 803 // comes first. This parameter maps to MemoryReservation in the Create a container 804 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 805 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 806 // --memory-reservation option to docker run 807 // (https://docs.docker.com/engine/reference/run/#security-configuration). If a 808 // task-level memory value is not specified, you must specify a non-zero integer 809 // for one or both of memory or memoryReservation in a container definition. If you 810 // specify both, memory must be greater than memoryReservation. If you specify 811 // memoryReservation, then that value is subtracted from the available memory 812 // resources for the container instance on which the container is placed. 813 // Otherwise, the value of memory is used. For example, if your container normally 814 // uses 128 MiB of memory, but occasionally bursts to 256 MiB of memory for short 815 // periods of time, you can set a memoryReservation of 128 MiB, and a memory hard 816 // limit of 300 MiB. This configuration would allow the container to only reserve 817 // 128 MiB of memory from the remaining resources on the container instance, but 818 // also allow the container to consume more memory resources when needed. The 819 // Docker daemon reserves a minimum of 4 MiB of memory for a container, so you 820 // should not specify fewer than 4 MiB of memory for your containers. 821 MemoryReservation *int32 822 823 // The mount points for data volumes in your container. This parameter maps to 824 // Volumes in the Create a container 825 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 826 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 827 // --volume option to docker run 828 // (https://docs.docker.com/engine/reference/run/#security-configuration). Windows 829 // containers can mount whole directories on the same drive as $env:ProgramData. 830 // Windows containers cannot mount directories on a different drive, and mount 831 // point cannot be across drives. 832 MountPoints []MountPoint 833 834 // The name of a container. If you are linking multiple containers together in a 835 // task definition, the name of one container can be entered in the links of 836 // another container to connect the containers. Up to 255 letters (uppercase and 837 // lowercase), numbers, underscores, and hyphens are allowed. This parameter maps 838 // to name in the Create a container 839 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 840 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the --name 841 // option to docker run 842 // (https://docs.docker.com/engine/reference/run/#security-configuration). 843 Name *string 844 845 // The list of port mappings for the container. Port mappings allow containers to 846 // access ports on the host container instance to send or receive traffic. For task 847 // definitions that use the awsvpc network mode, you should only specify the 848 // containerPort. The hostPort can be left blank or it must be the same value as 849 // the containerPort. Port mappings on Windows use the NetNAT gateway address 850 // rather than localhost. There is no loopback for port mappings on Windows, so you 851 // cannot access a container's mapped port from the host itself. This parameter 852 // maps to PortBindings in the Create a container 853 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 854 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 855 // --publish option to docker run 856 // (https://docs.docker.com/engine/reference/run/#security-configuration). If the 857 // network mode of a task definition is set to none, then you can't specify port 858 // mappings. If the network mode of a task definition is set to host, then host 859 // ports must either be undefined or they must match the container port in the port 860 // mapping. After a task reaches the RUNNING status, manual and automatic host and 861 // container port assignments are visible in the Network Bindings section of a 862 // container description for a selected task in the Amazon ECS console. The 863 // assignments are also visible in the networkBindings section DescribeTasks 864 // responses. 865 PortMappings []PortMapping 866 867 // When this parameter is true, the container is given elevated privileges on the 868 // host container instance (similar to the root user). This parameter maps to 869 // Privileged in the Create a container 870 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 871 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 872 // --privileged option to docker run 873 // (https://docs.docker.com/engine/reference/run/#security-configuration). This 874 // parameter is not supported for Windows containers or tasks run on AWS Fargate. 875 Privileged *bool 876 877 // When this parameter is true, a TTY is allocated. This parameter maps to Tty in 878 // the Create a container 879 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 880 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the --tty 881 // option to docker run 882 // (https://docs.docker.com/engine/reference/run/#security-configuration). 883 PseudoTerminal *bool 884 885 // When this parameter is true, the container is given read-only access to its root 886 // file system. This parameter maps to ReadonlyRootfs in the Create a container 887 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 888 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 889 // --read-only option to docker run 890 // (https://docs.docker.com/engine/reference/run/#security-configuration). This 891 // parameter is not supported for Windows containers. 892 ReadonlyRootFilesystem *bool 893 894 // The private repository authentication credentials to use. 895 RepositoryCredentials *RepositoryCredentials 896 897 // The type and amount of a resource to assign to a container. The only supported 898 // resource is a GPU. 899 ResourceRequirements []ResourceRequirement 900 901 // The secrets to pass to the container. For more information, see Specifying 902 // Sensitive Data 903 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) 904 // in the Amazon Elastic Container Service Developer Guide. 905 Secrets []Secret 906 907 // Time duration (in seconds) to wait before giving up on resolving dependencies 908 // for a container. For example, you specify two containers in a task definition 909 // with containerA having a dependency on containerB reaching a COMPLETE, SUCCESS, 910 // or HEALTHY status. If a startTimeout value is specified for containerB and it 911 // does not reach the desired status within that time then containerA will give up 912 // and not start. This results in the task transitioning to a STOPPED state. When 913 // the ECS_CONTAINER_START_TIMEOUT container agent configuration variable is used, 914 // it is enforced indendently from this start timeout value. For tasks using the 915 // Fargate launch type, this parameter requires that the task or service uses 916 // platform version 1.3.0 or later. For tasks using the EC2 launch type, your 917 // container instances require at least version 1.26.0 of the container agent to 918 // enable a container start timeout value. However, we recommend using the latest 919 // container agent version. For information about checking your agent version and 920 // updating to the latest version, see Updating the Amazon ECS Container Agent 921 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) 922 // in the Amazon Elastic Container Service Developer Guide. If you are using an 923 // Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of 924 // the ecs-init package. If your container instances are launched from version 925 // 20190301 or later, then they contain the required versions of the container 926 // agent and ecs-init. For more information, see Amazon ECS-optimized Linux AMI 927 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) 928 // in the Amazon Elastic Container Service Developer Guide. 929 StartTimeout *int32 930 931 // Time duration (in seconds) to wait before the container is forcefully killed if 932 // it doesn't exit normally on its own. For tasks using the Fargate launch type, 933 // the task or service requires platform version 1.3.0 or later. The max stop 934 // timeout value is 120 seconds and if the parameter is not specified, the default 935 // value of 30 seconds is used. For tasks using the EC2 launch type, if the 936 // stopTimeout parameter is not specified, the value set for the Amazon ECS 937 // container agent configuration variable ECS_CONTAINER_STOP_TIMEOUT is used by 938 // default. If neither the stopTimeout parameter or the ECS_CONTAINER_STOP_TIMEOUT 939 // agent configuration variable are set, then the default values of 30 seconds for 940 // Linux containers and 30 seconds on Windows containers are used. Your container 941 // instances require at least version 1.26.0 of the container agent to enable a 942 // container stop timeout value. However, we recommend using the latest container 943 // agent version. For information about checking your agent version and updating to 944 // the latest version, see Updating the Amazon ECS Container Agent 945 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) 946 // in the Amazon Elastic Container Service Developer Guide. If you are using an 947 // Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of 948 // the ecs-init package. If your container instances are launched from version 949 // 20190301 or later, then they contain the required versions of the container 950 // agent and ecs-init. For more information, see Amazon ECS-optimized Linux AMI 951 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) 952 // in the Amazon Elastic Container Service Developer Guide. 953 StopTimeout *int32 954 955 // A list of namespaced kernel parameters to set in the container. This parameter 956 // maps to Sysctls in the Create a container 957 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 958 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 959 // --sysctl option to docker run 960 // (https://docs.docker.com/engine/reference/run/#security-configuration). It is 961 // not recommended that you specify network-related systemControls parameters for 962 // multiple containers in a single task that also uses either the awsvpc or host 963 // network modes. For tasks that use the awsvpc network mode, the container that is 964 // started last determines which systemControls parameters take effect. For tasks 965 // that use the host network mode, it changes the container instance's namespaced 966 // kernel parameters as well as the containers. 967 SystemControls []SystemControl 968 969 // A list of ulimits to set in the container. If a ulimit value is specified in a 970 // task definition, it will override the default values set by Docker. This 971 // parameter maps to Ulimits in the Create a container 972 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 973 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 974 // --ulimit option to docker run 975 // (https://docs.docker.com/engine/reference/run/#security-configuration). Valid 976 // naming values are displayed in the Ulimit data type. Amazon ECS tasks hosted on 977 // Fargate use the default resource limit values set by the operating system with 978 // the exception of the nofile resource limit parameter which Fargate overrides. 979 // The nofile resource limit sets a restriction on the number of open files that a 980 // container can use. The default nofile soft limit is 1024 and hard limit is 4096. 981 // This parameter requires version 1.18 of the Docker Remote API or greater on your 982 // container instance. To check the Docker Remote API version on your container 983 // instance, log in to your container instance and run the following command: sudo 984 // docker version --format '{{.Server.APIVersion}}' This parameter is not supported 985 // for Windows containers. 986 Ulimits []Ulimit 987 988 // The user to use inside the container. This parameter maps to User in the Create 989 // a container 990 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 991 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the --user 992 // option to docker run 993 // (https://docs.docker.com/engine/reference/run/#security-configuration). When 994 // running tasks using the host network mode, you should not run containers using 995 // the root user (UID 0). It is considered best practice to use a non-root user. 996 // You can specify the user using the following formats. If specifying a UID or 997 // GID, you must specify it as a positive integer. 998 // 999 // * user 1000 // 1001 // * user:group 1002 // 1003 // * uid 1004 // 1005 // * 1006 // uid:gid 1007 // 1008 // * user:gid 1009 // 1010 // * uid:group 1011 // 1012 // This parameter is not supported for Windows 1013 // containers. 1014 User *string 1015 1016 // Data volumes to mount from another container. This parameter maps to VolumesFrom 1017 // in the Create a container 1018 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 1019 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 1020 // --volumes-from option to docker run 1021 // (https://docs.docker.com/engine/reference/run/#security-configuration). 1022 VolumesFrom []VolumeFrom 1023 1024 // The working directory in which to run commands inside the container. This 1025 // parameter maps to WorkingDir in the Create a container 1026 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 1027 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 1028 // --workdir option to docker run 1029 // (https://docs.docker.com/engine/reference/run/#security-configuration). 1030 WorkingDirectory *string 1031} 1032 1033// The dependencies defined for container startup and shutdown. A container can 1034// contain multiple dependencies. When a dependency is defined for container 1035// startup, for container shutdown it is reversed. Your Amazon ECS container 1036// instances require at least version 1.26.0 of the container agent to enable 1037// container dependencies. However, we recommend using the latest container agent 1038// version. For information about checking your agent version and updating to the 1039// latest version, see Updating the Amazon ECS Container Agent 1040// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) 1041// in the Amazon Elastic Container Service Developer Guide. If you are using an 1042// Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of 1043// the ecs-init package. If your container instances are launched from version 1044// 20190301 or later, then they contain the required versions of the container 1045// agent and ecs-init. For more information, see Amazon ECS-optimized Linux AMI 1046// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) 1047// in the Amazon Elastic Container Service Developer Guide. For tasks using the 1048// Fargate launch type, this parameter requires that the task or service uses 1049// platform version 1.3.0 or later. 1050type ContainerDependency struct { 1051 1052 // The dependency condition of the container. The following are the available 1053 // conditions and their behavior: 1054 // 1055 // * START - This condition emulates the behavior 1056 // of links and volumes today. It validates that a dependent container is started 1057 // before permitting other containers to start. 1058 // 1059 // * COMPLETE - This condition 1060 // validates that a dependent container runs to completion (exits) before 1061 // permitting other containers to start. This can be useful for nonessential 1062 // containers that run a script and then exit. This condition cannot be set on an 1063 // essential container. 1064 // 1065 // * SUCCESS - This condition is the same as COMPLETE, but it 1066 // also requires that the container exits with a zero status. This condition cannot 1067 // be set on an essential container. 1068 // 1069 // * HEALTHY - This condition validates that the 1070 // dependent container passes its Docker health check before permitting other 1071 // containers to start. This requires that the dependent container has health 1072 // checks configured. This condition is confirmed only at task startup. 1073 // 1074 // This member is required. 1075 Condition ContainerCondition 1076 1077 // The name of a container. 1078 // 1079 // This member is required. 1080 ContainerName *string 1081} 1082 1083// An EC2 instance that is running the Amazon ECS agent and has been registered 1084// with a cluster. 1085type ContainerInstance struct { 1086 1087 // This parameter returns true if the agent is connected to Amazon ECS. Registered 1088 // instances with an agent that may be unhealthy or stopped return false. Only 1089 // instances connected to an agent can accept placement requests. 1090 AgentConnected bool 1091 1092 // The status of the most recent agent update. If an update has never been 1093 // requested, this value is NULL. 1094 AgentUpdateStatus AgentUpdateStatus 1095 1096 // The resources attached to a container instance, such as elastic network 1097 // interfaces. 1098 Attachments []Attachment 1099 1100 // The attributes set for the container instance, either by the Amazon ECS 1101 // container agent at instance registration or manually with the PutAttributes 1102 // operation. 1103 Attributes []Attribute 1104 1105 // The capacity provider associated with the container instance. 1106 CapacityProviderName *string 1107 1108 // The Amazon Resource Name (ARN) of the container instance. The ARN contains the 1109 // arn:aws:ecs namespace, followed by the Region of the container instance, the AWS 1110 // account ID of the container instance owner, the container-instance namespace, 1111 // and then the container instance ID. For example, 1112 // arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID. 1113 ContainerInstanceArn *string 1114 1115 // The EC2 instance ID of the container instance. 1116 Ec2InstanceId *string 1117 1118 // The number of tasks on the container instance that are in the PENDING status. 1119 PendingTasksCount int32 1120 1121 // The Unix timestamp for when the container instance was registered. 1122 RegisteredAt *time.Time 1123 1124 // For CPU and memory resource types, this parameter describes the amount of each 1125 // resource that was available on the container instance when the container agent 1126 // registered it with Amazon ECS. This value represents the total amount of CPU and 1127 // memory that can be allocated on this container instance to tasks. For port 1128 // resource types, this parameter describes the ports that were reserved by the 1129 // Amazon ECS container agent when it registered the container instance with Amazon 1130 // ECS. 1131 RegisteredResources []Resource 1132 1133 // For CPU and memory resource types, this parameter describes the remaining CPU 1134 // and memory that has not already been allocated to tasks and is therefore 1135 // available for new tasks. For port resource types, this parameter describes the 1136 // ports that were reserved by the Amazon ECS container agent (at instance 1137 // registration time) and any task containers that have reserved port mappings on 1138 // the host (with the host or bridge network mode). Any port that is not specified 1139 // here is available for new tasks. 1140 RemainingResources []Resource 1141 1142 // The number of tasks on the container instance that are in the RUNNING status. 1143 RunningTasksCount int32 1144 1145 // The status of the container instance. The valid values are REGISTERING, 1146 // REGISTRATION_FAILED, ACTIVE, INACTIVE, DEREGISTERING, or DRAINING. If your 1147 // account has opted in to the awsvpcTrunking account setting, then any newly 1148 // registered container instance will transition to a REGISTERING status while the 1149 // trunk elastic network interface is provisioned for the instance. If the 1150 // registration fails, the instance will transition to a REGISTRATION_FAILED 1151 // status. You can describe the container instance and see the reason for failure 1152 // in the statusReason parameter. Once the container instance is terminated, the 1153 // instance transitions to a DEREGISTERING status while the trunk elastic network 1154 // interface is deprovisioned. The instance then transitions to an INACTIVE status. 1155 // The ACTIVE status indicates that the container instance can accept tasks. The 1156 // DRAINING indicates that new tasks are not placed on the container instance and 1157 // any service tasks running on the container instance are removed if possible. For 1158 // more information, see Container Instance Draining 1159 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-draining.html) 1160 // in the Amazon Elastic Container Service Developer Guide. 1161 Status *string 1162 1163 // The reason that the container instance reached its current status. 1164 StatusReason *string 1165 1166 // The metadata that you apply to the container instance to help you categorize and 1167 // organize them. Each tag consists of a key and an optional value, both of which 1168 // you define. The following basic restrictions apply to tags: 1169 // 1170 // * Maximum number of 1171 // tags per resource - 50 1172 // 1173 // * For each resource, each tag key must be unique, and 1174 // each tag key can have only one value. 1175 // 1176 // * Maximum key length - 128 Unicode 1177 // characters in UTF-8 1178 // 1179 // * Maximum value length - 256 Unicode characters in UTF-8 1180 // 1181 // * 1182 // If your tagging schema is used across multiple services and resources, remember 1183 // that other services may have restrictions on allowed characters. Generally 1184 // allowed characters are: letters, numbers, and spaces representable in UTF-8, and 1185 // the following characters: + - = . _ : / @. 1186 // 1187 // * Tag keys and values are 1188 // case-sensitive. 1189 // 1190 // * Do not use aws:, AWS:, or any upper or lowercase combination 1191 // of such as a prefix for either keys or values as it is reserved for AWS use. You 1192 // cannot edit or delete tag keys or values with this prefix. Tags with this prefix 1193 // do not count against your tags per resource limit. 1194 Tags []Tag 1195 1196 // The version counter for the container instance. Every time a container instance 1197 // experiences a change that triggers a CloudWatch event, the version counter is 1198 // incremented. If you are replicating your Amazon ECS container instance state 1199 // with CloudWatch Events, you can compare the version of a container instance 1200 // reported by the Amazon ECS APIs with the version reported in CloudWatch Events 1201 // for the container instance (inside the detail object) to verify that the version 1202 // in your event stream is current. 1203 Version int64 1204 1205 // The version information for the Amazon ECS container agent and Docker daemon 1206 // running on the container instance. 1207 VersionInfo *VersionInfo 1208} 1209 1210// The overrides that should be sent to a container. An empty container override 1211// can be passed in. An example of an empty container override would be 1212// {"containerOverrides": [ ] }. If a non-empty container override is specified, 1213// the name parameter must be included. 1214type ContainerOverride struct { 1215 1216 // The command to send to the container that overrides the default command from the 1217 // Docker image or the task definition. You must also specify a container name. 1218 Command []string 1219 1220 // The number of cpu units reserved for the container, instead of the default value 1221 // from the task definition. You must also specify a container name. 1222 Cpu *int32 1223 1224 // The environment variables to send to the container. You can add new environment 1225 // variables, which are added to the container at launch, or you can override the 1226 // existing environment variables from the Docker image or the task definition. You 1227 // must also specify a container name. 1228 Environment []KeyValuePair 1229 1230 // A list of files containing the environment variables to pass to a container, 1231 // instead of the value from the container definition. 1232 EnvironmentFiles []EnvironmentFile 1233 1234 // The hard limit (in MiB) of memory to present to the container, instead of the 1235 // default value from the task definition. If your container attempts to exceed the 1236 // memory specified here, the container is killed. You must also specify a 1237 // container name. 1238 Memory *int32 1239 1240 // The soft limit (in MiB) of memory to reserve for the container, instead of the 1241 // default value from the task definition. You must also specify a container name. 1242 MemoryReservation *int32 1243 1244 // The name of the container that receives the override. This parameter is required 1245 // if any override is specified. 1246 Name *string 1247 1248 // The type and amount of a resource to assign to a container, instead of the 1249 // default value from the task definition. The only supported resource is a GPU. 1250 ResourceRequirements []ResourceRequirement 1251} 1252 1253// An object representing a change in state for a container. 1254type ContainerStateChange struct { 1255 1256 // The name of the container. 1257 ContainerName *string 1258 1259 // The exit code for the container, if the state change is a result of the 1260 // container exiting. 1261 ExitCode *int32 1262 1263 // The container image SHA 256 digest. 1264 ImageDigest *string 1265 1266 // Any network bindings associated with the container. 1267 NetworkBindings []NetworkBinding 1268 1269 // The reason for the state change. 1270 Reason *string 1271 1272 // The ID of the Docker container. 1273 RuntimeId *string 1274 1275 // The status of the container. 1276 Status *string 1277} 1278 1279// The details of an Amazon ECS service deployment. This is used only when a 1280// service uses the ECS deployment controller type. 1281type Deployment struct { 1282 1283 // The capacity provider strategy that the deployment is using. 1284 CapacityProviderStrategy []CapacityProviderStrategyItem 1285 1286 // The Unix timestamp for when the service deployment was created. 1287 CreatedAt *time.Time 1288 1289 // The most recent desired count of tasks that was specified for the service to 1290 // deploy or maintain. 1291 DesiredCount int32 1292 1293 // The number of consecutively failed tasks in the deployment. A task is considered 1294 // a failure if the service scheduler can't launch the task, the task doesn't 1295 // transition to a RUNNING state, or if it fails any of its defined health checks 1296 // and is stopped. Once a service deployment has one or more successfully running 1297 // tasks, the failed task count resets to zero and stops being evaluated. 1298 FailedTasks int32 1299 1300 // The ID of the deployment. 1301 Id *string 1302 1303 // The launch type the tasks in the service are using. For more information, see 1304 // Amazon ECS Launch Types 1305 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) 1306 // in the Amazon Elastic Container Service Developer Guide. 1307 LaunchType LaunchType 1308 1309 // The VPC subnet and security group configuration for tasks that receive their own 1310 // elastic network interface by using the awsvpc networking mode. 1311 NetworkConfiguration *NetworkConfiguration 1312 1313 // The number of tasks in the deployment that are in the PENDING status. 1314 PendingCount int32 1315 1316 // The platform version on which your tasks in the service are running. A platform 1317 // version is only specified for tasks using the Fargate launch type. If one is not 1318 // specified, the LATEST platform version is used by default. For more information, 1319 // see AWS Fargate Platform Versions 1320 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) 1321 // in the Amazon Elastic Container Service Developer Guide. 1322 PlatformVersion *string 1323 1324 // The rolloutState of a service is only returned for services that use the rolling 1325 // update (ECS) deployment type that are not behind a Classic Load Balancer. The 1326 // rollout state of the deployment. When a service deployment is started, it begins 1327 // in an IN_PROGRESS state. When the service reaches a steady state, the deployment 1328 // will transition to a COMPLETED state. If the service fails to reach a steady 1329 // state and circuit breaker is enabled, the deployment will transition to a FAILED 1330 // state. A deployment in FAILED state will launch no new tasks. For more 1331 // information, see DeploymentCircuitBreaker. 1332 RolloutState DeploymentRolloutState 1333 1334 // A description of the rollout state of a deployment. 1335 RolloutStateReason *string 1336 1337 // The number of tasks in the deployment that are in the RUNNING status. 1338 RunningCount int32 1339 1340 // The status of the deployment. The following describes each state: PRIMARY The 1341 // most recent deployment of a service. ACTIVE A service deployment that still has 1342 // running tasks, but are in the process of being replaced with a new PRIMARY 1343 // deployment. INACTIVE A deployment that has been completely replaced. 1344 Status *string 1345 1346 // The most recent task definition that was specified for the tasks in the service 1347 // to use. 1348 TaskDefinition *string 1349 1350 // The Unix timestamp for when the service deployment was last updated. 1351 UpdatedAt *time.Time 1352} 1353 1354// The deployment circuit breaker can only be used for services using the rolling 1355// update (ECS) deployment type that are not behind a Classic Load Balancer. The 1356// deployment circuit breaker determines whether a service deployment will fail if 1357// the service can't reach a steady state. If enabled, a service deployment will 1358// transition to a failed state and stop launching new tasks. You can also enable 1359// Amazon ECS to roll back your service to the last completed deployment after a 1360// failure. For more information, see Rolling update 1361// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html) 1362// in the Amazon Elastic Container Service Developer Guide. 1363type DeploymentCircuitBreaker struct { 1364 1365 // Whether to enable the deployment circuit breaker logic for the service. 1366 // 1367 // This member is required. 1368 Enable bool 1369 1370 // Whether to enable Amazon ECS to roll back the service if a service deployment 1371 // fails. If rollback is enabled, when a service deployment fails, the service is 1372 // rolled back to the last deployment that completed successfully. 1373 // 1374 // This member is required. 1375 Rollback bool 1376} 1377 1378// Optional deployment parameters that control how many tasks run during a 1379// deployment and the ordering of stopping and starting tasks. 1380type DeploymentConfiguration struct { 1381 1382 // The deployment circuit breaker can only be used for services using the rolling 1383 // update (ECS) deployment type. The deployment circuit breaker determines whether 1384 // a service deployment will fail if the service can't reach a steady state. If 1385 // deployment circuit breaker is enabled, a service deployment will transition to a 1386 // failed state and stop launching new tasks. If rollback is enabled, when a 1387 // service deployment fails, the service is rolled back to the last deployment that 1388 // completed successfully. 1389 DeploymentCircuitBreaker *DeploymentCircuitBreaker 1390 1391 // If a service is using the rolling update (ECS) deployment type, the maximum 1392 // percent parameter represents an upper limit on the number of tasks in a service 1393 // that are allowed in the RUNNING or PENDING state during a deployment, as a 1394 // percentage of the desired number of tasks (rounded down to the nearest integer), 1395 // and while any container instances are in the DRAINING state if the service 1396 // contains tasks using the EC2 launch type. This parameter enables you to define 1397 // the deployment batch size. For example, if your service has a desired number of 1398 // four tasks and a maximum percent value of 200%, the scheduler may start four new 1399 // tasks before stopping the four older tasks (provided that the cluster resources 1400 // required to do this are available). The default value for maximum percent is 1401 // 200%. If a service is using the blue/green (CODE_DEPLOY) or EXTERNAL deployment 1402 // types and tasks that use the EC2 launch type, the maximum percent value is set 1403 // to the default value and is used to define the upper limit on the number of the 1404 // tasks in the service that remain in the RUNNING state while the container 1405 // instances are in the DRAINING state. If the tasks in the service use the Fargate 1406 // launch type, the maximum percent value is not used, although it is returned when 1407 // describing your service. 1408 MaximumPercent *int32 1409 1410 // If a service is using the rolling update (ECS) deployment type, the minimum 1411 // healthy percent represents a lower limit on the number of tasks in a service 1412 // that must remain in the RUNNING state during a deployment, as a percentage of 1413 // the desired number of tasks (rounded up to the nearest integer), and while any 1414 // container instances are in the DRAINING state if the service contains tasks 1415 // using the EC2 launch type. This parameter enables you to deploy without using 1416 // additional cluster capacity. For example, if your service has a desired number 1417 // of four tasks and a minimum healthy percent of 50%, the scheduler may stop two 1418 // existing tasks to free up cluster capacity before starting two new tasks. Tasks 1419 // for services that do not use a load balancer are considered healthy if they are 1420 // in the RUNNING state; tasks for services that do use a load balancer are 1421 // considered healthy if they are in the RUNNING state and they are reported as 1422 // healthy by the load balancer. The default value for minimum healthy percent is 1423 // 100%. If a service is using the blue/green (CODE_DEPLOY) or EXTERNAL deployment 1424 // types and tasks that use the EC2 launch type, the minimum healthy percent value 1425 // is set to the default value and is used to define the lower limit on the number 1426 // of the tasks in the service that remain in the RUNNING state while the container 1427 // instances are in the DRAINING state. If the tasks in the service use the Fargate 1428 // launch type, the minimum healthy percent value is not used, although it is 1429 // returned when describing your service. 1430 MinimumHealthyPercent *int32 1431} 1432 1433// The deployment controller to use for the service. For more information, see 1434// Amazon ECS Deployment Types 1435// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) 1436// in the Amazon Elastic Container Service Developer Guide. 1437type DeploymentController struct { 1438 1439 // The deployment controller type to use. There are three deployment controller 1440 // types available: ECS The rolling update (ECS) deployment type involves replacing 1441 // the current running version of the container with the latest version. The number 1442 // of containers Amazon ECS adds or removes from the service during a rolling 1443 // update is controlled by adjusting the minimum and maximum number of healthy 1444 // tasks allowed during a service deployment, as specified in the 1445 // DeploymentConfiguration. CODE_DEPLOY The blue/green (CODE_DEPLOY) deployment 1446 // type uses the blue/green deployment model powered by AWS CodeDeploy, which 1447 // allows you to verify a new deployment of a service before sending production 1448 // traffic to it. EXTERNAL The external (EXTERNAL) deployment type enables you to 1449 // use any third-party deployment controller for full control over the deployment 1450 // process for an Amazon ECS service. 1451 // 1452 // This member is required. 1453 Type DeploymentControllerType 1454} 1455 1456// An object representing a container instance host device. 1457type Device struct { 1458 1459 // The path for the device on the host container instance. 1460 // 1461 // This member is required. 1462 HostPath *string 1463 1464 // The path inside the container at which to expose the host device. 1465 ContainerPath *string 1466 1467 // The explicit permissions to provide to the container for the device. By default, 1468 // the container has permissions for read, write, and mknod for the device. 1469 Permissions []DeviceCgroupPermission 1470} 1471 1472// This parameter is specified when you are using Docker volumes. Docker volumes 1473// are only supported when you are using the EC2 launch type. Windows containers 1474// only support the use of the local driver. To use bind mounts, specify a host 1475// instead. 1476type DockerVolumeConfiguration struct { 1477 1478 // If this value is true, the Docker volume is created if it does not already 1479 // exist. This field is only used if the scope is shared. 1480 Autoprovision *bool 1481 1482 // The Docker volume driver to use. The driver value must match the driver name 1483 // provided by Docker because it is used for task placement. If the driver was 1484 // installed using the Docker plugin CLI, use docker plugin ls to retrieve the 1485 // driver name from your container instance. If the driver was installed using 1486 // another method, use Docker plugin discovery to retrieve the driver name. For 1487 // more information, see Docker plugin discovery 1488 // (https://docs.docker.com/engine/extend/plugin_api/#plugin-discovery). This 1489 // parameter maps to Driver in the Create a volume 1490 // (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) section of 1491 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 1492 // xxdriver option to docker volume create 1493 // (https://docs.docker.com/engine/reference/commandline/volume_create/). 1494 Driver *string 1495 1496 // A map of Docker driver-specific options passed through. This parameter maps to 1497 // DriverOpts in the Create a volume 1498 // (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) section of 1499 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the xxopt 1500 // option to docker volume create 1501 // (https://docs.docker.com/engine/reference/commandline/volume_create/). 1502 DriverOpts map[string]string 1503 1504 // Custom metadata to add to your Docker volume. This parameter maps to Labels in 1505 // the Create a volume 1506 // (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) section of 1507 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 1508 // xxlabel option to docker volume create 1509 // (https://docs.docker.com/engine/reference/commandline/volume_create/). 1510 Labels map[string]string 1511 1512 // The scope for the Docker volume that determines its lifecycle. Docker volumes 1513 // that are scoped to a task are automatically provisioned when the task starts and 1514 // destroyed when the task stops. Docker volumes that are scoped as shared persist 1515 // after the task stops. 1516 Scope Scope 1517} 1518 1519// The authorization configuration details for the Amazon EFS file system. 1520type EFSAuthorizationConfig struct { 1521 1522 // The Amazon EFS access point ID to use. If an access point is specified, the root 1523 // directory value specified in the EFSVolumeConfiguration must either be omitted 1524 // or set to / which will enforce the path set on the EFS access point. If an 1525 // access point is used, transit encryption must be enabled in the 1526 // EFSVolumeConfiguration. For more information, see Working with Amazon EFS Access 1527 // Points (https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html) in the 1528 // Amazon Elastic File System User Guide. 1529 AccessPointId *string 1530 1531 // Whether or not to use the Amazon ECS task IAM role defined in a task definition 1532 // when mounting the Amazon EFS file system. If enabled, transit encryption must be 1533 // enabled in the EFSVolumeConfiguration. If this parameter is omitted, the default 1534 // value of DISABLED is used. For more information, see Using Amazon EFS Access 1535 // Points 1536 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/efs-volumes.html#efs-volume-accesspoints) 1537 // in the Amazon Elastic Container Service Developer Guide. 1538 Iam EFSAuthorizationConfigIAM 1539} 1540 1541// This parameter is specified when you are using an Amazon Elastic File System 1542// file system for task storage. For more information, see Amazon EFS Volumes 1543// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/efs-volumes.html) 1544// in the Amazon Elastic Container Service Developer Guide. 1545type EFSVolumeConfiguration struct { 1546 1547 // The Amazon EFS file system ID to use. 1548 // 1549 // This member is required. 1550 FileSystemId *string 1551 1552 // The authorization configuration details for the Amazon EFS file system. 1553 AuthorizationConfig *EFSAuthorizationConfig 1554 1555 // The directory within the Amazon EFS file system to mount as the root directory 1556 // inside the host. If this parameter is omitted, the root of the Amazon EFS volume 1557 // will be used. Specifying / will have the same effect as omitting this parameter. 1558 // If an EFS access point is specified in the authorizationConfig, the root 1559 // directory parameter must either be omitted or set to / which will enforce the 1560 // path set on the EFS access point. 1561 RootDirectory *string 1562 1563 // Whether or not to enable encryption for Amazon EFS data in transit between the 1564 // Amazon ECS host and the Amazon EFS server. Transit encryption must be enabled if 1565 // Amazon EFS IAM authorization is used. If this parameter is omitted, the default 1566 // value of DISABLED is used. For more information, see Encrypting Data in Transit 1567 // (https://docs.aws.amazon.com/efs/latest/ug/encryption-in-transit.html) in the 1568 // Amazon Elastic File System User Guide. 1569 TransitEncryption EFSTransitEncryption 1570 1571 // The port to use when sending encrypted data between the Amazon ECS host and the 1572 // Amazon EFS server. If you do not specify a transit encryption port, it will use 1573 // the port selection strategy that the Amazon EFS mount helper uses. For more 1574 // information, see EFS Mount Helper 1575 // (https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html) in the Amazon 1576 // Elastic File System User Guide. 1577 TransitEncryptionPort *int32 1578} 1579 1580// A list of files containing the environment variables to pass to a container. You 1581// can specify up to ten environment files. The file must have a .env file 1582// extension. Each line in an environment file should contain an environment 1583// variable in VARIABLE=VALUE format. Lines beginning with # are treated as 1584// comments and are ignored. For more information on the environment variable file 1585// syntax, see Declare default environment variables in file 1586// (https://docs.docker.com/compose/env-file/). If there are environment variables 1587// specified using the environment parameter in a container definition, they take 1588// precedence over the variables contained within an environment file. If multiple 1589// environment files are specified that contain the same variable, they are 1590// processed from the top down. It is recommended to use unique variable names. For 1591// more information, see Specifying environment variables 1592// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html) 1593// in the Amazon Elastic Container Service Developer Guide. This field is only 1594// valid for containers in Fargate tasks that use platform version 1.4.0 or later. 1595type EnvironmentFile struct { 1596 1597 // The file type to use. The only supported value is s3. 1598 // 1599 // This member is required. 1600 Type EnvironmentFileType 1601 1602 // The Amazon Resource Name (ARN) of the Amazon S3 object containing the 1603 // environment variable file. 1604 // 1605 // This member is required. 1606 Value *string 1607} 1608 1609// The amount of ephemeral storage to allocate for the task. This parameter is used 1610// to expand the total amount of ephemeral storage available, beyond the default 1611// amount, for tasks hosted on AWS Fargate. For more information, see Fargate task 1612// storage 1613// (https://docs.aws.amazon.com/AmazonECS/latest/userguide/using_data_volumes.html) 1614// in the Amazon ECS User Guide for AWS Fargate. This parameter is only supported 1615// for tasks hosted on AWS Fargate using platform version 1.4.0 or later. 1616type EphemeralStorage struct { 1617 1618 // The total amount, in GiB, of ephemeral storage to set for the task. The minimum 1619 // supported value is 21 GiB and the maximum supported value is 200 GiB. 1620 // 1621 // This member is required. 1622 SizeInGiB int32 1623} 1624 1625// The details of the execute command configuration. 1626type ExecuteCommandConfiguration struct { 1627 1628 // Specify an AWS Key Management Service key ID to encrypt the data between the 1629 // local client and the container. 1630 KmsKeyId *string 1631 1632 // The log configuration for the results of the execute command actions. The logs 1633 // can be sent to CloudWatch Logs or an Amazon S3 bucket. When logging=OVERRIDE is 1634 // specified, a logConfiguration must be provided. 1635 LogConfiguration *ExecuteCommandLogConfiguration 1636 1637 // The log setting to use for redirecting logs for your execute command results. 1638 // The following log settings are available. 1639 // 1640 // * NONE: The execute command session 1641 // is not logged. 1642 // 1643 // * DEFAULT: The awslogs configuration in the task definition is 1644 // used. If no logging parameter is specified, it defaults to this value. If no 1645 // awslogs log driver is configured in the task definition, the output won't be 1646 // logged. 1647 // 1648 // * OVERRIDE: Specify the logging details as a part of logConfiguration. 1649 // If the OVERRIDE logging option is specified, the logConfiguration is required. 1650 Logging ExecuteCommandLogging 1651} 1652 1653// The log configuration for the results of the execute command actions. The logs 1654// can be sent to CloudWatch Logs or an Amazon S3 bucket. 1655type ExecuteCommandLogConfiguration struct { 1656 1657 // Whether or not to enable encryption on the CloudWatch logs. If not specified, 1658 // encryption will be disabled. 1659 CloudWatchEncryptionEnabled bool 1660 1661 // The name of the CloudWatch log group to send logs to. The CloudWatch log group 1662 // must already be created. 1663 CloudWatchLogGroupName *string 1664 1665 // The name of the S3 bucket to send logs to. The S3 bucket must already be 1666 // created. 1667 S3BucketName *string 1668 1669 // Whether or not to enable encryption on the CloudWatch logs. If not specified, 1670 // encryption will be disabled. 1671 S3EncryptionEnabled bool 1672 1673 // An optional folder in the S3 bucket to place logs in. 1674 S3KeyPrefix *string 1675} 1676 1677// A failed resource. For a list of common causes, see API failure reasons 1678// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/api_failures_messages.html) 1679// in the Amazon Elastic Container Service Developer Guide. 1680type Failure struct { 1681 1682 // The Amazon Resource Name (ARN) of the failed resource. 1683 Arn *string 1684 1685 // The details of the failure. 1686 Detail *string 1687 1688 // The reason for the failure. 1689 Reason *string 1690} 1691 1692// The FireLens configuration for the container. This is used to specify and 1693// configure a log router for container logs. For more information, see Custom Log 1694// Routing 1695// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) 1696// in the Amazon Elastic Container Service Developer Guide. 1697type FirelensConfiguration struct { 1698 1699 // The log router to use. The valid values are fluentd or fluentbit. 1700 // 1701 // This member is required. 1702 Type FirelensConfigurationType 1703 1704 // The options to use when configuring the log router. This field is optional and 1705 // can be used to specify a custom configuration file or to add additional 1706 // metadata, such as the task, task definition, cluster, and container instance 1707 // details to the log event. If specified, the syntax to use is 1708 // "options":{"enable-ecs-log-metadata":"true|false","config-file-type:"s3|file","config-file-value":"arn:aws:s3:::mybucket/fluent.conf|filepath"}. 1709 // For more information, see Creating a Task Definition that Uses a FireLens 1710 // Configuration 1711 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html#firelens-taskdef) 1712 // in the Amazon Elastic Container Service Developer Guide. Tasks hosted on AWS 1713 // Fargate only support the file configuration file type. 1714 Options map[string]string 1715} 1716 1717// The authorization configuration details for Amazon FSx for Windows File Server 1718// file system. See FSxWindowsFileServerVolumeConfiguration 1719// (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_FSxWindowsFileServerVolumeConfiguration.html) 1720// in the Amazon Elastic Container Service API Reference. For more information and 1721// the input format, see Amazon FSx for Windows File Server Volumes 1722// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/wfsx-volumes.html) 1723// in the Amazon Elastic Container Service Developer Guide. 1724type FSxWindowsFileServerAuthorizationConfig struct { 1725 1726 // The authorization credential option to use. The authorization credential options 1727 // can be provided using either the Amazon Resource Name (ARN) of an AWS Secrets 1728 // Manager secret or AWS Systems Manager Parameter Store parameter. The ARNs refer 1729 // to the stored credentials. 1730 // 1731 // This member is required. 1732 CredentialsParameter *string 1733 1734 // A fully qualified domain name hosted by an AWS Directory Service 1735 // (https://docs.aws.amazon.com/directoryservice/latest/admin-guide/directory_microsoft_ad.html) 1736 // Managed Microsoft AD (Active Directory) or self-hosted AD on Amazon EC2. 1737 // 1738 // This member is required. 1739 Domain *string 1740} 1741 1742// This parameter is specified when you are using Amazon FSx for Windows File 1743// Server (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/what-is.html) file 1744// system for task storage. For more information and the input format, see Amazon 1745// FSx for Windows File Server Volumes 1746// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/wfsx-volumes.html) 1747// in the Amazon Elastic Container Service Developer Guide. 1748type FSxWindowsFileServerVolumeConfiguration struct { 1749 1750 // The authorization configuration details for the Amazon FSx for Windows File 1751 // Server file system. 1752 // 1753 // This member is required. 1754 AuthorizationConfig *FSxWindowsFileServerAuthorizationConfig 1755 1756 // The Amazon FSx for Windows File Server file system ID to use. 1757 // 1758 // This member is required. 1759 FileSystemId *string 1760 1761 // The directory within the Amazon FSx for Windows File Server file system to mount 1762 // as the root directory inside the host. 1763 // 1764 // This member is required. 1765 RootDirectory *string 1766} 1767 1768// An object representing a container health check. Health check parameters that 1769// are specified in a container definition override any Docker health checks that 1770// exist in the container image (such as those specified in a parent image or from 1771// the image's Dockerfile). You can view the health status of both individual 1772// containers and a task with the DescribeTasks API operation or when viewing the 1773// task details in the console. The following describes the possible healthStatus 1774// values for a container: 1775// 1776// * HEALTHY-The container health check has passed 1777// successfully. 1778// 1779// * UNHEALTHY-The container health check has failed. 1780// 1781// * UNKNOWN-The 1782// container health check is being evaluated or there is no container health check 1783// defined. 1784// 1785// The following describes the possible healthStatus values for a task. 1786// The container health check status of nonessential containers do not have an 1787// effect on the health status of a task. 1788// 1789// * HEALTHY-All essential containers 1790// within the task have passed their health checks. 1791// 1792// * UNHEALTHY-One or more 1793// essential containers have failed their health check. 1794// 1795// * UNKNOWN-The essential 1796// containers within the task are still having their health checks evaluated or 1797// there are no container health checks defined. 1798// 1799// If a task is run manually, and 1800// not as part of a service, the task will continue its lifecycle regardless of its 1801// health status. For tasks that are part of a service, if the task reports as 1802// unhealthy then the task will be stopped and the service scheduler will replace 1803// it. The following are notes about container health check support: 1804// 1805// * Container 1806// health checks require version 1.17.0 or greater of the Amazon ECS container 1807// agent. For more information, see Updating the Amazon ECS Container Agent 1808// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html). 1809// 1810// * 1811// Container health checks are supported for Fargate tasks if you are using 1812// platform version 1.1.0 or greater. For more information, see AWS Fargate 1813// Platform Versions 1814// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html). 1815// 1816// * 1817// Container health checks are not supported for tasks that are part of a service 1818// that is configured to use a Classic Load Balancer. 1819type HealthCheck struct { 1820 1821 // A string array representing the command that the container runs to determine if 1822 // it is healthy. The string array must start with CMD to execute the command 1823 // arguments directly, or CMD-SHELL to run the command with the container's default 1824 // shell. For example: [ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ] An 1825 // exit code of 0 indicates success, and non-zero exit code indicates failure. For 1826 // more information, see HealthCheck in the Create a container 1827 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 1828 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/). 1829 // 1830 // This member is required. 1831 Command []string 1832 1833 // The time period in seconds between each health check execution. You may specify 1834 // between 5 and 300 seconds. The default value is 30 seconds. 1835 Interval *int32 1836 1837 // The number of times to retry a failed health check before the container is 1838 // considered unhealthy. You may specify between 1 and 10 retries. The default 1839 // value is 3. 1840 Retries *int32 1841 1842 // The optional grace period within which to provide containers time to bootstrap 1843 // before failed health checks count towards the maximum number of retries. You may 1844 // specify between 0 and 300 seconds. The startPeriod is disabled by default. If a 1845 // health check succeeds within the startPeriod, then the container is considered 1846 // healthy and any subsequent failures count toward the maximum number of retries. 1847 StartPeriod *int32 1848 1849 // The time period in seconds to wait for a health check to succeed before it is 1850 // considered a failure. You may specify between 2 and 60 seconds. The default 1851 // value is 5. 1852 Timeout *int32 1853} 1854 1855// Hostnames and IP address entries that are added to the /etc/hosts file of a 1856// container via the extraHosts parameter of its ContainerDefinition. 1857type HostEntry struct { 1858 1859 // The hostname to use in the /etc/hosts entry. 1860 // 1861 // This member is required. 1862 Hostname *string 1863 1864 // The IP address to use in the /etc/hosts entry. 1865 // 1866 // This member is required. 1867 IpAddress *string 1868} 1869 1870// Details on a container instance bind mount host volume. 1871type HostVolumeProperties struct { 1872 1873 // When the host parameter is used, specify a sourcePath to declare the path on the 1874 // host container instance that is presented to the container. If this parameter is 1875 // empty, then the Docker daemon has assigned a host path for you. If the host 1876 // parameter contains a sourcePath file location, then the data volume persists at 1877 // the specified location on the host container instance until you delete it 1878 // manually. If the sourcePath value does not exist on the host container instance, 1879 // the Docker daemon creates it. If the location does exist, the contents of the 1880 // source path folder are exported. If you are using the Fargate launch type, the 1881 // sourcePath parameter is not supported. 1882 SourcePath *string 1883} 1884 1885// Details on a Elastic Inference accelerator. For more information, see Working 1886// with Amazon Elastic Inference on Amazon ECS 1887// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-eia.html) in 1888// the Amazon Elastic Container Service Developer Guide. 1889type InferenceAccelerator struct { 1890 1891 // The Elastic Inference accelerator device name. The deviceName must also be 1892 // referenced in a container definition as a ResourceRequirement. 1893 // 1894 // This member is required. 1895 DeviceName *string 1896 1897 // The Elastic Inference accelerator type to use. 1898 // 1899 // This member is required. 1900 DeviceType *string 1901} 1902 1903// Details on an Elastic Inference accelerator task override. This parameter is 1904// used to override the Elastic Inference accelerator specified in the task 1905// definition. For more information, see Working with Amazon Elastic Inference on 1906// Amazon ECS 1907// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-eia.html) in 1908// the Amazon Elastic Container Service Developer Guide. 1909type InferenceAcceleratorOverride struct { 1910 1911 // The Elastic Inference accelerator device name to override for the task. This 1912 // parameter must match a deviceName specified in the task definition. 1913 DeviceName *string 1914 1915 // The Elastic Inference accelerator type to use. 1916 DeviceType *string 1917} 1918 1919// The Linux capabilities for the container that are added to or dropped from the 1920// default configuration provided by Docker. For more information on the default 1921// capabilities and the non-default available capabilities, see Runtime privilege 1922// and Linux capabilities 1923// (https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities) 1924// in the Docker run reference. For more detailed information on these Linux 1925// capabilities, see the capabilities(7) 1926// (http://man7.org/linux/man-pages/man7/capabilities.7.html) Linux manual page. 1927type KernelCapabilities struct { 1928 1929 // The Linux capabilities for the container that have been added to the default 1930 // configuration provided by Docker. This parameter maps to CapAdd in the Create a 1931 // container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) 1932 // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and 1933 // the --cap-add option to docker run 1934 // (https://docs.docker.com/engine/reference/run/#security-configuration). Tasks 1935 // launched on AWS Fargate only support adding the SYS_PTRACE kernel capability. 1936 // Valid values: "ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | 1937 // "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" 1938 // | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | 1939 // "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | 1940 // "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | 1941 // "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | 1942 // "SYS_PTRACE" | "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | 1943 // "SYSLOG" | "WAKE_ALARM" 1944 Add []string 1945 1946 // The Linux capabilities for the container that have been removed from the default 1947 // configuration provided by Docker. This parameter maps to CapDrop in the Create a 1948 // container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) 1949 // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and 1950 // the --cap-drop option to docker run 1951 // (https://docs.docker.com/engine/reference/run/#security-configuration). Valid 1952 // values: "ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | 1953 // "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | 1954 // "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | 1955 // "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | 1956 // "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | 1957 // "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | 1958 // "SYS_PTRACE" | "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | 1959 // "SYSLOG" | "WAKE_ALARM" 1960 Drop []string 1961} 1962 1963// A key-value pair object. 1964type KeyValuePair struct { 1965 1966 // The name of the key-value pair. For environment variables, this is the name of 1967 // the environment variable. 1968 Name *string 1969 1970 // The value of the key-value pair. For environment variables, this is the value of 1971 // the environment variable. 1972 Value *string 1973} 1974 1975// Linux-specific options that are applied to the container, such as Linux 1976// KernelCapabilities. 1977type LinuxParameters struct { 1978 1979 // The Linux capabilities for the container that are added to or dropped from the 1980 // default configuration provided by Docker. For tasks that use the Fargate launch 1981 // type, capabilities is supported for all platform versions but the add parameter 1982 // is only supported if using platform version 1.4.0 or later. 1983 Capabilities *KernelCapabilities 1984 1985 // Any host devices to expose to the container. This parameter maps to Devices in 1986 // the Create a container 1987 // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 1988 // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 1989 // --device option to docker run 1990 // (https://docs.docker.com/engine/reference/run/#security-configuration). If you 1991 // are using tasks that use the Fargate launch type, the devices parameter is not 1992 // supported. 1993 Devices []Device 1994 1995 // Run an init process inside the container that forwards signals and reaps 1996 // processes. This parameter maps to the --init option to docker run 1997 // (https://docs.docker.com/engine/reference/run/#security-configuration). This 1998 // parameter requires version 1.25 of the Docker Remote API or greater on your 1999 // container instance. To check the Docker Remote API version on your container 2000 // instance, log in to your container instance and run the following command: sudo 2001 // docker version --format '{{.Server.APIVersion}}' 2002 InitProcessEnabled *bool 2003 2004 // The total amount of swap memory (in MiB) a container can use. This parameter 2005 // will be translated to the --memory-swap option to docker run 2006 // (https://docs.docker.com/engine/reference/run/#security-configuration) where the 2007 // value would be the sum of the container memory plus the maxSwap value. If a 2008 // maxSwap value of 0 is specified, the container will not use swap. Accepted 2009 // values are 0 or any positive integer. If the maxSwap parameter is omitted, the 2010 // container will use the swap configuration for the container instance it is 2011 // running on. A maxSwap value must be set for the swappiness parameter to be used. 2012 // If you are using tasks that use the Fargate launch type, the maxSwap parameter 2013 // is not supported. 2014 MaxSwap *int32 2015 2016 // The value for the size (in MiB) of the /dev/shm volume. This parameter maps to 2017 // the --shm-size option to docker run 2018 // (https://docs.docker.com/engine/reference/run/#security-configuration). If you 2019 // are using tasks that use the Fargate launch type, the sharedMemorySize parameter 2020 // is not supported. 2021 SharedMemorySize *int32 2022 2023 // This allows you to tune a container's memory swappiness behavior. A swappiness 2024 // value of 0 will cause swapping to not happen unless absolutely necessary. A 2025 // swappiness value of 100 will cause pages to be swapped very aggressively. 2026 // Accepted values are whole numbers between 0 and 100. If the swappiness parameter 2027 // is not specified, a default value of 60 is used. If a value is not specified for 2028 // maxSwap then this parameter is ignored. This parameter maps to the 2029 // --memory-swappiness option to docker run 2030 // (https://docs.docker.com/engine/reference/run/#security-configuration). If you 2031 // are using tasks that use the Fargate launch type, the swappiness parameter is 2032 // not supported. 2033 Swappiness *int32 2034 2035 // The container path, mount options, and size (in MiB) of the tmpfs mount. This 2036 // parameter maps to the --tmpfs option to docker run 2037 // (https://docs.docker.com/engine/reference/run/#security-configuration). If you 2038 // are using tasks that use the Fargate launch type, the tmpfs parameter is not 2039 // supported. 2040 Tmpfs []Tmpfs 2041} 2042 2043// The load balancer configuration to use with a service or task set. For specific 2044// notes and restrictions regarding the use of load balancers with services and 2045// task sets, see the CreateService and CreateTaskSet actions. 2046type LoadBalancer struct { 2047 2048 // The name of the container (as it appears in a container definition) to associate 2049 // with the load balancer. 2050 ContainerName *string 2051 2052 // The port on the container to associate with the load balancer. This port must 2053 // correspond to a containerPort in the task definition the tasks in the service 2054 // are using. For tasks that use the EC2 launch type, the container instance they 2055 // are launched on must allow ingress traffic on the hostPort of the port mapping. 2056 ContainerPort *int32 2057 2058 // The name of the load balancer to associate with the Amazon ECS service or task 2059 // set. A load balancer name is only specified when using a Classic Load Balancer. 2060 // If you are using an Application Load Balancer or a Network Load Balancer the 2061 // load balancer name parameter should be omitted. 2062 LoadBalancerName *string 2063 2064 // The full Amazon Resource Name (ARN) of the Elastic Load Balancing target group 2065 // or groups associated with a service or task set. A target group ARN is only 2066 // specified when using an Application Load Balancer or Network Load Balancer. If 2067 // you are using a Classic Load Balancer the target group ARN should be omitted. 2068 // For services using the ECS deployment controller, you can specify one or 2069 // multiple target groups. For more information, see Registering Multiple Target 2070 // Groups with a Service 2071 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html) 2072 // in the Amazon Elastic Container Service Developer Guide. For services using the 2073 // CODE_DEPLOY deployment controller, you are required to define two target groups 2074 // for the load balancer. For more information, see Blue/Green Deployment with 2075 // CodeDeploy 2076 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-bluegreen.html) 2077 // in the Amazon Elastic Container Service Developer Guide. If your service's task 2078 // definition uses the awsvpc network mode (which is required for the Fargate 2079 // launch type), you must choose ip as the target type, not instance, when creating 2080 // your target groups because tasks that use the awsvpc network mode are associated 2081 // with an elastic network interface, not an Amazon EC2 instance. 2082 TargetGroupArn *string 2083} 2084 2085// The log configuration for the container. This parameter maps to LogConfig in the 2086// Create a container 2087// (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 2088// the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 2089// --log-driver option to docker run 2090// (https://docs.docker.com/engine/reference/commandline/run/). By default, 2091// containers use the same logging driver that the Docker daemon uses; however the 2092// container may use a different logging driver than the Docker daemon by 2093// specifying a log driver configuration in the container definition. For more 2094// information on the options for different supported log drivers, see Configure 2095// logging drivers (https://docs.docker.com/engine/admin/logging/overview/) in the 2096// Docker documentation. The following should be noted when specifying a log 2097// configuration for your containers: 2098// 2099// * Amazon ECS currently supports a subset of 2100// the logging drivers available to the Docker daemon (shown in the valid values 2101// below). Additional log drivers may be available in future releases of the Amazon 2102// ECS container agent. 2103// 2104// * This parameter requires version 1.18 of the Docker 2105// Remote API or greater on your container instance. 2106// 2107// * For tasks hosted on Amazon 2108// EC2 instances, the Amazon ECS container agent must register the available 2109// logging drivers with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable 2110// before containers placed on that instance can use these log configuration 2111// options. For more information, see Amazon ECS container agent configuration 2112// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) 2113// in the Amazon Elastic Container Service Developer Guide. 2114// 2115// * For tasks on AWS 2116// Fargate, because you do not have access to the underlying infrastructure your 2117// tasks are hosted on, any additional software needed will have to be installed 2118// outside of the task. For example, the Fluentd output aggregators or a remote 2119// host running Logstash to send Gelf logs to. 2120type LogConfiguration struct { 2121 2122 // The log driver to use for the container. For tasks on AWS Fargate, the supported 2123 // log drivers are awslogs, splunk, and awsfirelens. For tasks hosted on Amazon EC2 2124 // instances, the supported log drivers are awslogs, fluentd, gelf, json-file, 2125 // journald, logentries,syslog, splunk, and awsfirelens. For more information about 2126 // using the awslogs log driver, see Using the awslogs log driver 2127 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) 2128 // in the Amazon Elastic Container Service Developer Guide. For more information 2129 // about using the awsfirelens log driver, see Custom log routing 2130 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) 2131 // in the Amazon Elastic Container Service Developer Guide. If you have a custom 2132 // driver that is not listed, you can fork the Amazon ECS container agent project 2133 // that is available on GitHub (https://github.com/aws/amazon-ecs-agent) and 2134 // customize it to work with that driver. We encourage you to submit pull requests 2135 // for changes that you would like to have included. However, we do not currently 2136 // provide support for running modified copies of this software. 2137 // 2138 // This member is required. 2139 LogDriver LogDriver 2140 2141 // The configuration options to send to the log driver. This parameter requires 2142 // version 1.19 of the Docker Remote API or greater on your container instance. To 2143 // check the Docker Remote API version on your container instance, log in to your 2144 // container instance and run the following command: sudo docker version --format 2145 // '{{.Server.APIVersion}}' 2146 Options map[string]string 2147 2148 // The secrets to pass to the log configuration. For more information, see 2149 // Specifying Sensitive Data 2150 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) 2151 // in the Amazon Elastic Container Service Developer Guide. 2152 SecretOptions []Secret 2153} 2154 2155// Details about the managed agent status for the container. 2156type ManagedAgent struct { 2157 2158 // The Unix timestamp for when the managed agent was last started. 2159 LastStartedAt *time.Time 2160 2161 // The last known status of the managed agent. 2162 LastStatus *string 2163 2164 // The name of the managed agent. When the execute command feature is enabled, the 2165 // managed agent name is ExecuteCommandAgent. 2166 Name ManagedAgentName 2167 2168 // The reason for why the managed agent is in the state it is in. 2169 Reason *string 2170} 2171 2172// An object representing a change in state for a managed agent. 2173type ManagedAgentStateChange struct { 2174 2175 // The name of the container associated with the managed agent. 2176 // 2177 // This member is required. 2178 ContainerName *string 2179 2180 // The name of the managed agent. 2181 // 2182 // This member is required. 2183 ManagedAgentName ManagedAgentName 2184 2185 // The status of the managed agent. 2186 // 2187 // This member is required. 2188 Status *string 2189 2190 // The reason for the status of the managed agent. 2191 Reason *string 2192} 2193 2194// The managed scaling settings for the Auto Scaling group capacity provider. When 2195// managed scaling is enabled, Amazon ECS manages the scale-in and scale-out 2196// actions of the Auto Scaling group. Amazon ECS manages a target tracking scaling 2197// policy using an Amazon ECS-managed CloudWatch metric with the specified 2198// targetCapacity value as the target value for the metric. For more information, 2199// see Using Managed Scaling 2200// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html#asg-capacity-providers-managed-scaling) 2201// in the Amazon Elastic Container Service Developer Guide. If managed scaling is 2202// disabled, the user must manage the scaling of the Auto Scaling group. 2203type ManagedScaling struct { 2204 2205 // The period of time, in seconds, after a newly launched Amazon EC2 instance can 2206 // contribute to CloudWatch metrics for Auto Scaling group. If this parameter is 2207 // omitted, the default value of 300 seconds is used. 2208 InstanceWarmupPeriod *int32 2209 2210 // The maximum number of container instances that Amazon ECS will scale in or scale 2211 // out at one time. If this parameter is omitted, the default value of 10000 is 2212 // used. 2213 MaximumScalingStepSize *int32 2214 2215 // The minimum number of container instances that Amazon ECS will scale in or scale 2216 // out at one time. If this parameter is omitted, the default value of 1 is used. 2217 MinimumScalingStepSize *int32 2218 2219 // Whether or not to enable managed scaling for the capacity provider. 2220 Status ManagedScalingStatus 2221 2222 // The target capacity value for the capacity provider. The specified value must be 2223 // greater than 0 and less than or equal to 100. A value of 100 will result in the 2224 // Amazon EC2 instances in your Auto Scaling group being completely utilized. 2225 TargetCapacity *int32 2226} 2227 2228// Details on a volume mount point that is used in a container definition. 2229type MountPoint struct { 2230 2231 // The path on the container to mount the host volume at. 2232 ContainerPath *string 2233 2234 // If this value is true, the container has read-only access to the volume. If this 2235 // value is false, then the container can write to the volume. The default value is 2236 // false. 2237 ReadOnly *bool 2238 2239 // The name of the volume to mount. Must be a volume name referenced in the name 2240 // parameter of task definition volume. 2241 SourceVolume *string 2242} 2243 2244// Details on the network bindings between a container and its host container 2245// instance. After a task reaches the RUNNING status, manual and automatic host and 2246// container port assignments are visible in the networkBindings section of 2247// DescribeTasks API responses. 2248type NetworkBinding struct { 2249 2250 // The IP address that the container is bound to on the container instance. 2251 BindIP *string 2252 2253 // The port number on the container that is used with the network binding. 2254 ContainerPort *int32 2255 2256 // The port number on the host that is used with the network binding. 2257 HostPort *int32 2258 2259 // The protocol used for the network binding. 2260 Protocol TransportProtocol 2261} 2262 2263// An object representing the network configuration for a task or service. 2264type NetworkConfiguration struct { 2265 2266 // The VPC subnets and security groups associated with a task. All specified 2267 // subnets and security groups must be from the same VPC. 2268 AwsvpcConfiguration *AwsVpcConfiguration 2269} 2270 2271// An object representing the elastic network interface for tasks that use the 2272// awsvpc network mode. 2273type NetworkInterface struct { 2274 2275 // The attachment ID for the network interface. 2276 AttachmentId *string 2277 2278 // The private IPv6 address for the network interface. 2279 Ipv6Address *string 2280 2281 // The private IPv4 address for the network interface. 2282 PrivateIpv4Address *string 2283} 2284 2285// An object representing a constraint on task placement. For more information, see 2286// Task Placement Constraints 2287// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) 2288// in the Amazon Elastic Container Service Developer Guide. If you are using the 2289// Fargate launch type, task placement constraints are not supported. 2290type PlacementConstraint struct { 2291 2292 // A cluster query language expression to apply to the constraint. You cannot 2293 // specify an expression if the constraint type is distinctInstance. For more 2294 // information, see Cluster Query Language 2295 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) 2296 // in the Amazon Elastic Container Service Developer Guide. 2297 Expression *string 2298 2299 // The type of constraint. Use distinctInstance to ensure that each task in a 2300 // particular group is running on a different container instance. Use memberOf to 2301 // restrict the selection to a group of valid candidates. 2302 Type PlacementConstraintType 2303} 2304 2305// The task placement strategy for a task or service. For more information, see 2306// Task Placement Strategies 2307// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html) 2308// in the Amazon Elastic Container Service Developer Guide. 2309type PlacementStrategy struct { 2310 2311 // The field to apply the placement strategy against. For the spread placement 2312 // strategy, valid values are instanceId (or host, which has the same effect), or 2313 // any platform or custom attribute that is applied to a container instance, such 2314 // as attribute:ecs.availability-zone. For the binpack placement strategy, valid 2315 // values are cpu and memory. For the random placement strategy, this field is not 2316 // used. 2317 Field *string 2318 2319 // The type of placement strategy. The random placement strategy randomly places 2320 // tasks on available candidates. The spread placement strategy spreads placement 2321 // across available candidates evenly based on the field parameter. The binpack 2322 // strategy places tasks on available candidates that have the least available 2323 // amount of the resource that is specified with the field parameter. For example, 2324 // if you binpack on memory, a task is placed on the instance with the least amount 2325 // of remaining memory (but still enough to run the task). 2326 Type PlacementStrategyType 2327} 2328 2329// The devices that are available on the container instance. The only supported 2330// device type is a GPU. 2331type PlatformDevice struct { 2332 2333 // The ID for the GPU(s) on the container instance. The available GPU IDs can also 2334 // be obtained on the container instance in the 2335 // /var/lib/ecs/gpu/nvidia_gpu_info.json file. 2336 // 2337 // This member is required. 2338 Id *string 2339 2340 // The type of device that is available on the container instance. The only 2341 // supported value is GPU. 2342 // 2343 // This member is required. 2344 Type PlatformDeviceType 2345} 2346 2347// Port mappings allow containers to access ports on the host container instance to 2348// send or receive traffic. Port mappings are specified as part of the container 2349// definition. If you are using containers in a task with the awsvpc or host 2350// network mode, exposed ports should be specified using containerPort. The 2351// hostPort can be left blank or it must be the same value as the containerPort. 2352// You cannot expose the same container port for multiple protocols. An error will 2353// be returned if this is attempted After a task reaches the RUNNING status, manual 2354// and automatic host and container port assignments are visible in the 2355// networkBindings section of DescribeTasks API responses. 2356type PortMapping struct { 2357 2358 // The port number on the container that is bound to the user-specified or 2359 // automatically assigned host port. If you are using containers in a task with the 2360 // awsvpc or host network mode, exposed ports should be specified using 2361 // containerPort. If you are using containers in a task with the bridge network 2362 // mode and you specify a container port and not a host port, your container 2363 // automatically receives a host port in the ephemeral port range. For more 2364 // information, see hostPort. Port mappings that are automatically assigned in this 2365 // way do not count toward the 100 reserved ports limit of a container instance. 2366 ContainerPort *int32 2367 2368 // The port number on the container instance to reserve for your container. If you 2369 // are using containers in a task with the awsvpc or host network mode, the 2370 // hostPort can either be left blank or set to the same value as the containerPort. 2371 // If you are using containers in a task with the bridge network mode, you can 2372 // specify a non-reserved host port for your container port mapping, or you can 2373 // omit the hostPort (or set it to 0) while specifying a containerPort and your 2374 // container automatically receives a port in the ephemeral port range for your 2375 // container instance operating system and Docker version. The default ephemeral 2376 // port range for Docker version 1.6.0 and later is listed on the instance under 2377 // /proc/sys/net/ipv4/ip_local_port_range. If this kernel parameter is unavailable, 2378 // the default ephemeral port range from 49153 through 65535 is used. Do not 2379 // attempt to specify a host port in the ephemeral port range as these are reserved 2380 // for automatic assignment. In general, ports below 32768 are outside of the 2381 // ephemeral port range. The default ephemeral port range from 49153 through 65535 2382 // is always used for Docker versions before 1.6.0. The default reserved ports are 2383 // 22 for SSH, the Docker ports 2375 and 2376, and the Amazon ECS container agent 2384 // ports 51678-51680. Any host port that was previously specified in a running task 2385 // is also reserved while the task is running (after a task stops, the host port is 2386 // released). The current reserved ports are displayed in the remainingResources of 2387 // DescribeContainerInstances output. A container instance can have up to 100 2388 // reserved ports at a time, including the default reserved ports. Automatically 2389 // assigned ports don't count toward the 100 reserved ports limit. 2390 HostPort *int32 2391 2392 // The protocol used for the port mapping. Valid values are tcp and udp. The 2393 // default is tcp. 2394 Protocol TransportProtocol 2395} 2396 2397// The configuration details for the App Mesh proxy. For tasks using the EC2 launch 2398// type, the container instances require at least version 1.26.0 of the container 2399// agent and at least version 1.26.0-1 of the ecs-init package to enable a proxy 2400// configuration. If your container instances are launched from the Amazon 2401// ECS-optimized AMI version 20190301 or later, then they contain the required 2402// versions of the container agent and ecs-init. For more information, see Amazon 2403// ECS-optimized Linux AMI 2404// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) 2405type ProxyConfiguration struct { 2406 2407 // The name of the container that will serve as the App Mesh proxy. 2408 // 2409 // This member is required. 2410 ContainerName *string 2411 2412 // The set of network configuration parameters to provide the Container Network 2413 // Interface (CNI) plugin, specified as key-value pairs. 2414 // 2415 // * IgnoredUID - (Required) 2416 // The user ID (UID) of the proxy container as defined by the user parameter in a 2417 // container definition. This is used to ensure the proxy ignores its own traffic. 2418 // If IgnoredGID is specified, this field can be empty. 2419 // 2420 // * IgnoredGID - (Required) 2421 // The group ID (GID) of the proxy container as defined by the user parameter in a 2422 // container definition. This is used to ensure the proxy ignores its own traffic. 2423 // If IgnoredUID is specified, this field can be empty. 2424 // 2425 // * AppPorts - (Required) 2426 // The list of ports that the application uses. Network traffic to these ports is 2427 // forwarded to the ProxyIngressPort and ProxyEgressPort. 2428 // 2429 // * ProxyIngressPort - 2430 // (Required) Specifies the port that incoming traffic to the AppPorts is directed 2431 // to. 2432 // 2433 // * ProxyEgressPort - (Required) Specifies the port that outgoing traffic 2434 // from the AppPorts is directed to. 2435 // 2436 // * EgressIgnoredPorts - (Required) The egress 2437 // traffic going to the specified ports is ignored and not redirected to the 2438 // ProxyEgressPort. It can be an empty list. 2439 // 2440 // * EgressIgnoredIPs - (Required) The 2441 // egress traffic going to the specified IP addresses is ignored and not redirected 2442 // to the ProxyEgressPort. It can be an empty list. 2443 Properties []KeyValuePair 2444 2445 // The proxy type. The only supported value is APPMESH. 2446 Type ProxyConfigurationType 2447} 2448 2449// The repository credentials for private registry authentication. 2450type RepositoryCredentials struct { 2451 2452 // The Amazon Resource Name (ARN) of the secret containing the private repository 2453 // credentials. When you are using the Amazon ECS API, AWS CLI, or AWS SDK, if the 2454 // secret exists in the same Region as the task that you are launching then you can 2455 // use either the full ARN or the name of the secret. When you are using the AWS 2456 // Management Console, you must specify the full ARN of the secret. 2457 // 2458 // This member is required. 2459 CredentialsParameter *string 2460} 2461 2462// Describes the resources available for a container instance. 2463type Resource struct { 2464 2465 // When the doubleValue type is set, the value of the resource must be a double 2466 // precision floating-point type. 2467 DoubleValue float64 2468 2469 // When the integerValue type is set, the value of the resource must be an integer. 2470 IntegerValue int32 2471 2472 // When the longValue type is set, the value of the resource must be an extended 2473 // precision floating-point type. 2474 LongValue int64 2475 2476 // The name of the resource, such as CPU, MEMORY, PORTS, PORTS_UDP, or a 2477 // user-defined resource. 2478 Name *string 2479 2480 // When the stringSetValue type is set, the value of the resource must be a string 2481 // type. 2482 StringSetValue []string 2483 2484 // The type of the resource, such as INTEGER, DOUBLE, LONG, or STRINGSET. 2485 Type *string 2486} 2487 2488// The type and amount of a resource to assign to a container. The supported 2489// resource types are GPUs and Elastic Inference accelerators. For more 2490// information, see Working with GPUs on Amazon ECS 2491// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-gpu.html) or 2492// Working with Amazon Elastic Inference on Amazon ECS 2493// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-eia.html) in 2494// the Amazon Elastic Container Service Developer Guide 2495type ResourceRequirement struct { 2496 2497 // The type of resource to assign to a container. The supported values are GPU or 2498 // InferenceAccelerator. 2499 // 2500 // This member is required. 2501 Type ResourceType 2502 2503 // The value for the specified resource type. If the GPU type is used, the value is 2504 // the number of physical GPUs the Amazon ECS container agent will reserve for the 2505 // container. The number of GPUs reserved for all containers in a task should not 2506 // exceed the number of available GPUs on the container instance the task is 2507 // launched on. If the InferenceAccelerator type is used, the value should match 2508 // the deviceName for an InferenceAccelerator specified in a task definition. 2509 // 2510 // This member is required. 2511 Value *string 2512} 2513 2514// A floating-point percentage of the desired number of tasks to place and keep 2515// running in the task set. 2516type Scale struct { 2517 2518 // The unit of measure for the scale value. 2519 Unit ScaleUnit 2520 2521 // The value, specified as a percent total of a service's desiredCount, to scale 2522 // the task set. Accepted values are numbers between 0 and 100. 2523 Value float64 2524} 2525 2526// An object representing the secret to expose to your container. Secrets can be 2527// exposed to a container in the following ways: 2528// 2529// * To inject sensitive data into 2530// your containers as environment variables, use the secrets container definition 2531// parameter. 2532// 2533// * To reference sensitive information in the log configuration of a 2534// container, use the secretOptions container definition parameter. 2535// 2536// For more 2537// information, see Specifying Sensitive Data 2538// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) 2539// in the Amazon Elastic Container Service Developer Guide. 2540type Secret struct { 2541 2542 // The name of the secret. 2543 // 2544 // This member is required. 2545 Name *string 2546 2547 // The secret to expose to the container. The supported values are either the full 2548 // ARN of the AWS Secrets Manager secret or the full ARN of the parameter in the 2549 // AWS Systems Manager Parameter Store. If the AWS Systems Manager Parameter Store 2550 // parameter exists in the same Region as the task you are launching, then you can 2551 // use either the full ARN or name of the parameter. If the parameter exists in a 2552 // different Region, then the full ARN must be specified. 2553 // 2554 // This member is required. 2555 ValueFrom *string 2556} 2557 2558// Details on a service within a cluster 2559type Service struct { 2560 2561 // The capacity provider strategy associated with the service. 2562 CapacityProviderStrategy []CapacityProviderStrategyItem 2563 2564 // The Amazon Resource Name (ARN) of the cluster that hosts the service. 2565 ClusterArn *string 2566 2567 // The Unix timestamp for when the service was created. 2568 CreatedAt *time.Time 2569 2570 // The principal that created the service. 2571 CreatedBy *string 2572 2573 // Optional deployment parameters that control how many tasks run during the 2574 // deployment and the ordering of stopping and starting tasks. 2575 DeploymentConfiguration *DeploymentConfiguration 2576 2577 // The deployment controller type the service is using. When using the 2578 // DescribeServices API, this field is omitted if the service is using the ECS 2579 // deployment controller type. 2580 DeploymentController *DeploymentController 2581 2582 // The current state of deployments for the service. 2583 Deployments []Deployment 2584 2585 // The desired number of instantiations of the task definition to keep running on 2586 // the service. This value is specified when the service is created with 2587 // CreateService, and it can be modified with UpdateService. 2588 DesiredCount int32 2589 2590 // Specifies whether to enable Amazon ECS managed tags for the tasks in the 2591 // service. For more information, see Tagging Your Amazon ECS Resources 2592 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) 2593 // in the Amazon Elastic Container Service Developer Guide. 2594 EnableECSManagedTags bool 2595 2596 // Whether or not the execute command functionality is enabled for the service. If 2597 // true, the execute command functionality is enabled for all containers in tasks 2598 // as part of the service. 2599 EnableExecuteCommand bool 2600 2601 // The event stream for your service. A maximum of 100 of the latest events are 2602 // displayed. 2603 Events []ServiceEvent 2604 2605 // The period of time, in seconds, that the Amazon ECS service scheduler ignores 2606 // unhealthy Elastic Load Balancing target health checks after a task has first 2607 // started. 2608 HealthCheckGracePeriodSeconds *int32 2609 2610 // The launch type on which your service is running. If no value is specified, it 2611 // will default to EC2. Valid values include EC2 and FARGATE. For more information, 2612 // see Amazon ECS Launch Types 2613 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) 2614 // in the Amazon Elastic Container Service Developer Guide. 2615 LaunchType LaunchType 2616 2617 // A list of Elastic Load Balancing load balancer objects, containing the load 2618 // balancer name, the container name (as it appears in a container definition), and 2619 // the container port to access from the load balancer. 2620 LoadBalancers []LoadBalancer 2621 2622 // The VPC subnet and security group configuration for tasks that receive their own 2623 // elastic network interface by using the awsvpc networking mode. 2624 NetworkConfiguration *NetworkConfiguration 2625 2626 // The number of tasks in the cluster that are in the PENDING state. 2627 PendingCount int32 2628 2629 // The placement constraints for the tasks in the service. 2630 PlacementConstraints []PlacementConstraint 2631 2632 // The placement strategy that determines how tasks for the service are placed. 2633 PlacementStrategy []PlacementStrategy 2634 2635 // The platform version on which to run your service. A platform version is only 2636 // specified for tasks using the Fargate launch type. If one is not specified, the 2637 // LATEST platform version is used by default. For more information, see AWS 2638 // Fargate Platform Versions 2639 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) 2640 // in the Amazon Elastic Container Service Developer Guide. 2641 PlatformVersion *string 2642 2643 // Specifies whether to propagate the tags from the task definition or the service 2644 // to the task. If no value is specified, the tags are not propagated. 2645 PropagateTags PropagateTags 2646 2647 // The ARN of the IAM role associated with the service that allows the Amazon ECS 2648 // container agent to register container instances with an Elastic Load Balancing 2649 // load balancer. 2650 RoleArn *string 2651 2652 // The number of tasks in the cluster that are in the RUNNING state. 2653 RunningCount int32 2654 2655 // The scheduling strategy to use for the service. For more information, see 2656 // Services 2657 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html). 2658 // There are two service scheduler strategies available: 2659 // 2660 // * REPLICA-The replica 2661 // scheduling strategy places and maintains the desired number of tasks across your 2662 // cluster. By default, the service scheduler spreads tasks across Availability 2663 // Zones. You can use task placement strategies and constraints to customize task 2664 // placement decisions. 2665 // 2666 // * DAEMON-The daemon scheduling strategy deploys exactly 2667 // one task on each active container instance that meets all of the task placement 2668 // constraints that you specify in your cluster. The service scheduler also 2669 // evaluates the task placement constraints for running tasks and will stop tasks 2670 // that do not meet the placement constraints. Fargate tasks do not support the 2671 // DAEMON scheduling strategy. 2672 SchedulingStrategy SchedulingStrategy 2673 2674 // The ARN that identifies the service. The ARN contains the arn:aws:ecs namespace, 2675 // followed by the Region of the service, the AWS account ID of the service owner, 2676 // the service namespace, and then the service name. For example, 2677 // arn:aws:ecs:region:012345678910:service/my-service. 2678 ServiceArn *string 2679 2680 // The name of your service. Up to 255 letters (uppercase and lowercase), numbers, 2681 // underscores, and hyphens are allowed. Service names must be unique within a 2682 // cluster, but you can have similarly named services in multiple clusters within a 2683 // Region or across multiple Regions. 2684 ServiceName *string 2685 2686 // The details of the service discovery registries to assign to this service. For 2687 // more information, see Service Discovery 2688 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html). 2689 ServiceRegistries []ServiceRegistry 2690 2691 // The status of the service. The valid values are ACTIVE, DRAINING, or INACTIVE. 2692 Status *string 2693 2694 // The metadata that you apply to the service to help you categorize and organize 2695 // them. Each tag consists of a key and an optional value, both of which you 2696 // define. The following basic restrictions apply to tags: 2697 // 2698 // * Maximum number of 2699 // tags per resource - 50 2700 // 2701 // * For each resource, each tag key must be unique, and 2702 // each tag key can have only one value. 2703 // 2704 // * Maximum key length - 128 Unicode 2705 // characters in UTF-8 2706 // 2707 // * Maximum value length - 256 Unicode characters in UTF-8 2708 // 2709 // * 2710 // If your tagging schema is used across multiple services and resources, remember 2711 // that other services may have restrictions on allowed characters. Generally 2712 // allowed characters are: letters, numbers, and spaces representable in UTF-8, and 2713 // the following characters: + - = . _ : / @. 2714 // 2715 // * Tag keys and values are 2716 // case-sensitive. 2717 // 2718 // * Do not use aws:, AWS:, or any upper or lowercase combination 2719 // of such as a prefix for either keys or values as it is reserved for AWS use. You 2720 // cannot edit or delete tag keys or values with this prefix. Tags with this prefix 2721 // do not count against your tags per resource limit. 2722 Tags []Tag 2723 2724 // The task definition to use for tasks in the service. This value is specified 2725 // when the service is created with CreateService, and it can be modified with 2726 // UpdateService. 2727 TaskDefinition *string 2728 2729 // Information about a set of Amazon ECS tasks in either an AWS CodeDeploy or an 2730 // EXTERNAL deployment. An Amazon ECS task set includes details such as the desired 2731 // number of tasks, how many tasks are running, and whether the task set serves 2732 // production traffic. 2733 TaskSets []TaskSet 2734} 2735 2736// Details on an event associated with a service. 2737type ServiceEvent struct { 2738 2739 // The Unix timestamp for when the event was triggered. 2740 CreatedAt *time.Time 2741 2742 // The ID string of the event. 2743 Id *string 2744 2745 // The event message. 2746 Message *string 2747} 2748 2749// Details of the service registry. 2750type ServiceRegistry struct { 2751 2752 // The container name value, already specified in the task definition, to be used 2753 // for your service discovery service. If the task definition that your service 2754 // task specifies uses the bridge or host network mode, you must specify a 2755 // containerName and containerPort combination from the task definition. If the 2756 // task definition that your service task specifies uses the awsvpc network mode 2757 // and a type SRV DNS record is used, you must specify either a containerName and 2758 // containerPort combination or a port value, but not both. 2759 ContainerName *string 2760 2761 // The port value, already specified in the task definition, to be used for your 2762 // service discovery service. If the task definition your service task specifies 2763 // uses the bridge or host network mode, you must specify a containerName and 2764 // containerPort combination from the task definition. If the task definition your 2765 // service task specifies uses the awsvpc network mode and a type SRV DNS record is 2766 // used, you must specify either a containerName and containerPort combination or a 2767 // port value, but not both. 2768 ContainerPort *int32 2769 2770 // The port value used if your service discovery service specified an SRV record. 2771 // This field may be used if both the awsvpc network mode and SRV records are used. 2772 Port *int32 2773 2774 // The Amazon Resource Name (ARN) of the service registry. The currently supported 2775 // service registry is AWS Cloud Map. For more information, see CreateService 2776 // (https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html). 2777 RegistryArn *string 2778} 2779 2780// The details of the execute command session. 2781type Session struct { 2782 2783 // The ID of the execute command session. 2784 SessionId *string 2785 2786 // A URL back to managed agent on the container that the SSM Session Manager client 2787 // uses to send commands and receive output from the container. 2788 StreamUrl *string 2789 2790 // An encrypted token value containing session and caller information. Used to 2791 // authenticate the connection to the container. 2792 TokenValue *string 2793} 2794 2795// The current account setting for a resource. 2796type Setting struct { 2797 2798 // The Amazon ECS resource name. 2799 Name SettingName 2800 2801 // The ARN of the principal, which can be an IAM user, IAM role, or the root user. 2802 // If this field is omitted, the authenticated user is assumed. 2803 PrincipalArn *string 2804 2805 // Whether the account setting is enabled or disabled for the specified resource. 2806 Value *string 2807} 2808 2809// A list of namespaced kernel parameters to set in the container. This parameter 2810// maps to Sysctls in the Create a container 2811// (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of 2812// the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the 2813// --sysctl option to docker run 2814// (https://docs.docker.com/engine/reference/run/#security-configuration). It is 2815// not recommended that you specify network-related systemControls parameters for 2816// multiple containers in a single task that also uses either the awsvpc or host 2817// network mode for the following reasons: 2818// 2819// * For tasks that use the awsvpc network 2820// mode, if you set systemControls for any container, it applies to all containers 2821// in the task. If you set different systemControls for multiple containers in a 2822// single task, the container that is started last determines which systemControls 2823// take effect. 2824// 2825// * For tasks that use the host network mode, the systemControls 2826// parameter applies to the container instance's kernel parameter as well as that 2827// of all containers of any tasks running on that container instance. 2828type SystemControl struct { 2829 2830 // The namespaced kernel parameter for which to set a value. 2831 Namespace *string 2832 2833 // The value for the namespaced kernel parameter specified in namespace. 2834 Value *string 2835} 2836 2837// The metadata that you apply to a resource to help you categorize and organize 2838// them. Each tag consists of a key and an optional value, both of which you 2839// define. The following basic restrictions apply to tags: 2840// 2841// * Maximum number of 2842// tags per resource - 50 2843// 2844// * For each resource, each tag key must be unique, and 2845// each tag key can have only one value. 2846// 2847// * Maximum key length - 128 Unicode 2848// characters in UTF-8 2849// 2850// * Maximum value length - 256 Unicode characters in UTF-8 2851// 2852// * 2853// If your tagging schema is used across multiple services and resources, remember 2854// that other services may have restrictions on allowed characters. Generally 2855// allowed characters are: letters, numbers, and spaces representable in UTF-8, and 2856// the following characters: + - = . _ : / @. 2857// 2858// * Tag keys and values are 2859// case-sensitive. 2860// 2861// * Do not use aws:, AWS:, or any upper or lowercase combination 2862// of such as a prefix for either keys or values as it is reserved for AWS use. You 2863// cannot edit or delete tag keys or values with this prefix. Tags with this prefix 2864// do not count against your tags per resource limit. 2865type Tag struct { 2866 2867 // One part of a key-value pair that make up a tag. A key is a general label that 2868 // acts like a category for more specific tag values. 2869 Key *string 2870 2871 // The optional part of a key-value pair that make up a tag. A value acts as a 2872 // descriptor within a tag category (key). 2873 Value *string 2874} 2875 2876// Details on a task in a cluster. 2877type Task struct { 2878 2879 // The Elastic Network Adapter associated with the task if the task uses the awsvpc 2880 // network mode. 2881 Attachments []Attachment 2882 2883 // The attributes of the task 2884 Attributes []Attribute 2885 2886 // The availability zone of the task. 2887 AvailabilityZone *string 2888 2889 // The capacity provider associated with the task. 2890 CapacityProviderName *string 2891 2892 // The ARN of the cluster that hosts the task. 2893 ClusterArn *string 2894 2895 // The connectivity status of a task. 2896 Connectivity Connectivity 2897 2898 // The Unix timestamp for when the task last went into CONNECTED status. 2899 ConnectivityAt *time.Time 2900 2901 // The ARN of the container instances that host the task. 2902 ContainerInstanceArn *string 2903 2904 // The containers associated with the task. 2905 Containers []Container 2906 2907 // The number of CPU units used by the task as expressed in a task definition. It 2908 // can be expressed as an integer using CPU units, for example 1024. It can also be 2909 // expressed as a string using vCPUs, for example 1 vCPU or 1 vcpu. String values 2910 // are converted to an integer indicating the CPU units when the task definition is 2911 // registered. If you are using the EC2 launch type, this field is optional. 2912 // Supported values are between 128 CPU units (0.125 vCPUs) and 10240 CPU units (10 2913 // vCPUs). If you are using the Fargate launch type, this field is required and you 2914 // must use one of the following values, which determines your range of supported 2915 // values for the memory parameter: 2916 // 2917 // * 256 (.25 vCPU) - Available memory values: 2918 // 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) 2919 // 2920 // * 512 (.5 vCPU) - Available memory 2921 // values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) 2922 // 2923 // * 1024 (1 vCPU) - 2924 // Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 2925 // 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) 2926 // 2927 // * 2048 (2 vCPU) - Available memory 2928 // values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) 2929 // 2930 // * 2931 // 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) 2932 // in increments of 1024 (1 GB) 2933 Cpu *string 2934 2935 // The Unix timestamp for when the task was created (the task entered the PENDING 2936 // state). 2937 CreatedAt *time.Time 2938 2939 // The desired status of the task. For more information, see Task Lifecycle 2940 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html). 2941 DesiredStatus *string 2942 2943 // Whether or not execute command functionality is enabled for this task. If true, 2944 // this enables execute command functionality on all containers in the task. 2945 EnableExecuteCommand bool 2946 2947 // The ephemeral storage settings for the task. 2948 EphemeralStorage *EphemeralStorage 2949 2950 // The Unix timestamp for when the task execution stopped. 2951 ExecutionStoppedAt *time.Time 2952 2953 // The name of the task group associated with the task. 2954 Group *string 2955 2956 // The health status for the task, which is determined by the health of the 2957 // essential containers in the task. If all essential containers in the task are 2958 // reporting as HEALTHY, then the task status also reports as HEALTHY. If any 2959 // essential containers in the task are reporting as UNHEALTHY or UNKNOWN, then the 2960 // task status also reports as UNHEALTHY or UNKNOWN, accordingly. The Amazon ECS 2961 // container agent does not monitor or report on Docker health checks that are 2962 // embedded in a container image (such as those specified in a parent image or from 2963 // the image's Dockerfile) and not specified in the container definition. Health 2964 // check parameters that are specified in a container definition override any 2965 // Docker health checks that exist in the container image. 2966 HealthStatus HealthStatus 2967 2968 // The Elastic Inference accelerator associated with the task. 2969 InferenceAccelerators []InferenceAccelerator 2970 2971 // The last known status of the task. For more information, see Task Lifecycle 2972 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html). 2973 LastStatus *string 2974 2975 // The launch type on which your task is running. For more information, see Amazon 2976 // ECS Launch Types 2977 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) 2978 // in the Amazon Elastic Container Service Developer Guide. 2979 LaunchType LaunchType 2980 2981 // The amount of memory (in MiB) used by the task as expressed in a task 2982 // definition. It can be expressed as an integer using MiB, for example 1024. It 2983 // can also be expressed as a string using GB, for example 1GB or 1 GB. String 2984 // values are converted to an integer indicating the MiB when the task definition 2985 // is registered. If you are using the EC2 launch type, this field is optional. If 2986 // you are using the Fargate launch type, this field is required and you must use 2987 // one of the following values, which determines your range of supported values for 2988 // the cpu parameter: 2989 // 2990 // * 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu 2991 // values: 256 (.25 vCPU) 2992 // 2993 // * 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - 2994 // Available cpu values: 512 (.5 vCPU) 2995 // 2996 // * 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 2997 // 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 2998 // (1 vCPU) 2999 // 3000 // * Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - 3001 // Available cpu values: 2048 (2 vCPU) 3002 // 3003 // * Between 8192 (8 GB) and 30720 (30 GB) in 3004 // increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU) 3005 Memory *string 3006 3007 // One or more container overrides. 3008 Overrides *TaskOverride 3009 3010 // The platform version on which your task is running. A platform version is only 3011 // specified for tasks using the Fargate launch type. If one is not specified, the 3012 // LATEST platform version is used by default. For more information, see AWS 3013 // Fargate Platform Versions 3014 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) 3015 // in the Amazon Elastic Container Service Developer Guide. 3016 PlatformVersion *string 3017 3018 // The Unix timestamp for when the container image pull began. 3019 PullStartedAt *time.Time 3020 3021 // The Unix timestamp for when the container image pull completed. 3022 PullStoppedAt *time.Time 3023 3024 // The Unix timestamp for when the task started (the task transitioned from the 3025 // PENDING state to the RUNNING state). 3026 StartedAt *time.Time 3027 3028 // The tag specified when a task is started. If the task is started by an Amazon 3029 // ECS service, then the startedBy parameter contains the deployment ID of the 3030 // service that starts it. 3031 StartedBy *string 3032 3033 // The stop code indicating why a task was stopped. The stoppedReason may contain 3034 // additional details. 3035 StopCode TaskStopCode 3036 3037 // The Unix timestamp for when the task was stopped (the task transitioned from the 3038 // RUNNING state to the STOPPED state). 3039 StoppedAt *time.Time 3040 3041 // The reason that the task was stopped. 3042 StoppedReason *string 3043 3044 // The Unix timestamp for when the task stops (transitions from the RUNNING state 3045 // to STOPPED). 3046 StoppingAt *time.Time 3047 3048 // The metadata that you apply to the task to help you categorize and organize 3049 // them. Each tag consists of a key and an optional value, both of which you 3050 // define. The following basic restrictions apply to tags: 3051 // 3052 // * Maximum number of 3053 // tags per resource - 50 3054 // 3055 // * For each resource, each tag key must be unique, and 3056 // each tag key can have only one value. 3057 // 3058 // * Maximum key length - 128 Unicode 3059 // characters in UTF-8 3060 // 3061 // * Maximum value length - 256 Unicode characters in UTF-8 3062 // 3063 // * 3064 // If your tagging schema is used across multiple services and resources, remember 3065 // that other services may have restrictions on allowed characters. Generally 3066 // allowed characters are: letters, numbers, and spaces representable in UTF-8, and 3067 // the following characters: + - = . _ : / @. 3068 // 3069 // * Tag keys and values are 3070 // case-sensitive. 3071 // 3072 // * Do not use aws:, AWS:, or any upper or lowercase combination 3073 // of such as a prefix for either keys or values as it is reserved for AWS use. You 3074 // cannot edit or delete tag keys or values with this prefix. Tags with this prefix 3075 // do not count against your tags per resource limit. 3076 Tags []Tag 3077 3078 // The Amazon Resource Name (ARN) of the task. 3079 TaskArn *string 3080 3081 // The ARN of the task definition that creates the task. 3082 TaskDefinitionArn *string 3083 3084 // The version counter for the task. Every time a task experiences a change that 3085 // triggers a CloudWatch event, the version counter is incremented. If you are 3086 // replicating your Amazon ECS task state with CloudWatch Events, you can compare 3087 // the version of a task reported by the Amazon ECS API actions with the version 3088 // reported in CloudWatch Events for the task (inside the detail object) to verify 3089 // that the version in your event stream is current. 3090 Version int64 3091} 3092 3093// The details of a task definition which describes the container and volume 3094// definitions of an Amazon Elastic Container Service task. You can specify which 3095// Docker images to use, the required resources, and other configurations related 3096// to launching the task definition through an Amazon ECS service or task. 3097type TaskDefinition struct { 3098 3099 // The task launch types the task definition validated against during task 3100 // definition registration. For more information, see Amazon ECS launch types 3101 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) 3102 // in the Amazon Elastic Container Service Developer Guide. 3103 Compatibilities []Compatibility 3104 3105 // A list of container definitions in JSON format that describe the different 3106 // containers that make up your task. For more information about container 3107 // definition parameters and defaults, see Amazon ECS Task Definitions 3108 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) 3109 // in the Amazon Elastic Container Service Developer Guide. 3110 ContainerDefinitions []ContainerDefinition 3111 3112 // The number of cpu units used by the task. If you are using the EC2 launch type, 3113 // this field is optional and any value can be used. If you are using the Fargate 3114 // launch type, this field is required and you must use one of the following 3115 // values, which determines your range of valid values for the memory parameter: 3116 // 3117 // * 3118 // 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 3119 // GB) 3120 // 3121 // * 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 3122 // (3 GB), 4096 (4 GB) 3123 // 3124 // * 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3125 // 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) 3126 // 3127 // * 3128 // 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) 3129 // in increments of 1024 (1 GB) 3130 // 3131 // * 4096 (4 vCPU) - Available memory values: Between 3132 // 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) 3133 Cpu *string 3134 3135 // The Unix timestamp for when the task definition was deregistered. 3136 DeregisteredAt *time.Time 3137 3138 // The ephemeral storage settings to use for tasks run with the task definition. 3139 EphemeralStorage *EphemeralStorage 3140 3141 // The Amazon Resource Name (ARN) of the task execution role that grants the Amazon 3142 // ECS container agent permission to make AWS API calls on your behalf. The task 3143 // execution IAM role is required depending on the requirements of your task. For 3144 // more information, see Amazon ECS task execution IAM role 3145 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html) 3146 // in the Amazon Elastic Container Service Developer Guide. 3147 ExecutionRoleArn *string 3148 3149 // The name of a family that this task definition is registered to. Up to 255 3150 // letters (uppercase and lowercase), numbers, hyphens, and underscores are 3151 // allowed. A family groups multiple versions of a task definition. Amazon ECS 3152 // gives the first task definition that you registered to a family a revision 3153 // number of 1. Amazon ECS gives sequential revision numbers to each task 3154 // definition that you add. 3155 Family *string 3156 3157 // The Elastic Inference accelerator associated with the task. 3158 InferenceAccelerators []InferenceAccelerator 3159 3160 // The IPC resource namespace to use for the containers in the task. The valid 3161 // values are host, task, or none. If host is specified, then all containers within 3162 // the tasks that specified the host IPC mode on the same container instance share 3163 // the same IPC resources with the host Amazon EC2 instance. If task is specified, 3164 // all containers within the specified task share the same IPC resources. If none 3165 // is specified, then IPC resources within the containers of a task are private and 3166 // not shared with other containers in a task or on the container instance. If no 3167 // value is specified, then the IPC resource namespace sharing depends on the 3168 // Docker daemon setting on the container instance. For more information, see IPC 3169 // settings (https://docs.docker.com/engine/reference/run/#ipc-settings---ipc) in 3170 // the Docker run reference. If the host IPC mode is used, be aware that there is a 3171 // heightened risk of undesired IPC namespace expose. For more information, see 3172 // Docker security (https://docs.docker.com/engine/security/security/). If you are 3173 // setting namespaced kernel parameters using systemControls for the containers in 3174 // the task, the following will apply to your IPC resource namespace. For more 3175 // information, see System Controls 3176 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) 3177 // in the Amazon Elastic Container Service Developer Guide. 3178 // 3179 // * For tasks that use 3180 // the host IPC mode, IPC namespace related systemControls are not supported. 3181 // 3182 // * 3183 // For tasks that use the task IPC mode, IPC namespace related systemControls will 3184 // apply to all containers within a task. 3185 // 3186 // This parameter is not supported for 3187 // Windows containers or tasks run on AWS Fargate. 3188 IpcMode IpcMode 3189 3190 // The amount (in MiB) of memory used by the task. If your tasks will be run on 3191 // Amazon EC2 instances, you must specify either a task-level memory value or a 3192 // container-level memory value. This field is optional and any value can be used. 3193 // If a task-level memory value is specified then the container-level memory value 3194 // is optional. For more information regarding container-level memory and memory 3195 // reservation, see ContainerDefinition 3196 // (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html). 3197 // If your tasks will be run on AWS Fargate, this field is required and you must 3198 // use one of the following values, which determines your range of valid values for 3199 // the cpu parameter: 3200 // 3201 // * 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu 3202 // values: 256 (.25 vCPU) 3203 // 3204 // * 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - 3205 // Available cpu values: 512 (.5 vCPU) 3206 // 3207 // * 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 3208 // 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 3209 // (1 vCPU) 3210 // 3211 // * Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - 3212 // Available cpu values: 2048 (2 vCPU) 3213 // 3214 // * Between 8192 (8 GB) and 30720 (30 GB) in 3215 // increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU) 3216 Memory *string 3217 3218 // The Docker networking mode to use for the containers in the task. The valid 3219 // values are none, bridge, awsvpc, and host. If no network mode is specified, the 3220 // default is bridge. For Amazon ECS tasks on Fargate, the awsvpc network mode is 3221 // required. For Amazon ECS tasks on Amazon EC2 instances, any network mode can be 3222 // used. If the network mode is set to none, you cannot specify port mappings in 3223 // your container definitions, and the tasks containers do not have external 3224 // connectivity. The host and awsvpc network modes offer the highest networking 3225 // performance for containers because they use the EC2 network stack instead of the 3226 // virtualized network stack provided by the bridge mode. With the host and awsvpc 3227 // network modes, exposed container ports are mapped directly to the corresponding 3228 // host port (for the host network mode) or the attached elastic network interface 3229 // port (for the awsvpc network mode), so you cannot take advantage of dynamic host 3230 // port mappings. When using the host network mode, you should not run containers 3231 // using the root user (UID 0). It is considered best practice to use a non-root 3232 // user. If the network mode is awsvpc, the task is allocated an elastic network 3233 // interface, and you must specify a NetworkConfiguration value when you create a 3234 // service or run a task with the task definition. For more information, see Task 3235 // Networking 3236 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) 3237 // in the Amazon Elastic Container Service Developer Guide. Currently, only Amazon 3238 // ECS-optimized AMIs, other Amazon Linux variants with the ecs-init package, or 3239 // AWS Fargate infrastructure support the awsvpc network mode. If the network mode 3240 // is host, you cannot run multiple instantiations of the same task on a single 3241 // container instance when port mappings are used. Docker for Windows uses 3242 // different network modes than Docker for Linux. When you register a task 3243 // definition with Windows containers, you must not specify a network mode. If you 3244 // use the console to register a task definition with Windows containers, you must 3245 // choose the network mode object. For more information, see Network settings 3246 // (https://docs.docker.com/engine/reference/run/#network-settings) in the Docker 3247 // run reference. 3248 NetworkMode NetworkMode 3249 3250 // The process namespace to use for the containers in the task. The valid values 3251 // are host or task. If host is specified, then all containers within the tasks 3252 // that specified the host PID mode on the same container instance share the same 3253 // process namespace with the host Amazon EC2 instance. If task is specified, all 3254 // containers within the specified task share the same process namespace. If no 3255 // value is specified, the default is a private namespace. For more information, 3256 // see PID settings 3257 // (https://docs.docker.com/engine/reference/run/#pid-settings---pid) in the Docker 3258 // run reference. If the host PID mode is used, be aware that there is a heightened 3259 // risk of undesired process namespace expose. For more information, see Docker 3260 // security (https://docs.docker.com/engine/security/security/). This parameter is 3261 // not supported for Windows containers or tasks run on AWS Fargate. 3262 PidMode PidMode 3263 3264 // An array of placement constraint objects to use for tasks. This parameter is not 3265 // supported for tasks run on AWS Fargate. 3266 PlacementConstraints []TaskDefinitionPlacementConstraint 3267 3268 // The configuration details for the App Mesh proxy. Your Amazon ECS container 3269 // instances require at least version 1.26.0 of the container agent and at least 3270 // version 1.26.0-1 of the ecs-init package to enable a proxy configuration. If 3271 // your container instances are launched from the Amazon ECS-optimized AMI version 3272 // 20190301 or later, then they contain the required versions of the container 3273 // agent and ecs-init. For more information, see Amazon ECS-optimized Linux AMI 3274 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) 3275 // in the Amazon Elastic Container Service Developer Guide. 3276 ProxyConfiguration *ProxyConfiguration 3277 3278 // The Unix timestamp for when the task definition was registered. 3279 RegisteredAt *time.Time 3280 3281 // The principal that registered the task definition. 3282 RegisteredBy *string 3283 3284 // The container instance attributes required by your task. When an Amazon EC2 3285 // instance is registered to your cluster, the Amazon ECS container agent assigns 3286 // some standard attributes to the instance. You can apply custom attributes, 3287 // specified as key-value pairs using the Amazon ECS console or the PutAttributes 3288 // API. These attributes are used when considering task placement for tasks hosted 3289 // on Amazon EC2 instances. For more information, see Attributes 3290 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes) 3291 // in the Amazon Elastic Container Service Developer Guide. This parameter is not 3292 // supported for tasks run on AWS Fargate. 3293 RequiresAttributes []Attribute 3294 3295 // The task launch types the task definition was validated against. To determine 3296 // which task launch types the task definition is validated for, see the 3297 // TaskDefinition$compatibilities parameter. 3298 RequiresCompatibilities []Compatibility 3299 3300 // The revision of the task in a particular family. The revision is a version 3301 // number of a task definition in a family. When you register a task definition for 3302 // the first time, the revision is 1. Each time that you register a new revision of 3303 // a task definition in the same family, the revision value always increases by 3304 // one, even if you have deregistered previous revisions in this family. 3305 Revision int32 3306 3307 // The status of the task definition. 3308 Status TaskDefinitionStatus 3309 3310 // The full Amazon Resource Name (ARN) of the task definition. 3311 TaskDefinitionArn *string 3312 3313 // The short name or full Amazon Resource Name (ARN) of the AWS Identity and Access 3314 // Management (IAM) role that grants containers in the task permission to call AWS 3315 // APIs on your behalf. For more information, see Amazon ECS Task Role 3316 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) 3317 // in the Amazon Elastic Container Service Developer Guide. IAM roles for tasks on 3318 // Windows require that the -EnableTaskIAMRole option is set when you launch the 3319 // Amazon ECS-optimized Windows AMI. Your containers must also run some 3320 // configuration code in order to take advantage of the feature. For more 3321 // information, see Windows IAM roles for tasks 3322 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows_task_IAM_roles.html) 3323 // in the Amazon Elastic Container Service Developer Guide. 3324 TaskRoleArn *string 3325 3326 // The list of data volume definitions for the task. For more information, see 3327 // Using data volumes in tasks 3328 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html) 3329 // in the Amazon Elastic Container Service Developer Guide. The host and sourcePath 3330 // parameters are not supported for tasks run on AWS Fargate. 3331 Volumes []Volume 3332} 3333 3334// An object representing a constraint on task placement in the task definition. 3335// For more information, see Task placement constraints 3336// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) 3337// in the Amazon Elastic Container Service Developer Guide. Task placement 3338// constraints are not supported for tasks run on AWS Fargate. 3339type TaskDefinitionPlacementConstraint struct { 3340 3341 // A cluster query language expression to apply to the constraint. For more 3342 // information, see Cluster query language 3343 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) 3344 // in the Amazon Elastic Container Service Developer Guide. 3345 Expression *string 3346 3347 // The type of constraint. The MemberOf constraint restricts selection to be from a 3348 // group of valid candidates. 3349 Type TaskDefinitionPlacementConstraintType 3350} 3351 3352// The overrides associated with a task. 3353type TaskOverride struct { 3354 3355 // One or more container overrides sent to a task. 3356 ContainerOverrides []ContainerOverride 3357 3358 // The cpu override for the task. 3359 Cpu *string 3360 3361 // The ephemeral storage setting override for the task. This parameter is only 3362 // supported for tasks hosted on AWS Fargate using platform version 1.4.0 or later. 3363 EphemeralStorage *EphemeralStorage 3364 3365 // The Amazon Resource Name (ARN) of the task execution IAM role override for the 3366 // task. 3367 ExecutionRoleArn *string 3368 3369 // The Elastic Inference accelerator override for the task. 3370 InferenceAcceleratorOverrides []InferenceAcceleratorOverride 3371 3372 // The memory override for the task. 3373 Memory *string 3374 3375 // The Amazon Resource Name (ARN) of the IAM role that containers in this task can 3376 // assume. All containers in this task are granted the permissions that are 3377 // specified in this role. 3378 TaskRoleArn *string 3379} 3380 3381// Information about a set of Amazon ECS tasks in either an AWS CodeDeploy or an 3382// EXTERNAL deployment. An Amazon ECS task set includes details such as the desired 3383// number of tasks, how many tasks are running, and whether the task set serves 3384// production traffic. 3385type TaskSet struct { 3386 3387 // The capacity provider strategy associated with the task set. 3388 CapacityProviderStrategy []CapacityProviderStrategyItem 3389 3390 // The Amazon Resource Name (ARN) of the cluster that the service that hosts the 3391 // task set exists in. 3392 ClusterArn *string 3393 3394 // The computed desired count for the task set. This is calculated by multiplying 3395 // the service's desiredCount by the task set's scale percentage. The result is 3396 // always rounded up. For example, if the computed desired count is 1.2, it rounds 3397 // up to 2 tasks. 3398 ComputedDesiredCount int32 3399 3400 // The Unix timestamp for when the task set was created. 3401 CreatedAt *time.Time 3402 3403 // The external ID associated with the task set. If a task set is created by an AWS 3404 // CodeDeploy deployment, the externalId parameter contains the AWS CodeDeploy 3405 // deployment ID. If a task set is created for an external deployment and is 3406 // associated with a service discovery registry, the externalId parameter contains 3407 // the ECS_TASK_SET_EXTERNAL_ID AWS Cloud Map attribute. 3408 ExternalId *string 3409 3410 // The ID of the task set. 3411 Id *string 3412 3413 // The launch type the tasks in the task set are using. For more information, see 3414 // Amazon ECS launch types 3415 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) 3416 // in the Amazon Elastic Container Service Developer Guide. 3417 LaunchType LaunchType 3418 3419 // Details on a load balancer that is used with a task set. 3420 LoadBalancers []LoadBalancer 3421 3422 // The network configuration for the task set. 3423 NetworkConfiguration *NetworkConfiguration 3424 3425 // The number of tasks in the task set that are in the PENDING status during a 3426 // deployment. A task in the PENDING state is preparing to enter the RUNNING state. 3427 // A task set enters the PENDING status when it launches for the first time or when 3428 // it is restarted after being in the STOPPED state. 3429 PendingCount int32 3430 3431 // The AWS Fargate platform version on which the tasks in the task set are running. 3432 // A platform version is only specified for tasks run on AWS Fargate. For more 3433 // information, see AWS Fargate platform versions 3434 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) 3435 // in the Amazon Elastic Container Service Developer Guide. 3436 PlatformVersion *string 3437 3438 // The number of tasks in the task set that are in the RUNNING status during a 3439 // deployment. A task in the RUNNING state is running and ready for use. 3440 RunningCount int32 3441 3442 // A floating-point percentage of the desired number of tasks to place and keep 3443 // running in the task set. 3444 Scale *Scale 3445 3446 // The Amazon Resource Name (ARN) of the service the task set exists in. 3447 ServiceArn *string 3448 3449 // The details of the service discovery registries to assign to this task set. For 3450 // more information, see Service discovery 3451 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html). 3452 ServiceRegistries []ServiceRegistry 3453 3454 // The stability status, which indicates whether the task set has reached a steady 3455 // state. If the following conditions are met, the task set will be in 3456 // STEADY_STATE: 3457 // 3458 // * The task runningCount is equal to the computedDesiredCount. 3459 // 3460 // * 3461 // The pendingCount is 0. 3462 // 3463 // * There are no tasks running on container instances in 3464 // the DRAINING status. 3465 // 3466 // * All tasks are reporting a healthy status from the load 3467 // balancers, service discovery, and container health checks. 3468 // 3469 // If any of those 3470 // conditions are not met, the stability status returns STABILIZING. 3471 StabilityStatus StabilityStatus 3472 3473 // The Unix timestamp for when the task set stability status was retrieved. 3474 StabilityStatusAt *time.Time 3475 3476 // The tag specified when a task set is started. If the task set is created by an 3477 // AWS CodeDeploy deployment, the startedBy parameter is CODE_DEPLOY. For a task 3478 // set created for an external deployment, the startedBy field isn't used. 3479 StartedBy *string 3480 3481 // The status of the task set. The following describes each state: PRIMARY The task 3482 // set is serving production traffic. ACTIVE The task set is not serving production 3483 // traffic. DRAINING The tasks in the task set are being stopped and their 3484 // corresponding targets are being deregistered from their target group. 3485 Status *string 3486 3487 // The metadata that you apply to the task set to help you categorize and organize 3488 // them. Each tag consists of a key and an optional value, both of which you 3489 // define. The following basic restrictions apply to tags: 3490 // 3491 // * Maximum number of 3492 // tags per resource - 50 3493 // 3494 // * For each resource, each tag key must be unique, and 3495 // each tag key can have only one value. 3496 // 3497 // * Maximum key length - 128 Unicode 3498 // characters in UTF-8 3499 // 3500 // * Maximum value length - 256 Unicode characters in UTF-8 3501 // 3502 // * 3503 // If your tagging schema is used across multiple services and resources, remember 3504 // that other services may have restrictions on allowed characters. Generally 3505 // allowed characters are: letters, numbers, and spaces representable in UTF-8, and 3506 // the following characters: + - = . _ : / @. 3507 // 3508 // * Tag keys and values are 3509 // case-sensitive. 3510 // 3511 // * Do not use aws:, AWS:, or any upper or lowercase combination 3512 // of such as a prefix for either keys or values as it is reserved for AWS use. You 3513 // cannot edit or delete tag keys or values with this prefix. Tags with this prefix 3514 // do not count against your tags per resource limit. 3515 Tags []Tag 3516 3517 // The task definition the task set is using. 3518 TaskDefinition *string 3519 3520 // The Amazon Resource Name (ARN) of the task set. 3521 TaskSetArn *string 3522 3523 // The Unix timestamp for when the task set was last updated. 3524 UpdatedAt *time.Time 3525} 3526 3527// The container path, mount options, and size of the tmpfs mount. 3528type Tmpfs struct { 3529 3530 // The absolute file path where the tmpfs volume is to be mounted. 3531 // 3532 // This member is required. 3533 ContainerPath *string 3534 3535 // The maximum size (in MiB) of the tmpfs volume. 3536 // 3537 // This member is required. 3538 Size int32 3539 3540 // The list of tmpfs volume mount options. Valid values: "defaults" | "ro" | "rw" | 3541 // "suid" | "nosuid" | "dev" | "nodev" | "exec" | "noexec" | "sync" | "async" | 3542 // "dirsync" | "remount" | "mand" | "nomand" | "atime" | "noatime" | "diratime" | 3543 // "nodiratime" | "bind" | "rbind" | "unbindable" | "runbindable" | "private" | 3544 // "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime" | 3545 // "norelatime" | "strictatime" | "nostrictatime" | "mode" | "uid" | "gid" | 3546 // "nr_inodes" | "nr_blocks" | "mpol" 3547 MountOptions []string 3548} 3549 3550// The ulimit settings to pass to the container. Amazon ECS tasks hosted on Fargate 3551// use the default resource limit values set by the operating system with the 3552// exception of the nofile resource limit parameter which Fargate overrides. The 3553// nofile resource limit sets a restriction on the number of open files that a 3554// container can use. The default nofile soft limit is 1024 and hard limit is 4096. 3555type Ulimit struct { 3556 3557 // The hard limit for the ulimit type. 3558 // 3559 // This member is required. 3560 HardLimit int32 3561 3562 // The type of the ulimit. 3563 // 3564 // This member is required. 3565 Name UlimitName 3566 3567 // The soft limit for the ulimit type. 3568 // 3569 // This member is required. 3570 SoftLimit int32 3571} 3572 3573// The Docker and Amazon ECS container agent version information about a container 3574// instance. 3575type VersionInfo struct { 3576 3577 // The Git commit hash for the Amazon ECS container agent build on the 3578 // amazon-ecs-agent (https://github.com/aws/amazon-ecs-agent/commits/master) 3579 // GitHub repository. 3580 AgentHash *string 3581 3582 // The version number of the Amazon ECS container agent. 3583 AgentVersion *string 3584 3585 // The Docker version running on the container instance. 3586 DockerVersion *string 3587} 3588 3589// A data volume used in a task definition. For tasks that use the Amazon Elastic 3590// File System (Amazon EFS), specify an efsVolumeConfiguration. For Windows tasks 3591// that use Amazon FSx for Windows File Server file system, specify a 3592// fsxWindowsFileServerVolumeConfiguration. For tasks that use a Docker volume, 3593// specify a DockerVolumeConfiguration. For tasks that use a bind mount host 3594// volume, specify a host and optional sourcePath. For more information, see Using 3595// Data Volumes in Tasks 3596// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html). 3597type Volume struct { 3598 3599 // This parameter is specified when you are using Docker volumes. Windows 3600 // containers only support the use of the local driver. To use bind mounts, specify 3601 // the host parameter instead. Docker volumes are not supported by tasks run on AWS 3602 // Fargate. 3603 DockerVolumeConfiguration *DockerVolumeConfiguration 3604 3605 // This parameter is specified when you are using an Amazon Elastic File System 3606 // file system for task storage. 3607 EfsVolumeConfiguration *EFSVolumeConfiguration 3608 3609 // This parameter is specified when you are using Amazon FSx for Windows File 3610 // Server file system for task storage. 3611 FsxWindowsFileServerVolumeConfiguration *FSxWindowsFileServerVolumeConfiguration 3612 3613 // This parameter is specified when you are using bind mount host volumes. The 3614 // contents of the host parameter determine whether your bind mount host volume 3615 // persists on the host container instance and where it is stored. If the host 3616 // parameter is empty, then the Docker daemon assigns a host path for your data 3617 // volume. However, the data is not guaranteed to persist after the containers 3618 // associated with it stop running. Windows containers can mount whole directories 3619 // on the same drive as $env:ProgramData. Windows containers cannot mount 3620 // directories on a different drive, and mount point cannot be across drives. For 3621 // example, you can mount C:\my\path:C:\my\path and D:\:D:\, but not 3622 // D:\my\path:C:\my\path or D:\:C:\my\path. 3623 Host *HostVolumeProperties 3624 3625 // The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, 3626 // underscores, and hyphens are allowed. This name is referenced in the 3627 // sourceVolume parameter of container definition mountPoints. 3628 Name *string 3629} 3630 3631// Details on a data volume from another container in the same task definition. 3632type VolumeFrom struct { 3633 3634 // If this value is true, the container has read-only access to the volume. If this 3635 // value is false, then the container can write to the volume. The default value is 3636 // false. 3637 ReadOnly *bool 3638 3639 // The name of another container within the same task definition from which to 3640 // mount volumes. 3641 SourceContainer *string 3642} 3643