Creates a multi-region endpoint (global-endpoint).
The primary region is going to be the AWS-Region where the operation is executed. The secondary region has to be provided in request's parameters. From the data flow standpoint there is no difference between primary and secondary regions - sending traffic is divided between the two. The primary region is the region where the resource has been created and where it can be managed.
Parameters:
-
endpoint_name
(EndpointName)
–
The name of the multi-region endpoint (global-endpoint).
-
details
(Details)
–
Contains details of a multi-region endpoint (global-endpoint) being created.
-
tags
(Optional[TagList], default:
None
)
–
An array of objects that define the tags (keys and values) to associate with the multi-region endpoint (global-endpoint).
Raises:
Source code in docs_src/capo_sesv2/_services/se_sv2.py
| def create_multi_region_endpoint(
self,
endpoint_name: "capo_sesv2.types.endpoint_name.EndpointName",
details: "capo_sesv2.types.details.Details",
*,
config_overrides: Optional[SESv2ClientConfig] = None,
tags: Optional["capo_sesv2.types.tag_list.TagList"] = None,
) -> "capo_sesv2.types.create_multi_region_endpoint_response.CreateMultiRegionEndpointResponse":
"""<p>Creates a multi-region endpoint (global-endpoint).</p> <p>The primary region is going to be the AWS-Region where the operation is executed. The secondary region has to be provided in request's parameters. From the data flow standpoint there is no difference between primary and secondary regions - sending traffic is divided between the two. The primary region is the region where the resource has been created and where it can be managed. </p>
Args:
endpoint_name: <p>The name of the multi-region endpoint (global-endpoint).</p>
details: <p>Contains details of a multi-region endpoint (global-endpoint) being created.</p>
tags: <p>An array of objects that define the tags (keys and values) to associate with the multi-region endpoint (global-endpoint).</p>
Raises:
capo_sesv2.errors.already_exists_exception.AlreadyExistsException: <p>The resource specified in your request already exists.</p>
capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
capo_sesv2.errors.limit_exceeded_exception.LimitExceededException: <p>There are too many instances of the specified resource type.</p>
capo_sesv2.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
capo_sesv2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_sesv2.types.create_multi_region_endpoint_request.CreateMultiRegionEndpointRequest]",
) -> OperationResponse[
"capo_sesv2.types.create_multi_region_endpoint_response.CreateMultiRegionEndpointResponse"
]:
import capo_sesv2._operations.simple_email_service_v2.create_multi_region_endpoint
output, http_response = (
capo_sesv2._operations.simple_email_service_v2.create_multi_region_endpoint.create_multi_region_endpoint(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateMultiRegionEndpoint")
)
input_: capo_sesv2.types.create_multi_region_endpoint_request.CreateMultiRegionEndpointRequest = {
"endpoint_name": endpoint_name,
"details": details,
}
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|