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.
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.
563 564 565 566 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 563 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.
646 647 648 649 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 646 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.
728 729 730 731 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 728 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.
884 885 886 887 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 884 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.
958 959 960 961 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 958 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.
1004 1005 1006 1007 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1004 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.
1055 1056 1057 1058 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1055 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.
1091 1092 1093 1094 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1091 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
1158 1159 1160 1161 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1158 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.
1228 1229 1230 1231 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1228 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
1306 1307 1308 1309 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1306 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.
1385 1386 1387 1388 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1385 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.
1455 1456 1457 1458 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1455 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.
1523 1524 1525 1526 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1523 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.
1609 1610 1611 1612 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1609 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.
1701 1702 1703 1704 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1701 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.
1769 1770 1771 1772 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1769 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.
1816 1817 1818 1819 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1816 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.
1945 1946 1947 1948 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1945 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.
1994 1995 1996 1997 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 1994 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.
2034 2035 2036 2037 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2034 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.
2107 2108 2109 2110 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2107 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.
2196 2197 2198 2199 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2196 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.
2275 2276 2277 2278 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2275 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.
2410 2411 2412 2413 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2410 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.
2490 2491 2492 2493 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2490 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.
2546 2547 2548 2549 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2546 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 |
2662 2663 2664 2665 2666 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/client.rb', line 2662 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |