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
| 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. |
For more information, see AWS::Batch::ServiceEnvironment.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | ServiceEnvironmentType, CapacityLimits, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT examples
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 data__Identifier = '<ServiceEnvironmentArn>';
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
'{{ ServiceEnvironmentType }}',
'{{ CapacityLimits }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.batch.service_environments (
ServiceEnvironmentName,
State,
ServiceEnvironmentType,
CapacityLimits,
Tags,
region
)
SELECT
'{{ ServiceEnvironmentName }}',
'{{ State }}',
'{{ ServiceEnvironmentType }}',
'{{ CapacityLimits }}',
'{{ 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: ServiceEnvironmentName
value: '{{ ServiceEnvironmentName }}'
- name: State
value: '{{ State }}'
- name: ServiceEnvironmentType
value: '{{ ServiceEnvironmentType }}'
- name: CapacityLimits
value:
- MaxCapacity: '{{ MaxCapacity }}'
CapacityUnit: '{{ CapacityUnit }}'
- name: Tags
value: {}
DELETE example
/*+ delete */
DELETE FROM awscc.batch.service_environments
WHERE data__Identifier = '<ServiceEnvironmentArn>'
AND region = 'us-east-1';
Permissions
To operate on the service_environments resource, the following permissions are required:
Create
Batch:CreateServiceEnvironment,
Batch:TagResource,
Batch:DescribeServiceEnvironments,
Iam:CreateServiceLinkedRole
Read
Batch:DescribeServiceEnvironments
Update
Batch:UpdateServiceEnvironment,
Batch:DescribeServiceEnvironments,
Batch:TagResource,
Batch:UntagResource
Delete
Batch:DeleteServiceEnvironment,
Batch:DescribeServiceEnvironments,
Batch:UpdateServiceEnvironment
List
Batch:DescribeServiceEnvironments