contacts
Creates, updates, deletes or gets a contact
resource or lists contacts
in a region
Overview
Name | contacts |
Type | Resource |
Description | Resource Type definition for AWS::SSMContacts::Contact |
Id | aws.ssmcontacts.contacts |
Fields
Name | Datatype | Description |
---|---|---|
alias | string | Alias of the contact. String value with 20 to 256 characters. Only alphabetical, numeric characters, dash, or underscore allowed. |
display_name | string | Name of the contact. String value with 3 to 256 characters. Only alphabetical, space, numeric characters, dash, or underscore allowed. |
type | string | Contact type, which specify type of contact. Currently supported values: “PERSONAL”, “SHARED”, “OTHER“. |
plan | array | The stages that an escalation plan or engagement plan engages contacts and contact methods in. |
arn | string | The Amazon Resource Name (ARN) of the contact. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Alias, DisplayName, Type, 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 contacts
in a region.
SELECT
region,
alias,
display_name,
type,
plan,
arn
FROM aws.ssmcontacts.contacts
WHERE region = 'us-east-1';
Gets all properties from an individual contact
.
SELECT
region,
alias,
display_name,
type,
plan,
arn
FROM aws.ssmcontacts.contacts
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new contact
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ssmcontacts.contacts (
Alias,
DisplayName,
Type,
region
)
SELECT
'{{ Alias }}',
'{{ DisplayName }}',
'{{ Type }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ssmcontacts.contacts (
Alias,
DisplayName,
Type,
Plan,
region
)
SELECT
'{{ Alias }}',
'{{ DisplayName }}',
'{{ Type }}',
'{{ Plan }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: contact
props:
- name: Alias
value: '{{ Alias }}'
- name: DisplayName
value: '{{ DisplayName }}'
- name: Type
value: '{{ Type }}'
- name: Plan
value:
- DurationInMinutes: '{{ DurationInMinutes }}'
Targets:
- ContactTargetInfo:
ContactId: '{{ ContactId }}'
IsEssential: '{{ IsEssential }}'
ChannelTargetInfo:
ChannelId: '{{ ChannelId }}'
RetryIntervalInMinutes: '{{ RetryIntervalInMinutes }}'
DELETE
example
/*+ delete */
DELETE FROM aws.ssmcontacts.contacts
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the contacts
resource, the following permissions are required:
Create
ssm-contacts:CreateContact,
ssm-contacts:GetContact,
ssm-contacts:AssociateContact
Read
ssm-contacts:GetContact
Update
ssm-contacts:UpdateContact,
ssm-contacts:GetContact,
ssm-contacts:AssociateContact
Delete
ssm-contacts:DeleteContact,
ssm-contacts:GetContact,
ssm-contacts:AssociateContact
List
ssm-contacts:ListContacts