applications
Creates, updates, deletes, gets or lists an applications resource.
Overview
| Name | applications |
| Type | Resource |
| Id | aws.m2.applications |
Fields
The following fields are returned by SELECT queries:
- get_application
- list_applications
| Name | Datatype | Description |
|---|---|---|
name | string | The unique identifier of the application. (pattern: <code>^[A-Za-z0-9][A-Za-z0-9_-]{1,59}$</code>) |
application_arn | string | The Amazon Resource Name (ARN) of the application. (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>) |
application_id | string | The identifier of the application. (pattern: <code>^\S{1,80}$</code>) |
creation_time | string (date-time) | The timestamp when this application was created. |
deployed_version | object | The version of the application that is deployed. |
description | string | The description of the application. |
engine_type | string | The type of the target platform for the application. (microfocus, bluage) |
environment_id | string | The identifier of the runtime environment where you want to deploy the application. (pattern: <code>^\S{1,80}$</code>) |
kms_key_id | string | The identifier of a customer managed key. |
last_start_time | string (date-time) | The timestamp when you last started the application. Null until the application runs for the first time. |
latest_version | object | The latest version of the application. |
listener_arns | array | The Amazon Resource Name (ARN) for the network load balancer listener created in your Amazon Web Services account. Amazon Web Services Mainframe Modernization creates this listener for you the first time you deploy an application. |
listener_ports | array | The port associated with the network load balancer listener created in your Amazon Web Services account. |
load_balancer_dns_name | string | The public DNS name of the load balancer created in your Amazon Web Services account. (pattern: <code>^\S{1,100}$</code>) |
log_groups | array | The list of log summaries. Each log summary includes the log type as well as the log group identifier. These are CloudWatch logs. Amazon Web Services Mainframe Modernization pushes the application log to CloudWatch under the customer's account. |
role_arn | string | The Amazon Resource Name (ARN) of the role associated with the application. (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>) |
status | string | The status of the application. (Creating, Created, Available, Ready, Starting, Running, Stopping, Stopped, Failed, Deleting, Deleting From Environment) |
status_reason | string | The reason for the reported status. |
tags | object | A list of tags associated with the application. |
target_group_arns | array | Returns the Amazon Resource Names (ARNs) of the target groups that are attached to the network load balancer. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the application. (pattern: <code>^[A-Za-z0-9][A-Za-z0-9_-]{1,59}$</code>) |
application_arn | string | The Amazon Resource Name (ARN) of the application. (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>) |
application_id | string | The unique identifier of the application. (pattern: <code>^\S{1,80}$</code>) |
application_version | integer | The version of the application. |
creation_time | string (date-time) | The timestamp when the application was created. |
deployment_status | string | Indicates either an ongoing deployment or if the application has ever deployed successfully. (Deploying, Deployed) |
description | string | The description of the application. |
engine_type | string | The type of the target platform for this application. (microfocus, bluage) |
environment_id | string | The unique identifier of the runtime environment that hosts this application. (pattern: <code>^\S{1,80}$</code>) |
last_start_time | string (date-time) | The timestamp when you last started the application. Null until the application runs for the first time. |
role_arn | string | The Amazon Resource Name (ARN) of the role associated with the application. (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>) |
status | string | The status of the application. (Creating, Created, Available, Ready, Starting, Running, Stopping, Stopped, Failed, Deleting, Deleting From Environment) |
version_status | string | Indicates the status of the latest version of the application. (Creating, Available, Failed) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_application | select | application_id, region | Describes the details of a specific application. | |
list_applications | select | region | environmentId, maxResults, names, nextToken | Lists the applications associated with a specific Amazon Web Services account. You can provide the unique identifier of a specific runtime environment in a query parameter to see all applications associated with that environment. |
create_application | insert | region, definition, engineType, name | Creates a new application with given parameters. Requires an existing runtime environment and application definition file. | |
update_application | update | application_id, region, currentApplicationVersion | Updates an application and creates a new version. | |
delete_application | delete | application_id, region | Deletes a specific application. You cannot delete a running application. | |
cancel_batch_job_execution | exec | application_id, execution_id, region | Cancels the running of a specific batch job execution. | |
start_application | exec | application_id, region | Starts an application that is currently stopped. | |
start_batch_job | exec | application_id, region, batchJobIdentifier | Starts a batch job and returns the unique identifier of this execution of the batch job. The associated application must be running in order to start the batch job. | |
stop_application | exec | application_id, region | Stops a running application. |
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 stop. |
execution_id | string | The unique identifier of the batch job execution. |
region | string | AWS region (default: us-east-1) |
environmentId | string | The unique identifier of the runtime environment where the applications are deployed. |
maxResults | integer | The maximum number of applications to return. |
names | array | The names of the applications. |
nextToken | string | A pagination token to control the number of applications displayed in the list. |
SELECT examples
- get_application
- list_applications
Describes the details of a specific application.
SELECT
name,
application_arn,
application_id,
creation_time,
deployed_version,
description,
engine_type,
environment_id,
kms_key_id,
last_start_time,
latest_version,
listener_arns,
listener_ports,
load_balancer_dns_name,
log_groups,
role_arn,
status,
status_reason,
tags,
target_group_arns
FROM aws.m2.applications
WHERE application_id = '{{ application_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the applications associated with a specific Amazon Web Services account. You can provide the unique identifier of a specific runtime environment in a query parameter to see all applications associated with that environment.
SELECT
name,
application_arn,
application_id,
application_version,
creation_time,
deployment_status,
description,
engine_type,
environment_id,
last_start_time,
role_arn,
status,
version_status
FROM aws.m2.applications
WHERE region = '{{ region }}' -- required
AND environmentId = '{{ environmentId }}'
AND maxResults = '{{ maxResults }}'
AND names = '{{ names }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_application
- Manifest
Creates a new application with given parameters. Requires an existing runtime environment and application definition file.
INSERT INTO aws.m2.applications (
clientToken,
definition,
description,
engineType,
kmsKeyId,
name,
roleArn,
tags,
region
)
SELECT
'{{ clientToken }}',
'{{ definition }}' /* required */,
'{{ description }}',
'{{ engineType }}' /* required */,
'{{ kmsKeyId }}',
'{{ name }}' /* required */,
'{{ roleArn }}',
'{{ tags }}',
'{{ region }}'
RETURNING
application_arn,
application_id,
application_version
;
# Description fields are for documentation purposes
- name: applications
props:
- name: region
value: "{{ region }}"
description: Required parameter for the applications 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: definition
description: |
The application definition for a particular application.
value:
content: "{{ content }}"
s3Location: "{{ s3Location }}"
- name: description
value: "{{ description }}"
- name: engineType
value: "{{ engineType }}"
valid_values: ['microfocus', 'bluage']
- name: kmsKeyId
value: "{{ kmsKeyId }}"
- name: name
value: "{{ name }}"
- name: roleArn
value: "{{ roleArn }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_application
Updates an application and creates a new version.
UPDATE aws.m2.applications
SET
currentApplicationVersion = {{ currentApplicationVersion }},
definition = '{{ definition }}',
description = '{{ description }}'
WHERE
application_id = '{{ application_id }}' --required
AND region = '{{ region }}' --required
AND currentApplicationVersion = '{{ currentApplicationVersion }}' --required
RETURNING
application_version;
DELETE examples
- delete_application
Deletes a specific application. You cannot delete a running application.
DELETE FROM aws.m2.applications
WHERE application_id = '{{ application_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- cancel_batch_job_execution
- start_application
- start_batch_job
- stop_application
Cancels the running of a specific batch job execution.
EXEC aws.m2.applications.cancel_batch_job_execution
@application_id='{{ application_id }}' --required,
@execution_id='{{ execution_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"authSecretsManagerArn": "{{ authSecretsManagerArn }}"
}'
;
Starts an application that is currently stopped.
EXEC aws.m2.applications.start_application
@application_id='{{ application_id }}' --required,
@region='{{ region }}' --required
;
Starts a batch job and returns the unique identifier of this execution of the batch job. The associated application must be running in order to start the batch job.
EXEC aws.m2.applications.start_batch_job
@application_id='{{ application_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"authSecretsManagerArn": "{{ authSecretsManagerArn }}",
"batchJobIdentifier": "{{ batchJobIdentifier }}",
"jobParams": "{{ jobParams }}"
}'
;
Stops a running application.
EXEC aws.m2.applications.stop_application
@application_id='{{ application_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"forceStop": {{ forceStop }}
}'
;