application_instances
Creates, updates, deletes or gets an application_instance resource or lists application_instances in a region
Overview
| Name | application_instances |
| Type | Resource |
| Description | Creates an application instance and deploys it to a device. |
| Id | awscc.panorama.application_instances |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
default_runtime_context_device_name | string | |
status | string | |
default_runtime_context_device | string | The device's ID. |
description | string | A description for the application instance. |
application_instance_id_to_replace | string | The ID of an application instance to replace with the new instance. |
created_time | integer | |
health_status | string | |
manifest_overrides_payload | object | Setting overrides for the application manifest. |
runtime_role_arn | string | The ARN of a runtime role for the application instance. |
name | string | A name for the application instance. |
status_description | string | |
manifest_payload | object | The application's manifest document. |
arn | string | |
tags | array | Tags for the application instance. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region. |
For more information, see AWS::Panorama::ApplicationInstance.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | application_instances | INSERT | ManifestPayload, DefaultRuntimeContextDevice, region |
delete_resource | application_instances | DELETE | Identifier, region |
update_resource | application_instances | UPDATE | Identifier, PatchDocument, region |
list_resources | application_instances_list_only | SELECT | region |
get_resource | application_instances | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual application_instance.
SELECT
region,
default_runtime_context_device_name,
status,
default_runtime_context_device,
description,
application_instance_id_to_replace,
created_time,
health_status,
manifest_overrides_payload,
last_updated_time,
runtime_role_arn,
name,
application_instance_id,
status_description,
manifest_payload,
arn,
tags
FROM awscc.panorama.application_instances
WHERE
region = '{{ region }}' AND
Identifier = '{{ application_instance_id }}';
Lists all application_instances in a region.
SELECT
region,
application_instance_id
FROM awscc.panorama.application_instances_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new application_instance resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.panorama.application_instances (
DefaultRuntimeContextDevice,
ManifestPayload,
region
)
SELECT
'{{ default_runtime_context_device }}',
'{{ manifest_payload }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.panorama.application_instances (
DefaultRuntimeContextDevice,
Description,
ApplicationInstanceIdToReplace,
ManifestOverridesPayload,
RuntimeRoleArn,
Name,
ManifestPayload,
Tags,
region
)
SELECT
'{{ default_runtime_context_device }}',
'{{ description }}',
'{{ application_instance_id_to_replace }}',
'{{ manifest_overrides_payload }}',
'{{ runtime_role_arn }}',
'{{ name }}',
'{{ manifest_payload }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: application_instance
props:
- name: default_runtime_context_device
value: '{{ default_runtime_context_device }}'
- name: description
value: '{{ description }}'
- name: application_instance_id_to_replace
value: '{{ application_instance_id_to_replace }}'
- name: manifest_overrides_payload
value:
payload_data: '{{ payload_data }}'
- name: runtime_role_arn
value: '{{ runtime_role_arn }}'
- name: name
value: '{{ name }}'
- name: manifest_payload
value:
payload_data: '{{ payload_data }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a application_instance resource, using stack-deploy.
/*+ update */
UPDATE awscc.panorama.application_instances
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ application_instance_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.panorama.application_instances
WHERE
Identifier = '{{ application_instance_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the application_instances resource, the following permissions are required:
- Read
- Create
- Update
- List
- Delete
panorama:DescribeApplicationInstance,
panorama:DescribeApplicationInstanceDetails,
panorama:ListTagsForResource,
s3:ListObjects,
s3:GetObject,
s3:GetObjectVersion
panorama:CreateApplicationInstance,
panorama:ListTagsForResource,
panorama:TagResource,
panorama:DescribeApplicationInstance,
panorama:DescribeApplicationInstanceDetails,
iam:PassRole,
s3:ListBucket,
s3:PutObject,
s3:GetObject,
s3:GetObjectVersion
panorama:ListTagsForResource,
panorama:TagResource,
panorama:UntagResource,
panorama:DescribeApplicationInstance,
panorama:DescribeApplicationInstanceDetails,
s3:ListObjects,
s3:GetObject,
s3:GetObjectVersion
panorama:ListApplicationInstances,
s3:ListBucket,
s3:GetObject,
s3:GetObjectVersion
panorama:RemoveApplicationInstance,
panorama:DescribeApplicationInstance,
panorama:DescribeApplicationInstanceDetails,
s3:DeleteObject,
s3:DeleteObjectVersion,
s3:DeleteObjectVersionTagging,
s3:ListObjects,
s3:GetObject,
s3:GetObjectVersion