Sets default sender ID on a configuration set.
When sending a text message to a destination country that supports sender IDs, the default sender ID on the configuration set specified will be used if no dedicated origination phone numbers or registered sender IDs are available in your account.
Parameters:
-
configuration_set_name
(ConfigurationSetNameOrArn)
–
The configuration set to updated with a new default SenderId. This field can be the ConsigurationSetName or ConfigurationSetArn.
-
sender_id
(SenderId)
–
The current sender ID for the configuration set. When sending a text message to a destination country which supports SenderIds, the default sender ID on the configuration set specified on SendTextMessage will be used if no dedicated origination phone numbers or registered SenderIds are available in your account, instead of a generic sender ID, such as 'NOTICE'.
Raises:
Source code in docs_src/capo_pinpoint_sms_voice_v2/_services/pinpoint_sms_voice_v2.py
| def set_default_sender_id(
self,
configuration_set_name: "capo_pinpoint_sms_voice_v2.types.configuration_set_name_or_arn.ConfigurationSetNameOrArn",
sender_id: "capo_pinpoint_sms_voice_v2.types.sender_id.SenderId",
*,
config_overrides: Optional[PinpointSMSVoiceV2ClientConfig] = None,
) -> "capo_pinpoint_sms_voice_v2.types.set_default_sender_id_result.SetDefaultSenderIdResult":
"""<p>Sets default sender ID on a configuration set.</p> <p>When sending a text message to a destination country that supports sender IDs, the default sender ID on the configuration set specified will be used if no dedicated origination phone numbers or registered sender IDs are available in your account.</p>
Args:
configuration_set_name: <p>The configuration set to updated with a new default SenderId. This field can be the ConsigurationSetName or ConfigurationSetArn.</p>
sender_id: <p>The current sender ID for the configuration set. When sending a text message to a destination country which supports SenderIds, the default sender ID on the configuration set specified on <a>SendTextMessage</a> will be used if no dedicated origination phone numbers or registered SenderIds are available in your account, instead of a generic sender ID, such as 'NOTICE'.</p>
Raises:
capo_pinpoint_sms_voice_v2.errors.access_denied_exception.AccessDeniedException: <p>The request was denied because you don't have sufficient permissions to access the resource.</p>
capo_pinpoint_sms_voice_v2.errors.internal_server_exception.InternalServerException: <p>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.</p>
capo_pinpoint_sms_voice_v2.errors.resource_not_found_exception.ResourceNotFoundException: <p>A requested resource couldn't be found.</p>
capo_pinpoint_sms_voice_v2.errors.throttling_exception.ThrottlingException: <p>An error that occurred because too many requests were sent during a certain amount of time.</p>
capo_pinpoint_sms_voice_v2.errors.validation_exception.ValidationException: <p>A validation exception for a field.</p>
capo_pinpoint_sms_voice_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_pinpoint_sms_voice_v2.types.set_default_sender_id_request.SetDefaultSenderIdRequest]",
) -> OperationResponse[
"capo_pinpoint_sms_voice_v2.types.set_default_sender_id_result.SetDefaultSenderIdResult"
]:
import capo_pinpoint_sms_voice_v2._operations.pinpoint_sms_voice_v2.set_default_sender_id
output, http_response = (
capo_pinpoint_sms_voice_v2._operations.pinpoint_sms_voice_v2.set_default_sender_id.set_default_sender_id(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("SetDefaultSenderId")
)
input_: capo_pinpoint_sms_voice_v2.types.set_default_sender_id_request.SetDefaultSenderIdRequest = {
"configuration_set_name": configuration_set_name,
"sender_id": sender_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|