Skip to main content

applications

Creates, updates, deletes, gets or lists an applications resource.

Overview

Nameapplications
TypeResource
Idaws.m2.applications

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe unique identifier of the application. (pattern: <code>^[A-Za-z0-9][A-Za-z0-9_-]{1,59}$</code>)
application_arnstringThe 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_idstringThe identifier of the application. (pattern: <code>^\S{1,80}$</code>)
creation_timestring (date-time)The timestamp when this application was created.
deployed_versionobjectThe version of the application that is deployed.
descriptionstringThe description of the application.
engine_typestringThe type of the target platform for the application. (microfocus, bluage)
environment_idstringThe identifier of the runtime environment where you want to deploy the application. (pattern: <code>^\S{1,80}$</code>)
kms_key_idstringThe identifier of a customer managed key.
last_start_timestring (date-time)The timestamp when you last started the application. Null until the application runs for the first time.
latest_versionobjectThe latest version of the application.
listener_arnsarrayThe 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_portsarrayThe port associated with the network load balancer listener created in your Amazon Web Services account.
load_balancer_dns_namestringThe public DNS name of the load balancer created in your Amazon Web Services account. (pattern: <code>^\S{1,100}$</code>)
log_groupsarrayThe 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_arnstringThe 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>)
statusstringThe status of the application. (Creating, Created, Available, Ready, Starting, Running, Stopping, Stopped, Failed, Deleting, Deleting From Environment)
status_reasonstringThe reason for the reported status.
tagsobjectA list of tags associated with the application.
target_group_arnsarrayReturns the Amazon Resource Names (ARNs) of the target groups that are attached to the network load balancer.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_applicationselectapplication_id, regionDescribes the details of a specific application.
list_applicationsselectregionenvironmentId, maxResults, names, nextTokenLists 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_applicationinsertregion, definition, engineType, nameCreates a new application with given parameters. Requires an existing runtime environment and application definition file.
update_applicationupdateapplication_id, region, currentApplicationVersionUpdates an application and creates a new version.
delete_applicationdeleteapplication_id, regionDeletes a specific application. You cannot delete a running application.
cancel_batch_job_executionexecapplication_id, execution_id, regionCancels the running of a specific batch job execution.
start_applicationexecapplication_id, regionStarts an application that is currently stopped.
start_batch_jobexecapplication_id, region, batchJobIdentifierStarts 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_applicationexecapplication_id, regionStops 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.

NameDatatypeDescription
application_idstringThe unique identifier of the application you want to stop.
execution_idstringThe unique identifier of the batch job execution.
regionstringAWS region (default: us-east-1)
environmentIdstringThe unique identifier of the runtime environment where the applications are deployed.
maxResultsintegerThe maximum number of applications to return.
namesarrayThe names of the applications.
nextTokenstringA pagination token to control the number of applications displayed in the list.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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

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 }}"
}'
;