| 1 | # Generated by default/object.tt | ||
| 2 | package Paws::Batch::LinuxParameters; | ||
| 3 | use Moose; | ||
| 4 | has Devices => (is => 'ro', isa => 'ArrayRef[Paws::Batch::Device]', request_name => 'devices', traits => ['NameInRequest']); | ||
| 5 | has InitProcessEnabled => (is => 'ro', isa => 'Bool', request_name => 'initProcessEnabled', traits => ['NameInRequest']); | ||
| 6 | has MaxSwap => (is => 'ro', isa => 'Int', request_name => 'maxSwap', traits => ['NameInRequest']); | ||
| 7 | has SharedMemorySize => (is => 'ro', isa => 'Int', request_name => 'sharedMemorySize', traits => ['NameInRequest']); | ||
| 8 | has Swappiness => (is => 'ro', isa => 'Int', request_name => 'swappiness', traits => ['NameInRequest']); | ||
| 9 | has Tmpfs => (is => 'ro', isa => 'ArrayRef[Paws::Batch::Tmpfs]', request_name => 'tmpfs', traits => ['NameInRequest']); | ||
| 10 | |||
| 11 | 1; | ||
| 12 | |||
| 13 | ### main pod documentation begin ### | ||
| 14 | |||
| 15 | =head1 NAME | ||
| 16 | |||
| 17 | Paws::Batch::LinuxParameters | ||
| 18 | |||
| 19 | =head1 USAGE | ||
| 20 | |||
| 21 | This class represents one of two things: | ||
| 22 | |||
| 23 | =head3 Arguments in a call to a service | ||
| 24 | |||
| 25 | Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. | ||
| 26 | Each attribute should be used as a named argument in the calls that expect this type of object. | ||
| 27 | |||
| 28 | As an example, if Att1 is expected to be a Paws::Batch::LinuxParameters object: | ||
| 29 | |||
| 30 | $service_obj->Method(Att1 => { Devices => $value, ..., Tmpfs => $value }); | ||
| 31 | |||
| 32 | =head3 Results returned from an API call | ||
| 33 | |||
| 34 | Use accessors for each attribute. If Att1 is expected to be an Paws::Batch::LinuxParameters object: | ||
| 35 | |||
| 36 | $result = $service_obj->Method(...); | ||
| 37 | $result->Att1->Devices | ||
| 38 | |||
| 39 | =head1 DESCRIPTION | ||
| 40 | |||
| 41 | Linux-specific modifications that are applied to the container, such as | ||
| 42 | details for device mappings. | ||
| 43 | |||
| 44 | =head1 ATTRIBUTES | ||
| 45 | |||
| 46 | |||
| 47 | =head2 Devices => ArrayRef[L<Paws::Batch::Device>] | ||
| 48 | |||
| 49 | Any host devices to expose to the container. This parameter maps to | ||
| 50 | C<Devices> in the Create a container | ||
| 51 | (https://docs.docker.com/engine/api/v1.23/#create-a-container) section | ||
| 52 | of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) | ||
| 53 | and the C<--device> option to docker run | ||
| 54 | (https://docs.docker.com/engine/reference/run/). | ||
| 55 | |||
| 56 | This parameter isn't applicable to jobs running on Fargate resources | ||
| 57 | and shouldn't be provided. | ||
| 58 | |||
| 59 | |||
| 60 | =head2 InitProcessEnabled => Bool | ||
| 61 | |||
| 62 | If true, run an C<init> process inside the container that forwards | ||
| 63 | signals and reaps processes. This parameter maps to the C<--init> | ||
| 64 | option to docker run (https://docs.docker.com/engine/reference/run/). | ||
| 65 | This parameter requires version 1.25 of the Docker Remote API or | ||
| 66 | greater on your container instance. To check the Docker Remote API | ||
| 67 | version on your container instance, log into your container instance | ||
| 68 | and run the following command: C<sudo docker version | grep "Server API | ||
| 69 | version"> | ||
| 70 | |||
| 71 | |||
| 72 | =head2 MaxSwap => Int | ||
| 73 | |||
| 74 | The total amount of swap memory (in MiB) a container can use. This | ||
| 75 | parameter is translated to the C<--memory-swap> option to docker run | ||
| 76 | (https://docs.docker.com/engine/reference/run/) where the value is the | ||
| 77 | sum of the container memory plus the C<maxSwap> value. For more | ||
| 78 | information, see C<--memory-swap> details | ||
| 79 | (https://docs.docker.com/config/containers/resource_constraints/#--memory-swap-details) | ||
| 80 | in the Docker documentation. | ||
| 81 | |||
| 82 | If a C<maxSwap> value of C<0> is specified, the container doesn't use | ||
| 83 | swap. Accepted values are C<0> or any positive integer. If the | ||
| 84 | C<maxSwap> parameter is omitted, the container doesn't use the swap | ||
| 85 | configuration for the container instance it is running on. A C<maxSwap> | ||
| 86 | value must be set for the C<swappiness> parameter to be used. | ||
| 87 | |||
| 88 | This parameter isn't applicable to jobs running on Fargate resources | ||
| 89 | and shouldn't be provided. | ||
| 90 | |||
| 91 | |||
| 92 | =head2 SharedMemorySize => Int | ||
| 93 | |||
| 94 | The value for the size (in MiB) of the C</dev/shm> volume. This | ||
| 95 | parameter maps to the C<--shm-size> option to docker run | ||
| 96 | (https://docs.docker.com/engine/reference/run/). | ||
| 97 | |||
| 98 | This parameter isn't applicable to jobs running on Fargate resources | ||
| 99 | and shouldn't be provided. | ||
| 100 | |||
| 101 | |||
| 102 | =head2 Swappiness => Int | ||
| 103 | |||
| 104 | This allows you to tune a container's memory swappiness behavior. A | ||
| 105 | C<swappiness> value of C<0> causes swapping not to happen unless | ||
| 106 | absolutely necessary. A C<swappiness> value of C<100> causes pages to | ||
| 107 | be swapped very aggressively. Accepted values are whole numbers between | ||
| 108 | C<0> and C<100>. If the C<swappiness> parameter isn't specified, a | ||
| 109 | default value of C<60> is used. If a value isn't specified for | ||
| 110 | C<maxSwap> then this parameter is ignored. If C<maxSwap> is set to 0, | ||
| 111 | the container doesn't use swap. This parameter maps to the | ||
| 112 | C<--memory-swappiness> option to docker run | ||
| 113 | (https://docs.docker.com/engine/reference/run/). | ||
| 114 | |||
| 115 | Consider the following when you use a per-container swap configuration. | ||
| 116 | |||
| 117 | =over | ||
| 118 | |||
| 119 | =item * | ||
| 120 | |||
| 121 | Swap space must be enabled and allocated on the container instance for | ||
| 122 | the containers to use. | ||
| 123 | |||
| 124 | The Amazon ECS optimized AMIs don't have swap enabled by default. You | ||
| 125 | must enable swap on the instance to use this feature. For more | ||
| 126 | information, see Instance Store Swap Volumes | ||
| 127 | (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-store-swap-volumes.html) | ||
| 128 | in the I<Amazon EC2 User Guide for Linux Instances> or How do I | ||
| 129 | allocate memory to work as swap space in an Amazon EC2 instance by | ||
| 130 | using a swap file? | ||
| 131 | (http://aws.amazon.com/premiumsupport/knowledge-center/ec2-memory-swap-file/) | ||
| 132 | |||
| 133 | =item * | ||
| 134 | |||
| 135 | The swap space parameters are only supported for job definitions using | ||
| 136 | EC2 resources. | ||
| 137 | |||
| 138 | =item * | ||
| 139 | |||
| 140 | If the C<maxSwap> and C<swappiness> parameters are omitted from a job | ||
| 141 | definition, each container will have a default C<swappiness> value of | ||
| 142 | 60, and the total swap usage will be limited to two times the memory | ||
| 143 | reservation of the container. | ||
| 144 | |||
| 145 | =back | ||
| 146 | |||
| 147 | This parameter isn't applicable to jobs running on Fargate resources | ||
| 148 | and shouldn't be provided. | ||
| 149 | |||
| 150 | |||
| 151 | =head2 Tmpfs => ArrayRef[L<Paws::Batch::Tmpfs>] | ||
| 152 | |||
| 153 | The container path, mount options, and size (in MiB) of the tmpfs | ||
| 154 | mount. This parameter maps to the C<--tmpfs> option to docker run | ||
| 155 | (https://docs.docker.com/engine/reference/run/). | ||
| 156 | |||
| 157 | This parameter isn't applicable to jobs running on Fargate resources | ||
| 158 | and shouldn't be provided. | ||
| 159 | |||
| 160 | |||
| 161 | |||
| 162 | =head1 SEE ALSO | ||
| 163 | |||
| 164 | This class forms part of L<Paws>, describing an object used in L<Paws::Batch> | ||
| 165 | |||
| 166 | =head1 BUGS and CONTRIBUTIONS | ||
| 167 | |||
| 168 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 169 | |||
| 170 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 171 | |||
| 172 | =cut | ||
| 173 |