Skip to main content

pools

Creates, updates, deletes, gets or lists a pools resource.

Overview

Namepools
TypeResource
Idaws.pinpoint_sms_voice_v2.pools

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_timestampstring (date-time)The time when the pool was created, in UNIX epoch time format.
deletion_protection_enabledbooleanWhen set to true the pool can't be deleted.
message_typestringThe type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive. (TRANSACTIONAL, PROMOTIONAL)
opt_out_list_namestringThe name of the OptOutList associated with the pool. (pattern: <code>[A-Za-z0-9_-]+</code>)
pool_arnstringThe Amazon Resource Name (ARN) for the pool.
pool_idstringThe unique identifier for the pool.
self_managed_opt_outs_enabledbooleanWhen set to false, an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, End User Messaging SMS automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests. For more information see Self-managed opt-outs
shared_routes_enabledbooleanAllows you to enable shared routes on your pool. By default, this is set to False. If you set this value to True, your messages are sent using phone numbers or sender IDs (depending on the country) that are shared with other users. In some countries, such as the United States, senders aren't allowed to use shared routes and must use a dedicated phone number or short code.
statusstringThe current status of the pool. (CREATING, ACTIVE, DELETING)
two_way_channel_arnstringThe Amazon Resource Name (ARN) of the two way channel. (pattern: <code>\S+</code>)
two_way_channel_rolestringAn optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages. (pattern: <code>arn:\S+</code>)
two_way_enabledbooleanWhen set to true you can receive incoming text messages from your end recipients using the TwoWayChannelArn.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_poolsselectregionRetrieves the specified pools or all pools associated with your Amazon Web Services account. If you specify pool IDs, the output includes information for only the specified pools. If you specify filters, the output includes information for only those pools that meet the filter criteria. If you don't specify pool IDs or filters, the output includes information for all pools. If you specify a pool ID that isn't valid, an error is returned. A pool is a collection of phone numbers and SenderIds. A pool can include one or more phone numbers and SenderIds that are associated with your Amazon Web Services account.
create_poolinsertregion, OriginationIdentity, MessageTypeCreates a new pool and associates the specified origination identity to the pool. A pool can include one or more phone numbers and SenderIds that are associated with your Amazon Web Services account. The new pool inherits its configuration from the specified origination identity. This includes keywords, message type, opt-out list, two-way configuration, and self-managed opt-out configuration. Deletion protection isn't inherited from the origination identity and defaults to false. If the origination identity is a phone number and is already associated with another pool, an error is returned. A sender ID can be associated with multiple pools.
associate_origination_identityupdateregion, PoolId, OriginationIdentityAssociates the specified origination identity with a pool. If the origination identity is a phone number and is already associated with another pool, an error is returned. A sender ID can be associated with multiple pools. If the origination identity configuration doesn't match the pool's configuration, an error is returned.
update_poolupdateregion, PoolIdUpdates the configuration of an existing pool. You can update the opt-out list, enable or disable two-way messaging, change the TwoWayChannelArn, enable or disable self-managed opt-outs, enable or disable deletion protection, and enable or disable shared routes.
delete_pooldeleteregionDeletes an existing pool. Deleting a pool disassociates all origination identities from that pool. If the pool status isn't active or if deletion protection is enabled, an error is returned. A pool is a collection of phone numbers and SenderIds. A pool can include one or more phone numbers and SenderIds that are associated with your Amazon Web Services account.
disassociate_origination_identityexecregion, PoolId, OriginationIdentityRemoves the specified origination identity from an existing pool. If the origination identity isn't associated with the specified pool, an error is returned.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves the specified pools or all pools associated with your Amazon Web Services account. If you specify pool IDs, the output includes information for only the specified pools. If you specify filters, the output includes information for only those pools that meet the filter criteria. If you don't specify pool IDs or filters, the output includes information for all pools. If you specify a pool ID that isn't valid, an error is returned. A pool is a collection of phone numbers and SenderIds. A pool can include one or more phone numbers and SenderIds that are associated with your Amazon Web Services account.

SELECT
created_timestamp,
deletion_protection_enabled,
message_type,
opt_out_list_name,
pool_arn,
pool_id,
self_managed_opt_outs_enabled,
shared_routes_enabled,
status,
two_way_channel_arn,
two_way_channel_role,
two_way_enabled
FROM aws.pinpoint_sms_voice_v2.pools
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new pool and associates the specified origination identity to the pool. A pool can include one or more phone numbers and SenderIds that are associated with your Amazon Web Services account. The new pool inherits its configuration from the specified origination identity. This includes keywords, message type, opt-out list, two-way configuration, and self-managed opt-out configuration. Deletion protection isn't inherited from the origination identity and defaults to false. If the origination identity is a phone number and is already associated with another pool, an error is returned. A sender ID can be associated with multiple pools.

INSERT INTO aws.pinpoint_sms_voice_v2.pools (
OriginationIdentity,
IsoCountryCode,
MessageType,
DeletionProtectionEnabled,
Tags,
ClientToken,
region
)
SELECT
'{{ OriginationIdentity }}' /* required */,
'{{ IsoCountryCode }}',
'{{ MessageType }}' /* required */,
{{ DeletionProtectionEnabled }},
'{{ Tags }}',
'{{ ClientToken }}',
'{{ region }}'
RETURNING
created_timestamp,
deletion_protection_enabled,
message_type,
opt_out_list_name,
pool_arn,
pool_id,
self_managed_opt_outs_enabled,
shared_routes_enabled,
status,
tags,
two_way_channel_arn,
two_way_channel_role,
two_way_enabled
;

UPDATE examples

Associates the specified origination identity with a pool. If the origination identity is a phone number and is already associated with another pool, an error is returned. A sender ID can be associated with multiple pools. If the origination identity configuration doesn't match the pool's configuration, an error is returned.

UPDATE aws.pinpoint_sms_voice_v2.pools
SET
PoolId = '{{ PoolId }}',
OriginationIdentity = '{{ OriginationIdentity }}',
IsoCountryCode = '{{ IsoCountryCode }}',
ClientToken = '{{ ClientToken }}'
WHERE
region = '{{ region }}' --required
AND PoolId = '{{ PoolId }}' --required
AND OriginationIdentity = '{{ OriginationIdentity }}' --required
RETURNING
iso_country_code,
origination_identity,
origination_identity_arn,
pool_arn,
pool_id;

DELETE examples

Deletes an existing pool. Deleting a pool disassociates all origination identities from that pool. If the pool status isn't active or if deletion protection is enabled, an error is returned. A pool is a collection of phone numbers and SenderIds. A pool can include one or more phone numbers and SenderIds that are associated with your Amazon Web Services account.

DELETE FROM aws.pinpoint_sms_voice_v2.pools
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Removes the specified origination identity from an existing pool. If the origination identity isn't associated with the specified pool, an error is returned.

EXEC aws.pinpoint_sms_voice_v2.pools.disassociate_origination_identity
@region='{{ region }}' --required
@@json=
'{
"PoolId": "{{ PoolId }}",
"OriginationIdentity": "{{ OriginationIdentity }}",
"IsoCountryCode": "{{ IsoCountryCode }}",
"ClientToken": "{{ ClientToken }}"
}'
;