Skip to main content

instances

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

Overview

Nameinstances
TypeResource
Idaws.supplychain.instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
aws_account_idstringThe Amazon Web Services account ID that owns the instance. (pattern: <code>[0-9]{12}</code>)
created_timestring (date-time)The instance creation timestamp.
error_messagestringThe 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_descriptionstringThe Amazon Web Services Supply Chain instance description. (pattern: <code>([a-zA-Z0-9., _ʼ'%-]){0,500}</code>)
instance_idstringThe 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_namestringThe Amazon Web Services Supply Chain instance name. (pattern: <code>(?![ _ʼ'%-])[a-zA-Z0-9 _ʼ'%-]{0,62}[a-zA-Z0-9]</code>)
kms_key_arnstringThe 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_timestring (date-time)The instance last modified timestamp.
statestringThe state of the instance. (Initializing, Active, CreateFailed, DeleteFailed, Deleting, Deleted)
version_numbernumber (double)The version number of the instance.
web_app_dns_domainstringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_instanceselectinstance_id, regionEnables you to programmatically retrieve the information related to an Amazon Web Services Supply Chain instance ID.
list_instancesselectregionnextToken, maxResults, instanceNameFilter, instanceStateFilterList 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_instanceinsertregionEnables 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_instanceupdateinstance_id, regionEnables 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_instancedeleteinstance_id, regionEnables 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_eventexecinstance_id, region, eventType, data, eventGroupIdSend 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.

NameDatatypeDescription
instance_idstringThe AWS Supply Chain instance identifier.
regionstringAWS region (default: us-east-1)
instanceNameFilterarrayThe filter to ListInstances based on their names.
instanceStateFilterarrayThe filter to ListInstances based on their state.
maxResultsintegerSpecify the maximum number of instances to fetch in this paginated request.
nextTokenstringThe pagination token to fetch the next page of instances.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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