Creates a new campaign for an application or updates the settings of an existing campaign for an application.
#create_segment(options = {}) ⇒ Types::CreateSegmentResponseCreates a new segment for an application or updates the configuration, dimension, and other settings for an existing segment that's associated with an application.
#delete_adm_channel(options = {}) ⇒ Types::DeleteAdmChannelResponseDisables the ADM channel for an application and deletes any existing settings for the channel.
#delete_apns_channel(options = {}) ⇒ Types::DeleteApnsChannelResponseDisables the APNs channel for an application and deletes any existing settings for the channel.
#delete_baidu_channel(options = {}) ⇒ Types::DeleteBaiduChannelResponseDisables the Baidu channel for an application and deletes any existing settings for the channel.
#delete_email_channel(options = {}) ⇒ Types::DeleteEmailChannelResponseDisables the email channel for an application and deletes any existing settings for the channel.
#delete_gcm_channel(options = {}) ⇒ Types::DeleteGcmChannelResponseDisables the GCM channel for an application and deletes any existing settings for the channel.
#delete_sms_channel(options = {}) ⇒ Types::DeleteSmsChannelResponseDisables the SMS channel for an application and deletes any existing settings for the channel.
#delete_voice_channel(options = {}) ⇒ Types::DeleteVoiceChannelResponseDisables the voice channel for an application and deletes any existing settings for the channel.
#get_adm_channel(options = {}) ⇒ Types::GetAdmChannelResponseRetrieves information about the status and settings of the ADM channel for an application.
#get_apns_channel(options = {}) ⇒ Types::GetApnsChannelResponseRetrieves information about the status and settings of the APNs channel for an application.
#get_apns_voip_channel(options = {}) ⇒ Types::GetApnsVoipChannelResponseRetrieves information about the status and settings of the APNs VoIP channel for an application.
#get_apps(options = {}) ⇒ Types::GetAppsResponseRetrieves information about all the applications that are associated with your Amazon Pinpoint account.
#get_baidu_channel(options = {}) ⇒ Types::GetBaiduChannelResponseRetrieves information about the status and settings of the Baidu channel for an application.
#get_campaign(options = {}) ⇒ Types::GetCampaignResponseRetrieves information about the status, configuration, and other settings for a campaign.
#get_campaign_version(options = {}) ⇒ Types::GetCampaignVersionResponseRetrieves information about the status, configuration, and other settings for a specific version of a campaign.
#get_campaign_versions(options = {}) ⇒ Types::GetCampaignVersionsResponseRetrieves information about the status, configuration, and other settings for all versions of a campaign.
#get_campaigns(options = {}) ⇒ Types::GetCampaignsResponseRetrieves information about the status, configuration, and other settings for all the campaigns that are associated with an application.
#get_channels(options = {}) ⇒ Types::GetChannelsResponseRetrieves information about the history and status of each channel for an application.
#get_email_channel(options = {}) ⇒ Types::GetEmailChannelResponseRetrieves information about the status and settings of the email channel for an application.
#get_email_template(options = {}) ⇒ Types::GetEmailTemplateResponseRetrieves the content and settings of a message template for messages that are sent through the email channel.
#get_endpoint(options = {}) ⇒ Types::GetEndpointResponseRetrieves information about the settings and attributes of a specific endpoint for an application.
#get_export_job(options = {}) ⇒ Types::GetExportJobResponseRetrieves information about the status and settings of a specific export job for an application.
#get_export_jobs(options = {}) ⇒ Types::GetExportJobsResponseRetrieves information about the status and settings of all the export jobs for an application.
#get_gcm_channel(options = {}) ⇒ Types::GetGcmChannelResponseRetrieves information about the status and settings of the GCM channel for an application.
#get_import_job(options = {}) ⇒ Types::GetImportJobResponseRetrieves information about the status and settings of a specific import job for an application.
#get_import_jobs(options = {}) ⇒ Types::GetImportJobsResponseRetrieves information about the status and settings of all the import jobs for an application.
#get_journey(options = {}) ⇒ Types::GetJourneyResponseRetrieves information about the status, configuration, and other settings for a journey.
#get_push_template(options = {}) ⇒ Types::GetPushTemplateResponseRetrieves the content and settings of a message template for messages that are sent through a push notification channel.
#get_recommender_configurations(options = {}) ⇒ Types::GetRecommenderConfigurationsResponseRetrieves information about all the recommender model configurations that are associated with your Amazon Pinpoint account.
#get_segment(options = {}) ⇒ Types::GetSegmentResponseRetrieves information about the configuration, dimension, and other settings for a specific segment that's associated with an application.
#get_segment_version(options = {}) ⇒ Types::GetSegmentVersionResponseRetrieves information about the configuration, dimension, and other settings for a specific version of a segment that's associated with an application.
#get_segment_versions(options = {}) ⇒ Types::GetSegmentVersionsResponseRetrieves information about the configuration, dimension, and other settings for all the versions of a specific segment that's associated with an application.
#get_segments(options = {}) ⇒ Types::GetSegmentsResponseRetrieves information about the configuration, dimension, and other settings for all the segments that are associated with an application.
#get_sms_channel(options = {}) ⇒ Types::GetSmsChannelResponseRetrieves information about the status and settings of the SMS channel for an application.
#get_sms_template(options = {}) ⇒ Types::GetSmsTemplateResponseRetrieves the content and settings of a message template for messages that are sent through the SMS channel.
#get_user_endpoints(options = {}) ⇒ Types::GetUserEndpointsResponseRetrieves information about all the endpoints that are associated with a specific user ID.
#get_voice_channel(options = {}) ⇒ Types::GetVoiceChannelResponseRetrieves information about the status and settings of the voice channel for an application.
#get_voice_template(options = {}) ⇒ Types::GetVoiceTemplateResponseRetrieves the content and settings of a message template for messages that are sent through the voice channel.
#list_journeys(options = {}) ⇒ Types::ListJourneysResponseRetrieves information about the status, configuration, and other settings for all the journeys that are associated with an application.
#list_tags_for_resource(options = {}) ⇒ Types::ListTagsForResourceResponseRetrieves all the tags (keys and values) that are associated with an application, campaign, message template, or segment.
#list_templates(options = {}) ⇒ Types::ListTemplatesResponseRetrieves information about all the message templates that are associated with your Amazon Pinpoint account.
#put_event_stream(options = {}) ⇒ Types::PutEventStreamResponseCreates a new event stream for an application or updates the settings of an existing event stream for an application.
#put_events(options = {}) ⇒ Types::PutEventsResponseCreates a new event to record for endpoints, or creates or updates endpoint data that existing events are associated with.
#remove_attributes(options = {}) ⇒ Types::RemoveAttributesResponseRemoves one or more attributes, of the same attribute type, from all the endpoints that are associated with an application.
#tag_resource(options = {}) ⇒ StructAdds one or more tags (keys and values) to an application, campaign, message template, or segment.
#untag_resource(options = {}) ⇒ StructRemoves one or more tags (keys and values) from an application, campaign, message template, or segment.
#update_adm_channel(options = {}) ⇒ Types::UpdateAdmChannelResponseEnables the ADM channel for an application or updates the status and settings of the ADM channel for an application.
#update_apns_channel(options = {}) ⇒ Types::UpdateApnsChannelResponseEnables the APNs channel for an application or updates the status and settings of the APNs channel for an application.
#update_apns_sandbox_channel(options = {}) ⇒ Types::UpdateApnsSandboxChannelResponseEnables the APNs sandbox channel for an application or updates the status and settings of the APNs sandbox channel for an application.
#update_apns_voip_channel(options = {}) ⇒ Types::UpdateApnsVoipChannelResponseEnables the APNs VoIP channel for an application or updates the status and settings of the APNs VoIP channel for an application.
#update_apns_voip_sandbox_channel(options = {}) ⇒ Types::UpdateApnsVoipSandboxChannelResponseEnables the APNs VoIP sandbox channel for an application or updates the status and settings of the APNs VoIP sandbox channel for an application.
#update_baidu_channel(options = {}) ⇒ Types::UpdateBaiduChannelResponseEnables the Baidu channel for an application or updates the status and settings of the Baidu channel for an application.
#update_email_channel(options = {}) ⇒ Types::UpdateEmailChannelResponseEnables the email channel for an application or updates the status and settings of the email channel for an application.
#update_endpoint(options = {}) ⇒ Types::UpdateEndpointResponseCreates a new endpoint for an application or updates the settings and attributes of an existing endpoint for an application. You can also use this operation to define custom attributes for an endpoint. If an update includes one or more values for a custom attribute, Amazon Pinpoint replaces (overwrites) any existing values with the new values.
#update_endpoints_batch(options = {}) ⇒ Types::UpdateEndpointsBatchResponseCreates a new batch of endpoints for an application or updates the settings and attributes of a batch of existing endpoints for an application. You can also use this operation to define custom attributes for a batch of endpoints. If an update includes one or more values for a custom attribute, Amazon Pinpoint replaces (overwrites) any existing values with the new values.
#update_gcm_channel(options = {}) ⇒ Types::UpdateGcmChannelResponseEnables the GCM channel for an application or updates the status and settings of the GCM channel for an application.
#update_push_template(options = {}) ⇒ Types::UpdatePushTemplateResponseUpdates an existing message template for messages that are sent through a push notification channel.
#update_segment(options = {}) ⇒ Types::UpdateSegmentResponseCreates a new segment for an application or updates the configuration, dimension, and other settings for an existing segment that's associated with an application.
#update_sms_channel(options = {}) ⇒ Types::UpdateSmsChannelResponseEnables the SMS channel for an application or updates the status and settings of the SMS channel for an application.
#update_voice_channel(options = {}) ⇒ Types::UpdateVoiceChannelResponseEnables the voice channel for an application or updates the status and settings of the voice channel for an application.
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ BooleanWaiters polls an API operation until a resource enters a desired state.
Basic UsageWaiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.
# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)
ConfigurationYou can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:
# poll for ~25 seconds
client.wait_until(...) do |w|
w.max_attempts = 5
w.delay = 5
end
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(...) do |w|
# disable max attempts
w.max_attempts = nil
# poll for 1 hour, instead of a number of attempts
w.before_wait do |attempts, response|
throw :failure if Time.now - started_at > 3600
end
end
Handling Errors
When a waiter is successful, it returns true
. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:
Waiter Name Client Method Default Delay: Default Max Attempts:RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4