Skip to main content

instances

Creates, updates, deletes or gets an instance resource or lists instances in a region

Overview

Nameinstances
TypeResource
DescriptionResource Type definition for AWS::Connect::Instance
Idawscc.connect.instances

Fields

NameDatatypeDescription
idstringAn instanceId is automatically generated on creation and assigned as the unique identifier.
arnstringAn instanceArn is automatically generated on creation based on instanceId.
identity_management_typestringSpecifies the type of directory integration for new instance.
instance_aliasstringAlias of the new directory created as part of new instance creation.
created_timestringTimestamp of instance creation logged as part of instance creation.
service_rolestringService linked role created as part of instance creation.
instance_statusstringSpecifies the creation status of new instance.
directory_idstringExisting directoryId user wants to map to the new Connect instance.
attributesobjectThe attributes for the instance.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

For more information, see AWS::Connect::Instance.

Methods

NameResourceAccessible byRequired Params
create_resourceinstancesINSERTIdentityManagementType, Attributes, region
delete_resourceinstancesDELETEIdentifier, region
update_resourceinstancesUPDATEIdentifier, PatchDocument, region
list_resourcesinstances_list_onlySELECTregion
get_resourceinstancesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual instance.

SELECT
region,
id,
arn,
identity_management_type,
instance_alias,
created_time,
service_role,
instance_status,
directory_id,
attributes,
tags
FROM awscc.connect.instances
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new instance resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.connect.instances (
IdentityManagementType,
Attributes,
region
)
SELECT
'{{ identity_management_type }}',
'{{ attributes }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a instance resource, using stack-deploy.

/*+ update */
UPDATE awscc.connect.instances
SET PatchDocument = string('{{ {
"Attributes": attributes,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.connect.instances
WHERE
Identifier = '{{ arn }}' 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:

ParameterDescription
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 instances resource, the following permissions are required:

connect:CreateInstance,
connect:DescribeInstance,
connect:UpdateInstanceAttribute,
connect:TagResource,
ds:CheckAlias,
ds:CreateAlias,
ds:AuthorizeApplication,
ds:UnauthorizeApplication,
ds:CreateIdentityPoolDirectory,
ds:CreateDirectory,
ds:DescribeDirectories,
iam:CreateServiceLinkedRole,
iam:PutRolePolicy,
logs:CreateLogGroup