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 | awscc.connect.instances |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
arn | string | An instanceArn is automatically generated on creation based on instanceId. |
region | string | AWS region. |
For more information, see AWS::Connect::Instance.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | instances | INSERT | IdentityManagementType, Attributes, region |
delete_resource | instances | DELETE | Identifier, region |
update_resource | instances | UPDATE | Identifier, PatchDocument, region |
list_resources | instances_list_only | SELECT | region |
get_resource | instances | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all instances in a region.
SELECT
region,
arn
FROM awscc.connect.instances_list_only
WHERE
region = 'us-east-1';
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 awscc.connect.instances (
IdentityManagementType,
Attributes,
region
)
SELECT
'{{ identity_management_type }}',
'{{ attributes }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.connect.instances (
IdentityManagementType,
InstanceAlias,
DirectoryId,
Attributes,
Tags,
region
)
SELECT
'{{ identity_management_type }}',
'{{ instance_alias }}',
'{{ directory_id }}',
'{{ 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: identity_management_type
value: '{{ identity_management_type }}'
- name: instance_alias
value: '{{ instance_alias }}'
- name: directory_id
value: '{{ directory_id }}'
- name: attributes
value:
inbound_calls: '{{ inbound_calls }}'
outbound_calls: '{{ outbound_calls }}'
contactflow_logs: '{{ contactflow_logs }}'
contact_lens: '{{ contact_lens }}'
auto_resolve_best_voices: '{{ auto_resolve_best_voices }}'
use_custom_tt_svoices: '{{ use_custom_tt_svoices }}'
early_media: '{{ early_media }}'
multi_party_conference: '{{ multi_party_conference }}'
high_volume_out_bound: '{{ high_volume_out_bound }}'
enhanced_contact_monitoring: '{{ enhanced_contact_monitoring }}'
enhanced_chat_monitoring: '{{ enhanced_chat_monitoring }}'
multi_party_chat_conference: '{{ multi_party_chat_conference }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.connect.instances
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the instances resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
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
connect:DescribeInstance,
connect:ListInstanceAttributes,
ds:DescribeDirectories
connect:ListInstanceAttributes,
connect:UpdateInstanceAttribute,
ds:DescribeDirectories,
iam:CreateServiceLinkedRole,
iam:DeleteRolePolicy,
logs:CreateLogGroup,
iam:PutRolePolicy,
connect:TagResource,
connect:UntagResource
connect:DeleteInstance,
connect:DescribeInstance,
connect:UntagResource,
ds:DeleteDirectory,
ds:UnauthorizeApplication,
ds:DescribeDirectories
connect:ListInstances,
connect:ListInstanceAttributes,
ds:DescribeDirectories