| 1 | # Generated by default/object.tt | ||
| 2 | package Paws::Batch::ContainerProperties; | ||
| 3 | use Moose; | ||
| 4 | has Command => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'command', traits => ['NameInRequest']); | ||
| 5 | has Environment => (is => 'ro', isa => 'ArrayRef[Paws::Batch::KeyValuePair]', request_name => 'environment', traits => ['NameInRequest']); | ||
| 6 | has ExecutionRoleArn => (is => 'ro', isa => 'Str', request_name => 'executionRoleArn', traits => ['NameInRequest']); | ||
| 7 | has FargatePlatformConfiguration => (is => 'ro', isa => 'Paws::Batch::FargatePlatformConfiguration', request_name => 'fargatePlatformConfiguration', traits => ['NameInRequest']); | ||
| 8 | has Image => (is => 'ro', isa => 'Str', request_name => 'image', traits => ['NameInRequest']); | ||
| 9 | has InstanceType => (is => 'ro', isa => 'Str', request_name => 'instanceType', traits => ['NameInRequest']); | ||
| 10 | has JobRoleArn => (is => 'ro', isa => 'Str', request_name => 'jobRoleArn', traits => ['NameInRequest']); | ||
| 11 | has LinuxParameters => (is => 'ro', isa => 'Paws::Batch::LinuxParameters', request_name => 'linuxParameters', traits => ['NameInRequest']); | ||
| 12 | has LogConfiguration => (is => 'ro', isa => 'Paws::Batch::LogConfiguration', request_name => 'logConfiguration', traits => ['NameInRequest']); | ||
| 13 | has Memory => (is => 'ro', isa => 'Int', request_name => 'memory', traits => ['NameInRequest']); | ||
| 14 | has MountPoints => (is => 'ro', isa => 'ArrayRef[Paws::Batch::MountPoint]', request_name => 'mountPoints', traits => ['NameInRequest']); | ||
| 15 | has NetworkConfiguration => (is => 'ro', isa => 'Paws::Batch::NetworkConfiguration', request_name => 'networkConfiguration', traits => ['NameInRequest']); | ||
| 16 | has Privileged => (is => 'ro', isa => 'Bool', request_name => 'privileged', traits => ['NameInRequest']); | ||
| 17 | has ReadonlyRootFilesystem => (is => 'ro', isa => 'Bool', request_name => 'readonlyRootFilesystem', traits => ['NameInRequest']); | ||
| 18 | has ResourceRequirements => (is => 'ro', isa => 'ArrayRef[Paws::Batch::ResourceRequirement]', request_name => 'resourceRequirements', traits => ['NameInRequest']); | ||
| 19 | has Secrets => (is => 'ro', isa => 'ArrayRef[Paws::Batch::Secret]', request_name => 'secrets', traits => ['NameInRequest']); | ||
| 20 | has Ulimits => (is => 'ro', isa => 'ArrayRef[Paws::Batch::Ulimit]', request_name => 'ulimits', traits => ['NameInRequest']); | ||
| 21 | has User => (is => 'ro', isa => 'Str', request_name => 'user', traits => ['NameInRequest']); | ||
| 22 | has Vcpus => (is => 'ro', isa => 'Int', request_name => 'vcpus', traits => ['NameInRequest']); | ||
| 23 | has Volumes => (is => 'ro', isa => 'ArrayRef[Paws::Batch::Volume]', request_name => 'volumes', traits => ['NameInRequest']); | ||
| 24 | |||
| 25 | 1; | ||
| 26 | |||
| 27 | ### main pod documentation begin ### | ||
| 28 | |||
| 29 | =head1 NAME | ||
| 30 | |||
| 31 | Paws::Batch::ContainerProperties | ||
| 32 | |||
| 33 | =head1 USAGE | ||
| 34 | |||
| 35 | This class represents one of two things: | ||
| 36 | |||
| 37 | =head3 Arguments in a call to a service | ||
| 38 | |||
| 39 | Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. | ||
| 40 | Each attribute should be used as a named argument in the calls that expect this type of object. | ||
| 41 | |||
| 42 | As an example, if Att1 is expected to be a Paws::Batch::ContainerProperties object: | ||
| 43 | |||
| 44 | $service_obj->Method(Att1 => { Command => $value, ..., Volumes => $value }); | ||
| 45 | |||
| 46 | =head3 Results returned from an API call | ||
| 47 | |||
| 48 | Use accessors for each attribute. If Att1 is expected to be an Paws::Batch::ContainerProperties object: | ||
| 49 | |||
| 50 | $result = $service_obj->Method(...); | ||
| 51 | $result->Att1->Command | ||
| 52 | |||
| 53 | =head1 DESCRIPTION | ||
| 54 | |||
| 55 | Container properties are used in job definitions to describe the | ||
| 56 | container that's launched as part of a job. | ||
| 57 | |||
| 58 | =head1 ATTRIBUTES | ||
| 59 | |||
| 60 | |||
| 61 | =head2 Command => ArrayRef[Str|Undef] | ||
| 62 | |||
| 63 | The command that's passed to the container. This parameter maps to | ||
| 64 | C<Cmd> in the Create a container | ||
| 65 | (https://docs.docker.com/engine/api/v1.23/#create-a-container) section | ||
| 66 | of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) | ||
| 67 | and the C<COMMAND> parameter to docker run | ||
| 68 | (https://docs.docker.com/engine/reference/run/). For more information, | ||
| 69 | see https://docs.docker.com/engine/reference/builder/#cmd | ||
| 70 | (https://docs.docker.com/engine/reference/builder/#cmd). | ||
| 71 | |||
| 72 | |||
| 73 | =head2 Environment => ArrayRef[L<Paws::Batch::KeyValuePair>] | ||
| 74 | |||
| 75 | The environment variables to pass to a container. This parameter maps | ||
| 76 | to C<Env> in the Create a container | ||
| 77 | (https://docs.docker.com/engine/api/v1.23/#create-a-container) section | ||
| 78 | of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) | ||
| 79 | and the C<--env> option to docker run | ||
| 80 | (https://docs.docker.com/engine/reference/run/). | ||
| 81 | |||
| 82 | We don't recommend using plaintext environment variables for sensitive | ||
| 83 | information, such as credential data. | ||
| 84 | |||
| 85 | Environment variables must not start with C<AWS_BATCH>; this naming | ||
| 86 | convention is reserved for variables that are set by the AWS Batch | ||
| 87 | service. | ||
| 88 | |||
| 89 | |||
| 90 | =head2 ExecutionRoleArn => Str | ||
| 91 | |||
| 92 | The Amazon Resource Name (ARN) of the execution role that AWS Batch can | ||
| 93 | assume. For jobs that run on Fargate resources, you must provide an | ||
| 94 | execution role. For more information, see AWS Batch execution IAM role | ||
| 95 | (https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html) | ||
| 96 | in the I<AWS Batch User Guide>. | ||
| 97 | |||
| 98 | |||
| 99 | =head2 FargatePlatformConfiguration => L<Paws::Batch::FargatePlatformConfiguration> | ||
| 100 | |||
| 101 | The platform configuration for jobs running on Fargate resources. Jobs | ||
| 102 | running on EC2 resources must not specify this parameter. | ||
| 103 | |||
| 104 | |||
| 105 | =head2 Image => Str | ||
| 106 | |||
| 107 | The image used to start a container. This string is passed directly to | ||
| 108 | the Docker daemon. Images in the Docker Hub registry are available by | ||
| 109 | default. Other repositories are specified with C< | ||
| 110 | I<repository-url>/I<image>:I<tag> >. Up to 255 letters (uppercase and | ||
| 111 | lowercase), numbers, hyphens, underscores, colons, periods, forward | ||
| 112 | slashes, and number signs are allowed. This parameter maps to C<Image> | ||
| 113 | in the Create a container | ||
| 114 | (https://docs.docker.com/engine/api/v1.23/#create-a-container) section | ||
| 115 | of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) | ||
| 116 | and the C<IMAGE> parameter of docker run | ||
| 117 | (https://docs.docker.com/engine/reference/run/). | ||
| 118 | |||
| 119 | Docker image architecture must match the processor architecture of the | ||
| 120 | compute resources that they're scheduled on. For example, ARM-based | ||
| 121 | Docker images can only run on ARM-based compute resources. | ||
| 122 | |||
| 123 | =over | ||
| 124 | |||
| 125 | =item * | ||
| 126 | |||
| 127 | Images in Amazon ECR repositories use the full registry and repository | ||
| 128 | URI (for example, | ||
| 129 | C<012345678910.dkr.ecr.E<lt>region-nameE<gt>.amazonaws.com/E<lt>repository-nameE<gt>>). | ||
| 130 | |||
| 131 | =item * | ||
| 132 | |||
| 133 | Images in official repositories on Docker Hub use a single name (for | ||
| 134 | example, C<ubuntu> or C<mongo>). | ||
| 135 | |||
| 136 | =item * | ||
| 137 | |||
| 138 | Images in other repositories on Docker Hub are qualified with an | ||
| 139 | organization name (for example, C<amazon/amazon-ecs-agent>). | ||
| 140 | |||
| 141 | =item * | ||
| 142 | |||
| 143 | Images in other online repositories are qualified further by a domain | ||
| 144 | name (for example, C<quay.io/assemblyline/ubuntu>). | ||
| 145 | |||
| 146 | =back | ||
| 147 | |||
| 148 | |||
| 149 | |||
| 150 | =head2 InstanceType => Str | ||
| 151 | |||
| 152 | The instance type to use for a multi-node parallel job. All node groups | ||
| 153 | in a multi-node parallel job must use the same instance type. | ||
| 154 | |||
| 155 | This parameter isn't applicable to single-node container jobs or for | ||
| 156 | jobs that run on Fargate resources and shouldn't be provided. | ||
| 157 | |||
| 158 | |||
| 159 | =head2 JobRoleArn => Str | ||
| 160 | |||
| 161 | The Amazon Resource Name (ARN) of the IAM role that the container can | ||
| 162 | assume for AWS permissions. For more information, see IAM Roles for | ||
| 163 | Tasks | ||
| 164 | (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) | ||
| 165 | in the I<Amazon Elastic Container Service Developer Guide>. | ||
| 166 | |||
| 167 | |||
| 168 | =head2 LinuxParameters => L<Paws::Batch::LinuxParameters> | ||
| 169 | |||
| 170 | Linux-specific modifications that are applied to the container, such as | ||
| 171 | details for device mappings. | ||
| 172 | |||
| 173 | |||
| 174 | =head2 LogConfiguration => L<Paws::Batch::LogConfiguration> | ||
| 175 | |||
| 176 | The log configuration specification for the container. | ||
| 177 | |||
| 178 | This parameter maps to C<LogConfig> in the Create a container | ||
| 179 | (https://docs.docker.com/engine/api/v1.23/#create-a-container) section | ||
| 180 | of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) | ||
| 181 | and the C<--log-driver> option to docker run | ||
| 182 | (https://docs.docker.com/engine/reference/run/). By default, containers | ||
| 183 | use the same logging driver that the Docker daemon uses. However the | ||
| 184 | container might use a different logging driver than the Docker daemon | ||
| 185 | by specifying a log driver with this parameter in the container | ||
| 186 | definition. To use a different logging driver for a container, the log | ||
| 187 | system must be configured properly on the container instance (or on a | ||
| 188 | different log server for remote logging options). For more information | ||
| 189 | on the options for different supported log drivers, see Configure | ||
| 190 | logging drivers | ||
| 191 | (https://docs.docker.com/engine/admin/logging/overview/) in the Docker | ||
| 192 | documentation. | ||
| 193 | |||
| 194 | AWS Batch currently supports a subset of the logging drivers available | ||
| 195 | to the Docker daemon (shown in the LogConfiguration data type). | ||
| 196 | |||
| 197 | This parameter requires version 1.18 of the Docker Remote API or | ||
| 198 | greater on your container instance. To check the Docker Remote API | ||
| 199 | version on your container instance, log into your container instance | ||
| 200 | and run the following command: C<sudo docker version | grep "Server API | ||
| 201 | version"> | ||
| 202 | |||
| 203 | The Amazon ECS container agent running on a container instance must | ||
| 204 | register the logging drivers available on that instance with the | ||
| 205 | C<ECS_AVAILABLE_LOGGING_DRIVERS> environment variable before containers | ||
| 206 | placed on that instance can use these log configuration options. For | ||
| 207 | more information, see Amazon ECS Container Agent Configuration | ||
| 208 | (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) | ||
| 209 | in the I<Amazon Elastic Container Service Developer Guide>. | ||
| 210 | |||
| 211 | |||
| 212 | =head2 Memory => Int | ||
| 213 | |||
| 214 | This parameter indicates the memory hard limit (in MiB) for a | ||
| 215 | container. If your container attempts to exceed the specified number, | ||
| 216 | it is terminated. You must specify at least 4 MiB of memory for a job | ||
| 217 | using this parameter. The memory hard limit can be specified in several | ||
| 218 | places. It must be specified for each node at least once. | ||
| 219 | |||
| 220 | This parameter maps to C<Memory> in the Create a container | ||
| 221 | (https://docs.docker.com/engine/api/v1.23/#create-a-container) section | ||
| 222 | of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) | ||
| 223 | and the C<--memory> option to docker run | ||
| 224 | (https://docs.docker.com/engine/reference/run/). | ||
| 225 | |||
| 226 | This parameter is supported on EC2 resources but isn't supported on | ||
| 227 | Fargate resources. For Fargate resources, you should specify the memory | ||
| 228 | requirement using C<resourceRequirement>. You can do this for EC2 | ||
| 229 | resources. | ||
| 230 | |||
| 231 | If you're trying to maximize your resource utilization by providing | ||
| 232 | your jobs as much memory as possible for a particular instance type, | ||
| 233 | see Memory Management | ||
| 234 | (https://docs.aws.amazon.com/batch/latest/userguide/memory-management.html) | ||
| 235 | in the I<AWS Batch User Guide>. | ||
| 236 | |||
| 237 | |||
| 238 | =head2 MountPoints => ArrayRef[L<Paws::Batch::MountPoint>] | ||
| 239 | |||
| 240 | The mount points for data volumes in your container. This parameter | ||
| 241 | maps to C<Volumes> in the Create a container | ||
| 242 | (https://docs.docker.com/engine/api/v1.23/#create-a-container) section | ||
| 243 | of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) | ||
| 244 | and the C<--volume> option to docker run | ||
| 245 | (https://docs.docker.com/engine/reference/run/). | ||
| 246 | |||
| 247 | |||
| 248 | =head2 NetworkConfiguration => L<Paws::Batch::NetworkConfiguration> | ||
| 249 | |||
| 250 | The network configuration for jobs running on Fargate resources. Jobs | ||
| 251 | running on EC2 resources must not specify this parameter. | ||
| 252 | |||
| 253 | |||
| 254 | =head2 Privileged => Bool | ||
| 255 | |||
| 256 | When this parameter is true, the container is given elevated | ||
| 257 | permissions on the host container instance (similar to the C<root> | ||
| 258 | user). This parameter maps to C<Privileged> in the Create a container | ||
| 259 | (https://docs.docker.com/engine/api/v1.23/#create-a-container) section | ||
| 260 | of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) | ||
| 261 | and the C<--privileged> option to docker run | ||
| 262 | (https://docs.docker.com/engine/reference/run/). The default value is | ||
| 263 | false. | ||
| 264 | |||
| 265 | This parameter isn't applicable to jobs running on Fargate resources | ||
| 266 | and shouldn't be provided, or specified as false. | ||
| 267 | |||
| 268 | |||
| 269 | =head2 ReadonlyRootFilesystem => Bool | ||
| 270 | |||
| 271 | When this parameter is true, the container is given read-only access to | ||
| 272 | its root file system. This parameter maps to C<ReadonlyRootfs> in the | ||
| 273 | Create a container | ||
| 274 | (https://docs.docker.com/engine/api/v1.23/#create-a-container) section | ||
| 275 | of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) | ||
| 276 | and the C<--read-only> option to C<docker run>. | ||
| 277 | |||
| 278 | |||
| 279 | =head2 ResourceRequirements => ArrayRef[L<Paws::Batch::ResourceRequirement>] | ||
| 280 | |||
| 281 | The type and amount of resources to assign to a container. The | ||
| 282 | supported resources include C<GPU>, C<MEMORY>, and C<VCPU>. | ||
| 283 | |||
| 284 | |||
| 285 | =head2 Secrets => ArrayRef[L<Paws::Batch::Secret>] | ||
| 286 | |||
| 287 | The secrets for the container. For more information, see Specifying | ||
| 288 | sensitive data | ||
| 289 | (https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data.html) | ||
| 290 | in the I<AWS Batch User Guide>. | ||
| 291 | |||
| 292 | |||
| 293 | =head2 Ulimits => ArrayRef[L<Paws::Batch::Ulimit>] | ||
| 294 | |||
| 295 | A list of C<ulimits> to set in the container. This parameter maps to | ||
| 296 | C<Ulimits> in the Create a container | ||
| 297 | (https://docs.docker.com/engine/api/v1.23/#create-a-container) section | ||
| 298 | of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) | ||
| 299 | and the C<--ulimit> option to docker run | ||
| 300 | (https://docs.docker.com/engine/reference/run/). | ||
| 301 | |||
| 302 | This parameter isn't applicable to jobs running on Fargate resources | ||
| 303 | and shouldn't be provided. | ||
| 304 | |||
| 305 | |||
| 306 | =head2 User => Str | ||
| 307 | |||
| 308 | The user name to use inside the container. This parameter maps to | ||
| 309 | C<User> in the Create a container | ||
| 310 | (https://docs.docker.com/engine/api/v1.23/#create-a-container) section | ||
| 311 | of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) | ||
| 312 | and the C<--user> option to docker run | ||
| 313 | (https://docs.docker.com/engine/reference/run/). | ||
| 314 | |||
| 315 | |||
| 316 | =head2 Vcpus => Int | ||
| 317 | |||
| 318 | The number of vCPUs reserved for the job. Each vCPU is equivalent to | ||
| 319 | 1,024 CPU shares. This parameter maps to C<CpuShares> in the Create a | ||
| 320 | container | ||
| 321 | (https://docs.docker.com/engine/api/v1.23/#create-a-container) section | ||
| 322 | of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) | ||
| 323 | and the C<--cpu-shares> option to docker run | ||
| 324 | (https://docs.docker.com/engine/reference/run/). The number of vCPUs | ||
| 325 | must be specified but can be be specified in several places. You must | ||
| 326 | specify it at least once for each node. | ||
| 327 | |||
| 328 | This parameter is supported on EC2 resources but isn't supported for | ||
| 329 | jobs that run on Fargate resources. For these resources, use | ||
| 330 | C<resourceRequirement> instead. You can use this parameter or | ||
| 331 | C<resourceRequirements> structure but not both. | ||
| 332 | |||
| 333 | This parameter isn't applicable to jobs running on Fargate resources | ||
| 334 | and shouldn't be provided. For jobs that run on Fargate resources, you | ||
| 335 | must specify the vCPU requirement for the job using | ||
| 336 | C<resourceRequirements>. | ||
| 337 | |||
| 338 | |||
| 339 | =head2 Volumes => ArrayRef[L<Paws::Batch::Volume>] | ||
| 340 | |||
| 341 | A list of data volumes used in a job. | ||
| 342 | |||
| 343 | |||
| 344 | |||
| 345 | =head1 SEE ALSO | ||
| 346 | |||
| 347 | This class forms part of L<Paws>, describing an object used in L<Paws::Batch> | ||
| 348 | |||
| 349 | =head1 BUGS and CONTRIBUTIONS | ||
| 350 | |||
| 351 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 352 | |||
| 353 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 354 | |||
| 355 | =cut | ||
| 356 |