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 | awscc.ssmcontacts.contacts |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
tags | array | |
arn | string | The Amazon Resource Name (ARN) of the contact. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the contact. |
region | string | AWS region. |
For more information, see AWS::SSMContacts::Contact.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | contacts | INSERT | Alias, DisplayName, Type, region |
delete_resource | contacts | DELETE | Identifier, region |
update_resource | contacts | UPDATE | Identifier, PatchDocument, region |
list_resources | contacts_list_only | SELECT | region |
get_resource | contacts | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual contact.
SELECT
region,
alias,
display_name,
type,
plan,
tags,
arn
FROM awscc.ssmcontacts.contacts
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all contacts in a region.
SELECT
region,
arn
FROM awscc.ssmcontacts.contacts_list_only
WHERE
region = '{{ region }}';
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 awscc.ssmcontacts.contacts (
Alias,
DisplayName,
Type,
region
)
SELECT
'{{ alias }}',
'{{ display_name }}',
'{{ type }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.ssmcontacts.contacts (
Alias,
DisplayName,
Type,
Plan,
Tags,
region
)
SELECT
'{{ alias }}',
'{{ display_name }}',
'{{ type }}',
'{{ plan }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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: display_name
value: '{{ display_name }}'
- name: type
value: '{{ type }}'
- name: plan
value:
- duration_in_minutes: '{{ duration_in_minutes }}'
targets:
- contact_target_info:
contact_id: '{{ contact_id }}'
is_essential: '{{ is_essential }}'
channel_target_info:
channel_id: '{{ channel_id }}'
retry_interval_in_minutes: '{{ retry_interval_in_minutes }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a contact resource, using stack-deploy.
/*+ update */
UPDATE awscc.ssmcontacts.contacts
SET PatchDocument = string('{{ {
"DisplayName": display_name,
"Plan": plan,
"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.ssmcontacts.contacts
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:
| Parameter | Description |
|---|---|
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 contacts resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
ssm-contacts:CreateContact,
ssm-contacts:GetContact,
ssm-contacts:AssociateContact,
ssm-contacts:TagResource,
ssm-contacts:ListTagsForResource
ssm-contacts:GetContact,
ssm-contacts:ListTagsForResource
ssm-contacts:UpdateContact,
ssm-contacts:GetContact,
ssm-contacts:AssociateContact,
ssm-contacts:TagResource,
ssm-contacts:UntagResource,
ssm-contacts:ListTagsForResource
ssm-contacts:DeleteContact,
ssm-contacts:GetContact,
ssm-contacts:AssociateContact
ssm-contacts:ListContacts,
ssm-contacts:ListTagsForResource