service_environments
Creates, updates, deletes or gets a service_environment resource or lists service_environments in a region
Overview
| Name | service_environments |
| Type | Resource |
| Description | Resource Type definition for AWS::Batch::ServiceEnvironment |
| Id | awscc.batch.service_environments |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
service_environment_arn | string | |
service_environment_name | string | |
state | string | |
service_environment_type | string | |
capacity_limits | array | |
tags | object | A key-value pair to associate with a resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
service_environment_arn | string | |
region | string | AWS region. |
For more information, see AWS::Batch::ServiceEnvironment.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | service_environments | INSERT | ServiceEnvironmentType, CapacityLimits, region |
delete_resource | service_environments | DELETE | Identifier, region |
update_resource | service_environments | UPDATE | Identifier, PatchDocument, region |
list_resources | service_environments_list_only | SELECT | region |
get_resource | service_environments | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual service_environment.
SELECT
region,
service_environment_arn,
service_environment_name,
state,
service_environment_type,
capacity_limits,
tags
FROM awscc.batch.service_environments
WHERE
region = 'us-east-1' AND
Identifier = '{{ service_environment_arn }}';
Lists all service_environments in a region.
SELECT
region,
service_environment_arn
FROM awscc.batch.service_environments_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new service_environment resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.batch.service_environments (
ServiceEnvironmentType,
CapacityLimits,
region
)
SELECT
'{{ service_environment_type }}',
'{{ capacity_limits }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.batch.service_environments (
ServiceEnvironmentName,
State,
ServiceEnvironmentType,
CapacityLimits,
Tags,
region
)
SELECT
'{{ service_environment_name }}',
'{{ state }}',
'{{ service_environment_type }}',
'{{ capacity_limits }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: service_environment
props:
- name: service_environment_name
value: '{{ service_environment_name }}'
- name: state
value: '{{ state }}'
- name: service_environment_type
value: '{{ service_environment_type }}'
- name: capacity_limits
value:
- max_capacity: '{{ max_capacity }}'
capacity_unit: '{{ capacity_unit }}'
- name: tags
value: {}
UPDATE example
Use the following StackQL query and manifest file to update a service_environment resource, using stack-deploy.
/*+ update */
UPDATE awscc.batch.service_environments
SET PatchDocument = string('{{ {
"State": state,
"CapacityLimits": capacity_limits,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ service_environment_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.batch.service_environments
WHERE
Identifier = '{{ service_environment_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the service_environments resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
Batch:CreateServiceEnvironment,
Batch:TagResource,
Batch:DescribeServiceEnvironments,
Iam:CreateServiceLinkedRole
Batch:DescribeServiceEnvironments
Batch:UpdateServiceEnvironment,
Batch:DescribeServiceEnvironments,
Batch:TagResource,
Batch:UntagResource
Batch:DeleteServiceEnvironment,
Batch:DescribeServiceEnvironments,
Batch:UpdateServiceEnvironment
Batch:DescribeServiceEnvironments