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