instances
Creates, updates, deletes or gets an instance
resource or lists instances
in a region
Overview
Name | instances |
Type | Resource |
Description | Resource Type definition for AWS::Connect::Instance |
Id | aws.connect.instances |
Fields
Name | Datatype | Description |
---|---|---|
id | string | An instanceId is automatically generated on creation and assigned as the unique identifier. |
arn | string | An instanceArn is automatically generated on creation based on instanceId. |
identity_management_type | string | Specifies the type of directory integration for new instance. |
instance_alias | string | Alias of the new directory created as part of new instance creation. |
created_time | string | Timestamp of instance creation logged as part of instance creation. |
service_role | string | Service linked role created as part of instance creation. |
instance_status | string | Specifies the creation status of new instance. |
directory_id | string | Existing directoryId user wants to map to the new Connect instance. |
attributes | object | The attributes for the instance. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | IdentityManagementType, Attributes, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.connect.instances (
IdentityManagementType,
Attributes,
region
)
SELECT
'{{ IdentityManagementType }}',
'{{ Attributes }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.connect.instances (
IdentityManagementType,
InstanceAlias,
DirectoryId,
Attributes,
Tags,
region
)
SELECT
'{{ IdentityManagementType }}',
'{{ InstanceAlias }}',
'{{ DirectoryId }}',
'{{ Attributes }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: instance
props:
- name: IdentityManagementType
value: '{{ IdentityManagementType }}'
- name: InstanceAlias
value: '{{ InstanceAlias }}'
- name: DirectoryId
value: '{{ DirectoryId }}'
- name: Attributes
value:
InboundCalls: '{{ InboundCalls }}'
OutboundCalls: '{{ OutboundCalls }}'
ContactflowLogs: '{{ ContactflowLogs }}'
ContactLens: '{{ ContactLens }}'
AutoResolveBestVoices: '{{ AutoResolveBestVoices }}'
UseCustomTTSVoices: '{{ UseCustomTTSVoices }}'
EarlyMedia: '{{ EarlyMedia }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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