Class: Aws::EndUserMessaging::Client

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

Overview

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

client = Aws::EndUserMessaging::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):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []] —

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider) —

    Your AWS credentials used for authentication. This can be any class that includes and implements Aws::CredentialProvider, or 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, :session_token, and :account_id options.

    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID'].

    • ~/.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::InstanceProfileCredentials 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)
  • :account_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.

  • :auth_scheme_preference (Array<String>) —

    A list of preferred authentication schemes to use when making a request. Supported values are: sigv4, sigv4a, httpBearerAuth, and noAuth. When set using ENV['AWS_AUTH_SCHEME_PREFERENCE'] or in shared config as auth_scheme_preference, the value should be a comma-separated list.

  • :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 —

    When true, the SDK will not prepend the modeled host prefix to the endpoint.

  • :disable_request_compression (Boolean) — default: false —

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP) —

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :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.

  • :ignore_configured_endpoint_urls (Boolean) —

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

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

  • :request_checksum_calculation (String) — default: "when_supported" —

    Determines when a checksum will be calculated for request payloads. Values are:

    • when_supported - (default) When set, a checksum will be calculated for all request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true and/or a requestAlgorithmMember is modeled.
    • when_required - When set, a checksum will only be calculated for request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true or where a requestAlgorithmMember is modeled and supplied.
  • :request_min_compression_size_bytes (Integer) — default: 10240 —

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :response_checksum_validation (String) — default: "when_supported" —

    Determines when checksum validation will be performed on response payloads. Values are:

    • when_supported - (default) When set, checksum validation is performed on all response payloads of operations modeled with the httpChecksum trait where responseAlgorithms is modeled, except when no modeled checksum algorithms are supported.
    • when_required - When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and the requestValidationModeMember member is set to ENABLED.
  • :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 the 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 - A retry mode that includes all the functionality of standard mode along with automatic client side throttling.

  • :sdk_ua_app_id (String) —

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array) —

    A list of regions that should be signed with SigV4a signing. When not passed, a default :sigv4a_signing_region_set is searched for in the following locations:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :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.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider —

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses NoOpTelemetryProvider which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :token_provider (Aws::TokenProvider) —

    Your Bearer token used for authentication. This can be any class that includes and implements Aws::TokenProvider, or instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

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

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

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

  • :endpoint_provider (Aws::EndUserMessaging::EndpointProvider) —

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::EndUserMessaging::EndpointParameters.

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

  • :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_open_timeout (Float) — default: 15 —

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

  • :http_proxy (URI::HTTP, String) —

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

  • :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_wire_trace (Boolean) — default: false —

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

  • :on_chunk_received (Proc) —

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc) —

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true —

    When true, response errors are raised.

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

  • :ssl_ca_store (String) —

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate) —

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey) —

    Sets a client key when creating http connections.

  • :ssl_timeout (Float) —

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true —

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



471
472
473
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 471

def initialize(*args)
  super
end

Instance Method Details

#create_brand_profile(params = {}) ⇒ Types::CreateBrandProfileOutput

Creates a brand profile. A brand profile is a lightweight container that holds your brand identity information as flexible attributes. After you create a brand profile, use the CreateBrandProfileAttributes operation to add company information, addresses, compliance documents, and logos.

Examples:

Example: Create a brand profile


resp = client.create_brand_profile({
  brand_profile_name: "AcmeCorp", 
  deletion_protection_enabled: true, 
})

resp.to_h outputs the following:
{
  attributes_created: 0, 
  brand_profile_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:brand-profile/bp-abc12345678901234", 
  brand_profile_id: "bp-abc12345678901234", 
  brand_profile_name: "AcmeCorp", 
  created_at: Time.parse(1727130000), 
  deletion_protection_enabled: true, 
  status: "ACTIVE", 
  updated_at: Time.parse(1727130000), 
}

Request syntax with placeholder values


