send_media_message
async
¶
send_media_message(
destination_phone_number: PhoneNumber,
origination_identity: MediaMessageOriginationIdentity,
*,
config_overrides: Optional[AsyncPinpointSMSVoiceV2ClientConfig] = None,
message_body: Optional[TextMessageBody] = None,
media_urls: Optional[MediaUrlList] = None,
configuration_set_name: Optional[ConfigurationSetNameOrArn] = None,
max_price: Optional[MaxPrice] = None,
time_to_live: Optional[TimeToLive] = None,
context: Optional[ContextMap] = None,
dry_run: Optional[bool] = None,
protect_configuration_id: Optional[ProtectConfigurationIdOrArn] = None,
message_feedback_enabled: Optional[bool] = None,
) -> SendMediaMessageResult
Creates a new multimedia message (MMS) and sends it to a recipient's phone number.
Parameters:
-
destination_phone_number(PhoneNumber) –The destination phone number in E.164 format.
-
origination_identity(MediaMessageOriginationIdentity) –The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.
If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).
-
message_body(Optional[TextMessageBody], default:None) –The text body of the message.
-
media_urls(Optional[MediaUrlList], default:None) –An array of URLs to each media file to send.
The media files have to be stored in an S3 bucket. Supported media file formats are listed in MMS file types, size and character limits. For more information on creating an S3 bucket and managing objects, see Creating a bucket, Uploading objects in the Amazon S3 User Guide, and Setting up an Amazon S3 bucket for MMS files in the Amazon Web Services End User Messaging SMS User Guide.
-
configuration_set_name(Optional[ConfigurationSetNameOrArn], default:None) –The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.
-
max_price(Optional[MaxPrice], default:None) –The maximum amount that you want to spend, in US dollars, per each MMS message.
-
time_to_live(Optional[TimeToLive], default:None) –How long the media message is valid for. By default this is 72 hours.
-
context(Optional[ContextMap], default:None) –You can specify custom data in this field. If you do, that data is logged to the event destination.
-
dry_run(Optional[bool], default:None) –When set to true, the message is checked and validated, but isn't sent to the end recipient.
-
protect_configuration_id(Optional[ProtectConfigurationIdOrArn], default:None) –The unique identifier of the protect configuration to use.
-
message_feedback_enabled(Optional[bool], default:None) –Set to true to enable message feedback for the message. When a user receives the message you need to update the message status using PutMessageFeedback.
Raises:
-
AccessDeniedException–The request was denied because you don't have sufficient permissions to access the resource.
-
ConflictException–Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time or it could be that the requested action isn't valid for the current state or configuration of the resource.
-
InternalServerException–The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.
-
ResourceNotFoundException–A requested resource couldn't be found.
-
ServiceQuotaExceededException–The request would cause a service quota to be exceeded.
-
ThrottlingException–An error that occurred because too many requests were sent during a certain amount of time.
-
ValidationException–A validation exception for a field.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_pinpoint_sms_voice_v2/_services/async_pinpoint_sms_voice_v2.py
5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 | |