send_rcs_message
¶
send_rcs_message(
destination_phone_number: PhoneNumber,
origination_identity: RcsMessageOriginationIdentity,
*,
config_overrides: Optional[PinpointSMSVoiceV2ClientConfig] = None,
rcs_message_content: Optional[RcsMessageContent] = None,
time_to_live: Optional[RcsTimeToLive] = None,
message_traffic_type: Optional[RcsMessageTrafficType] = None,
fallback_configuration: Optional[RcsFallbackConfiguration] = None,
protect_configuration_id: Optional[ProtectConfigurationIdOrArn] = None,
configuration_set_name: Optional[ConfigurationSetNameOrArn] = None,
max_price: Optional[MaxPrice] = None,
dry_run: Optional[bool] = None,
context: Optional[ContextMap] = None,
message_feedback_enabled: Optional[bool] = None,
) -> SendRcsMessageResult
Creates a new RCS message and sends it to a recipient's phone number. RCS messages support rich content including text, files, rich cards, and carousels with interactive suggested actions.
Parameters:
-
destination_phone_number(PhoneNumber) –The destination phone number in E.164 format.
-
origination_identity(RcsMessageOriginationIdentity) –The origination identity of the message. This can be either the RcsAgentId, RcsAgentArn, PoolId, or PoolArn.
-
rcs_message_content(Optional[RcsMessageContent], default:None) –The content of the RCS message. Contains the message content (text, file, rich card, or carousel) and optional message-level suggested actions.
-
time_to_live(Optional[RcsTimeToLive], default:None) –The duration in seconds that the RCS message is valid for delivery. If the message cannot be delivered within this duration, it is considered expired. Valid values are 1 to 172800 (48 hours). If a FallbackConfiguration is provided, the fallback is triggered when the duration expires without delivery confirmation.
-
message_traffic_type(Optional[RcsMessageTrafficType], default:None) –The traffic type of the RCS message. Valid values are AUTHENTICATION, TRANSACTION, PROMOTION, SERVICE_REQUEST, and ACKNOWLEDGEMENT. This field is reserved for future use.
-
fallback_configuration(Optional[RcsFallbackConfiguration], default:None) –Configuration for SMS or MMS fallback when RCS delivery fails. If provided, the service sends a fallback message via the specified channel when the RCS message fails or the TimeToLive expires.
-
protect_configuration_id(Optional[ProtectConfigurationIdOrArn], default:None) –The unique identifier of the protect configuration to use.
-
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 RCS message.
-
dry_run(Optional[bool], default:None) –When set to true, the message is checked and validated, but isn't sent to the end recipient.
-
context(Optional[ContextMap], default:None) –You can specify custom data in this field. If you do, that data is logged to the event destination.
-
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
5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 | |