create_contact
(**kwargs)¶Contacts are either the contacts that Incident Manager engages during an incident or the escalation plans that Incident Manager uses to engage contacts in phases during an incident.
See also: AWS API Documentation
Request Syntax
response = client.create_contact(
Alias='string',
DisplayName='string',
Type='PERSONAL'|'ESCALATION',
Plan={
'Stages': [
{
'DurationInMinutes': 123,
'Targets': [
{
'ChannelTargetInfo': {
'ContactChannelId': 'string',
'RetryIntervalInMinutes': 123
},
'ContactTargetInfo': {
'ContactId': 'string',
'IsEssential': True|False
}
},
]
},
]
},
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
IdempotencyToken='string'
)
[REQUIRED]
The short name to quickly identify a contact or escalation plan. The contact alias must be unique and identifiable.
[REQUIRED]
To create an escalation plan use ESCALATION
. To create a contact use PERSONAL
.
[REQUIRED]
A list of stages. A contact has an engagement plan with stages that contact specified contact channels. An escalation plan uses stages that contact specified contacts.
A list of stages that the escalation plan or engagement plan uses to engage contacts and contact methods.
A set amount of time that an escalation plan or engagement plan engages the specified contacts or contact methods.
The time to wait until beginning the next stage. The duration can only be set to 0 if a target is specified.
The contacts or contact methods that the escalation plan or engagement plan is engaging.
The contact or contact channel that's being engaged.
Information about the contact channel Incident Manager is engaging.
The Amazon Resource Name (ARN) of the contact channel.
The number of minutes to wait to retry sending engagement in the case the engagement initially fails.
Information about the contact that Incident Manager is engaging.
The Amazon Resource Name (ARN) of the contact.
A Boolean value determining if the contact's acknowledgement stops the progress of stages in the plan.
Adds a tag to the target. You can only tag resources created in the first Region of your replication set.
A container of a key-value name pair.
Name of the object key.
Value of the tag.
A token ensuring that the operation is called only once with the specified details.
This field is autopopulated if not provided.
dict
Response Syntax
{
'ContactArn': 'string'
}
Response Structure
(dict) --
ContactArn (string) --
The Amazon Resource Name (ARN) of the created contact or escalation plan.
Exceptions
SSMContacts.Client.exceptions.AccessDeniedException
SSMContacts.Client.exceptions.ConflictException
SSMContacts.Client.exceptions.InternalServerException
SSMContacts.Client.exceptions.ServiceQuotaExceededException
SSMContacts.Client.exceptions.ThrottlingException
SSMContacts.Client.exceptions.ValidationException
SSMContacts.Client.exceptions.DataEncryptionException
Examples
The following create-contact example creates a contact in your environment with a blank plan. The plan can be updated after creating contact channels. Use the create-contact-channel operation with the output ARN of this command. After you have created contact channels for this contact use update-contact to update the plan.
response = client.create_contact(
Alias='akuam',
DisplayName='Akua Mansa',
Plan={
'Stages': [
],
},
Type='PERSONAL',
)
print(response)
Expected Output:
{
'ContactArn': 'arn:aws:ssm-contacts:us-east-2:111122223333:contact/akuam',
'ResponseMetadata': {
'...': '...',
},
}