Amazon Pinpoint SMS Voice V2

2025/04/29 - Amazon Pinpoint SMS Voice V2 - 2 updated api methods

Changes  AWS End User Messaging has added MONITOR and FILTER functionality to SMS Protect.

GetProtectConfigurationCountryRuleSet (updated) Link ¶
Changes (response)
{'CountryRuleSet': {'ProtectStatus': {'FILTER', 'MONITOR'}}}

Retrieve the CountryRuleSet for the specified NumberCapability from a protect configuration.

See also: AWS API Documentation

Request Syntax

client.get_protect_configuration_country_rule_set(
    ProtectConfigurationId='string',
    NumberCapability='SMS'|'VOICE'|'MMS'
)
type ProtectConfigurationId:

string

param ProtectConfigurationId:

[REQUIRED]

The unique identifier for the protect configuration.

type NumberCapability:

string

param NumberCapability:

[REQUIRED]

The capability type to return the CountryRuleSet for. Valid values are SMS, VOICE, or MMS.

rtype:

dict

returns:

Response Syntax

{
    'ProtectConfigurationArn': 'string',
    'ProtectConfigurationId': 'string',
    'NumberCapability': 'SMS'|'VOICE'|'MMS',
    'CountryRuleSet': {
        'string': {
            'ProtectStatus': 'ALLOW'|'BLOCK'|'MONITOR'|'FILTER'
        }
    }
}

Response Structure

  • (dict) --

    • ProtectConfigurationArn (string) --

      The Amazon Resource Name (ARN) of the protect configuration.

    • ProtectConfigurationId (string) --

      The unique identifier for the protect configuration.

    • NumberCapability (string) --

      The capability type associated with the returned ProtectConfigurationCountryRuleSetInformation objects.

    • CountryRuleSet (dict) --

      A map of ProtectConfigurationCountryRuleSetInformation objects that contain the details for the requested NumberCapability. The Key is the two-letter ISO country code. For a list of supported ISO country codes, see Supported countries and regions (SMS channel) in the AWS End User Messaging SMS User Guide.

      • (string) --

        • (dict) --

          The types of statuses that can be used.

          • ProtectStatus (string) --

            The types of protection that can be used.

UpdateProtectConfigurationCountryRuleSet (updated) Link ¶
Changes (request, response)
Request
{'CountryRuleSetUpdates': {'ProtectStatus': {'FILTER', 'MONITOR'}}}
Response
{'CountryRuleSet': {'ProtectStatus': {'FILTER', 'MONITOR'}}}

Update a country rule set to ALLOW, BLOCK, MONITOR, or FILTER messages to be sent to the specified destination counties. You can update one or multiple countries at a time. The updates are only applied to the specified NumberCapability type.

See also: AWS API Documentation

Request Syntax

client.update_protect_configuration_country_rule_set(
    ProtectConfigurationId='string',
    NumberCapability='SMS'|'VOICE'|'MMS',
    CountryRuleSetUpdates={
        'string': {
            'ProtectStatus': 'ALLOW'|'BLOCK'|'MONITOR'|'FILTER'
        }
    }
)
type ProtectConfigurationId:

string

param ProtectConfigurationId:

[REQUIRED]

The unique identifier for the protect configuration.

type NumberCapability:

string

param NumberCapability:

[REQUIRED]

The number capability to apply the CountryRuleSetUpdates updates to.

type CountryRuleSetUpdates:

dict

param CountryRuleSetUpdates:

[REQUIRED]

A map of ProtectConfigurationCountryRuleSetInformation objects that contain the details for the requested NumberCapability. The Key is the two-letter ISO country code. For a list of supported ISO country codes, see Supported countries and regions (SMS channel) in the AWS End User Messaging SMS User Guide.

For example, to set the United States as allowed and Canada as blocked, the CountryRuleSetUpdates would be formatted as: "CountryRuleSetUpdates": { "US" : { "ProtectStatus": "ALLOW" } "CA" : { "ProtectStatus": "BLOCK" } }

  • (string) --

    • (dict) --

      The types of statuses that can be used.

      • ProtectStatus (string) -- [REQUIRED]

        The types of protection that can be used.

rtype:

dict

returns:

Response Syntax

{
    'ProtectConfigurationArn': 'string',
    'ProtectConfigurationId': 'string',
    'NumberCapability': 'SMS'|'VOICE'|'MMS',
    'CountryRuleSet': {
        'string': {
            'ProtectStatus': 'ALLOW'|'BLOCK'|'MONITOR'|'FILTER'
        }
    }
}

Response Structure

  • (dict) --

    • ProtectConfigurationArn (string) --

      The Amazon Resource Name (ARN) of the protect configuration.

    • ProtectConfigurationId (string) --

      The unique identifier for the protect configuration.

    • NumberCapability (string) --

      The number capability that was updated

    • CountryRuleSet (dict) --

      An array of ProtectConfigurationCountryRuleSetInformation containing the rules for the NumberCapability.

      • (string) --

        • (dict) --

          The types of statuses that can be used.

          • ProtectStatus (string) --

            The types of protection that can be used.