resp = client.create_brand_profile({
  brand_profile_name: "BrandProfileName", # required
  client_token: "ClientToken",
  deletion_protection_enabled: false,
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.brand_profile_id #=> String
resp.brand_profile_arn #=> String
resp.brand_profile_name #=> String
resp.status #=> String, one of "ACTIVE", "BLOCKED", "PAUSED", "CANCELLED", "FAILED"
resp.deletion_protection_enabled #=> Boolean
resp.created_at #=> Time
resp.updated_at #=> Time
resp.attributes_created #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_name (required, String) —

    The name of the brand profile. The name can contain alphanumeric characters, underscores, hyphens, and spaces.

  • :client_token (String) —

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do not specify a client token, the AWS SDK automatically generates one.

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

  • :deletion_protection_enabled (Boolean) —

    Specifies whether deletion protection is enabled. When enabled, the resource cannot be deleted until deletion protection is turned off.

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

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

Returns:

See Also:



563
564
565
566
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 563

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

#create_brand_profile_attributes(params = {}) ⇒ Types::CreateBrandProfileAttributesOutput

Creates up to 10 attributes for a brand profile in a single request. For attributes of type IMAGE or DOCUMENT, the response includes a presigned Amazon S3 URL that you use to upload the media. This operation is atomic: either all of the attributes are created, or none of them are.

Examples:

Example: Create a text attribute on a brand profile


resp = client.create_brand_profile_attributes({
  attributes: [
    {
      attribute_name: "SupportEmail", 
      attribute_type: "TEXT", 
      attribute_value: "support@example.com", 
      category: "CONTACT", 
    }, 
  ], 
  brand_profile_id: "bp-abc12345678901234", 
})

resp.to_h outputs the following:
{
  attributes: [
    {
      attribute_name: "SupportEmail", 
      attribute_type: "TEXT", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.create_brand_profile_attributes({
  brand_profile_id: "BrandProfileIdOrArn", # required
  attributes: [ # required
    {
      attribute_name: "BrandProfileAttributeName", # required
      attribute_type: "TEXT", # required, accepts TEXT, IMAGE, DOCUMENT
      attribute_value: "BrandProfileAttributeValue",
      attachment_body: "data",
      description: "BrandProfileAttributeDescription",
      category: "BrandProfileAttributeCategory",
    },
  ],
  client_token: "ClientToken",
})

Response structure


resp.attributes #=> Array
resp.attributes[0].attribute_name #=> String
resp.attributes[0].attribute_type #=> String, one of "TEXT", "IMAGE", "DOCUMENT"
resp.attributes[0].media_download_url #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_id (required, String) —

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

  • :attributes (required, Array<Types::BrandProfileAttributeInput>) —

    The brand profile attributes.

  • :client_token (String) —

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do not specify a client token, the AWS SDK automatically generates one.

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

Returns:

See Also:



646
647
648
649
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 646

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

#create_brand_profile_from_registration(params = {}) ⇒ Types::CreateBrandProfileFromRegistrationOutput

Creates a brand profile and populates its attributes from an existing registration. This operation runs asynchronously. Use the GetJob operation to track its progress.

Examples:

Example: Create a brand profile from a registration


resp = client.create_brand_profile_from_registration({
  brand_profile_name: "AcmeCorp", 
  registration_id: "reg-abc12345678901234", 
  smart_match: true, 
})

resp.to_h outputs the following:
{
  results: [
    {
      job_id: "job-abc12345678901234", 
      resource_identifier: "reg-abc12345678901234", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.create_brand_profile_from_registration({
  registration_id: "RegistrationIdOrArn", # required
  brand_profile_name: "BrandProfileName", # required
  smart_match: false,
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  client_token: "ClientToken",
})

Response structure


resp.results #=> Array
resp.results[0].job_id #=> String
resp.results[0].resource_identifier #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :registration_id (required, String) —

    The identifier or Amazon Resource Name (ARN) of the registration to populate the brand profile from.

  • :brand_profile_name (required, String) —

    The name of the brand profile. The name can contain alphanumeric characters, underscores, hyphens, and spaces.

  • :smart_match (Boolean) —

    Specifies whether to use semantic field mapping between brand profile attributes and registration fields. The default is true. When false, the service maps fields using a fixed set of standard field types.

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

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

  • :client_token (String) —

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do not specify a client token, the AWS SDK automatically generates one.

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

Returns:

See Also:



728
729
730
731
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 728

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

#create_notify_code_configuration(params = {}) ⇒ Types::CreateNotifyCodeConfigurationOutput

Creates a notify code configuration. A notify code configuration is a reusable policy that defines how one-time passcodes are generated and rendered, including the code type, length, validity period, maximum number of attempts, and channel templates.

Examples:

Example: Create a notify code configuration


resp = client.create_notify_code_configuration({
  channel_parameters: {
    text: {
      inline_template_body: "Your verification code is {{code}}.", 
    }, 
  }, 
  code_configuration_parameters: {
    code_length: 6, 
    code_type: "NUMERIC", 
    max_attempts: 3, 
    validity_period_minutes: 10, 
  }, 
  notify_code_configuration_name: "SignupOtp", 
})

resp.to_h outputs the following:
{
  notify_code_configuration: {
    channel_parameters: {
      text: {
        inline_template_body: "Your verification code is {{code}}.", 
      }, 
    }, 
    code_configuration_parameters: {
      code_length: 6, 
      code_type: "NUMERIC", 
      max_attempts: 3, 
      validity_period_minutes: 10, 
    }, 
    created_at: Time.parse(1727130000), 
    deletion_protection_enabled: false, 
    notify_code_configuration_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:notify-code-configuration/ncc-abc12345678901234", 
    notify_code_configuration_id: "ncc-abc12345678901234", 
    notify_code_configuration_name: "SignupOtp", 
    updated_at: Time.parse(1727130000), 
  }, 
}

Request syntax with placeholder values


resp = client.create_notify_code_configuration({
  notify_code_configuration_name: "NotifyCodeConfigurationName", # required
  code_configuration_parameters: {
    code_type: "NUMERIC", # accepts NUMERIC, ALPHA, ALPHANUMERIC
    code_length: 1,
    validity_period_minutes: 1,
    max_attempts: 1,
  },
  channel_parameters: {
    text: {
      inline_template_body: "InlineTemplateBody",
      destination_country_parameters: {
        "DestinationCountryParameterKey" => "DestinationCountryParameterValue",
      },
    },
    voice: {
      inline_template_body: "InlineTemplateBody",
      language_code: "LanguageCode",
      voice_id: "VoiceId",
      voice_message_body_text_type: "TEXT", # accepts TEXT, SSML
    },
    notify: {
      notify_template_id: "NotifyTemplateId",
      voice_id: "VoiceId",
    },
    whats_app: {
      whats_app_template_name: "WhatsAppTemplateName",
      language_code: "LanguageCode",
    },
  },
  deletion_protection_enabled: false,
  client_token: "ClientToken",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.notify_code_configuration.notify_code_configuration_id #=> String
resp.notify_code_configuration.notify_code_configuration_arn #=> String
resp.notify_code_configuration.notify_code_configuration_name #=> String
resp.notify_code_configuration.code_configuration_parameters.code_type #=> String, one of "NUMERIC", "ALPHA", "ALPHANUMERIC"
resp.notify_code_configuration.code_configuration_parameters.code_length #=> Integer
resp.notify_code_configuration.code_configuration_parameters.validity_period_minutes #=> Integer
resp.notify_code_configuration.code_configuration_parameters.max_attempts #=> Integer
resp.notify_code_configuration.channel_parameters.text.inline_template_body #=> String
resp.notify_code_configuration.channel_parameters.text.destination_country_parameters #=> Hash
resp.notify_code_configuration.channel_parameters.text.destination_country_parameters["DestinationCountryParameterKey"] #=> String
resp.notify_code_configuration.channel_parameters.voice.inline_template_body #=> String
resp.notify_code_configuration.channel_parameters.voice.language_code #=> String
resp.notify_code_configuration.channel_parameters.voice.voice_id #=> String
resp.notify_code_configuration.channel_parameters.voice.voice_message_body_text_type #=> String, one of "TEXT", "SSML"
resp.notify_code_configuration.channel_parameters.notify.notify_template_id #=> String
resp.notify_code_configuration.channel_parameters.notify.voice_id #=> String
resp.notify_code_configuration.channel_parameters.whats_app.whats_app_template_name #=> String
resp.notify_code_configuration.channel_parameters.whats_app.language_code #=> String
resp.notify_code_configuration.deletion_protection_enabled #=> Boolean
resp.notify_code_configuration.created_at #=> Time
resp.notify_code_configuration.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :notify_code_configuration_name (required, String) —

    The name of the notify code configuration.

  • :code_configuration_parameters (Types::CodeConfigurationParameters) —

    The passcode policy parameters, including the code type, length, validity period, and maximum number of attempts. Each member is optional. When you omit a member, no value is applied at create time and the default is applied when a passcode is sent.

  • :channel_parameters (Types::ChannelParameters) —

    The channel-specific parameters used to render and deliver the one-time passcode. Provide parameters for any subset of channels. Each member configures one delivery route, and the route that is selected at send time uses the matching channel.

  • :deletion_protection_enabled (Boolean) —

    Specifies whether deletion protection is enabled. When enabled, the resource cannot be deleted until deletion protection is turned off.

  • :client_token (String) —

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do not specify a client token, the AWS SDK automatically generates one.

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

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

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

Returns:

See Also:



884
885
886
887
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 884

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

#create_registrations_from_brand_profile(params = {}) ⇒ Types::CreateRegistrationsFromBrandProfileOutput

Creates one or more registrations in the DRAFT state and prefills their fields from the attributes of a brand profile. This operation runs asynchronously. Use the GetJob operation to track its progress.

Examples:

Example: Create draft registrations from a brand profile


resp = client.create_registrations_from_brand_profile({
  brand_profile_id: "bp-abc12345678901234", 
  registration_types: [
    "US_TOLL_FREE_REGISTRATION", 
  ], 
  smart_match: true, 
})

resp.to_h outputs the following:
{
  results: [
    {
      job_id: "job-abc12345678901234", 
      resource_identifier: "US_TOLL_FREE_REGISTRATION", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.create_registrations_from_brand_profile({
  brand_profile_id: "BrandProfileIdOrArn", # required
  registration_types: ["RegistrationType"], # required
  smart_match: false,
  client_token: "ClientToken",
})

Response structure


resp.results #=> Array
resp.results[0].job_id #=> String
resp.results[0].resource_identifier #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_id (required, String) —

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

  • :registration_types (required, Array<String>) —

    The registration types to create, for example US_TOLL_FREE_REGISTRATION or SENDER_ID.

  • :smart_match (Boolean) —

    Specifies whether to use semantic field mapping between brand profile attributes and registration fields. The default is true. When false, the service maps fields using a fixed set of standard field types.

  • :client_token (String) —

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do not specify a client token, the AWS SDK automatically generates one.

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

Returns:

See Also:



958
959
960
961
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 958

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

#delete_brand_profile(params = {}) ⇒ Types::DeleteBrandProfileOutput

Deletes a brand profile. This operation also deletes the attributes of the profile and any associated media. The request fails if deletion protection is enabled for the profile.

Examples:

Example: Delete a brand profile


resp = client.delete_brand_profile({
  brand_profile_id: "bp-abc12345678901234", 
})

resp.to_h outputs the following:
{
  brand_profile_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:brand-profile/bp-abc12345678901234", 
  brand_profile_id: "bp-abc12345678901234", 
}

Request syntax with placeholder values


resp = client.delete_brand_profile({
  brand_profile_id: "BrandProfileIdOrArn", # required
})

Response structure


resp.brand_profile_id #=> String
resp.brand_profile_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_id (required, String) —

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

Returns:

See Also:



1004
1005
1006
1007
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1004

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

#delete_brand_profile_attribute(params = {}) ⇒ Types::DeleteBrandProfileAttributeOutput

Deletes a brand profile attribute. If the attribute stores media, this operation also deletes the associated media.

Examples:

Example: Delete a brand profile attribute


resp = client.delete_brand_profile_attribute({
  attribute_name: "SupportEmail", 
  brand_profile_id: "bp-abc12345678901234", 
})

resp.to_h outputs the following:
{
  attribute_name: "SupportEmail", 
  brand_profile_id: "bp-abc12345678901234", 
}

Request syntax with placeholder values


resp = client.delete_brand_profile_attribute({
  brand_profile_id: "BrandProfileIdOrArn", # required
  attribute_name: "BrandProfileAttributeName", # required
})

Response structure


resp.brand_profile_id #=> String
resp.attribute_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_id (required, String) —

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

  • :attribute_name (required, String) —

    The name of the brand profile attribute. The name is unique within a brand profile.

Returns:

See Also:



1055
1056
1057
1058
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1055

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

#delete_notify_code_configuration(params = {}) ⇒ Struct

Deletes a notify code configuration. Verifications that are already in progress are not affected, because they capture the policy at the time that the passcode was sent.

Examples:

Example: Delete a notify code configuration


resp = client.delete_notify_code_configuration({
  notify_code_configuration_id: "ncc-abc12345678901234", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_notify_code_configuration({
  notify_code_configuration_id: "NotifyCodeConfigurationIdOrArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :notify_code_configuration_id (required, String) —

    The unique identifier of the notify code configuration. You can specify either the bare ID or the full Amazon Resource Name (ARN).

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



1091
1092
1093
1094
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1091

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

#get_brand_profile(params = {}) ⇒ Types::GetBrandProfileOutput

Retrieves the metadata for a brand profile, including its name, status, deletion protection setting, and timestamps. To retrieve the attributes of the profile, use the ListBrandProfileAttributes operation.

The following waiters are defined for this operation (see #wait_until for detailed usage):

  • brand_profile_active

Examples:

Example: Get a brand profile


resp = client.get_brand_profile({
  brand_profile_id: "bp-abc12345678901234", 
})

resp.to_h outputs the following:
{
  brand_profile_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:brand-profile/bp-abc12345678901234", 
  brand_profile_id: "bp-abc12345678901234", 
  brand_profile_name: "AcmeCorp", 
  created_at: Time.parse(1727130000), 
  deletion_protection_enabled: true, 
  status: "ACTIVE", 
  updated_at: Time.parse(1727130000), 
}

Request syntax with placeholder values


resp = client.get_brand_profile({
  brand_profile_id: "BrandProfileIdOrArn", # required
})

Response structure


resp.brand_profile_id #=> String
resp.brand_profile_arn #=> String
resp.brand_profile_name #=> String
resp.status #=> String, one of "ACTIVE", "BLOCKED", "PAUSED", "CANCELLED", "FAILED"
resp.deletion_protection_enabled #=> Boolean
resp.created_at #=> Time
resp.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_id (required, String) —

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

Returns:

See Also:



1158
1159
1160
1161
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1158

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

#get_brand_profile_attribute(params = {}) ⇒ Types::GetBrandProfileAttributeOutput

Retrieves a single brand profile attribute.

Examples:

Example: Get a brand profile attribute


resp = client.get_brand_profile_attribute({
  attribute_name: "SupportEmail", 
  brand_profile_id: "bp-abc12345678901234", 
})

resp.to_h outputs the following:
{
  attribute_name: "SupportEmail", 
  attribute_type: "TEXT", 
  attribute_value: "support@example.com", 
  category: "CONTACT", 
  created_at: Time.parse(1727130000), 
  updated_at: Time.parse(1727130000), 
}

Request syntax with placeholder values


resp = client.get_brand_profile_attribute({
  brand_profile_id: "BrandProfileIdOrArn", # required
  attribute_name: "BrandProfileAttributeName", # required
})

Response structure


resp.attribute_name #=> String
resp.attribute_type #=> String, one of "TEXT", "IMAGE", "DOCUMENT"
resp.attribute_value #=> String
resp.description #=> String
resp.category #=> String
resp.media_content_type #=> String
resp.media_size_bytes #=> Integer
resp.media_download_url #=> String
resp.created_at #=> Time
resp.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_id (required, String) —

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

  • :attribute_name (required, String) —

    The name of the brand profile attribute. The name is unique within a brand profile.

Returns:

See Also:



1228
1229
1230
1231
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1228

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

#get_job(params = {}) ⇒ Types::Job

Retrieves the current state of an asynchronous job, including its status and any resources that it created or updated.

The following waiters are defined for this operation (see #wait_until for detailed usage):

  • job_success

Examples:

Example: Get an async job


resp = client.get_job({
  job_id: "job-abc12345678901234", 
})

resp.to_h outputs the following:
{
  brand_profile_id: "bp-abc12345678901234", 
  created_at: Time.parse(1727130000), 
  job_id: "job-abc12345678901234", 
  operation_type: "CreateRegistrationsFromBrandProfile", 
  resources: [
    {
      resource_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:registration/reg-abc12345678901234", 
      resource_id: "reg-abc12345678901234", 
      resource_type: "REGISTRATION", 
    }, 
  ], 
  status: "SUCCESS", 
  updated_at: Time.parse(1727130060), 
}

Request syntax with placeholder values


resp = client.get_job({
  job_id: "JobId", # required
})

Response structure


resp.job_id #=> String
resp.status #=> String, one of "SUCCESS", "PROCESSING", "FAILED"
resp.operation_type #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.brand_profile_id #=> String
resp.error_code #=> String
resp.error_message #=> String
resp.resources #=> Array
resp.resources[0].resource_type #=> String, one of "REGISTRATION", "BRAND_PROFILE"
resp.resources[0].resource_id #=> String
resp.resources[0].resource_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String) —

    The unique identifier of the asynchronous job. Use the GetJob operation to check the status of the job and to retrieve its results.

Returns:

See Also:



1306
1307
1308
1309
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1306

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

#get_notify_code_configuration(params = {}) ⇒ Types::GetNotifyCodeConfigurationOutput

Retrieves a notify code configuration.

Examples:

Example: Get a notify code configuration


resp = client.get_notify_code_configuration({
  notify_code_configuration_id: "ncc-abc12345678901234", 
})

resp.to_h outputs the following:
{
  notify_code_configuration: {
    channel_parameters: {
      text: {
        inline_template_body: "Your verification code is {{code}}.", 
      }, 
    }, 
    code_configuration_parameters: {
      code_length: 6, 
      code_type: "NUMERIC", 
      max_attempts: 3, 
      validity_period_minutes: 10, 
    }, 
    created_at: Time.parse(1727130000), 
    deletion_protection_enabled: false, 
    notify_code_configuration_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:notify-code-configuration/ncc-abc12345678901234", 
    notify_code_configuration_id: "ncc-abc12345678901234", 
    notify_code_configuration_name: "SignupOtp", 
    updated_at: Time.parse(1727130000), 
  }, 
}

Request syntax with placeholder values


resp = client.get_notify_code_configuration({
  notify_code_configuration_id: "NotifyCodeConfigurationIdOrArn", # required
})

Response structure


resp.notify_code_configuration.notify_code_configuration_id #=> String
resp.notify_code_configuration.notify_code_configuration_arn #=> String
resp.notify_code_configuration.notify_code_configuration_name #=> String
resp.notify_code_configuration.code_configuration_parameters.code_type #=> String, one of "NUMERIC", "ALPHA", "ALPHANUMERIC"
resp.notify_code_configuration.code_configuration_parameters.code_length #=> Integer
resp.notify_code_configuration.code_configuration_parameters.validity_period_minutes #=> Integer
resp.notify_code_configuration.code_configuration_parameters.max_attempts #=> Integer
resp.notify_code_configuration.channel_parameters.text.inline_template_body #=> String
resp.notify_code_configuration.channel_parameters.text.destination_country_parameters #=> Hash
resp.notify_code_configuration.channel_parameters.text.destination_country_parameters["DestinationCountryParameterKey"] #=> String
resp.notify_code_configuration.channel_parameters.voice.inline_template_body #=> String
resp.notify_code_configuration.channel_parameters.voice.language_code #=> String
resp.notify_code_configuration.channel_parameters.voice.voice_id #=> String
resp.notify_code_configuration.channel_parameters.voice.voice_message_body_text_type #=> String, one of "TEXT", "SSML"
resp.notify_code_configuration.channel_parameters.notify.notify_template_id #=> String
resp.notify_code_configuration.channel_parameters.notify.voice_id #=> String
resp.notify_code_configuration.channel_parameters.whats_app.whats_app_template_name #=> String
resp.notify_code_configuration.channel_parameters.whats_app.language_code #=> String
resp.notify_code_configuration.deletion_protection_enabled #=> Boolean
resp.notify_code_configuration.created_at #=> Time
resp.notify_code_configuration.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :notify_code_configuration_id (required, String) —

    The unique identifier of the notify code configuration. You can specify either the bare ID or the full Amazon Resource Name (ARN).

Returns:

See Also:



1385
1386
1387
1388
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1385

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

#list_brand_profile_attributes(params = {}) ⇒ Types::ListBrandProfileAttributesOutput

Retrieves a paginated list of the attributes for a brand profile.

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

Examples:

Example: List brand profile attributes


resp = client.list_brand_profile_attributes({
  brand_profile_id: "bp-abc12345678901234", 
  max_results: 10, 
})

resp.to_h outputs the following:
{
  brand_profile_attributes: [
    {
      attribute_name: "SupportEmail", 
      attribute_type: "TEXT", 
      category: "CONTACT", 
      created_at: Time.parse(1727130000), 
      updated_at: Time.parse(1727130000), 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_brand_profile_attributes({
  brand_profile_id: "BrandProfileIdOrArn", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.brand_profile_attributes #=> Array
resp.brand_profile_attributes[0].attribute_name #=> String
resp.brand_profile_attributes[0].attribute_type #=> String, one of "TEXT", "IMAGE", "DOCUMENT"
resp.brand_profile_attributes[0].description #=> String
resp.brand_profile_attributes[0].category #=> String
resp.brand_profile_attributes[0].created_at #=> Time
resp.brand_profile_attributes[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_id (required, String) —

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

  • :next_token (String) —

    The token to retrieve the next page of results. This value is returned when more results are available, and is null when there are no more results to return.

  • :max_results (Integer) —

    The maximum number of results to return per page.

Returns:

See Also:



1455
1456
1457
1458
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1455

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

#list_brand_profiles(params = {}) ⇒ Types::ListBrandProfilesOutput

Retrieves a paginated list of the brand profiles in your account. Use the nextToken parameter to retrieve additional results.

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

Examples:

Example: List brand profiles


resp = client.list_brand_profiles({
  max_results: 10, 
})

resp.to_h outputs the following:
{
  brand_profiles: [
    {
      brand_profile_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:brand-profile/bp-abc12345678901234", 
      brand_profile_id: "bp-abc12345678901234", 
      brand_profile_name: "AcmeCorp", 
      created_at: Time.parse(1727130000), 
      deletion_protection_enabled: true, 
      status: "ACTIVE", 
      updated_at: Time.parse(1727130000), 
    }, 
  ], 
}

Request syntax with placeholder values


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

Response structure


resp.brand_profiles #=> Array
resp.brand_profiles[0].brand_profile_id #=> String
resp.brand_profiles[0].brand_profile_arn #=> String
resp.brand_profiles[0].brand_profile_name #=> String
resp.brand_profiles[0].status #=> String, one of "ACTIVE", "BLOCKED", "PAUSED", "CANCELLED", "FAILED"
resp.brand_profiles[0].deletion_protection_enabled #=> Boolean
resp.brand_profiles[0].created_at #=> Time
resp.brand_profiles[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String) —

    The token to retrieve the next page of results. This value is returned when more results are available, and is null when there are no more results to return.

  • :max_results (Integer) —

    The maximum number of results to return per page.

Returns:

See Also:



1523
1524
1525
1526
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1523

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

#list_jobs(params = {}) ⇒ Types::ListJobsOutput

Retrieves a paginated list of the asynchronous jobs in your account. You can filter the results by status, brand profile, or operation type.

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

Examples:

Example: List async jobs


resp = client.list_jobs({
  max_results: 10, 
  status: "SUCCESS", 
})

resp.to_h outputs the following:
{
  jobs: [
    {
      brand_profile_id: "bp-abc12345678901234", 
      created_at: Time.parse(1727130000), 
      job_id: "job-abc12345678901234", 
      operation_type: "CreateRegistrationsFromBrandProfile", 
      status: "SUCCESS", 
      updated_at: Time.parse(1727130060), 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_jobs({
  max_results: 1,
  next_token: "NextToken",
  status: "SUCCESS", # accepts SUCCESS, PROCESSING, FAILED
  brand_profile_id: "BrandProfileIdOrArn",
  operation_type: "JobOperationType",
})

Response structure


resp.jobs #=> Array
resp.jobs[0].job_id #=> String
resp.jobs[0].status #=> String, one of "SUCCESS", "PROCESSING", "FAILED"
resp.jobs[0].operation_type #=> String
resp.jobs[0].created_at #=> Time
resp.jobs[0].updated_at #=> Time
resp.jobs[0].brand_profile_id #=> String
resp.jobs[0].error_code #=> String
resp.jobs[0].error_message #=> String
resp.jobs[0].resources #=> Array
resp.jobs[0].resources[0].resource_type #=> String, one of "REGISTRATION", "BRAND_PROFILE"
resp.jobs[0].resources[0].resource_id #=> String
resp.jobs[0].resources[0].resource_arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer) —

    The maximum number of results to return per page.

  • :next_token (String) —

    The token to retrieve the next page of results. This value is returned when more results are available, and is null when there are no more results to return.

  • :status (String) —

    Filters the results to jobs that have the specified status.

  • :brand_profile_id (String) —

    Filters the results to jobs for the specified brand profile.

  • :operation_type (String) —

    Filters the results to jobs of the specified operation type.

Returns:

See Also:



1609
1610
1611
1612
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1609

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

#list_notify_code_configurations(params = {}) ⇒ Types::ListNotifyCodeConfigurationsOutput

Retrieves a paginated list of the notify code configurations in your account.

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

Examples:

Example: List notify code configurations


resp = client.list_notify_code_configurations({
  max_results: 10, 
})

resp.to_h outputs the following:
{
  notify_code_configurations: [
    {
      channel_parameters: {
        text: {
          inline_template_body: "Your verification code is {{code}}.", 
        }, 
      }, 
      code_configuration_parameters: {
        code_length: 6, 
        code_type: "NUMERIC", 
        max_attempts: 3, 
        validity_period_minutes: 10, 
      }, 
      created_at: Time.parse(1727130000), 
      deletion_protection_enabled: false, 
      notify_code_configuration_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:notify-code-configuration/ncc-abc12345678901234", 
      notify_code_configuration_id: "ncc-abc12345678901234", 
      notify_code_configuration_name: "SignupOtp", 
      updated_at: Time.parse(1727130000), 
    }, 
  ], 
}

Request syntax with placeholder values


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

Response structure


resp.notify_code_configurations #=> Array
resp.notify_code_configurations[0].notify_code_configuration_id #=> String
resp.notify_code_configurations[0].notify_code_configuration_arn #=> String
resp.notify_code_configurations[0].notify_code_configuration_name #=> String
resp.notify_code_configurations[0].code_configuration_parameters.code_type #=> String, one of "NUMERIC", "ALPHA", "ALPHANUMERIC"
resp.notify_code_configurations[0].code_configuration_parameters.code_length #=> Integer
resp.notify_code_configurations[0].code_configuration_parameters.validity_period_minutes #=> Integer
resp.notify_code_configurations[0].code_configuration_parameters.max_attempts #=> Integer
resp.notify_code_configurations[0].channel_parameters.text.inline_template_body #=> String
resp.notify_code_configurations[0].channel_parameters.text.destination_country_parameters #=> Hash
resp.notify_code_configurations[0].channel_parameters.text.destination_country_parameters["DestinationCountryParameterKey"] #=> String
resp.notify_code_configurations[0].channel_parameters.voice.inline_template_body #=> String
resp.notify_code_configurations[0].channel_parameters.voice.language_code #=> String
resp.notify_code_configurations[0].channel_parameters.voice.voice_id #=> String
resp.notify_code_configurations[0].channel_parameters.voice.voice_message_body_text_type #=> String, one of "TEXT", "SSML"
resp.notify_code_configurations[0].channel_parameters.notify.notify_template_id #=> String
resp.notify_code_configurations[0].channel_parameters.notify.voice_id #=> String
resp.notify_code_configurations[0].channel_parameters.whats_app.whats_app_template_name #=> String
resp.notify_code_configurations[0].channel_parameters.whats_app.language_code #=> String
resp.notify_code_configurations[0].deletion_protection_enabled #=> Boolean
resp.notify_code_configurations[0].created_at #=> Time
resp.notify_code_configurations[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer) —

    The maximum number of results to return per page.

  • :next_token (String) —

    The token to retrieve the next page of results. This value is returned when more results are available, and is null when there are no more results to return.

Returns:

See Also:



1701
1702
1703
1704
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1701

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

#list_registrations_from_brand_profile(params = {}) ⇒ Types::ListRegistrationsFromBrandProfileOutput

Retrieves a paginated list of the registrations that were created from a brand profile through the synchronization operations.

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

Examples:

Example: List registrations created from a brand profile


resp = client.list_registrations_from_brand_profile({
  brand_profile_id: "bp-abc12345678901234", 
  max_results: 10, 
})

resp.to_h outputs the following:
{
  registration_associations: [
    {
      created_at: Time.parse(1727130000), 
      registration_id: "reg-abc12345678901234", 
      registration_type: "US_TOLL_FREE_REGISTRATION", 
      smart_match_used: true, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_registrations_from_brand_profile({
  brand_profile_id: "BrandProfileIdOrArn", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.registration_associations #=> Array
resp.registration_associations[0].registration_id #=> String
resp.registration_associations[0].registration_type #=> String
resp.registration_associations[0].created_at #=> Time
resp.registration_associations[0].smart_match_used #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_id (required, String) —

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

  • :max_results (Integer) —

    The maximum number of results to return per page.

  • :next_token (String) —

    The token to retrieve the next page of results. This value is returned when more results are available, and is null when there are no more results to return.

Returns:

See Also:



1769
1770
1771
1772
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1769

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

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

Retrieves the tags that are associated with a resource.

Examples:

Example: List tags on a resource


resp = client.list_tags_for_resource({
  resource_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:brand-profile/bp-abc12345678901234", 
})

resp.to_h outputs the following:
{
  tags: [
    {
      key: "Environment", 
      value: "Production", 
    }, 
  ], 
}

Request syntax with placeholder values


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

Response structure


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.

Returns:

See Also:



1816
1817
1818
1819
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1816

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

#send_notify_code_verification(params = {}) ⇒ Types::SendNotifyCodeVerificationOutput

Generates a one-time passcode and delivers it to a recipient over the requested channel. The passcode policy is captured from the referenced notify code configuration at the time of the request, so later updates to the configuration do not affect verifications that are already in progress.

Examples:

Example: Send a one-time passcode over SMS


resp = client.send_notify_code_verification({
  channel: "TEXT", 
  destination_identity: "+14255550100", 
  notify_code_configuration: "ncc-abc12345678901234", 
  origination_identity: "arn:aws:sms-voice:us-east-1:123456789012:phone-number/pn-abc123", 
  reference_id: "signup-flow-42", 
})

resp.to_h outputs the following:
{
  message_id: "msg-abc12345678901234", 
  verification_id: "ver-abc12345678901234", 
}

Request syntax with placeholder values


resp = client.send_notify_code_verification({
  channel: "TEXT", # required, accepts TEXT, VOICE, WHATSAPP
  destination_identity: "DestinationIdentity", # required
  origination_identity: "OriginationIdentity", # required
  notify_code_configuration: "NotifyCodeConfigurationIdOrArn",
  override_channel_parameters: {
    text: {
      inline_template_body: "InlineTemplateBody",
      destination_country_parameters: {
        "DestinationCountryParameterKey" => "DestinationCountryParameterValue",
      },
    },
    voice: {
      inline_template_body: "InlineTemplateBody",
      language_code: "LanguageCode",
      voice_id: "VoiceId",
      voice_message_body_text_type: "TEXT", # accepts TEXT, SSML
    },
    notify: {
      notify_template_id: "NotifyTemplateId",
      voice_id: "VoiceId",
    },
    whats_app: {
      whats_app_template_name: "WhatsAppTemplateName",
      language_code: "LanguageCode",
    },
  },
  override_code_configuration_parameters: {
    code_type: "NUMERIC", # accepts NUMERIC, ALPHA, ALPHANUMERIC
    code_length: 1,
    validity_period_minutes: 1,
    max_attempts: 1,
  },
  configuration_set_name: "ConfigurationSetName",
  context: {
    "ContextKey" => "ContextValue",
  },
  reference_id: "ReferenceId",
})

Response structure


resp.verification_id #=> String
resp.message_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel (required, String) —

    The channel used to deliver the one-time passcode to the recipient.

  • :destination_identity (required, String) —

    The recipient identifier. For the TEXT and VOICE channels, specify an E.164 phone number. For the WhatsApp channel, specify a WhatsApp address.

  • :origination_identity (required, String) —

    The identity used to send the message, such as a phone number, sender ID, or pool that is owned by your account.

  • :notify_code_configuration (String) —

    The identifier or Amazon Resource Name (ARN) of the notify code configuration that supplies the passcode policy and template defaults. When you do not specify a configuration, you must supply the template in the request.

  • :override_channel_parameters (Types::ChannelParameters) —

    The channel-specific parameters used to render and deliver the one-time passcode for this request. The route that is derived from the channel and the origination identity selects the matching channel. When you do not specify channel parameters, the service uses the parameters from the referenced notify code configuration.

  • :override_code_configuration_parameters (Types::CodeConfigurationParameters) —

    The per-send overrides for the passcode policy parameters, including the code type, length, validity period, and maximum number of attempts. These values override the values from the referenced notify code configuration. When you do not specify a value, the value from the configuration is used, and if neither is set, the service default applies.

  • :configuration_set_name (String) —

    The name of the configuration set used to control how delivery events for the message are handled.

  • :context (Hash<String,String>) —

    A map of custom key and value pairs that are propagated to the delivery events for this verification.

  • :reference_id (String) —

    A caller-supplied reference identifier that binds a send request to a later validate request. Specify the same value in both requests.

Returns:

See Also:



1945
1946
1947
1948
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1945

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

#tag_resource(params = {}) ⇒ Struct

Adds or overwrites the tags on a resource.

Examples:

Example: Tag a resource


resp = client.tag_resource({
  resource_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:brand-profile/bp-abc12345678901234", 
  tags: [
    {
      key: "Environment", 
      value: "Production", 
    }, 
  ], 
})

resp.to_h outputs the following:
{
}

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:



1994
1995
1996
1997
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1994

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

#untag_resource(params = {}) ⇒ Struct

Removes the specified tags from a resource.

Examples:

Example: Remove tags from a resource


resp = client.untag_resource({
  resource_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:brand-profile/bp-abc12345678901234", 
  tag_keys: [
    "Environment", 
  ], 
})

resp.to_h outputs the following:
{
}

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>) —

    The list of tag keys to remove from the resource.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



2034
2035
2036
2037
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2034

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

#update_brand_profile(params = {}) ⇒ Types::UpdateBrandProfileOutput

Updates the name or the deletion protection setting of a brand profile. To change the information that is stored in the profile, use the brand profile attribute operations.

Examples:

Example: Update a brand profile name


resp = client.update_brand_profile({
  brand_profile_id: "bp-abc12345678901234", 
  brand_profile_name: "AcmeCorpUpdated", 
  deletion_protection_enabled: false, 
})

resp.to_h outputs the following:
{
  brand_profile_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:brand-profile/bp-abc12345678901234", 
  brand_profile_id: "bp-abc12345678901234", 
  brand_profile_name: "AcmeCorpUpdated", 
  created_at: Time.parse(1727130000), 
  deletion_protection_enabled: false, 
  status: "ACTIVE", 
  updated_at: Time.parse(1727216400), 
}

Request syntax with placeholder values


resp = client.update_brand_profile({
  brand_profile_id: "BrandProfileIdOrArn", # required
  brand_profile_name: "BrandProfileName",
  deletion_protection_enabled: false,
})

Response structure


resp.brand_profile_id #=> String
resp.brand_profile_arn #=> String
resp.brand_profile_name #=> String
resp.status #=> String, one of "ACTIVE", "BLOCKED", "PAUSED", "CANCELLED", "FAILED"
resp.deletion_protection_enabled #=> Boolean
resp.created_at #=> Time
resp.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_id (required, String) —

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

  • :brand_profile_name (String) —

    The name of the brand profile. The name can contain alphanumeric characters, underscores, hyphens, and spaces.

  • :deletion_protection_enabled (Boolean) —

    Specifies whether deletion protection is enabled. When enabled, the resource cannot be deleted until deletion protection is turned off.

Returns:

See Also:



2107
2108
2109
2110
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2107

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

#update_brand_profile_attribute(params = {}) ⇒ Types::UpdateBrandProfileAttributeOutput

Updates the value, description, or category of an existing brand profile attribute.

Examples:

Example: Update a brand profile attribute value


resp = client.update_brand_profile_attribute({
  attribute_name: "SupportEmail", 
  attribute_value: "help@example.com", 
  brand_profile_id: "bp-abc12345678901234", 
  category: "CONTACT", 
})

resp.to_h outputs the following:
{
  attribute_name: "SupportEmail", 
  attribute_type: "TEXT", 
  attribute_value: "help@example.com", 
  category: "CONTACT", 
  created_at: Time.parse(1727130000), 
  updated_at: Time.parse(1727216400), 
}

Request syntax with placeholder values


resp = client.update_brand_profile_attribute({
  brand_profile_id: "BrandProfileIdOrArn", # required
  attribute_name: "BrandProfileAttributeName", # required
  attribute_value: "BrandProfileAttributeValue",
  attachment_body: "data",
  description: "BrandProfileAttributeDescription",
  category: "BrandProfileAttributeCategory",
})

Response structure


resp.attribute_name #=> String
resp.attribute_type #=> String, one of "TEXT", "IMAGE", "DOCUMENT"
resp.attribute_value #=> String
resp.description #=> String
resp.category #=> String
resp.media_content_type #=> String
resp.media_size_bytes #=> Integer
resp.created_at #=> Time
resp.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_id (required, String) —

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

  • :attribute_name (required, String) —

    The name of the brand profile attribute. The name is unique within a brand profile.

  • :attribute_value (String) —

    The text value of the attribute. This value applies to attributes of type TEXT.

  • :attachment_body (String, StringIO, File) —

    The binary content for an attribute of type IMAGE or DOCUMENT. The content is base64-encoded when it is sent over the wire.

  • :description (String) —

    A description of the attribute.

  • :category (String) —

    The category of the attribute.

Returns:

See Also:



2196
2197
2198
2199
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2196

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

#update_brand_profile_from_registration(params = {}) ⇒ Types::UpdateBrandProfileFromRegistrationOutput

Imports or refreshes the attributes of an existing brand profile from an existing registration. This operation runs asynchronously. Use the GetJob operation to track its progress.

Examples:

Example: Update a brand profile from a registration


resp = client.update_brand_profile_from_registration({
  brand_profile_id: "bp-abc12345678901234", 
  on_attribute_conflict: "REPLACE", 
  registration_id: "reg-abc12345678901234", 
  smart_match: true, 
})

resp.to_h outputs the following:
{
  results: [
    {
      job_id: "job-abc12345678901234", 
      resource_identifier: "reg-abc12345678901234", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.update_brand_profile_from_registration({
  brand_profile_id: "BrandProfileIdOrArn", # required
  registration_id: "RegistrationIdOrArn", # required
  smart_match: false,
  on_attribute_conflict: "REPLACE", # accepts REPLACE, PRESERVE
  client_token: "ClientToken",
})

Response structure


resp.results #=> Array
resp.results[0].job_id #=> String
resp.results[0].resource_identifier #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_id (required, String) —

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

  • :registration_id (required, String) —

    The identifier or Amazon Resource Name (ARN) of the registration to import attributes from.

  • :smart_match (Boolean) —

    Specifies whether to use semantic field mapping between brand profile attributes and registration fields. The default is true. When false, the service maps fields using a fixed set of standard field types.

  • :on_attribute_conflict (String) —

    Specifies how the service resolves an attribute that already exists. REPLACE overwrites the existing value with the incoming value. PRESERVE keeps the existing value.

  • :client_token (String) —

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do not specify a client token, the AWS SDK automatically generates one.

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

Returns:

See Also:



2275
2276
2277
2278
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2275

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

#update_notify_code_configuration(params = {}) ⇒ Types::UpdateNotifyCodeConfigurationOutput

Updates the mutable fields of a notify code configuration. Only the fields that you supply are changed. For the template and language fields, supplying an empty value clears the currently stored value.

Examples:

Example: Update a notify code configuration


resp = client.update_notify_code_configuration({
  code_configuration_parameters: {
    code_length: 8, 
    validity_period_minutes: 15, 
  }, 
  notify_code_configuration_id: "ncc-abc12345678901234", 
})

resp.to_h outputs the following:
{
  notify_code_configuration: {
    channel_parameters: {
      text: {
        inline_template_body: "Your verification code is {{code}}.", 
      }, 
    }, 
    code_configuration_parameters: {
      code_length: 8, 
      code_type: "NUMERIC", 
      max_attempts: 3, 
      validity_period_minutes: 15, 
    }, 
    created_at: Time.parse(1727130000), 
    deletion_protection_enabled: false, 
    notify_code_configuration_arn: "arn:aws:end-user-messaging:us-east-1:123456789012:notify-code-configuration/ncc-abc12345678901234", 
    notify_code_configuration_id: "ncc-abc12345678901234", 
    notify_code_configuration_name: "SignupOtp", 
    updated_at: Time.parse(1727216400), 
  }, 
}

Request syntax with placeholder values


resp = client.update_notify_code_configuration({
  notify_code_configuration_id: "NotifyCodeConfigurationIdOrArn", # required
  notify_code_configuration_name: "NotifyCodeConfigurationName",
  code_configuration_parameters: {
    code_type: "NUMERIC", # accepts NUMERIC, ALPHA, ALPHANUMERIC
    code_length: 1,
    validity_period_minutes: 1,
    max_attempts: 1,
  },
  channel_parameters: {
    text: {
      inline_template_body: "UpdateInlineTemplateBody",
      destination_country_parameters: {
        "DestinationCountryParameterKey" => "DestinationCountryParameterValue",
      },
    },
    voice: {
      inline_template_body: "UpdateInlineTemplateBody",
      language_code: "UpdateLanguageCode",
      voice_id: "UpdateVoiceId",
      voice_message_body_text_type: "TEXT", # accepts TEXT, SSML
    },
    notify: {
      notify_template_id: "UpdateNotifyTemplateId",
      voice_id: "UpdateVoiceId",
    },
    whats_app: {
      whats_app_template_name: "UpdateWhatsAppTemplateName",
      language_code: "UpdateLanguageCode",
    },
  },
  deletion_protection_enabled: false,
})

Response structure


resp.notify_code_configuration.notify_code_configuration_id #=> String
resp.notify_code_configuration.notify_code_configuration_arn #=> String
resp.notify_code_configuration.notify_code_configuration_name #=> String
resp.notify_code_configuration.code_configuration_parameters.code_type #=> String, one of "NUMERIC", "ALPHA", "ALPHANUMERIC"
resp.notify_code_configuration.code_configuration_parameters.code_length #=> Integer
resp.notify_code_configuration.code_configuration_parameters.validity_period_minutes #=> Integer
resp.notify_code_configuration.code_configuration_parameters.max_attempts #=> Integer
resp.notify_code_configuration.channel_parameters.text.inline_template_body #=> String
resp.notify_code_configuration.channel_parameters.text.destination_country_parameters #=> Hash
resp.notify_code_configuration.channel_parameters.text.destination_country_parameters["DestinationCountryParameterKey"] #=> String
resp.notify_code_configuration.channel_parameters.voice.inline_template_body #=> String
resp.notify_code_configuration.channel_parameters.voice.language_code #=> String
resp.notify_code_configuration.channel_parameters.voice.voice_id #=> String
resp.notify_code_configuration.channel_parameters.voice.voice_message_body_text_type #=> String, one of "TEXT", "SSML"
resp.notify_code_configuration.channel_parameters.notify.notify_template_id #=> String
resp.notify_code_configuration.channel_parameters.notify.voice_id #=> String
resp.notify_code_configuration.channel_parameters.whats_app.whats_app_template_name #=> String
resp.notify_code_configuration.channel_parameters.whats_app.language_code #=> String
resp.notify_code_configuration.deletion_protection_enabled #=> Boolean
resp.notify_code_configuration.created_at #=> Time
resp.notify_code_configuration.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :notify_code_configuration_id (required, String) —

    The unique identifier of the notify code configuration. You can specify either the bare ID or the full Amazon Resource Name (ARN).

  • :notify_code_configuration_name (String) —

    The name of the notify code configuration.

  • :code_configuration_parameters (Types::UpdateCodeConfigurationParameters) —

    The updated passcode policy parameters, including the code type, length, validity period, and maximum number of attempts. When you omit a member, its current value is preserved.

  • :channel_parameters (Types::UpdateChannelParameters) —

    The updated channel-specific parameters used to render and deliver the one-time passcode. This is a loose, nested update: when you omit a channel, that channel's parameters remain unchanged. Within a supplied channel, an empty string on a string member, or an empty map on the destination-country parameters, clears the currently stored value, and absent members preserve the current value.

  • :deletion_protection_enabled (Boolean) —

    Specifies whether deletion protection is enabled. When enabled, the resource cannot be deleted until deletion protection is turned off.

Returns:

See Also:



2410
2411
2412
2413
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2410

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

#update_registrations_from_brand_profile(params = {}) ⇒ Types::UpdateRegistrationsFromBrandProfileOutput

Repushes the attributes of a brand profile into existing DRAFT registrations. This operation runs asynchronously. Use the GetJob operation to track its progress.

Examples:

Example: Update registrations from a brand profile


resp = client.update_registrations_from_brand_profile({
  brand_profile_id: "bp-abc12345678901234", 
  on_attribute_conflict: "PRESERVE", 
  registration_ids: [
    "reg-abc12345678901234", 
  ], 
  smart_match: true, 
})

resp.to_h outputs the following:
{
  results: [
    {
      job_id: "job-abc12345678901234", 
      resource_identifier: "reg-abc12345678901234", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.update_registrations_from_brand_profile({
  brand_profile_id: "BrandProfileIdOrArn", # required
  registration_ids: ["RegistrationIdOrArn"], # required
  smart_match: false,
  on_attribute_conflict: "REPLACE", # accepts REPLACE, PRESERVE
  client_token: "ClientToken",
})

Response structure


resp.results #=> Array
resp.results[0].job_id #=> String
resp.results[0].resource_identifier #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :brand_profile_id (required, String) —

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

  • :registration_ids (required, Array<String>) —

    The identifiers of the registrations.

  • :smart_match (Boolean) —

    Specifies whether to use semantic field mapping between brand profile attributes and registration fields. The default is true. When false, the service maps fields using a fixed set of standard field types.

  • :on_attribute_conflict (String) —

    Specifies how the service resolves an attribute that already exists. REPLACE overwrites the existing value with the incoming value. PRESERVE keeps the existing value.

  • :client_token (String) —

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do not specify a client token, the AWS SDK automatically generates one.

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

Returns:

See Also:



2490
2491
2492
2493
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2490

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

#validate_notify_code_verification(params = {}) ⇒ Types::ValidateNotifyCodeVerificationOutput

Validates a one-time passcode that a recipient submitted. Validation succeeds when the passcode matches, the validity period has not elapsed, and the maximum number of attempts has not been exceeded.

Examples:

Example: Validate a submitted one-time passcode


resp = client.validate_notify_code_verification({
  code: "123456", 
  destination_identity: "+14255550100", 
  reference_id: "signup-flow-42", 
})

resp.to_h outputs the following:
{
  status: "VALID", 
}

Request syntax with placeholder values


resp = client.validate_notify_code_verification({
  destination_identity: "DestinationIdentity", # required
  reference_id: "ReferenceId",
  code: "VerificationCode", # required
})

Response structure


resp.status #=> String, one of "VALID", "INVALID"

Parameters:

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

    ({})

Options Hash (params):

  • :destination_identity (required, String) —

    The recipient identifier. For the TEXT and VOICE channels, specify an E.164 phone number. For the WhatsApp channel, specify a WhatsApp address.

  • :reference_id (String) —

    The caller-supplied reference identifier used to locate the verification. This value must match the value that you supplied to the SendNotifyCodeVerification operation.

  • :code (required, String) —

    The one-time passcode that the recipient submitted for validation.

Returns:

See Also:



2546
2547
2548
2549
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2546

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

#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean

Polls an API operation until a resource enters a desired state.

Basic Usage

A waiter will call an API operation until:

  • It is successful
  • It enters a terminal state
  • It makes the maximum number of attempts

In between attempts, the waiter will sleep.

# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.

# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(waiter_name, params, {

  # disable max attempts
  max_attempts: nil,

  # poll for 1 hour, instead of a number of attempts
  before_wait: -> (attempts, response) do
    throw :failure if Time.now - started_at > 3600
  end
})

Handling Errors

When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Valid Waiters

The following table lists the valid waiter names, the operations they call, and the default :delay and :max_attempts values.

waiter_name params :delay :max_attempts
brand_profile_active #get_brand_profile 30 5
job_success #get_job 30 5

Parameters:

  • waiter_name (Symbol)
  • params (Hash) (defaults to: {}) —

    ({})

  • options (Hash) (defaults to: {}) —

    ({})

Options Hash (options):

  • :max_attempts (Integer)
  • :delay (Integer)
  • :before_attempt (Proc)
  • :before_wait (Proc)

Yields:

  • (w.waiter)

Returns:

  • (Boolean) —

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError) —

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError) —

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError) —

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError) —

    Raised when you request to wait for an unknown state.



2662
2663
2664
2665
2666
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2662

def wait_until(waiter_name, params = {}, options = {})
  w = waiter(waiter_name, options)
  yield(w.waiter) if block_given? # deprecated
  w.wait(params)
end