contact_methods
Creates, updates, deletes, gets or lists a contact_methods resource.
Overview
| Name | contact_methods |
| Type | Resource |
| Id | aws.lightsail.contact_methods |
Fields
The following fields are returned by SELECT queries:
- get_contact_methods
| Name | Datatype | Description |
|---|---|---|
contact_methods | array | An array of objects that describe the contact methods. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_contact_methods | select | region | Returns information about the configured contact methods. Specify a protocol in your request to return information about a specific contact method. A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each Amazon Web Services Region. However, SMS text messaging is not supported in some Amazon Web Services Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail. | |
create_contact_method | insert | region, protocol, contactEndpoint | Creates an email or SMS text message contact method. A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each Amazon Web Services Region. However, SMS text messaging is not supported in some Amazon Web Services Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail. The create contact method operation supports tag-based access control via request tags. For more information, see the Lightsail Developer Guide. | |
delete_contact_method | delete | region | Deletes a contact method. A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each Amazon Web Services Region. However, SMS text messaging is not supported in some Amazon Web Services Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail. | |
send_contact_method_verification | exec | region, protocol | Sends a verification request to an email contact method to ensure it's owned by the requester. SMS contact methods don't need to be verified. A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each Amazon Web Services Region. However, SMS text messaging is not supported in some Amazon Web Services Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail. A verification request is sent to the contact method when you initially create it. Use this action to send another verification request if a previous verification request was deleted, or has expired. Notifications are not sent to an email contact method until after it is verified, and confirmed as valid. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_contact_methods
Returns information about the configured contact methods. Specify a protocol in your request to return information about a specific contact method. A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each Amazon Web Services Region. However, SMS text messaging is not supported in some Amazon Web Services Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail.
SELECT
contact_methods
FROM aws.lightsail.contact_methods
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_contact_method
- Manifest
Creates an email or SMS text message contact method. A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each Amazon Web Services Region. However, SMS text messaging is not supported in some Amazon Web Services Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail. The create contact method operation supports tag-based access control via request tags. For more information, see the Lightsail Developer Guide.
INSERT INTO aws.lightsail.contact_methods (
protocol,
contactEndpoint,
tags,
region
)
SELECT
'{{ protocol }}' /* required */,
'{{ contactEndpoint }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
operations
;
# Description fields are for documentation purposes
- name: contact_methods
props:
- name: region
value: "{{ region }}"
description: Required parameter for the contact_methods resource.
- name: protocol
value: "{{ protocol }}"
description: |
The protocol of the contact method, such as Email or SMS (text messaging). The SMS protocol is supported only in the following Amazon Web Services Regions. US East (N. Virginia) (us-east-1) US West (Oregon) (us-west-2) Europe (Ireland) (eu-west-1) Asia Pacific (Tokyo) (ap-northeast-1) Asia Pacific (Singapore) (ap-southeast-1) Asia Pacific (Sydney) (ap-southeast-2) For a list of countries/regions where SMS text messages can be sent, and the latest Amazon Web Services Regions where SMS text messaging is supported, see Supported Regions and Countries in the Amazon SNS Developer Guide. For more information about notifications in Amazon Lightsail, see Notifications in Amazon Lightsail.
valid_values: ['Email', 'SMS']
- name: contactEndpoint
value: "{{ contactEndpoint }}"
description: |
The destination of the contact method, such as an email address or a mobile phone number. Use the E.164 format when specifying a mobile phone number. E.164 is a standard for the phone number structure used for international telecommunication. Phone numbers that follow this format can have a maximum of 15 digits, and they are prefixed with the plus character (+) and the country code. For example, a U.S. phone number in E.164 format would be specified as +1XXX5550100. For more information, see E.164 on Wikipedia.
- name: tags
description: |
The tag keys and optional values to add to the contact method during create. Use the TagResource action to tag a resource after it's created.
value:
- key: "{{ key }}"
value: "{{ value }}"
DELETE examples
- delete_contact_method
Deletes a contact method. A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each Amazon Web Services Region. However, SMS text messaging is not supported in some Amazon Web Services Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail.
DELETE FROM aws.lightsail.contact_methods
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- send_contact_method_verification
Sends a verification request to an email contact method to ensure it's owned by the requester. SMS contact methods don't need to be verified. A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each Amazon Web Services Region. However, SMS text messaging is not supported in some Amazon Web Services Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail. A verification request is sent to the contact method when you initially create it. Use this action to send another verification request if a previous verification request was deleted, or has expired. Notifications are not sent to an email contact method until after it is verified, and confirmed as valid.
EXEC aws.lightsail.contact_methods.send_contact_method_verification
@region='{{ region }}' --required
@@json=
'{
"protocol": "{{ protocol }}"
}'
;