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
Idaws.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.

Methods

NameAccessible byRequired Params
create_resourceINSERTIdentityManagementType, Attributes, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all instances in a region.

SELECT
region,
id,
arn,
identity_management_type,
instance_alias,
created_time,
service_role,
instance_status,
directory_id,
attributes,
tags
FROM aws.connect.instances
WHERE region = 'us-east-1';

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 aws.connect.instances
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

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

/*+ create */
INSERT INTO aws.connect.instances (
IdentityManagementType,
Attributes,
region
)
SELECT
'{{ IdentityManagementType }}',
'{{ Attributes }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.connect.instances
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the instances resource, the following permissions are required:

Create

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

Read

connect:DescribeInstance,
connect:ListInstanceAttributes,
ds:DescribeDirectories

Update

connect:ListInstanceAttributes,
connect:UpdateInstanceAttribute,
iam:CreateServiceLinkedRole,
iam:PutRolePolicy,
connect:TagResource,
connect:UntagResource

Delete

connect:DeleteInstance,
connect:DescribeInstance,
connect:UntagResource,
ds:DeleteDirectory,
ds:UnauthorizeApplication,
ds:DescribeDirectories

List

connect:ListInstances,
connect:ListInstanceAttributes,
ds:DescribeDirectories