instances
Creates, updates, deletes, gets or lists an instances resource.
Overview
| Name | instances |
| Type | Resource |
| Id | aws.supplychain.instances |
Fields
The following fields are returned by SELECT queries:
- get_instance
- list_instances
| Name | Datatype | Description |
|---|---|---|
aws_account_id | string | The Amazon Web Services account ID that owns the instance. (pattern: <code>[0-9]{12}</code>) |
created_time | string (date-time) | The instance creation timestamp. |
error_message | string | The Amazon Web Services Supply Chain instance error message. If the instance results in an unhealthy state, customers need to check the error message, delete the current instance, and recreate a new one based on the mitigation from the error message. |
instance_description | string | The Amazon Web Services Supply Chain instance description. (pattern: <code>([a-zA-Z0-9., _ʼ'%-]){0,500}</code>) |
instance_id | string | The Amazon Web Services Supply Chain instance identifier. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>) |
instance_name | string | The Amazon Web Services Supply Chain instance name. (pattern: <code>(?![ _ʼ'%-])[a-zA-Z0-9 _ʼ'%-]{0,62}[a-zA-Z0-9]</code>) |
kms_key_arn | string | The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you optionally provided for encryption. If you did not provide anything here, AWS Supply Chain uses the Amazon Web Services owned KMS key and nothing is returned. (pattern: <code>arn:[a-z0-9][-.a-z0-9]{0,62}:kms:([a-z0-9][-.a-z0-9]{0,62})?:([a-z0-9][-.a-z0-9]{0,62})?:key/.{0,1019}</code>) |
last_modified_time | string (date-time) | The instance last modified timestamp. |
state | string | The state of the instance. (Initializing, Active, CreateFailed, DeleteFailed, Deleting, Deleted) |
version_number | number (double) | The version number of the instance. |
web_app_dns_domain | string | The WebApp DNS domain name of the instance. (pattern: <code>(?![-])[a-zA-Z0-9-]{1,62}[a-zA-Z0-9]</code>) |
| Name | Datatype | Description |
|---|---|---|
aws_account_id | string | The Amazon Web Services account ID that owns the instance. (pattern: <code>[0-9]{12}</code>) |
created_time | string (date-time) | The instance creation timestamp. |
error_message | string | The Amazon Web Services Supply Chain instance error message. If the instance results in an unhealthy state, customers need to check the error message, delete the current instance, and recreate a new one based on the mitigation from the error message. |
instance_description | string | The Amazon Web Services Supply Chain instance description. (pattern: <code>([a-zA-Z0-9., _ʼ'%-]){0,500}</code>) |
instance_id | string | The Amazon Web Services Supply Chain instance identifier. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>) |
instance_name | string | The Amazon Web Services Supply Chain instance name. (pattern: <code>(?![ _ʼ'%-])[a-zA-Z0-9 _ʼ'%-]{0,62}[a-zA-Z0-9]</code>) |
kms_key_arn | string | The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you optionally provided for encryption. If you did not provide anything here, AWS Supply Chain uses the Amazon Web Services owned KMS key and nothing is returned. (pattern: <code>arn:[a-z0-9][-.a-z0-9]{0,62}:kms:([a-z0-9][-.a-z0-9]{0,62})?:([a-z0-9][-.a-z0-9]{0,62})?:key/.{0,1019}</code>) |
last_modified_time | string (date-time) | The instance last modified timestamp. |
state | string | The state of the instance. (Initializing, Active, CreateFailed, DeleteFailed, Deleting, Deleted) |
version_number | number (double) | The version number of the instance. |
web_app_dns_domain | string | The WebApp DNS domain name of the instance. (pattern: <code>(?![-])[a-zA-Z0-9-]{1,62}[a-zA-Z0-9]</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_instance | select | instance_id, region | Enables you to programmatically retrieve the information related to an Amazon Web Services Supply Chain instance ID. | |
list_instances | select | region | nextToken, maxResults, instanceNameFilter, instanceStateFilter | List all Amazon Web Services Supply Chain instances for a specific account. Enables you to programmatically list all Amazon Web Services Supply Chain instances based on their account ID, instance name, and state of the instance (active or delete). |
create_instance | insert | region | Enables you to programmatically create an Amazon Web Services Supply Chain instance by applying KMS keys and relevant information associated with the API without using the Amazon Web Services console. This is an asynchronous operation. Upon receiving a CreateInstance request, Amazon Web Services Supply Chain immediately returns the instance resource, instance ID, and the initializing state while simultaneously creating all required Amazon Web Services resources for an instance creation. You can use GetInstance to check the status of the instance. If the instance results in an unhealthy state, you need to check the error message, delete the current instance, and recreate a new one based on the mitigation from the error message. | |
update_instance | update | instance_id, region | Enables you to programmatically update an Amazon Web Services Supply Chain instance description by providing all the relevant information such as account ID, instance ID and so on without using the AWS console. | |
delete_instance | delete | instance_id, region | Enables you to programmatically delete an Amazon Web Services Supply Chain instance by deleting the KMS keys and relevant information associated with the API without using the Amazon Web Services console. This is an asynchronous operation. Upon receiving a DeleteInstance request, Amazon Web Services Supply Chain immediately returns a response with the instance resource, delete state while cleaning up all Amazon Web Services resources created during the instance creation process. You can use the GetInstance action to check the instance status. | |
send_data_integration_event | exec | instance_id, region, eventType, data, eventGroupId | Send the data payload for the event with real-time data for analysis or monitoring. The real-time data events are stored in an Amazon Web Services service before being processed and stored in data lake. |
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 |
|---|---|---|
instance_id | string | The AWS Supply Chain instance identifier. |
region | string | AWS region (default: us-east-1) |
instanceNameFilter | array | The filter to ListInstances based on their names. |
instanceStateFilter | array | The filter to ListInstances based on their state. |
maxResults | integer | Specify the maximum number of instances to fetch in this paginated request. |
nextToken | string | The pagination token to fetch the next page of instances. |
SELECT examples
- get_instance
- list_instances
Enables you to programmatically retrieve the information related to an Amazon Web Services Supply Chain instance ID.
SELECT
aws_account_id,
created_time,
error_message,
instance_description,
instance_id,
instance_name,
kms_key_arn,
last_modified_time,
state,
version_number,
web_app_dns_domain
FROM aws.supplychain.instances
WHERE instance_id = '{{ instance_id }}' -- required
AND region = '{{ region }}' -- required
;
List all Amazon Web Services Supply Chain instances for a specific account. Enables you to programmatically list all Amazon Web Services Supply Chain instances based on their account ID, instance name, and state of the instance (active or delete).
SELECT
aws_account_id,
created_time,
error_message,
instance_description,
instance_id,
instance_name,
kms_key_arn,
last_modified_time,
state,
version_number,
web_app_dns_domain
FROM aws.supplychain.instances
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND instanceNameFilter = '{{ instanceNameFilter }}'
AND instanceStateFilter = '{{ instanceStateFilter }}'
;
INSERT examples
- create_instance
- Manifest
Enables you to programmatically create an Amazon Web Services Supply Chain instance by applying KMS keys and relevant information associated with the API without using the Amazon Web Services console. This is an asynchronous operation. Upon receiving a CreateInstance request, Amazon Web Services Supply Chain immediately returns the instance resource, instance ID, and the initializing state while simultaneously creating all required Amazon Web Services resources for an instance creation. You can use GetInstance to check the status of the instance. If the instance results in an unhealthy state, you need to check the error message, delete the current instance, and recreate a new one based on the mitigation from the error message.
INSERT INTO aws.supplychain.instances (
instanceName,
instanceDescription,
kmsKeyArn,
webAppDnsDomain,
tags,
clientToken,
region
)
SELECT
'{{ instanceName }}',
'{{ instanceDescription }}',
'{{ kmsKeyArn }}',
'{{ webAppDnsDomain }}',
'{{ tags }}',
'{{ clientToken }}',
'{{ region }}'
RETURNING
instance
;
# Description fields are for documentation purposes
- name: instances
props:
- name: region
value: "{{ region }}"
description: Required parameter for the instances resource.
- name: instanceName
value: "{{ instanceName }}"
- name: instanceDescription
value: "{{ instanceDescription }}"
- name: kmsKeyArn
value: "{{ kmsKeyArn }}"
- name: webAppDnsDomain
value: "{{ webAppDnsDomain }}"
- name: tags
value: "{{ tags }}"
- name: clientToken
value: "{{ clientToken }}"
description: |
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
UPDATE examples
- update_instance
Enables you to programmatically update an Amazon Web Services Supply Chain instance description by providing all the relevant information such as account ID, instance ID and so on without using the AWS console.
UPDATE aws.supplychain.instances
SET
instanceName = '{{ instanceName }}',
instanceDescription = '{{ instanceDescription }}'
WHERE
instance_id = '{{ instance_id }}' --required
AND region = '{{ region }}' --required
RETURNING
instance;
DELETE examples
- delete_instance
Enables you to programmatically delete an Amazon Web Services Supply Chain instance by deleting the KMS keys and relevant information associated with the API without using the Amazon Web Services console. This is an asynchronous operation. Upon receiving a DeleteInstance request, Amazon Web Services Supply Chain immediately returns a response with the instance resource, delete state while cleaning up all Amazon Web Services resources created during the instance creation process. You can use the GetInstance action to check the instance status.
DELETE FROM aws.supplychain.instances
WHERE instance_id = '{{ instance_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- send_data_integration_event
Send the data payload for the event with real-time data for analysis or monitoring. The real-time data events are stored in an Amazon Web Services service before being processed and stored in data lake.
EXEC aws.supplychain.instances.send_data_integration_event
@instance_id='{{ instance_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"eventType": "{{ eventType }}",
"data": "{{ data }}",
"eventGroupId": "{{ eventGroupId }}",
"eventTimestamp": "{{ eventTimestamp }}",
"clientToken": "{{ clientToken }}",
"datasetTarget": "{{ datasetTarget }}"
}'
;