Class: Aws::EndUserMessaging::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::EndUserMessaging::Client
- 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
API Operations collapse
-
#create_brand_profile(params = {}) ⇒ Types::CreateBrandProfileOutput
Creates a brand profile.
-
#create_brand_profile_attributes(params = {}) ⇒ Types::CreateBrandProfileAttributesOutput
Creates up to 10 attributes for a brand profile in a single request.
-
#create_brand_profile_from_registration(params = {}) ⇒ Types::CreateBrandProfileFromRegistrationOutput
Creates a brand profile and populates its attributes from an existing registration.
-
#create_notify_code_configuration(params = {}) ⇒ Types::CreateNotifyCodeConfigurationOutput
Creates a notify code configuration.
-
#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.
-
#delete_brand_profile(params = {}) ⇒ Types::DeleteBrandProfileOutput
Deletes a brand profile.
-
#delete_brand_profile_attribute(params = {}) ⇒ Types::DeleteBrandProfileAttributeOutput
Deletes a brand profile attribute.
-
#delete_notify_code_configuration(params = {}) ⇒ Struct
Deletes a notify code configuration.
-
#get_brand_profile(params = {}) ⇒ Types::GetBrandProfileOutput
Retrieves the metadata for a brand profile, including its name, status, deletion protection setting, and timestamps.
-
#get_brand_profile_attribute(params = {}) ⇒ Types::GetBrandProfileAttributeOutput
Retrieves a single brand profile attribute.
-
#get_job(params = {}) ⇒ Types::Job
Retrieves the current state of an asynchronous job, including its status and any resources that it created or updated.
-
#get_notify_code_configuration(params = {}) ⇒ Types::GetNotifyCodeConfigurationOutput
Retrieves a notify code configuration.
-
#list_brand_profile_attributes(params = {}) ⇒ Types::ListBrandProfileAttributesOutput
Retrieves a paginated list of the attributes for a brand profile.
-
#list_brand_profiles(params = {}) ⇒ Types::ListBrandProfilesOutput
Retrieves a paginated list of the brand profiles in your account.
-
#list_jobs(params = {}) ⇒ Types::ListJobsOutput
Retrieves a paginated list of the asynchronous jobs in your account.
-
#list_notify_code_configurations(params = {}) ⇒ Types::ListNotifyCodeConfigurationsOutput
Retrieves a paginated list of the notify code configurations in your account.
-
#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.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Retrieves the tags that are associated with a resource.
-
#send_notify_code_verification(params = {}) ⇒ Types::SendNotifyCodeVerificationOutput
Generates a one-time passcode and delivers it to a recipient over the requested channel.
-
#tag_resource(params = {}) ⇒ Struct
Adds or overwrites the tags on a resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes the specified tags from a resource.
-
#update_brand_profile(params = {}) ⇒ Types::UpdateBrandProfileOutput
Updates the name or the deletion protection setting of a brand profile.
-
#update_brand_profile_attribute(params = {}) ⇒ Types::UpdateBrandProfileAttributeOutput
Updates the value, description, or category of an existing brand profile attribute.
-
#update_brand_profile_from_registration(params = {}) ⇒ Types::UpdateBrandProfileFromRegistrationOutput
Imports or refreshes the attributes of an existing brand profile from an existing registration.
-
#update_notify_code_configuration(params = {}) ⇒ Types::UpdateNotifyCodeConfigurationOutput
Updates the mutable fields of a notify code configuration.
-
#update_registrations_from_brand_profile(params = {}) ⇒ Types::UpdateRegistrationsFromBrandProfileOutput
Repushes the attributes of a brand profile into existing DRAFT registrations.
-
#validate_notify_code_verification(params = {}) ⇒ Types::ValidateNotifyCodeVerificationOutput
Validates a one-time passcode that a recipient submitted.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
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.
478 479 480 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 478 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.
570 571 572 573 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 570 def create_brand_profile(params = {}, = {}) req = build_request(:create_brand_profile, params) req.send_request() 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.
653 654 655 656 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 653 def create_brand_profile_attributes(params = {}, = {}) req = build_request(:create_brand_profile_attributes, params) req.send_request() 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.
735 736 737 738 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 735 def create_brand_profile_from_registration(params = {}, = {}) req = build_request(:create_brand_profile_from_registration, params) req.send_request() 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.
891 892 893 894 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 891 def create_notify_code_configuration(params = {}, = {}) req = build_request(:create_notify_code_configuration, params) req.send_request() 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.
965 966 967 968 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 965 def create_registrations_from_brand_profile(params = {}, = {}) req = build_request(:create_registrations_from_brand_profile, params) req.send_request() 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.
1011 1012 1013 1014 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1011 def delete_brand_profile(params = {}, = {}) req = build_request(:delete_brand_profile, params) req.send_request() 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.
1062 1063 1064 1065 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1062 def delete_brand_profile_attribute(params = {}, = {}) req = build_request(:delete_brand_profile_attribute, params) req.send_request() 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.
1098 1099 1100 1101 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1098 def delete_notify_code_configuration(params = {}, = {}) req = build_request(:delete_notify_code_configuration, params) req.send_request() 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
1165 1166 1167 1168 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1165 def get_brand_profile(params = {}, = {}) req = build_request(:get_brand_profile, params) req.send_request() end |
#get_brand_profile_attribute(params = {}) ⇒ Types::GetBrandProfileAttributeOutput
Retrieves a single brand profile attribute.
1235 1236 1237 1238 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1235 def get_brand_profile_attribute(params = {}, = {}) req = build_request(:get_brand_profile_attribute, params) req.send_request() 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
1313 1314 1315 1316 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1313 def get_job(params = {}, = {}) req = build_request(:get_job, params) req.send_request() end |
#get_notify_code_configuration(params = {}) ⇒ Types::GetNotifyCodeConfigurationOutput
Retrieves a notify code configuration.
1392 1393 1394 1395 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1392 def get_notify_code_configuration(params = {}, = {}) req = build_request(:get_notify_code_configuration, params) req.send_request() 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.
1462 1463 1464 1465 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1462 def list_brand_profile_attributes(params = {}, = {}) req = build_request(:list_brand_profile_attributes, params) req.send_request() 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.
1530 1531 1532 1533 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1530 def list_brand_profiles(params = {}, = {}) req = build_request(:list_brand_profiles, params) req.send_request() 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.
1616 1617 1618 1619 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1616 def list_jobs(params = {}, = {}) req = build_request(:list_jobs, params) req.send_request() 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.
1708 1709 1710 1711 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1708 def list_notify_code_configurations(params = {}, = {}) req = build_request(:list_notify_code_configurations, params) req.send_request() 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.
1776 1777 1778 1779 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1776 def list_registrations_from_brand_profile(params = {}, = {}) req = build_request(:list_registrations_from_brand_profile, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Retrieves the tags that are associated with a resource.
1823 1824 1825 1826 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1823 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() 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.
1952 1953 1954 1955 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1952 def send_notify_code_verification(params = {}, = {}) req = build_request(:send_notify_code_verification, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds or overwrites the tags on a resource.
2001 2002 2003 2004 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2001 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes the specified tags from a resource.
2041 2042 2043 2044 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2041 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() 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.
2114 2115 2116 2117 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2114 def update_brand_profile(params = {}, = {}) req = build_request(:update_brand_profile, params) req.send_request() end |
#update_brand_profile_attribute(params = {}) ⇒ Types::UpdateBrandProfileAttributeOutput
Updates the value, description, or category of an existing brand profile attribute.
2203 2204 2205 2206 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2203 def update_brand_profile_attribute(params = {}, = {}) req = build_request(:update_brand_profile_attribute, params) req.send_request() 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.
2282 2283 2284 2285 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2282 def update_brand_profile_from_registration(params = {}, = {}) req = build_request(:update_brand_profile_from_registration, params) req.send_request() 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.
2417 2418 2419 2420 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2417 def update_notify_code_configuration(params = {}, = {}) req = build_request(:update_notify_code_configuration, params) req.send_request() 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.
2497 2498 2499 2500 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2497 def update_registrations_from_brand_profile(params = {}, = {}) req = build_request(:update_registrations_from_brand_profile, params) req.send_request() 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.
2553 2554 2555 2556 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2553 def validate_notify_code_verification(params = {}, = {}) req = build_request(:validate_notify_code_verification, params) req.send_request() 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 |
2669 2670 2671 2672 2673 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2669 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |