Paws::Batch::CreateComputeEnvironment - Arguments for method CreateComputeEnvironment on Paws::Batch
This class represents the parameters used for calling the method CreateComputeEnvironment on the AWS Batch service. Use the attributes of this class as arguments to method CreateComputeEnvironment.
You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateComputeEnvironment.
my $batch = Paws->service('Batch'); # To create a managed EC2 compute environment # This example creates a managed compute environment with specific C4 # instance types that are launched on demand. The compute environment is # called C4OnDemand. my $CreateComputeEnvironmentResponse = $batch->CreateComputeEnvironment( 'ComputeEnvironmentName' => 'C4OnDemand', 'ComputeResources' => { 'DesiredvCpus' => 48, 'Ec2KeyPair' => 'id_rsa', 'InstanceRole' => 'ecsInstanceRole', 'InstanceTypes' => [ 'c4.large', 'c4.xlarge', 'c4.2xlarge', 'c4.4xlarge', 'c4.8xlarge' ], 'MaxvCpus' => 128, 'MinvCpus' => 0, 'SecurityGroupIds' => ['sg-cf5093b2'], 'Subnets' => [ 'subnet-220c0e0a', 'subnet-1a95556d', 'subnet-978f6dce' ], 'Tags' => { 'Name' => 'Batch Instance - C4OnDemand' }, 'Type' => 'EC2' }, 'ServiceRole' => 'arn:aws:iam::012345678910:role/AWSBatchServiceRole', 'State' => 'ENABLED', 'Type' => 'MANAGED' ); # Results: my $computeEnvironmentArn = $CreateComputeEnvironmentResponse->computeEnvironmentArn; my $computeEnvironmentName = $CreateComputeEnvironmentResponse->computeEnvironmentName; # Returns a L<Paws::Batch::CreateComputeEnvironmentResponse> object. # To create a managed EC2 Spot compute environment # This example creates a managed compute environment with the M4 instance # type that is launched when the Spot bid price is at or below 20% of the # On-Demand price for the instance type. The compute environment is called # M4Spot. my $CreateComputeEnvironmentResponse = $batch->CreateComputeEnvironment( 'ComputeEnvironmentName' => 'M4Spot', 'ComputeResources' => { 'BidPercentage' => 20, 'DesiredvCpus' => 4, 'Ec2KeyPair' => 'id_rsa', 'InstanceRole' => 'ecsInstanceRole', 'InstanceTypes' => ['m4'], 'MaxvCpus' => 128, 'MinvCpus' => 0, 'SecurityGroupIds' => ['sg-cf5093b2'], 'SpotIamFleetRole' => 'arn:aws:iam::012345678910:role/aws-ec2-spot-fleet-role', 'Subnets' => [ 'subnet-220c0e0a', 'subnet-1a95556d', 'subnet-978f6dce' ], 'Tags' => { 'Name' => 'Batch Instance - M4Spot' }, 'Type' => 'SPOT' }, 'ServiceRole' => 'arn:aws:iam::012345678910:role/AWSBatchServiceRole', 'State' => 'ENABLED', 'Type' => 'MANAGED' ); # Results: my $computeEnvironmentArn = $CreateComputeEnvironmentResponse->computeEnvironmentArn; my $computeEnvironmentName = $CreateComputeEnvironmentResponse->computeEnvironmentName; # Returns a L<Paws::Batch::CreateComputeEnvironmentResponse> object.
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. For the AWS API documentation, see https://docs.aws.amazon.com/goto/WebAPI/batch/CreateComputeEnvironment
The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. For more information, see Compute Environments (https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) in the AWS Batch User Guide.
The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.
If your specified role has a path other than /, then you must either specify the full role ARN (this is recommended) or prefix the role name with the path.
/
Depending on how you created your AWS Batch service role, its ARN may contain the service-role path prefix. When you only specify the name of the service role, AWS Batch assumes that your ARN does not use the service-role path prefix. Because of this, we recommend that you specify the full ARN of your service role when you create compute environments.
service-role
The state of the compute environment. If the state is ENABLED, then the compute environment accepts jobs from a queue and can scale out automatically based on queues.
ENABLED
Valid values are: "ENABLED", "DISABLED"
"ENABLED"
"DISABLED"
The type of the compute environment. For more information, see Compute Environments (https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) in the AWS Batch User Guide.
Valid values are: "MANAGED", "UNMANAGED"
"MANAGED"
"UNMANAGED"
This class forms part of Paws, documenting arguments for method CreateComputeEnvironment in Paws::Batch
The source code is located here: https://github.com/pplu/aws-sdk-perl
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
To install Paws::SDK::Config, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Paws::SDK::Config
CPAN shell
perl -MCPAN -e shell install Paws::SDK::Config
For more information on module installation, please visit the detailed CPAN module installation guide.