send_media_message
¶
send_media_message(
destination_phone_number: PhoneNumber,
origination_identity: MediaMessageOriginationIdentity,
*,
config_overrides: Optional[PinpointSMSVoiceV2ClientConfig] = 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/pinpoint_sms_voice_v2.py
5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 | |