environments
Creates, updates, deletes, gets or lists an environments resource.
Overview
| Name | environments |
| Type | Resource |
| Id | aws.m2.environments |
Fields
The following fields are returned by SELECT queries:
- get_environment
- list_environments
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the runtime environment. Must be unique within the account. (pattern: <code>^[A-Za-z0-9][A-Za-z0-9_-]{1,59}$</code>) |
actual_capacity | integer | The number of instances included in the runtime environment. A standalone runtime environment has a maximum of one instance. Currently, a high availability runtime environment has a maximum of two instances. |
creation_time | string (date-time) | The timestamp when the runtime environment was created. |
description | string | The description of the runtime environment. |
engine_type | string | The target platform for the runtime environment. (microfocus, bluage) |
engine_version | string | The version of the runtime engine. (pattern: <code>^\S{1,10}$</code>) |
environment_arn | string | The Amazon Resource Name (ARN) of the runtime environment. (pattern: <code>^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]|):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$</code>) |
environment_id | string | The unique identifier of the runtime environment. (pattern: <code>^\S{1,80}$</code>) |
high_availability_config | object | Defines the details of a high availability configuration. |
instance_type | string | The type of instance underlying the runtime environment. (pattern: <code>^\S{1,20}$</code>) |
kms_key_id | string | The identifier of a customer managed key. |
load_balancer_arn | string | The Amazon Resource Name (ARN) for the load balancer used with the runtime environment. |
network_type | string | The network type supported by the runtime environment. (ipv4, dual) |
pending_maintenance | object | Indicates the pending maintenance scheduled on this environment. |
preferred_maintenance_window | string | The maintenance window for the runtime environment. If you don't provide a value for the maintenance window, the service assigns a random value. (pattern: <code>^\S{1,50}$</code>) |
publicly_accessible | boolean | Whether applications running in this runtime environment are publicly accessible. |
security_group_ids | array | The unique identifiers of the security groups assigned to this runtime environment. |
status | string | The status of the runtime environment. If the Amazon Web Services Mainframe Modernization environment is missing a connection to the customer owned dependent resource, the status will be Unhealthy. (Creating, Available, Updating, Deleting, Failed, UnHealthy) |
status_reason | string | The reason for the reported status. |
storage_configurations | array | The storage configurations defined for the runtime environment. |
subnet_ids | array | The unique identifiers of the subnets assigned to this runtime environment. |
tags | object | The tags defined for this runtime environment. |
vpc_id | string | The unique identifier for the VPC used with this runtime environment. (pattern: <code>^\S{1,50}$</code>) |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the runtime environment. (pattern: <code>^[A-Za-z0-9][A-Za-z0-9_-]{1,59}$</code>) |
creation_time | string (date-time) | The timestamp when the runtime environment was created. |
engine_type | string | The target platform for the runtime environment. (microfocus, bluage) |
engine_version | string | The version of the runtime engine. (pattern: <code>^\S{1,10}$</code>) |
environment_arn | string | The Amazon Resource Name (ARN) of a particular runtime environment. (pattern: <code>^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]|):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$</code>) |
environment_id | string | The unique identifier of a particular runtime environment. (pattern: <code>^\S{1,80}$</code>) |
instance_type | string | The instance type of the runtime environment. (pattern: <code>^\S{1,20}$</code>) |
network_type | string | The network type supported by the runtime environment. (ipv4, dual) |
status | string | The status of the runtime environment (Creating, Available, Updating, Deleting, Failed, UnHealthy) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_environment | select | environment_id, region | Describes a specific runtime environment. | |
list_environments | select | region | engineType, maxResults, names, nextToken | Lists the runtime environments. |
create_environment | insert | region, engineType, instanceType, name | Creates a runtime environment for a given runtime engine. | |
update_environment | update | environment_id, region | Updates the configuration details for a specific runtime environment. | |
delete_application_from_environment | delete | application_id, environment_id, region | Deletes a specific application from the specific runtime environment where it was previously deployed. You cannot delete a runtime environment using DeleteEnvironment if any application has ever been deployed to it. This API removes the association of the application with the runtime environment so you can delete the environment smoothly. | |
delete_environment | delete | environment_id, region | Deletes a specific runtime environment. The environment cannot contain deployed applications. If it does, you must delete those applications before you delete the environment. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
application_id | string | The unique identifier of the application you want to delete. |
environment_id | string | The unique identifier of the runtime environment you want to delete. |
region | string | AWS region (default: us-east-1) |
engineType | string | The engine type for the runtime environment. |
maxResults | integer | The maximum number of runtime environments to return. |
names | array | The names of the runtime environments. Must be unique within the account. |
nextToken | string | A pagination token to control the number of runtime environments displayed in the list. |
SELECT examples
- get_environment
- list_environments
Describes a specific runtime environment.
SELECT
name,
actual_capacity,
creation_time,
description,
engine_type,
engine_version,
environment_arn,
environment_id,
high_availability_config,
instance_type,
kms_key_id,
load_balancer_arn,
network_type,
pending_maintenance,
preferred_maintenance_window,
publicly_accessible,
security_group_ids,
status,
status_reason,
storage_configurations,
subnet_ids,
tags,
vpc_id
FROM aws.m2.environments
WHERE environment_id = '{{ environment_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the runtime environments.
SELECT
name,
creation_time,
engine_type,
engine_version,
environment_arn,
environment_id,
instance_type,
network_type,
status
FROM aws.m2.environments
WHERE region = '{{ region }}' -- required
AND engineType = '{{ engineType }}'
AND maxResults = '{{ maxResults }}'
AND names = '{{ names }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_environment
- Manifest
Creates a runtime environment for a given runtime engine.
INSERT INTO aws.m2.environments (
clientToken,
description,
engineType,
engineVersion,
highAvailabilityConfig,
instanceType,
kmsKeyId,
name,
networkType,
preferredMaintenanceWindow,
publiclyAccessible,
securityGroupIds,
storageConfigurations,
subnetIds,
tags,
region
)
SELECT
'{{ clientToken }}',
'{{ description }}',
'{{ engineType }}' /* required */,
'{{ engineVersion }}',
'{{ highAvailabilityConfig }}',
'{{ instanceType }}' /* required */,
'{{ kmsKeyId }}',
'{{ name }}' /* required */,
'{{ networkType }}',
'{{ preferredMaintenanceWindow }}',
{{ publiclyAccessible }},
'{{ securityGroupIds }}',
'{{ storageConfigurations }}',
'{{ subnetIds }}',
'{{ tags }}',
'{{ region }}'
RETURNING
environment_id
;
# Description fields are for documentation purposes
- name: environments
props:
- name: region
value: "{{ region }}"
description: Required parameter for the environments resource.
- name: clientToken
value: "{{ clientToken }}"
description: |
A client token is a unique, case-sensitive string of up to 128 ASCII characters with ASCII values of 33-126 inclusive. It is generated by the client to ensure idempotent operations, allowing safe retries without unintended side effects.
- name: description
value: "{{ description }}"
- name: engineType
value: "{{ engineType }}"
valid_values: ['microfocus', 'bluage']
- name: engineVersion
value: "{{ engineVersion }}"
- name: highAvailabilityConfig
description: |
Defines the details of a high availability configuration.
value:
desiredCapacity: {{ desiredCapacity }}
- name: instanceType
value: "{{ instanceType }}"
- name: kmsKeyId
value: "{{ kmsKeyId }}"
- name: name
value: "{{ name }}"
- name: networkType
value: "{{ networkType }}"
valid_values: ['ipv4', 'dual']
- name: preferredMaintenanceWindow
value: "{{ preferredMaintenanceWindow }}"
- name: publiclyAccessible
value: {{ publiclyAccessible }}
- name: securityGroupIds
value:
- "{{ securityGroupIds }}"
- name: storageConfigurations
value:
- efs:
fileSystemId: "{{ fileSystemId }}"
mountPoint: "{{ mountPoint }}"
fsx:
fileSystemId: "{{ fileSystemId }}"
mountPoint: "{{ mountPoint }}"
- name: subnetIds
value:
- "{{ subnetIds }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_environment
Updates the configuration details for a specific runtime environment.
UPDATE aws.m2.environments
SET
applyDuringMaintenanceWindow = {{ applyDuringMaintenanceWindow }},
desiredCapacity = {{ desiredCapacity }},
engineVersion = '{{ engineVersion }}',
forceUpdate = {{ forceUpdate }},
instanceType = '{{ instanceType }}',
preferredMaintenanceWindow = '{{ preferredMaintenanceWindow }}'
WHERE
environment_id = '{{ environment_id }}' --required
AND region = '{{ region }}' --required
RETURNING
environment_id;
DELETE examples
- delete_application_from_environment
- delete_environment
Deletes a specific application from the specific runtime environment where it was previously deployed. You cannot delete a runtime environment using DeleteEnvironment if any application has ever been deployed to it. This API removes the association of the application with the runtime environment so you can delete the environment smoothly.
DELETE FROM aws.m2.environments
WHERE application_id = '{{ application_id }}' --required
AND environment_id = '{{ environment_id }}' --required
AND region = '{{ region }}' --required
;
Deletes a specific runtime environment. The environment cannot contain deployed applications. If it does, you must delete those applications before you delete the environment.
DELETE FROM aws.m2.environments
WHERE environment_id = '{{ environment_id }}' --required
AND region = '{{ region }}' --required
;