« blib/lib/Paws/Batch/CreateComputeEnvironmentResponse.pm
↑ Summary
blib/lib/Paws/Batch/CreateJobQueueResponse.pm »
| 1 | |||
| 2 | package Paws::Batch::CreateJobQueue; | ||
| 3 | use Moose; | ||
| 4 | has ComputeEnvironmentOrder => (is => 'ro', isa => 'ArrayRef[Paws::Batch::ComputeEnvironmentOrder]', traits => ['NameInRequest'], request_name => 'computeEnvironmentOrder', required => 1); | ||
| 5 | has JobQueueName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'jobQueueName', required => 1); | ||
| 6 | has Priority => (is => 'ro', isa => 'Int', traits => ['NameInRequest'], request_name => 'priority', required => 1); | ||
| 7 | has State => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'state'); | ||
| 8 | has Tags => (is => 'ro', isa => 'Paws::Batch::TagrisTagsMap', traits => ['NameInRequest'], request_name => 'tags'); | ||
| 9 | |||
| 10 | use MooseX::ClassAttribute; | ||
| 11 | |||
| 12 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateJobQueue'); | ||
| 13 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/v1/createjobqueue'); | ||
| 14 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | ||
| 15 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Batch::CreateJobQueueResponse'); | ||
| 16 | 1; | ||
| 17 | |||
| 18 | ### main pod documentation begin ### | ||
| 19 | |||
| 20 | =head1 NAME | ||
| 21 | |||
| 22 | Paws::Batch::CreateJobQueue - Arguments for method CreateJobQueue on L<Paws::Batch> | ||
| 23 | |||
| 24 | =head1 DESCRIPTION | ||
| 25 | |||
| 26 | This class represents the parameters used for calling the method CreateJobQueue on the | ||
| 27 | L<AWS Batch|Paws::Batch> service. Use the attributes of this class | ||
| 28 | as arguments to method CreateJobQueue. | ||
| 29 | |||
| 30 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateJobQueue. | ||
| 31 | |||
| 32 | =head1 SYNOPSIS | ||
| 33 | |||
| 34 | my $batch = Paws->service('Batch'); | ||
| 35 | # To create a job queue with a single compute environment | ||
| 36 | # This example creates a job queue called LowPriority that uses the M4Spot | ||
| 37 | # compute environment. | ||
| 38 | my $CreateJobQueueResponse = $batch->CreateJobQueue( | ||
| 39 | 'ComputeEnvironmentOrder' => [ | ||
| 40 | |||
| 41 | { | ||
| 42 | 'ComputeEnvironment' => 'M4Spot', | ||
| 43 | 'Order' => 1 | ||
| 44 | } | ||
| 45 | ], | ||
| 46 | 'JobQueueName' => 'LowPriority', | ||
| 47 | 'Priority' => 1, | ||
| 48 | 'State' => 'ENABLED' | ||
| 49 | ); | ||
| 50 | |||
| 51 | # Results: | ||
| 52 | my $jobQueueArn = $CreateJobQueueResponse->jobQueueArn; | ||
| 53 | my $jobQueueName = $CreateJobQueueResponse->jobQueueName; | ||
| 54 | |||
| 55 | # Returns a L<Paws::Batch::CreateJobQueueResponse> object. | ||
| 56 | # To create a job queue with multiple compute environments | ||
| 57 | # This example creates a job queue called HighPriority that uses the C4OnDemand | ||
| 58 | # compute environment with an order of 1 and the M4Spot compute environment with | ||
| 59 | # an order of 2. | ||
| 60 | my $CreateJobQueueResponse = $batch->CreateJobQueue( | ||
| 61 | 'ComputeEnvironmentOrder' => [ | ||
| 62 | |||
| 63 | { | ||
| 64 | 'ComputeEnvironment' => 'C4OnDemand', | ||
| 65 | 'Order' => 1 | ||
| 66 | }, | ||
| 67 | |||
| 68 | { | ||
| 69 | 'ComputeEnvironment' => 'M4Spot', | ||
| 70 | 'Order' => 2 | ||
| 71 | } | ||
| 72 | ], | ||
| 73 | 'JobQueueName' => 'HighPriority', | ||
| 74 | 'Priority' => 10, | ||
| 75 | 'State' => 'ENABLED' | ||
| 76 | ); | ||
| 77 | |||
| 78 | # Results: | ||
| 79 | my $jobQueueArn = $CreateJobQueueResponse->jobQueueArn; | ||
| 80 | my $jobQueueName = $CreateJobQueueResponse->jobQueueName; | ||
| 81 | |||
| 82 | # Returns a L<Paws::Batch::CreateJobQueueResponse> object. | ||
| 83 | |||
| 84 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 85 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/batch/CreateJobQueue> | ||
| 86 | |||
| 87 | =head1 ATTRIBUTES | ||
| 88 | |||
| 89 | |||
| 90 | =head2 B<REQUIRED> ComputeEnvironmentOrder => ArrayRef[L<Paws::Batch::ComputeEnvironmentOrder>] | ||
| 91 | |||
| 92 | The set of compute environments mapped to a job queue and their order | ||
| 93 | relative to each other. The job scheduler uses this parameter to | ||
| 94 | determine which compute environment should run a specific job. Compute | ||
| 95 | environments must be in the C<VALID> state before you can associate | ||
| 96 | them with a job queue. You can associate up to three compute | ||
| 97 | environments with a job queue. All of the compute environments must be | ||
| 98 | either EC2 (C<EC2> or C<SPOT>) or Fargate (C<FARGATE> or | ||
| 99 | C<FARGATE_SPOT>); EC2 and Fargate compute environments can't be mixed. | ||
| 100 | |||
| 101 | All compute environments that are associated with a job queue must | ||
| 102 | share the same architecture. AWS Batch doesn't support mixing compute | ||
| 103 | environment architecture types in a single job queue. | ||
| 104 | |||
| 105 | |||
| 106 | |||
| 107 | =head2 B<REQUIRED> JobQueueName => Str | ||
| 108 | |||
| 109 | The name of the job queue. Up to 128 letters (uppercase and lowercase), | ||
| 110 | numbers, and underscores are allowed. | ||
| 111 | |||
| 112 | |||
| 113 | |||
| 114 | =head2 B<REQUIRED> Priority => Int | ||
| 115 | |||
| 116 | The priority of the job queue. Job queues with a higher priority (or a | ||
| 117 | higher integer value for the C<priority> parameter) are evaluated first | ||
| 118 | when associated with the same compute environment. Priority is | ||
| 119 | determined in descending order. For example, a job queue with a | ||
| 120 | priority value of C<10> is given scheduling preference over a job queue | ||
| 121 | with a priority value of C<1>. All of the compute environments must be | ||
| 122 | either EC2 (C<EC2> or C<SPOT>) or Fargate (C<FARGATE> or | ||
| 123 | C<FARGATE_SPOT>); EC2 and Fargate compute environments cannot be mixed. | ||
| 124 | |||
| 125 | |||
| 126 | |||
| 127 | =head2 State => Str | ||
| 128 | |||
| 129 | The state of the job queue. If the job queue state is C<ENABLED>, it is | ||
| 130 | able to accept jobs. If the job queue state is C<DISABLED>, new jobs | ||
| 131 | can't be added to the queue, but jobs already in the queue can finish. | ||
| 132 | |||
| 133 | Valid values are: C<"ENABLED">, C<"DISABLED"> | ||
| 134 | |||
| 135 | =head2 Tags => L<Paws::Batch::TagrisTagsMap> | ||
| 136 | |||
| 137 | The tags that you apply to the job queue to help you categorize and | ||
| 138 | organize your resources. Each tag consists of a key and an optional | ||
| 139 | value. For more information, see Tagging your AWS Batch resources | ||
| 140 | (https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html) in | ||
| 141 | I<AWS Batch User Guide>. | ||
| 142 | |||
| 143 | |||
| 144 | |||
| 145 | |||
| 146 | =head1 SEE ALSO | ||
| 147 | |||
| 148 | This class forms part of L<Paws>, documenting arguments for method CreateJobQueue in L<Paws::Batch> | ||
| 149 | |||
| 150 | =head1 BUGS and CONTRIBUTIONS | ||
| 151 | |||
| 152 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 153 | |||
| 154 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 155 | |||
| 156 | =cut | ||
| 157 |