Class: Aws::PinpointSMSVoiceV2::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb

Overview

An API client for PinpointSMSVoiceV2. To construct a client, you need to configure a :region and :credentials.

client = Aws::PinpointSMSVoiceV2::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :secret_access_key (String)
  • :session_token (String)
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



358
359
360
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 358

def initialize(*args)
  super
end

Instance Method Details

#associate_origination_identity(params = {}) ⇒ Types::AssociateOriginationIdentityResult

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.

Examples:

Request syntax with placeholder values


resp = client.associate_origination_identity({
  pool_id: "PoolIdOrArn", # required
  origination_identity: "PhoneOrSenderIdOrArn", # required
  iso_country_code: "IsoCountryCode", # required
  client_token: "ClientToken",
})

Response structure


resp.pool_arn #=> String
resp.pool_id #=> String
resp.origination_identity_arn #=> String
resp.origination_identity #=> String
resp.iso_country_code #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pool_id (required, String)

    The pool to update with the new Identity. This value can be either the PoolId or PoolArn, and you can find these values using DescribePools.

  • :origination_identity (required, String)

    The origination identity to use, such as 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.

  • :iso_country_code (required, String)

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

  • :client_token (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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



426
427
428
429
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 426

def associate_origination_identity(params = {}, options = {})
  req = build_request(:associate_origination_identity, params)
  req.send_request(options)
end

#create_configuration_set(params = {}) ⇒ Types::CreateConfigurationSetResult

Creates a new configuration set. After you create the configuration set, you can add one or more event destinations to it.

A configuration set is a set of rules that you apply to the SMS and voice messages that you send.

When you send a message, you can optionally specify a single configuration set.

Examples:

Request syntax with placeholder values


resp = client.create_configuration_set({
  configuration_set_name: "ConfigurationSetName", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  client_token: "ClientToken",
})

Response structure


resp.configuration_set_arn #=> String
resp.configuration_set_name #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.created_timestamp #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :configuration_set_name (required, String)

    The name to use for the new configuration set.

  • :tags (Array<Types::Tag>)

    An array of key and value pair tags that's associated with the new configuration set.

  • :client_token (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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



489
490
491
492
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 489

def create_configuration_set(params = {}, options = {})
  req = build_request(:create_configuration_set, params)
  req.send_request(options)
end

#create_event_destination(params = {}) ⇒ Types::CreateEventDestinationResult

Creates a new event destination in a configuration set.

An event destination is a location where you send message events. The event options are Amazon CloudWatch, Amazon Kinesis Data Firehose, or Amazon SNS. For example, when a message is delivered successfully, you can send information about that event to an event destination, or send notifications to endpoints that are subscribed to an Amazon SNS topic.

Each configuration set can contain between 0 and 5 event destinations. Each event destination can contain a reference to a single destination, such as a CloudWatch or Kinesis Data Firehose destination.

Examples:

Request syntax with placeholder values


resp = client.create_event_destination({
  configuration_set_name: "ConfigurationSetNameOrArn", # required
  event_destination_name: "EventDestinationName", # required
  matching_event_types: ["ALL"], # required, accepts ALL, TEXT_ALL, TEXT_SENT, TEXT_PENDING, TEXT_QUEUED, TEXT_SUCCESSFUL, TEXT_DELIVERED, TEXT_INVALID, TEXT_INVALID_MESSAGE, TEXT_UNREACHABLE, TEXT_CARRIER_UNREACHABLE, TEXT_BLOCKED, TEXT_CARRIER_BLOCKED, TEXT_SPAM, TEXT_UNKNOWN, TEXT_TTL_EXPIRED, VOICE_ALL, VOICE_INITIATED, VOICE_RINGING, VOICE_ANSWERED, VOICE_COMPLETED, VOICE_BUSY, VOICE_NO_ANSWER, VOICE_FAILED, VOICE_TTL_EXPIRED
  cloud_watch_logs_destination: {
    iam_role_arn: "IamRoleArn", # required
    log_group_arn: "LogGroupArn", # required
  },
  kinesis_firehose_destination: {
    iam_role_arn: "IamRoleArn", # required
    delivery_stream_arn: "DeliveryStreamArn", # required
  },
  sns_destination: {
    topic_arn: "SnsTopicArn", # required
  },
  client_token: "ClientToken",
})

Response structure


resp.configuration_set_arn #=> String
resp.configuration_set_name #=> String
resp.event_destination.event_destination_name #=> String
resp.event_destination.enabled #=> Boolean
resp.event_destination.matching_event_types #=> Array
resp.event_destination.matching_event_types[0] #=> String, one of "ALL", "TEXT_ALL", "TEXT_SENT", "TEXT_PENDING", "TEXT_QUEUED", "TEXT_SUCCESSFUL", "TEXT_DELIVERED", "TEXT_INVALID", "TEXT_INVALID_MESSAGE", "TEXT_UNREACHABLE", "TEXT_CARRIER_UNREACHABLE", "TEXT_BLOCKED", "TEXT_CARRIER_BLOCKED", "TEXT_SPAM", "TEXT_UNKNOWN", "TEXT_TTL_EXPIRED", "VOICE_ALL", "VOICE_INITIATED", "VOICE_RINGING", "VOICE_ANSWERED", "VOICE_COMPLETED", "VOICE_BUSY", "VOICE_NO_ANSWER", "VOICE_FAILED", "VOICE_TTL_EXPIRED"
resp.event_destination.cloud_watch_logs_destination.iam_role_arn #=> String
resp.event_destination.cloud_watch_logs_destination.log_group_arn #=> String
resp.event_destination.kinesis_firehose_destination.iam_role_arn #=> String
resp.event_destination.kinesis_firehose_destination.delivery_stream_arn #=> String
resp.event_destination.sns_destination.topic_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :configuration_set_name (required, String)

    Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action.

  • :event_destination_name (required, String)

    The name that identifies the event destination.

  • :matching_event_types (required, Array<String>)

    An array of event types that determine which events to log. If "ALL" is used, then Amazon Pinpoint logs every event type.

  • :cloud_watch_logs_destination (Types::CloudWatchLogsDestination)

    An object that contains information about an event destination for logging to Amazon CloudWatch logs.

  • :kinesis_firehose_destination (Types::KinesisFirehoseDestination)

    An object that contains information about an event destination for logging to Amazon Kinesis Data Firehose.

  • :sns_destination (Types::SnsDestination)

    An object that contains information about an event destination for logging to Amazon SNS.

  • :client_token (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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



585
586
587
588
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 585

def create_event_destination(params = {}, options = {})
  req = build_request(:create_event_destination, params)
  req.send_request(options)
end

#create_opt_out_list(params = {}) ⇒ Types::CreateOptOutListResult

Creates a new opt-out list.

If the opt-out list name already exists, an Error is returned.

An opt-out list is a list of phone numbers that are opted out, meaning you can't send SMS or voice messages to them. If end user replies with the keyword "STOP," an entry for the phone number is added to the opt-out list. In addition to STOP, your recipients can use any supported opt-out keyword, such as CANCEL or OPTOUT. For a list of supported opt-out keywords, see SMS opt out in the Amazon Pinpoint User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_opt_out_list({
  opt_out_list_name: "OptOutListName", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  client_token: "ClientToken",
})

Response structure


resp.opt_out_list_arn #=> String
resp.opt_out_list_name #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.created_timestamp #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :opt_out_list_name (required, String)

    The name of the new OptOutList.

  • :tags (Array<Types::Tag>)

    An array of tags (key and value pairs) to associate with the new OptOutList.

  • :client_token (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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



655
656
657
658
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 655

def create_opt_out_list(params = {}, options = {})
  req = build_request(:create_opt_out_list, params)
  req.send_request(options)
end

#create_pool(params = {}) ⇒ Types::CreatePoolResult

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.

Examples:

Request syntax with placeholder values


resp = client.create_pool({
  origination_identity: "PhoneOrSenderIdOrArn", # required
  iso_country_code: "IsoCountryCode", # required
  message_type: "TRANSACTIONAL", # required, accepts TRANSACTIONAL, PROMOTIONAL
  deletion_protection_enabled: false,
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  client_token: "ClientToken",
})

Response structure


resp.pool_arn #=> String
resp.pool_id #=> String
resp.status #=> String, one of "CREATING", "ACTIVE", "DELETING"
resp.message_type #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"
resp.two_way_enabled #=> Boolean
resp.two_way_channel_arn #=> String
resp.self_managed_opt_outs_enabled #=> Boolean
resp.opt_out_list_name #=> String
resp.shared_routes_enabled #=> Boolean
resp.deletion_protection_enabled #=> Boolean
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.created_timestamp #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :origination_identity (required, String)

    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.

  • :iso_country_code (required, String)

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

  • :message_type (required, String)

    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.

  • :deletion_protection_enabled (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 (Array<Types::Tag>)

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

  • :client_token (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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



758
759
760
761
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 758

def create_pool(params = {}, options = {})
  req = build_request(:create_pool, params)
  req.send_request(options)
end

#delete_configuration_set(params = {}) ⇒ Types::DeleteConfigurationSetResult

Deletes an existing configuration set.

A configuration set is a set of rules that you apply to voice and SMS messages that you send. In a configuration set, you can specify a destination for specific types of events related to voice and SMS messages.

Examples:

Request syntax with placeholder values


resp = client.delete_configuration_set({
  configuration_set_name: "ConfigurationSetNameOrArn", # required
})

Response structure


resp.configuration_set_arn #=> String
resp.configuration_set_name #=> String
resp.event_destinations #=> Array
resp.event_destinations[0].event_destination_name #=> String
resp.event_destinations[0].enabled #=> Boolean
resp.event_destinations[0].matching_event_types #=> Array
resp.event_destinations[0].matching_event_types[0] #=> String, one of "ALL", "TEXT_ALL", "TEXT_SENT", "TEXT_PENDING", "TEXT_QUEUED", "TEXT_SUCCESSFUL", "TEXT_DELIVERED", "TEXT_INVALID", "TEXT_INVALID_MESSAGE", "TEXT_UNREACHABLE", "TEXT_CARRIER_UNREACHABLE", "TEXT_BLOCKED", "TEXT_CARRIER_BLOCKED", "TEXT_SPAM", "TEXT_UNKNOWN", "TEXT_TTL_EXPIRED", "VOICE_ALL", "VOICE_INITIATED", "VOICE_RINGING", "VOICE_ANSWERED", "VOICE_COMPLETED", "VOICE_BUSY", "VOICE_NO_ANSWER", "VOICE_FAILED", "VOICE_TTL_EXPIRED"
resp.event_destinations[0].cloud_watch_logs_destination.iam_role_arn #=> String
resp.event_destinations[0].cloud_watch_logs_destination.log_group_arn #=> String
resp.event_destinations[0].kinesis_firehose_destination.iam_role_arn #=> String
resp.event_destinations[0].kinesis_firehose_destination.delivery_stream_arn #=> String
resp.event_destinations[0].sns_destination.topic_arn #=> String
resp.default_message_type #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"
resp.default_sender_id #=> String
resp.created_timestamp #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :configuration_set_name (required, String)

    The name of the configuration set or the configuration set ARN that you want to delete. The ConfigurationSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action.

Returns:

See Also:



812
813
814
815
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 812

def delete_configuration_set(params = {}, options = {})
  req = build_request(:delete_configuration_set, params)
  req.send_request(options)
end

#delete_default_message_type(params = {}) ⇒ Types::DeleteDefaultMessageTypeResult

Deletes an existing default message type on a configuration set.

A message type is a type of messages that you plan to send. If you send account-related messages or time-sensitive messages such as one-time passcodes, choose Transactional. If you plan to send messages that contain marketing material or other promotional content, choose Promotional. This setting applies to your entire Amazon Web Services account.

Examples:

Request syntax with placeholder values


resp = client.delete_default_message_type({
  configuration_set_name: "ConfigurationSetNameOrArn", # required
})

Response structure


resp.configuration_set_arn #=> String
resp.configuration_set_name #=> String
resp.message_type #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :configuration_set_name (required, String)

    The name of the configuration set or the configuration set Amazon Resource Name (ARN) to delete the default message type from. The ConfigurationSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action.

Returns:

See Also:



854
855
856
857
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 854

def delete_default_message_type(params = {}, options = {})
  req = build_request(:delete_default_message_type, params)
  req.send_request(options)
end

#delete_default_sender_id(params = {}) ⇒ Types::DeleteDefaultSenderIdResult

Deletes an existing default sender ID on a configuration set.

A default sender ID is the identity that appears on recipients' devices when they receive SMS messages. Support for sender ID capabilities varies by country or region.

Examples:

Request syntax with placeholder values


resp = client.delete_default_sender_id({
  configuration_set_name: "ConfigurationSetNameOrArn", # required
})

Response structure


resp.configuration_set_arn #=> String
resp.configuration_set_name #=> String
resp.sender_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :configuration_set_name (required, String)

    The name of the configuration set or the configuration set Amazon Resource Name (ARN) to delete the default sender ID from. The ConfigurationSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action.

Returns:

See Also:



893
894
895
896
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 893

def delete_default_sender_id(params = {}, options = {})
  req = build_request(:delete_default_sender_id, params)
  req.send_request(options)
end

#delete_event_destination(params = {}) ⇒ Types::DeleteEventDestinationResult

Deletes an existing event destination.

An event destination is a location where you send response information about the messages that you send. For example, when a message is delivered successfully, you can send information about that event to an Amazon CloudWatch destination, or send notifications to endpoints that are subscribed to an Amazon SNS topic.

Examples:

Request syntax with placeholder values


resp = client.delete_event_destination({
  configuration_set_name: "ConfigurationSetNameOrArn", # required
  event_destination_name: "EventDestinationName", # required
})

Response structure


resp.configuration_set_arn #=> String
resp.configuration_set_name #=> String
resp.event_destination.event_destination_name #=> String
resp.event_destination.enabled #=> Boolean
resp.event_destination.matching_event_types #=> Array
resp.event_destination.matching_event_types[0] #=> String, one of "ALL", "TEXT_ALL", "TEXT_SENT", "TEXT_PENDING", "TEXT_QUEUED", "TEXT_SUCCESSFUL", "TEXT_DELIVERED", "TEXT_INVALID", "TEXT_INVALID_MESSAGE", "TEXT_UNREACHABLE", "TEXT_CARRIER_UNREACHABLE", "TEXT_BLOCKED", "TEXT_CARRIER_BLOCKED", "TEXT_SPAM", "TEXT_UNKNOWN", "TEXT_TTL_EXPIRED", "VOICE_ALL", "VOICE_INITIATED", "VOICE_RINGING", "VOICE_ANSWERED", "VOICE_COMPLETED", "VOICE_BUSY", "VOICE_NO_ANSWER", "VOICE_FAILED", "VOICE_TTL_EXPIRED"
resp.event_destination.cloud_watch_logs_destination.iam_role_arn #=> String
resp.event_destination.cloud_watch_logs_destination.log_group_arn #=> String
resp.event_destination.kinesis_firehose_destination.iam_role_arn #=> String
resp.event_destination.kinesis_firehose_destination.delivery_stream_arn #=> String
resp.event_destination.sns_destination.topic_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :configuration_set_name (required, String)

    The name of the configuration set or the configuration set's Amazon Resource Name (ARN) to remove the event destination from. The ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action.

  • :event_destination_name (required, String)

    The name of the event destination to delete.

Returns:

See Also:



946
947
948
949
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 946

def delete_event_destination(params = {}, options = {})
  req = build_request(:delete_event_destination, params)
  req.send_request(options)
end

#delete_keyword(params = {}) ⇒ Types::DeleteKeywordResult

Deletes an existing keyword from an origination phone number or pool.

A keyword is a word that you can search for on a particular phone number or pool. It is also a specific word or phrase that an end user can send to your number to elicit a response, such as an informational message or a special offer. When your number receives a message that begins with a keyword, Amazon Pinpoint responds with a customizable message.

Keywords "HELP" and "STOP" can't be deleted or modified.

Examples:

Request syntax with placeholder values


resp = client.delete_keyword({
  origination_identity: "PhoneOrPoolIdOrArn", # required
  keyword: "Keyword", # required
})

Response structure


resp.origination_identity_arn #=> String
resp.origination_identity #=> String
resp.keyword #=> String
resp.keyword_message #=> String
resp.keyword_action #=> String, one of "AUTOMATIC_RESPONSE", "OPT_OUT", "OPT_IN"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :origination_identity (required, String)

    The origination identity to use such as a PhoneNumberId, PhoneNumberArn, PoolId or PoolArn. You can use DescribePhoneNumbers to find the values for PhoneNumberId and PhoneNumberArn and DescribePools to find the values of PoolId and PoolArn.

  • :keyword (required, String)

    The keyword to delete.

Returns:

See Also:



998
999
1000
1001
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 998

def delete_keyword(params = {}, options = {})
  req = build_request(:delete_keyword, params)
  req.send_request(options)
end

#delete_opt_out_list(params = {}) ⇒ Types::DeleteOptOutListResult

Deletes an existing opt-out list. All opted out phone numbers in the opt-out list are deleted.

If the specified opt-out list name doesn't exist or is in-use by an origination phone number or pool, an Error is returned.

Examples:

Request syntax with placeholder values


resp = client.delete_opt_out_list({
  opt_out_list_name: "OptOutListNameOrArn", # required
})

Response structure


resp.opt_out_list_arn #=> String
resp.opt_out_list_name #=> String
resp.created_timestamp #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :opt_out_list_name (required, String)

    The OptOutListName or OptOutListArn of the OptOutList to delete. You can use DescribeOptOutLists to find the values for OptOutListName and OptOutListArn.

Returns:

See Also:



1036
1037
1038
1039
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1036

def delete_opt_out_list(params = {}, options = {})
  req = build_request(:delete_opt_out_list, params)
  req.send_request(options)
end

#delete_opted_out_number(params = {}) ⇒ Types::DeleteOptedOutNumberResult

Deletes an existing opted out destination phone number from the specified opt-out list.

Each destination phone number can only be deleted once every 30 days.

If the specified destination phone number doesn't exist or if the opt-out list doesn't exist, an Error is returned.

Examples:

Request syntax with placeholder values


resp = client.delete_opted_out_number({
  opt_out_list_name: "OptOutListNameOrArn", # required
  opted_out_number: "PhoneNumber", # required
})

Response structure


resp.opt_out_list_arn #=> String
resp.opt_out_list_name #=> String
resp.opted_out_number #=> String
resp.opted_out_timestamp #=> Time
resp.end_user_opted_out #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :opt_out_list_name (required, String)

    The OptOutListName or OptOutListArn to remove the phone number from.

  • :opted_out_number (required, String)

    The phone number, in E.164 format, to remove from the OptOutList.

Returns:

See Also:



1082
1083
1084
1085
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1082

def delete_opted_out_number(params = {}, options = {})
  req = build_request(:delete_opted_out_number, params)
  req.send_request(options)
end

#delete_pool(params = {}) ⇒ Types::DeletePoolResult

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.

Examples:

Request syntax with placeholder values


resp = client.delete_pool({
  pool_id: "PoolIdOrArn", # required
})

Response structure


resp.pool_arn #=> String
resp.pool_id #=> String
resp.status #=> String, one of "CREATING", "ACTIVE", "DELETING"
resp.message_type #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"
resp.two_way_enabled #=> Boolean
resp.two_way_channel_arn #=> String
resp.self_managed_opt_outs_enabled #=> Boolean
resp.opt_out_list_name #=> String
resp.shared_routes_enabled #=> Boolean
resp.created_timestamp #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pool_id (required, String)

    The PoolId or PoolArn of the pool to delete. You can use DescribePools to find the values for PoolId and PoolArn .

Returns:

See Also:



1137
1138
1139
1140
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1137

def delete_pool(params = {}, options = {})
  req = build_request(:delete_pool, params)
  req.send_request(options)
end

#delete_text_message_spend_limit_override(params = {}) ⇒ Types::DeleteTextMessageSpendLimitOverrideResult

Deletes an account-level monthly spending limit override for sending text messages. Deleting a spend limit override will set the EnforcedLimit to equal the MaxLimit, which is controlled by Amazon Web Services. For more information on spend limits (quotas) see Amazon Pinpoint quotas in the Amazon Pinpoint Developer Guide.

Examples:

Response structure


resp.monthly_limit #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Returns:

See Also:



1164
1165
1166
1167
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1164

def delete_text_message_spend_limit_override(params = {}, options = {})
  req = build_request(:delete_text_message_spend_limit_override, params)
  req.send_request(options)
end

#delete_voice_message_spend_limit_override(params = {}) ⇒ Types::DeleteVoiceMessageSpendLimitOverrideResult

Deletes an account level monthly spend limit override for sending voice messages. Deleting a spend limit override sets the EnforcedLimit equal to the MaxLimit, which is controlled by Amazon Web Services. For more information on spending limits (quotas) see Amazon Pinpoint quotas in the Amazon Pinpoint Developer Guide.

Examples:

Response structure


resp.monthly_limit #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Returns:

See Also:



1191
1192
1193
1194
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1191

def delete_voice_message_spend_limit_override(params = {}, options = {})
  req = build_request(:delete_voice_message_spend_limit_override, params)
  req.send_request(options)
end

#describe_account_attributes(params = {}) ⇒ Types::DescribeAccountAttributesResult

Describes attributes of your Amazon Web Services account. The supported account attributes include account tier, which indicates whether your account is in the sandbox or production environment. When you're ready to move your account out of the sandbox, create an Amazon Web Services Support case for a service limit increase request.

New Amazon Pinpoint accounts are placed into an SMS or voice sandbox. The sandbox protects both Amazon Web Services end recipients and SMS or voice recipients from fraud and abuse.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp. #=> Array
resp.[0].name #=> String, one of "ACCOUNT_TIER"
resp.[0].value #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (String)

    The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

  • :max_results (Integer)

    The maximum number of results to return per each request.

Returns:

See Also:



1238
1239
1240
1241
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1238

def (params = {}, options = {})
  req = build_request(:describe_account_attributes, params)
  req.send_request(options)
end

#describe_account_limits(params = {}) ⇒ Types::DescribeAccountLimitsResult

Describes the current Amazon Pinpoint SMS Voice V2 resource quotas for your account. The description for a quota includes the quota name, current usage toward that quota, and the quota's maximum value.

When you establish an Amazon Web Services account, the account has initial quotas on the maximum number of configuration sets, opt-out lists, phone numbers, and pools that you can create in a given Region. For more information see Amazon Pinpoint quotas in the Amazon Pinpoint Developer Guide.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp. #=> Array
resp.[0].name #=> String, one of "PHONE_NUMBERS", "POOLS", "CONFIGURATION_SETS", "OPT_OUT_LISTS"
resp.[0].used #=> Integer
resp.[0].max #=> Integer
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (String)

    The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

  • :max_results (Integer)

    The maximum number of results to return per each request.

Returns:

See Also:



1290
1291
1292
1293
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1290

def (params = {}, options = {})
  req = build_request(:describe_account_limits, params)
  req.send_request(options)
end

#describe_configuration_sets(params = {}) ⇒ Types::DescribeConfigurationSetsResult

Describes the specified configuration sets or all in your account.

If you specify configuration set names, the output includes information for only the specified configuration sets. If you specify filters, the output includes information for only those configuration sets that meet the filter criteria. If you don't specify configuration set names or filters, the output includes information for all configuration sets.

If you specify a configuration set name that isn't valid, an error is returned.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_configuration_sets({
  configuration_set_names: ["ConfigurationSetNameOrArn"],
  filters: [
    {
      name: "event-destination-name", # required, accepts event-destination-name, matching-event-types, default-message-type, default-sender-id
      values: ["FilterValue"], # required
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.configuration_sets #=> Array
resp.configuration_sets[0].configuration_set_arn #=> String
resp.configuration_sets[0].configuration_set_name #=> String
resp.configuration_sets[0].event_destinations #=> Array
resp.configuration_sets[0].event_destinations[0].event_destination_name #=> String
resp.configuration_sets[0].event_destinations[0].enabled #=> Boolean
resp.configuration_sets[0].event_destinations[0].matching_event_types #=> Array
resp.configuration_sets[0].event_destinations[0].matching_event_types[0] #=> String, one of "ALL", "TEXT_ALL", "TEXT_SENT", "TEXT_PENDING", "TEXT_QUEUED", "TEXT_SUCCESSFUL", "TEXT_DELIVERED", "TEXT_INVALID", "TEXT_INVALID_MESSAGE", "TEXT_UNREACHABLE", "TEXT_CARRIER_UNREACHABLE", "TEXT_BLOCKED", "TEXT_CARRIER_BLOCKED", "TEXT_SPAM", "TEXT_UNKNOWN", "TEXT_TTL_EXPIRED", "VOICE_ALL", "VOICE_INITIATED", "VOICE_RINGING", "VOICE_ANSWERED", "VOICE_COMPLETED", "VOICE_BUSY", "VOICE_NO_ANSWER", "VOICE_FAILED", "VOICE_TTL_EXPIRED"
resp.configuration_sets[0].event_destinations[0].cloud_watch_logs_destination.iam_role_arn #=> String
resp.configuration_sets[0].event_destinations[0].cloud_watch_logs_destination.log_group_arn #=> String
resp.configuration_sets[0].event_destinations[0].kinesis_firehose_destination.iam_role_arn #=> String
resp.configuration_sets[0].event_destinations[0].kinesis_firehose_destination.delivery_stream_arn #=> String
resp.configuration_sets[0].event_destinations[0].sns_destination.topic_arn #=> String
resp.configuration_sets[0].default_message_type #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"
resp.configuration_sets[0].default_sender_id #=> String
resp.configuration_sets[0].created_timestamp #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :configuration_set_names (Array<String>)

    An array of strings. Each element can be either a ConfigurationSetName or ConfigurationSetArn.

  • :filters (Array<Types::ConfigurationSetFilter>)

    An array of filters to apply to the results that are returned.

  • :next_token (String)

    The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

  • :max_results (Integer)

    The maximum number of results to return per each request.

Returns:

See Also:



1366
1367
1368
1369
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1366

def describe_configuration_sets(params = {}, options = {})
  req = build_request(:describe_configuration_sets, params)
  req.send_request(options)
end

#describe_keywords(params = {}) ⇒ Types::DescribeKeywordsResult

Describes the specified keywords or all keywords on your origination phone number or pool.

A keyword is a word that you can search for on a particular phone number or pool. It is also a specific word or phrase that an end user can send to your number to elicit a response, such as an informational message or a special offer. When your number receives a message that begins with a keyword, Amazon Pinpoint responds with a customizable message.

If you specify a keyword that isn't valid, an Error is returned.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_keywords({
  origination_identity: "PhoneOrPoolIdOrArn", # required
  keywords: ["Keyword"],
  filters: [
    {
      name: "keyword-action", # required, accepts keyword-action
      values: ["FilterValue"], # required
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.origination_identity_arn #=> String
resp.origination_identity #=> String
resp.keywords #=> Array
resp.keywords[0].keyword #=> String
resp.keywords[0].keyword_message #=> String
resp.keywords[0].keyword_action #=> String, one of "AUTOMATIC_RESPONSE", "OPT_OUT", "OPT_IN"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :origination_identity (required, String)

    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.

  • :keywords (Array<String>)

    An array of keywords to search for.

  • :filters (Array<Types::KeywordFilter>)

    An array of keyword filters to filter the results.

  • :next_token (String)

    The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

  • :max_results (Integer)

    The maximum number of results to return per each request.

Returns:

See Also:



1441
1442
1443
1444
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1441

def describe_keywords(params = {}, options = {})
  req = build_request(:describe_keywords, params)
  req.send_request(options)
end

#describe_opt_out_lists(params = {}) ⇒ Types::DescribeOptOutListsResult

Describes the specified opt-out list or all opt-out lists in your account.

If you specify opt-out list names, the output includes information for only the specified opt-out lists. Opt-out lists include only those that meet the filter criteria. If you don't specify opt-out list names or filters, the output includes information for all opt-out lists.

If you specify an opt-out list name that isn't valid, an Error is returned.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_opt_out_lists({
  opt_out_list_names: ["OptOutListNameOrArn"],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.opt_out_lists #=> Array
resp.opt_out_lists[0].opt_out_list_arn #=> String
resp.opt_out_lists[0].opt_out_list_name #=> String
resp.opt_out_lists[0].created_timestamp #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :opt_out_list_names (Array<String>)

    The OptOutLists to show the details of. This is an array of strings that can be either the OptOutListName or OptOutListArn.

  • :next_token (String)

    The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

  • :max_results (Integer)

    The maximum number of results to return per each request.

Returns:

See Also:



1496
1497
1498
1499
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1496

def describe_opt_out_lists(params = {}, options = {})
  req = build_request(:describe_opt_out_lists, params)
  req.send_request(options)
end

#describe_opted_out_numbers(params = {}) ⇒ Types::DescribeOptedOutNumbersResult

Describes the specified opted out destination numbers or all opted out destination numbers in an opt-out list.

If you specify opted out numbers, the output includes information for only the specified opted out numbers. If you specify filters, the output includes information for only those opted out numbers that meet the filter criteria. If you don't specify opted out numbers or filters, the output includes information for all opted out destination numbers in your opt-out list.

If you specify an opted out number that isn't valid, an Error is returned.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_opted_out_numbers({
  opt_out_list_name: "OptOutListNameOrArn", # required
  opted_out_numbers: ["PhoneNumber"],
  filters: [
    {
      name: "end-user-opted-out", # required, accepts end-user-opted-out
      values: ["FilterValue"], # required
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.opt_out_list_arn #=> String
resp.opt_out_list_name #=> String
resp.opted_out_numbers #=> Array
resp.opted_out_numbers[0].opted_out_number #=> String
resp.opted_out_numbers[0].opted_out_timestamp #=> Time
resp.opted_out_numbers[0].end_user_opted_out #=> Boolean
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :opt_out_list_name (required, String)

    The OptOutListName or OptOutListArn of the OptOutList. You can use DescribeOptOutLists to find the values for OptOutListName and OptOutListArn.

  • :opted_out_numbers (Array<String>)

    An array of phone numbers to search for in the OptOutList.

  • :filters (Array<Types::OptedOutFilter>)

    An array of OptedOutFilter objects to filter the results on.

  • :next_token (String)

    The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

  • :max_results (Integer)

    The maximum number of results to return per each request.

Returns:

See Also:



1570
1571
1572
1573
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1570

def describe_opted_out_numbers(params = {}, options = {})
  req = build_request(:describe_opted_out_numbers, params)
  req.send_request(options)
end

#describe_phone_numbers(params = {}) ⇒ Types::DescribePhoneNumbersResult

Describes the specified origination phone number, or all the phone numbers in your account.

If you specify phone number IDs, the output includes information for only the specified phone numbers. If you specify filters, the output includes information for only those phone numbers that meet the filter criteria. If you don't specify phone number IDs or filters, the output includes information for all phone numbers.

If you specify a phone number ID that isn't valid, an Error is returned.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_phone_numbers({
  phone_number_ids: ["PhoneNumberIdOrArn"],
  filters: [
    {
      name: "status", # required, accepts status, iso-country-code, message-type, number-capability, number-type, two-way-enabled, self-managed-opt-outs-enabled, opt-out-list-name, deletion-protection-enabled
      values: ["FilterValue"], # required
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.phone_numbers #=> Array
resp.phone_numbers[0].phone_number_arn #=> String
resp.phone_numbers[0].phone_number_id #=> String
resp.phone_numbers[0].phone_number #=> String
resp.phone_numbers[0].status #=> String, one of "PENDING", "ACTIVE", "ASSOCIATING", "DISASSOCIATING", "DELETED"
resp.phone_numbers[0].iso_country_code #=> String
resp.phone_numbers[0].message_type #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"
resp.phone_numbers[0].number_capabilities #=> Array
resp.phone_numbers[0].number_capabilities[0] #=> String, one of "SMS", "VOICE"
resp.phone_numbers[0].number_type #=> String, one of "SHORT_CODE", "LONG_CODE", "TOLL_FREE", "TEN_DLC"
resp.phone_numbers[0].monthly_leasing_price #=> String
resp.phone_numbers[0].two_way_enabled #=> Boolean
resp.phone_numbers[0].two_way_channel_arn #=> String
resp.phone_numbers[0].self_managed_opt_outs_enabled #=> Boolean
resp.phone_numbers[0].opt_out_list_name #=> String
resp.phone_numbers[0].deletion_protection_enabled #=> Boolean
resp.phone_numbers[0].pool_id #=> String
resp.phone_numbers[0].created_timestamp #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :phone_number_ids (Array<String>)

    The unique identifier of phone numbers to find information about. This is an array of strings that can be either the PhoneNumberId or PhoneNumberArn.

  • :filters (Array<Types::PhoneNumberFilter>)

    An array of PhoneNumberFilter objects to filter the results.

  • :next_token (String)

    The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

  • :max_results (Integer)

    The maximum number of results to return per each request.

Returns:

See Also:



1649
1650
1651
1652
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1649

def describe_phone_numbers(params = {}, options = {})
  req = build_request(:describe_phone_numbers, params)
  req.send_request(options)
end

#describe_pools(params = {}) ⇒ Types::DescribePoolsResult

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_pools({
  pool_ids: ["PoolIdOrArn"],
  filters: [
    {
      name: "status", # required, accepts status, message-type, two-way-enabled, self-managed-opt-outs-enabled, opt-out-list-name, shared-routes-enabled, deletion-protection-enabled
      values: ["FilterValue"], # required
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.pools #=> Array
resp.pools[0].pool_arn #=> String
resp.pools[0].pool_id #=> String
resp.pools[0].status #=> String, one of "CREATING", "ACTIVE", "DELETING"
resp.pools[0].message_type #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"
resp.pools[0].two_way_enabled #=> Boolean
resp.pools[0].two_way_channel_arn #=> String
resp.pools[0].self_managed_opt_outs_enabled #=> Boolean
resp.pools[0].opt_out_list_name #=> String
resp.pools[0].shared_routes_enabled #=> Boolean
resp.pools[0].deletion_protection_enabled #=> Boolean
resp.pools[0].created_timestamp #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pool_ids (Array<String>)

    The unique identifier of pools to find. This is an array of strings that can be either the PoolId or PoolArn.

  • :filters (Array<Types::PoolFilter>)

    An array of PoolFilter objects to filter the results.

  • :next_token (String)

    The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

  • :max_results (Integer)

    The maximum number of results to return per each request.

Returns:

See Also:



1724
1725
1726
1727
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1724

def describe_pools(params = {}, options = {})
  req = build_request(:describe_pools, params)
  req.send_request(options)
end

#describe_sender_ids(params = {}) ⇒ Types::DescribeSenderIdsResult

Describes the specified SenderIds or all SenderIds associated with your Amazon Web Services account.

If you specify SenderIds, the output includes information for only the specified SenderIds. If you specify filters, the output includes information for only those SenderIds that meet the filter criteria. If you don't specify SenderIds or filters, the output includes information for all SenderIds.

f you specify a sender ID that isn't valid, an Error is returned.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_sender_ids({
  sender_ids: [
    {
      sender_id: "SenderIdOrArn", # required
      iso_country_code: "IsoCountryCode", # required
    },
  ],
  filters: [
    {
      name: "sender-id", # required, accepts sender-id, iso-country-code, message-type
      values: ["FilterValue"], # required
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.sender_ids #=> Array
resp.sender_ids[0].sender_id_arn #=> String
resp.sender_ids[0].sender_id #=> String
resp.sender_ids[0].iso_country_code #=> String
resp.sender_ids[0].message_types #=> Array
resp.sender_ids[0].message_types[0] #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"
resp.sender_ids[0].monthly_leasing_price #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :sender_ids (Array<Types::SenderIdAndCountry>)

    An array of SenderIdAndCountry objects to search for.

  • :filters (Array<Types::SenderIdFilter>)

    An array of SenderIdFilter objects to filter the results.

  • :next_token (String)

    The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

  • :max_results (Integer)

    The maximum number of results to return per each request.

Returns:

See Also:



1794
1795
1796
1797
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1794

def describe_sender_ids(params = {}, options = {})
  req = build_request(:describe_sender_ids, params)
  req.send_request(options)
end

#describe_spend_limits(params = {}) ⇒ Types::DescribeSpendLimitsResult

Describes the current Amazon Pinpoint monthly spend limits for sending voice and text messages.

When you establish an Amazon Web Services account, the account has initial monthly spend limit in a given Region. For more information on increasing your monthly spend limit, see Requesting increases to your monthly SMS spending quota for Amazon Pinpoint in the Amazon Pinpoint User Guide.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_spend_limits({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.spend_limits #=> Array
resp.spend_limits[0].name #=> String, one of "TEXT_MESSAGE_MONTHLY_SPEND_LIMIT", "VOICE_MESSAGE_MONTHLY_SPEND_LIMIT"
resp.spend_limits[0].enforced_limit #=> Integer
resp.spend_limits[0].max_limit #=> Integer
resp.spend_limits[0].overridden #=> Boolean
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (String)

    The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

  • :max_results (Integer)

    The maximum number of results to return per each request.

Returns:

See Also:



1846
1847
1848
1849
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1846

def describe_spend_limits(params = {}, options = {})
  req = build_request(:describe_spend_limits, params)
  req.send_request(options)
end

#disassociate_origination_identity(params = {}) ⇒ Types::DisassociateOriginationIdentityResult

Removes the specified origination identity from an existing pool.

If the origination identity isn't associated with the specified pool, an Error is returned.

Examples:

Request syntax with placeholder values


resp = client.disassociate_origination_identity({
  pool_id: "PoolIdOrArn", # required
  origination_identity: "PhoneOrSenderIdOrArn", # required
  iso_country_code: "IsoCountryCode", # required
  client_token: "ClientToken",
})

Response structure


resp.pool_arn #=> String
resp.pool_id #=> String
resp.origination_identity_arn #=> String
resp.origination_identity #=> String
resp.iso_country_code #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pool_id (required, String)

    The unique identifier for the pool to disassociate with the origination identity. This value can be either the PoolId or PoolArn.

  • :origination_identity (required, String)

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

  • :iso_country_code (required, String)

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

  • :client_token (String)

    Unique, case-sensitive identifier 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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



1909
1910
1911
1912
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1909

def disassociate_origination_identity(params = {}, options = {})
  req = build_request(:disassociate_origination_identity, params)
  req.send_request(options)
end

#list_pool_origination_identities(params = {}) ⇒ Types::ListPoolOriginationIdentitiesResult

Lists all associated origination identities in your pool.

If you specify filters, the output includes information for only those origination identities that meet the filter criteria.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_pool_origination_identities({
  pool_id: "PoolIdOrArn", # required
  filters: [
    {
      name: "iso-country-code", # required, accepts iso-country-code, number-capability
      values: ["FilterValue"], # required
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.pool_arn #=> String
resp.pool_id #=> String
resp.origination_identities #=> Array
resp.origination_identities[0].origination_identity_arn #=> String
resp.origination_identities[0].origination_identity #=> String
resp.origination_identities[0].iso_country_code #=> String
resp.origination_identities[0].number_capabilities #=> Array
resp.origination_identities[0].number_capabilities[0] #=> String, one of "SMS", "VOICE"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pool_id (required, String)

    The unique identifier for the pool. This value can be either the PoolId or PoolArn.

  • :filters (Array<Types::PoolOriginationIdentitiesFilter>)

    An array of PoolOriginationIdentitiesFilter objects to filter the results..

  • :next_token (String)

    The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

  • :max_results (Integer)

    The maximum number of results to return per each request.

Returns:

See Also:



1973
1974
1975
1976
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 1973

def list_pool_origination_identities(params = {}, options = {})
  req = build_request(:list_pool_origination_identities, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResult

List all tags associated with a resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "AmazonResourceName", # required
})

Response structure


resp.resource_arn #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource to query for.

Returns:

See Also:



2005
2006
2007
2008
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2005

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#put_keyword(params = {}) ⇒ Types::PutKeywordResult

Creates or updates a keyword configuration on an origination phone number or pool.

A keyword is a word that you can search for on a particular phone number or pool. It is also a specific word or phrase that an end user can send to your number to elicit a response, such as an informational message or a special offer. When your number receives a message that begins with a keyword, Amazon Pinpoint responds with a customizable message.

If you specify a keyword that isn't valid, an Error is returned.

Examples:

Request syntax with placeholder values


resp = client.put_keyword({
  origination_identity: "PhoneOrPoolIdOrArn", # required
  keyword: "Keyword", # required
  keyword_message: "KeywordMessage", # required
  keyword_action: "AUTOMATIC_RESPONSE", # accepts AUTOMATIC_RESPONSE, OPT_OUT, OPT_IN
})

Response structure


resp.origination_identity_arn #=> String
resp.origination_identity #=> String
resp.keyword #=> String
resp.keyword_message #=> String
resp.keyword_action #=> String, one of "AUTOMATIC_RESPONSE", "OPT_OUT", "OPT_IN"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :origination_identity (required, String)

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

  • :keyword (required, String)

    The new keyword to add.

  • :keyword_message (required, String)

    The message associated with the keyword.

    • AUTOMATIC_RESPONSE: A message is sent to the recipient.

    • OPT_OUT: Keeps the recipient from receiving future messages.

    • OPT_IN: The recipient wants to receive future messages.

  • :keyword_action (String)

    The action to perform for the new keyword when it is received.

Returns:

See Also:



2073
2074
2075
2076
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2073

def put_keyword(params = {}, options = {})
  req = build_request(:put_keyword, params)
  req.send_request(options)
end

#put_opted_out_number(params = {}) ⇒ Types::PutOptedOutNumberResult

Creates an opted out destination phone number in the opt-out list.

If the destination phone number isn't valid or if the specified opt-out list doesn't exist, an Error is returned.

Examples:

Request syntax with placeholder values


resp = client.put_opted_out_number({
  opt_out_list_name: "OptOutListNameOrArn", # required
  opted_out_number: "PhoneNumber", # required
})

Response structure


resp.opt_out_list_arn #=> String
resp.opt_out_list_name #=> String
resp.opted_out_number #=> String
resp.opted_out_timestamp #=> Time
resp.end_user_opted_out #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :opt_out_list_name (required, String)

    The OptOutListName or OptOutListArn to add the phone number to.

  • :opted_out_number (required, String)

    The phone number to add to the OptOutList in E.164 format.

Returns:

See Also:



2116
2117
2118
2119
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2116

def put_opted_out_number(params = {}, options = {})
  req = build_request(:put_opted_out_number, params)
  req.send_request(options)
end

#release_phone_number(params = {}) ⇒ Types::ReleasePhoneNumberResult

Releases an existing origination phone number in your account. Once released, a phone number is no longer available for sending messages.

If the origination phone number has deletion protection enabled or is associated with a pool, an Error is returned.

Examples:

Request syntax with placeholder values


resp = client.release_phone_number({
  phone_number_id: "PhoneNumberIdOrArn", # required
})

Response structure


resp.phone_number_arn #=> String
resp.phone_number_id #=> String
resp.phone_number #=> String
resp.status #=> String, one of "PENDING", "ACTIVE", "ASSOCIATING", "DISASSOCIATING", "DELETED"
resp.iso_country_code #=> String
resp.message_type #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"
resp.number_capabilities #=> Array
resp.number_capabilities[0] #=> String, one of "SMS", "VOICE"
resp.number_type #=> String, one of "SHORT_CODE", "LONG_CODE", "TOLL_FREE", "TEN_DLC"
resp.monthly_leasing_price #=> String
resp.two_way_enabled #=> Boolean
resp.two_way_channel_arn #=> String
resp.self_managed_opt_outs_enabled #=> Boolean
resp.opt_out_list_name #=> String
resp.created_timestamp #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :phone_number_id (required, String)

    The PhoneNumberId or PhoneNumberArn of the phone number to release. You can use DescribePhoneNumbers to get the values for PhoneNumberId and PhoneNumberArn.

Returns:

See Also:



2177
2178
2179
2180
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2177

def release_phone_number(params = {}, options = {})
  req = build_request(:release_phone_number, params)
  req.send_request(options)
end

#request_phone_number(params = {}) ⇒ Types::RequestPhoneNumberResult

Request an origination phone number for use in your account. For more information on phone number request see Requesting a number in the Amazon Pinpoint User Guide.

Examples:

Request syntax with placeholder values


resp = client.request_phone_number({
  iso_country_code: "IsoCountryCode", # required
  message_type: "TRANSACTIONAL", # required, accepts TRANSACTIONAL, PROMOTIONAL
  number_capabilities: ["SMS"], # required, accepts SMS, VOICE
  number_type: "LONG_CODE", # required, accepts LONG_CODE, TOLL_FREE, TEN_DLC
  opt_out_list_name: "OptOutListNameOrArn",
  pool_id: "PoolIdOrArn",
  registration_id: "RegistrationId",
  deletion_protection_enabled: false,
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  client_token: "ClientToken",
})

Response structure


resp.phone_number_arn #=> String
resp.phone_number_id #=> String
resp.phone_number #=> String
resp.status #=> String, one of "PENDING", "ACTIVE", "ASSOCIATING", "DISASSOCIATING", "DELETED"
resp.iso_country_code #=> String
resp.message_type #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"
resp.number_capabilities #=> Array
resp.number_capabilities[0] #=> String, one of "SMS", "VOICE"
resp.number_type #=> String, one of "LONG_CODE", "TOLL_FREE", "TEN_DLC"
resp.monthly_leasing_price #=> String
resp.two_way_enabled #=> Boolean
resp.two_way_channel_arn #=> String
resp.self_managed_opt_outs_enabled #=> Boolean
resp.opt_out_list_name #=> String
resp.deletion_protection_enabled #=> Boolean
resp.pool_id #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.created_timestamp #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :iso_country_code (required, String)

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

  • :message_type (required, String)

    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.

  • :number_capabilities (required, Array<String>)

    Indicates if the phone number will be used for text messages, voice messages, or both.

  • :number_type (required, String)

    The type of phone number to request.

  • :opt_out_list_name (String)

    The name of the OptOutList to associate with the phone number. You can use the OutOutListName or OptPutListArn.

  • :pool_id (String)

    The pool to associated with the phone number. You can use the PoolId or PoolArn.

  • :registration_id (String)

    Use this field to attach your phone number for an external registration process.

  • :deletion_protection_enabled (Boolean)

    By default this is set to false. When set to true the phone number can't be deleted.

  • :tags (Array<Types::Tag>)

    An array of tags (key and value pairs) associate with the requested phone number.

  • :client_token (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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



2302
2303
2304
2305
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2302

def request_phone_number(params = {}, options = {})
  req = build_request(:request_phone_number, params)
  req.send_request(options)
end

#send_text_message(params = {}) ⇒ Types::SendTextMessageResult

Creates a new text message and sends it to a recipient's phone number.

SMS throughput limits are measured in Message Parts per Second (MPS). Your MPS limit depends on the destination country of your messages, as well as the type of phone number (origination number) that you use to send the message. For more information, see Message Parts per Second (MPS) limits in the Amazon Pinpoint User Guide.

Examples:

Request syntax with placeholder values


resp = client.send_text_message({
  destination_phone_number: "PhoneNumber", # required
  origination_identity: "TextMessageOriginationIdentity",
  message_body: "TextMessageBody",
  message_type: "TRANSACTIONAL", # accepts TRANSACTIONAL, PROMOTIONAL
  keyword: "Keyword",
  configuration_set_name: "ConfigurationSetNameOrArn",
  max_price: "MaxPrice",
  time_to_live: 1,
  context: {
    "ContextKey" => "ContextValue",
  },
  destination_country_parameters: {
    "IN_TEMPLATE_ID" => "DestinationCountryParameterValue",
  },
  dry_run: false,
})

Response structure


resp.message_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :destination_phone_number (required, String)

    The destination phone number in E.164 format.

  • :origination_identity (String)

    The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

  • :message_body (String)

    The body of the text message.

  • :message_type (String)

    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.

  • :keyword (String)

    When you register a short code in the US, you must specify a program name. If you don’t have a US short code, omit this attribute.

  • :configuration_set_name (String)

    The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.

  • :max_price (String)

    The maximum amount that you want to spend, in US dollars, per each text message part. A text message can contain multiple parts.

  • :time_to_live (Integer)

    How long the text message is valid for. By default this is 72 hours.

  • :context (Hash<String,String>)

    You can specify custom data in this field. If you do, that data is logged to the event destination.

  • :destination_country_parameters (Hash<String,String>)

    This field is used for any country-specific registration requirements. Currently, this setting is only used when you send messages to recipients in India using a sender ID. For more information see Special requirements for sending SMS messages to recipients in India.

  • :dry_run (Boolean)

    When set to true, the message is checked and validated, but isn't sent to the end recipient.

Returns:

See Also:



2402
2403
2404
2405
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2402

def send_text_message(params = {}, options = {})
  req = build_request(:send_text_message, params)
  req.send_request(options)
end

#send_voice_message(params = {}) ⇒ Types::SendVoiceMessageResult

Allows you to send a request that sends a text message through Amazon Pinpoint. This operation uses Amazon Polly to convert a text script into a voice message.

Examples:

Request syntax with placeholder values


resp = client.send_voice_message({
  destination_phone_number: "PhoneNumber", # required
  origination_identity: "VoiceMessageOriginationIdentity", # required
  message_body: "VoiceMessageBody",
  message_body_text_type: "TEXT", # accepts TEXT, SSML
  voice_id: "AMY", # accepts AMY, ASTRID, BIANCA, BRIAN, CAMILA, CARLA, CARMEN, CELINE, CHANTAL, CONCHITA, CRISTIANO, DORA, EMMA, ENRIQUE, EWA, FILIZ, GERAINT, GIORGIO, GWYNETH, HANS, INES, IVY, JACEK, JAN, JOANNA, JOEY, JUSTIN, KARL, KENDRA, KIMBERLY, LEA, LIV, LOTTE, LUCIA, LUPE, MADS, MAJA, MARLENE, MATHIEU, MATTHEW, MAXIM, MIA, MIGUEL, MIZUKI, NAJA, NICOLE, PENELOPE, RAVEENA, RICARDO, RUBEN, RUSSELL, SALLI, SEOYEON, TAKUMI, TATYANA, VICKI, VITORIA, ZEINA, ZHIYU
  configuration_set_name: "ConfigurationSetNameOrArn",
  max_price_per_minute: "MaxPrice",
  time_to_live: 1,
  context: {
    "ContextKey" => "ContextValue",
  },
  dry_run: false,
})

Response structure


resp.message_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :destination_phone_number (required, String)

    The destination phone number in E.164 format.

  • :origination_identity (required, String)

    The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, PhoneNumberArn, PoolId, or PoolArn.

  • :message_body (String)

    The text to convert to a voice message.

  • :message_body_text_type (String)

    Specifies if the MessageBody field contains text or speech synthesis markup language (SSML).

    • TEXT: This is the default value. When used the maximum character limit is 3000.

    • SSML: When used the maximum character limit is 6000 including SSML tagging.

  • :voice_id (String)

    The voice for the Amazon Polly service to use. By default this is set to "MATTHEW".

  • :configuration_set_name (String)

    The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.

  • :max_price_per_minute (String)

    The maximum amount to spend per voice message, in US dollars.

  • :time_to_live (Integer)

    How long the voice message is valid for. By default this is 72 hours.

  • :context (Hash<String,String>)

    You can specify custom data in this field. If you do, that data is logged to the event destination.

  • :dry_run (Boolean)

    When set to true, the message is checked and validated, but isn't sent to the end recipient.

Returns:

See Also:



2494
2495
2496
2497
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2494

def send_voice_message(params = {}, options = {})
  req = build_request(:send_voice_message, params)
  req.send_request(options)
end

#set_default_message_type(params = {}) ⇒ Types::SetDefaultMessageTypeResult

Sets the default message type on a configuration set.

Choose the category of SMS messages that you plan to send from this account. If you send account-related messages or time-sensitive messages such as one-time passcodes, choose Transactional. If you plan to send messages that contain marketing material or other promotional content, choose Promotional. This setting applies to your entire Amazon Web Services account.

Examples:

Request syntax with placeholder values


resp = client.set_default_message_type({
  configuration_set_name: "ConfigurationSetNameOrArn", # required
  message_type: "TRANSACTIONAL", # required, accepts TRANSACTIONAL, PROMOTIONAL
})

Response structure


resp.configuration_set_arn #=> String
resp.configuration_set_name #=> String
resp.message_type #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :configuration_set_name (required, String)

    The configuration set to update with a new default message type. This field can be the ConsigurationSetName or ConfigurationSetArn.

  • :message_type (required, String)

    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.

Returns:

See Also:



2540
2541
2542
2543
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2540

def set_default_message_type(params = {}, options = {})
  req = build_request(:set_default_message_type, params)
  req.send_request(options)
end

#set_default_sender_id(params = {}) ⇒ Types::SetDefaultSenderIdResult

Sets default sender ID on a configuration set.

When sending a text message to a destination country that supports sender IDs, the default sender ID on the configuration set specified will be used if no dedicated origination phone numbers or registered sender IDs are available in your account.

Examples:

Request syntax with placeholder values


resp = client.set_default_sender_id({
  configuration_set_name: "ConfigurationSetNameOrArn", # required
  sender_id: "SenderId", # required
})

Response structure


resp.configuration_set_arn #=> String
resp.configuration_set_name #=> String
resp.sender_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :configuration_set_name (required, String)

    The configuration set to updated with a new default SenderId. This field can be the ConsigurationSetName or ConfigurationSetArn.

  • :sender_id (required, String)

    The current sender ID for the configuration set. When sending a text message to a destination country which supports SenderIds, the default sender ID on the configuration set specified on SendTextMessage will be used if no dedicated origination phone numbers or registered SenderIds are available in your account, instead of a generic sender ID, such as 'NOTICE'.

Returns:

See Also:



2587
2588
2589
2590
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2587

def set_default_sender_id(params = {}, options = {})
  req = build_request(:set_default_sender_id, params)
  req.send_request(options)
end

#set_text_message_spend_limit_override(params = {}) ⇒ Types::SetTextMessageSpendLimitOverrideResult

Sets an account level monthly spend limit override for sending text messages. The requested spend limit must be less than or equal to the MaxLimit, which is set by Amazon Web Services.

Examples:

Request syntax with placeholder values


resp = client.set_text_message_spend_limit_override({
  monthly_limit: 1, # required
})

Response structure


resp.monthly_limit #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :monthly_limit (required, Integer)

    The new monthly limit to enforce on text messages.

Returns:

See Also:



2617
2618
2619
2620
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2617

def set_text_message_spend_limit_override(params = {}, options = {})
  req = build_request(:set_text_message_spend_limit_override, params)
  req.send_request(options)
end

#set_voice_message_spend_limit_override(params = {}) ⇒ Types::SetVoiceMessageSpendLimitOverrideResult

Sets an account level monthly spend limit override for sending voice messages. The requested spend limit must be less than or equal to the MaxLimit, which is set by Amazon Web Services.

Examples:

Request syntax with placeholder values


resp = client.set_voice_message_spend_limit_override({
  monthly_limit: 1, # required
})

Response structure


resp.monthly_limit #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :monthly_limit (required, Integer)

    The new monthly limit to enforce on voice messages.

Returns:

See Also:



2647
2648
2649
2650
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2647

def set_voice_message_spend_limit_override(params = {}, options = {})
  req = build_request(:set_voice_message_spend_limit_override, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Adds or overwrites only the specified tags for the specified Amazon Pinpoint SMS Voice, version 2 resource. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see Tagging Amazon Pinpoint resources in the Amazon Pinpoint Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "AmazonResourceName", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource.

  • :tags (required, Array<Types::Tag>)

    An array of key and value pair tags that are associated with the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2689
2690
2691
2692
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2689

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Removes the association of the specified tags from an Amazon Pinpoint SMS Voice V2 resource. For more information on tags see Tagging Amazon Pinpoint resources in the Amazon Pinpoint Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "AmazonResourceName", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource.

  • :tag_keys (required, Array<String>)

    An array of tag key values to unassociate with the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2722
2723
2724
2725
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2722

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_event_destination(params = {}) ⇒ Types::UpdateEventDestinationResult

Updates an existing event destination in a configuration set. You can update the IAM role ARN for CloudWatch Logs and Kinesis Data Firehose. You can also enable or disable the event destination.

You may want to update an event destination to change its matching event types or updating the destination resource ARN. You can't change an event destination's type between CloudWatch Logs, Kinesis Data Firehose, and Amazon SNS.

Examples:

Request syntax with placeholder values


resp = client.update_event_destination({
  configuration_set_name: "ConfigurationSetNameOrArn", # required
  event_destination_name: "EventDestinationName", # required
  enabled: false,
  matching_event_types: ["ALL"], # accepts ALL, TEXT_ALL, TEXT_SENT, TEXT_PENDING, TEXT_QUEUED, TEXT_SUCCESSFUL, TEXT_DELIVERED, TEXT_INVALID, TEXT_INVALID_MESSAGE, TEXT_UNREACHABLE, TEXT_CARRIER_UNREACHABLE, TEXT_BLOCKED, TEXT_CARRIER_BLOCKED, TEXT_SPAM, TEXT_UNKNOWN, TEXT_TTL_EXPIRED, VOICE_ALL, VOICE_INITIATED, VOICE_RINGING, VOICE_ANSWERED, VOICE_COMPLETED, VOICE_BUSY, VOICE_NO_ANSWER, VOICE_FAILED, VOICE_TTL_EXPIRED
  cloud_watch_logs_destination: {
    iam_role_arn: "IamRoleArn", # required
    log_group_arn: "LogGroupArn", # required
  },
  kinesis_firehose_destination: {
    iam_role_arn: "IamRoleArn", # required
    delivery_stream_arn: "DeliveryStreamArn", # required
  },
  sns_destination: {
    topic_arn: "SnsTopicArn", # required
  },
})

Response structure


resp.configuration_set_arn #=> String
resp.configuration_set_name #=> String
resp.event_destination.event_destination_name #=> String
resp.event_destination.enabled #=> Boolean
resp.event_destination.matching_event_types #=> Array
resp.event_destination.matching_event_types[0] #=> String, one of "ALL", "TEXT_ALL", "TEXT_SENT", "TEXT_PENDING", "TEXT_QUEUED", "TEXT_SUCCESSFUL", "TEXT_DELIVERED", "TEXT_INVALID", "TEXT_INVALID_MESSAGE", "TEXT_UNREACHABLE", "TEXT_CARRIER_UNREACHABLE", "TEXT_BLOCKED", "TEXT_CARRIER_BLOCKED", "TEXT_SPAM", "TEXT_UNKNOWN", "TEXT_TTL_EXPIRED", "VOICE_ALL", "VOICE_INITIATED", "VOICE_RINGING", "VOICE_ANSWERED", "VOICE_COMPLETED", "VOICE_BUSY", "VOICE_NO_ANSWER", "VOICE_FAILED", "VOICE_TTL_EXPIRED"
resp.event_destination.cloud_watch_logs_destination.iam_role_arn #=> String
resp.event_destination.cloud_watch_logs_destination.log_group_arn #=> String
resp.event_destination.kinesis_firehose_destination.iam_role_arn #=> String
resp.event_destination.kinesis_firehose_destination.delivery_stream_arn #=> String
resp.event_destination.sns_destination.topic_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :configuration_set_name (required, String)

    The configuration set to update with the new event destination. Valid values for this can be the ConfigurationSetName or ConfigurationSetArn.

  • :event_destination_name (required, String)

    The name to use for the event destination.

  • :enabled (Boolean)

    When set to true logging is enabled.

  • :matching_event_types (Array<String>)

    An array of event types that determine which events to log.

  • :cloud_watch_logs_destination (Types::CloudWatchLogsDestination)

    An object that contains information about an event destination that sends data to CloudWatch Logs.

  • :kinesis_firehose_destination (Types::KinesisFirehoseDestination)

    An object that contains information about an event destination for logging to Kinesis Data Firehose.

  • :sns_destination (Types::SnsDestination)

    An object that contains information about an event destination that sends data to Amazon SNS.

Returns:

See Also:



2806
2807
2808
2809
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2806

def update_event_destination(params = {}, options = {})
  req = build_request(:update_event_destination, params)
  req.send_request(options)
end

#update_phone_number(params = {}) ⇒ Types::UpdatePhoneNumberResult

Updates the configuration of an existing origination phone number. You can update the opt-out list, enable or disable two-way messaging, change the TwoWayChannelArn, enable or disable self-managed opt-outs, and enable or disable deletion protection.

If the origination phone number is associated with a pool, an Error is returned.

Examples:

Request syntax with placeholder values


resp = client.update_phone_number({
  phone_number_id: "PhoneNumberIdOrArn", # required
  two_way_enabled: false,
  two_way_channel_arn: "TwoWayChannelArn",
  self_managed_opt_outs_enabled: false,
  opt_out_list_name: "OptOutListNameOrArn",
  deletion_protection_enabled: false,
})

Response structure


resp.phone_number_arn #=> String
resp.phone_number_id #=> String
resp.phone_number #=> String
resp.status #=> String, one of "PENDING", "ACTIVE", "ASSOCIATING", "DISASSOCIATING", "DELETED"
resp.iso_country_code #=> String
resp.message_type #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"
resp.number_capabilities #=> Array
resp.number_capabilities[0] #=> String, one of "SMS", "VOICE"
resp.number_type #=> String, one of "SHORT_CODE", "LONG_CODE", "TOLL_FREE", "TEN_DLC"
resp.monthly_leasing_price #=> String
resp.two_way_enabled #=> Boolean
resp.two_way_channel_arn #=> String
resp.self_managed_opt_outs_enabled #=> Boolean
resp.opt_out_list_name #=> String
resp.deletion_protection_enabled #=> Boolean
resp.created_timestamp #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :phone_number_id (required, String)

    The unique identifier of the phone number. Valid values for this field can be either the PhoneNumberId or PhoneNumberArn.

  • :two_way_enabled (Boolean)

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

  • :two_way_channel_arn (String)

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

  • :self_managed_opt_outs_enabled (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.

  • :opt_out_list_name (String)

    The OptOutList to add the phone number to. Valid values for this field can be either the OutOutListName or OutOutListArn.

  • :deletion_protection_enabled (Boolean)

    By default this is set to false. When set to true the phone number can't be deleted.

Returns:

See Also:



2898
2899
2900
2901
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2898

def update_phone_number(params = {}, options = {})
  req = build_request(:update_phone_number, params)
  req.send_request(options)
end

#update_pool(params = {}) ⇒ Types::UpdatePoolResult

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

Examples:

Request syntax with placeholder values


resp = client.update_pool({
  pool_id: "PoolIdOrArn", # required
  two_way_enabled: false,
  two_way_channel_arn: "TwoWayChannelArn",
  self_managed_opt_outs_enabled: false,
  opt_out_list_name: "OptOutListNameOrArn",
  shared_routes_enabled: false,
  deletion_protection_enabled: false,
})

Response structure


resp.pool_arn #=> String
resp.pool_id #=> String
resp.status #=> String, one of "CREATING", "ACTIVE", "DELETING"
resp.message_type #=> String, one of "TRANSACTIONAL", "PROMOTIONAL"
resp.two_way_enabled #=> Boolean
resp.two_way_channel_arn #=> String
resp.self_managed_opt_outs_enabled #=> Boolean
resp.opt_out_list_name #=> String
resp.shared_routes_enabled #=> Boolean
resp.deletion_protection_enabled #=> Boolean
resp.created_timestamp #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pool_id (required, String)

    The unique identifier of the pool to update. Valid values are either the PoolId or PoolArn.

  • :two_way_enabled (Boolean)

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

  • :two_way_channel_arn (String)

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

  • :self_managed_opt_outs_enabled (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.

  • :opt_out_list_name (String)

    The OptOutList to associate with the pool. Valid values are either OptOutListName or OptOutListArn.

  • :shared_routes_enabled (Boolean)

    Indicates whether shared routes are enabled for the pool.

  • :deletion_protection_enabled (Boolean)

    When set to true the pool can't be deleted.

Returns:

See Also:



2981
2982
2983
2984
# File 'gems/aws-sdk-pinpointsmsvoicev2/lib/aws-sdk-pinpointsmsvoicev2/client.rb', line 2981

def update_pool(params = {}, options = {})
  req = build_request(:update_pool, params)
  req.send_request(options)
end