PinpointSMSVoiceV2 / Client / create_pool

create_pool#

PinpointSMSVoiceV2.Client.create_pool(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.create_pool(
    OriginationIdentity='string',
    IsoCountryCode='string',
    MessageType='TRANSACTIONAL'|'PROMOTIONAL',
    DeletionProtectionEnabled=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ClientToken='string'
)
Parameters:
  • OriginationIdentity (string) –

    [REQUIRED]

    The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use DescribePhoneNumbers to find the values for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used to get the values for SenderId and SenderIdArn.

  • IsoCountryCode (string) –

    [REQUIRED]

    The new two-character code, in ISO 3166-1 alpha-2 format, for the country or region of the new pool.

  • MessageType (string) –

    [REQUIRED]

    The 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.

  • DeletionProtectionEnabled (boolean) – By default this is set to false. When set to true the pool can’t be deleted. You can change this value using the UpdatePool action.

  • Tags (list) –

    An array of tags (key and value pairs) associated with the pool.

    • (dict) –

      The list of tags to be added to the specified topic.

      • Key (string) – [REQUIRED]

        The key identifier, or name, of the tag.

      • Value (string) – [REQUIRED]

        The string value associated with the key of the tag.

  • ClientToken (string) –

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, a randomly generated token is used for the request to ensure idempotency.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'PoolArn': 'string',
    'PoolId': 'string',
    'Status': 'CREATING'|'ACTIVE'|'DELETING',
    'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
    'TwoWayEnabled': True|False,
    'TwoWayChannelArn': 'string',
    'TwoWayChannelRole': 'string',
    'SelfManagedOptOutsEnabled': True|False,
    'OptOutListName': 'string',
    'SharedRoutesEnabled': True|False,
    'DeletionProtectionEnabled': True|False,
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'CreatedTimestamp': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • PoolArn (string) –

      The Amazon Resource Name (ARN) for the pool.

    • PoolId (string) –

      The unique identifier for the pool.

    • Status (string) –

      The current status of the pool.

      • CREATING: The pool is currently being created and isn’t yet available for use.

      • ACTIVE: The pool is active and available for use.

      • DELETING: The pool is being deleted.

    • MessageType (string) –

      The type of message for the pool to use.

    • TwoWayEnabled (boolean) –

      By default this is set to false. When set to true you can receive incoming text messages from your end recipients.

    • TwoWayChannelArn (string) –

      The Amazon Resource Name (ARN) of the two way channel.

    • TwoWayChannelRole (string) –

      An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.

    • SelfManagedOptOutsEnabled (boolean) –

      By default this is set to false. When an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, Amazon Pinpoint 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.

    • OptOutListName (string) –

      The name of the OptOutList associated with the pool.

    • SharedRoutesEnabled (boolean) –

      Indicates whether shared routes are enabled for the pool.

    • DeletionProtectionEnabled (boolean) –

      When set to true deletion protection is enabled. By default this is set to false.

    • Tags (list) –

      An array of tags (key and value pairs) associated with the pool.

      • (dict) –

        The list of tags to be added to the specified topic.

        • Key (string) –

          The key identifier, or name, of the tag.

        • Value (string) –

          The string value associated with the key of the tag.

    • CreatedTimestamp (datetime) –

      The time when the pool was created, in UNIX epoch time format.

Exceptions

  • PinpointSMSVoiceV2.Client.exceptions.ServiceQuotaExceededException

  • PinpointSMSVoiceV2.Client.exceptions.ThrottlingException

  • PinpointSMSVoiceV2.Client.exceptions.AccessDeniedException

  • PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException

  • PinpointSMSVoiceV2.Client.exceptions.ValidationException

  • PinpointSMSVoiceV2.Client.exceptions.ConflictException

  • PinpointSMSVoiceV2.Client.exceptions.InternalServerException