Class: Aws::SocialMessaging::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::SocialMessaging::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-socialmessaging/client.rb
Overview
An API client for SocialMessaging. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::SocialMessaging::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#associate_whats_app_business_account(params = {}) ⇒ Types::AssociateWhatsAppBusinessAccountOutput
This is only used through the Amazon Web Services console during sign-up to associate your WhatsApp Business Account to your Amazon Web Services account.
-
#delete_whats_app_message_media(params = {}) ⇒ Types::DeleteWhatsAppMessageMediaOutput
Delete a media object from the WhatsApp service.
-
#disassociate_whats_app_business_account(params = {}) ⇒ Struct
Disassociate a WhatsApp Business Account (WABA) from your Amazon Web Services account.
-
#get_linked_whats_app_business_account(params = {}) ⇒ Types::GetLinkedWhatsAppBusinessAccountOutput
Get the details of your linked WhatsApp Business Account.
-
#get_linked_whats_app_business_account_phone_number(params = {}) ⇒ Types::GetLinkedWhatsAppBusinessAccountPhoneNumberOutput
Use your WhatsApp phone number id to get the WABA account id and phone number details.
-
#get_whats_app_message_media(params = {}) ⇒ Types::GetWhatsAppMessageMediaOutput
Get a media file from the WhatsApp service.
-
#list_linked_whats_app_business_accounts(params = {}) ⇒ Types::ListLinkedWhatsAppBusinessAccountsOutput
List all WhatsApp Business Accounts linked to your Amazon Web Services account.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
List all tags associated with a resource, such as a phone number or WABA.
-
#post_whats_app_message_media(params = {}) ⇒ Types::PostWhatsAppMessageMediaOutput
Upload a media file to the WhatsApp service.
-
#put_whats_app_business_account_event_destinations(params = {}) ⇒ Struct
Add an event destination to log event data from WhatsApp for a WhatsApp Business Account (WABA).
-
#send_whats_app_message(params = {}) ⇒ Types::SendWhatsAppMessageOutput
Send a WhatsApp message.
-
#tag_resource(params = {}) ⇒ Types::TagResourceOutput
Adds or overwrites only the specified tags for the specified resource.
-
#untag_resource(params = {}) ⇒ Types::UntagResourceOutput
Removes the specified tags from a resource.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
444 445 446 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 444 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1114 1115 1116 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 1114 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1117 1118 1119 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 1117 def errors_module Errors end |
Instance Method Details
#associate_whats_app_business_account(params = {}) ⇒ Types::AssociateWhatsAppBusinessAccountOutput
This is only used through the Amazon Web Services console during sign-up to associate your WhatsApp Business Account to your Amazon Web Services account.
527 528 529 530 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 527 def associate_whats_app_business_account(params = {}, = {}) req = build_request(:associate_whats_app_business_account, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 1087 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::SocialMessaging') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-socialmessaging' context[:gem_version] = '1.3.0' Seahorse::Client::Request.new(handlers, context) end |
#delete_whats_app_message_media(params = {}) ⇒ Types::DeleteWhatsAppMessageMediaOutput
Delete a media object from the WhatsApp service. If the object is still in an Amazon S3 bucket you should delete it from there too.
572 573 574 575 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 572 def (params = {}, = {}) req = build_request(:delete_whats_app_message_media, params) req.send_request() end |
#disassociate_whats_app_business_account(params = {}) ⇒ Struct
Disassociate a WhatsApp Business Account (WABA) from your Amazon Web Services account.
602 603 604 605 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 602 def disassociate_whats_app_business_account(params = {}, = {}) req = build_request(:disassociate_whats_app_business_account, params) req.send_request() end |
#get_linked_whats_app_business_account(params = {}) ⇒ Types::GetLinkedWhatsAppBusinessAccountOutput
Get the details of your linked WhatsApp Business Account.
654 655 656 657 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 654 def get_linked_whats_app_business_account(params = {}, = {}) req = build_request(:get_linked_whats_app_business_account, params) req.send_request() end |
#get_linked_whats_app_business_account_phone_number(params = {}) ⇒ Types::GetLinkedWhatsAppBusinessAccountPhoneNumberOutput
Use your WhatsApp phone number id to get the WABA account id and phone number details.
698 699 700 701 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 698 def get_linked_whats_app_business_account_phone_number(params = {}, = {}) req = build_request(:get_linked_whats_app_business_account_phone_number, params) req.send_request() end |
#get_whats_app_message_media(params = {}) ⇒ Types::GetWhatsAppMessageMediaOutput
Get a media file from the WhatsApp service. On successful completion the media file is retrieved from Meta and stored in the specified Amazon S3 bucket. Use either ‘destinationS3File` or `destinationS3PresignedUrl` for the destination. If both are used then an `InvalidParameterException` is returned.
763 764 765 766 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 763 def (params = {}, = {}) req = build_request(:get_whats_app_message_media, params) req.send_request() end |
#list_linked_whats_app_business_accounts(params = {}) ⇒ Types::ListLinkedWhatsAppBusinessAccountsOutput
List all WhatsApp Business Accounts linked to your Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
809 810 811 812 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 809 def list_linked_whats_app_business_accounts(params = {}, = {}) req = build_request(:list_linked_whats_app_business_accounts, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
List all tags associated with a resource, such as a phone number or WABA.
843 844 845 846 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 843 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#post_whats_app_message_media(params = {}) ⇒ Types::PostWhatsAppMessageMediaOutput
Upload a media file to the WhatsApp service. Only the specified ‘originationPhoneNumberId` has the permissions to send the media file when using [SendWhatsAppMessage]. You must use either `sourceS3File` or `sourceS3PresignedUrl` for the source. If both or neither are specified then an `InvalidParameterException` is returned.
[1]: docs.aws.amazon.com/social-messaging/latest/APIReference/API_SendWhatsAppMessage.html
902 903 904 905 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 902 def (params = {}, = {}) req = build_request(:post_whats_app_message_media, params) req.send_request() end |
#put_whats_app_business_account_event_destinations(params = {}) ⇒ Struct
Add an event destination to log event data from WhatsApp for a WhatsApp Business Account (WABA). A WABA can only have one event destination at a time. All resources associated with the WABA use the same event destination.
944 945 946 947 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 944 def put_whats_app_business_account_event_destinations(params = {}, = {}) req = build_request(:put_whats_app_business_account_event_destinations, params) req.send_request() end |
#send_whats_app_message(params = {}) ⇒ Types::SendWhatsAppMessageOutput
Send a WhatsApp message. For examples of sending a message using the Amazon Web Services CLI, see [Sending messages] in the Amazon Web Services End User Messaging Social User Guide .
[1]: docs.aws.amazon.com/social-messaging/latest/userguide/send-message.html
1007 1008 1009 1010 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 1007 def (params = {}, = {}) req = build_request(:send_whats_app_message, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Types::TagResourceOutput
Adds or overwrites only the specified tags for the specified resource. When you specify an existing tag key, the value is overwritten with the new value.
1046 1047 1048 1049 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 1046 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Types::UntagResourceOutput
Removes the specified tags from a resource.
1078 1079 1080 1081 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 1078 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1107 1108 1109 |
# File 'lib/aws-sdk-socialmessaging/client.rb', line 1107 def waiter_names [] end |