Copyright | (c) 2013-2017 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates an AWS Batch compute environment. You can create MANAGED
or UNMANAGED
compute environments.
In a managed compute environment, AWS Batch manages the compute resources within the environment, based on the compute resources that you specify. Instances launched into a managed compute environment use a recent, approved version of the Amazon ECS-optimized AMI. You can choose to use Amazon EC2 On-Demand instances in your managed compute environment, or you can use Amazon EC2 Spot instances that only launch when the Spot bid price is below a specified percentage of the On-Demand price.
In an unmanaged compute environment, you can manage your own compute resources. This provides more compute resource configuration options, such as using a custom AMI, but you must ensure that your AMI meets the Amazon ECS container instance AMI specification. For more information, see Container Instance AMIs in the Amazon EC2 Container Service Developer Guide . After you have created your unmanaged compute environment, you can use the DescribeComputeEnvironments
operation to find the Amazon ECS cluster that is associated with it and then manually launch your container instances into that Amazon ECS cluster. For more information, see Launching an Amazon ECS Container Instance in the Amazon EC2 Container Service Developer Guide .
- createComputeEnvironment :: Text -> CEType -> Text -> CreateComputeEnvironment
- data CreateComputeEnvironment
- cceState :: Lens' CreateComputeEnvironment (Maybe CEState)
- cceComputeResources :: Lens' CreateComputeEnvironment (Maybe ComputeResource)
- cceComputeEnvironmentName :: Lens' CreateComputeEnvironment Text
- cceType :: Lens' CreateComputeEnvironment CEType
- cceServiceRole :: Lens' CreateComputeEnvironment Text
- createComputeEnvironmentResponse :: Int -> CreateComputeEnvironmentResponse
- data CreateComputeEnvironmentResponse
- ccersComputeEnvironmentName :: Lens' CreateComputeEnvironmentResponse (Maybe Text)
- ccersComputeEnvironmentARN :: Lens' CreateComputeEnvironmentResponse (Maybe Text)
- ccersResponseStatus :: Lens' CreateComputeEnvironmentResponse Int
Creating a Request
createComputeEnvironment Source #
Creates a value of CreateComputeEnvironment
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cceState
- The state of the compute environment. If the state isENABLED
, then the compute environment accepts jobs from a queue and can scale out automatically based on queues.cceComputeResources
- Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments.cceComputeEnvironmentName
- The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.cceType
- The type of the compute environment.cceServiceRole
- 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.
data CreateComputeEnvironment Source #
See: createComputeEnvironment
smart constructor.
Request Lenses
cceState :: Lens' CreateComputeEnvironment (Maybe CEState) Source #
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.
cceComputeResources :: Lens' CreateComputeEnvironment (Maybe ComputeResource) Source #
Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments.
cceComputeEnvironmentName :: Lens' CreateComputeEnvironment Text Source #
The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
cceServiceRole :: Lens' CreateComputeEnvironment Text Source #
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.
Destructuring the Response
createComputeEnvironmentResponse Source #
Creates a value of CreateComputeEnvironmentResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ccersComputeEnvironmentName
- The name of the compute environment.ccersComputeEnvironmentARN
- The Amazon Resource Name (ARN) of the compute environment.ccersResponseStatus
- -- | The response status code.
data CreateComputeEnvironmentResponse Source #
See: createComputeEnvironmentResponse
smart constructor.
Response Lenses
ccersComputeEnvironmentName :: Lens' CreateComputeEnvironmentResponse (Maybe Text) Source #
The name of the compute environment.
ccersComputeEnvironmentARN :: Lens' CreateComputeEnvironmentResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the compute environment.
ccersResponseStatus :: Lens' CreateComputeEnvironmentResponse Int Source #
- - | The response status code.