Returns the requested sending authorization policies for the given identity (an email address or a domain). The policies are returned as a map of policy names to policy contents. You can retrieve a maximum of 20 policies at a time.
This API is for the identity owner only. If you have not verified the identity, this API will return an error.
Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide.
You can execute this operation no more than once per second.
Parameters:
Raises:
Source code in docs_src/capo_sesv2/_services/async_se_sv2.py
| async def get_email_identity_policies(
self,
email_identity: "capo_sesv2.types.identity.Identity",
*,
config_overrides: Optional[AsyncSESv2ClientConfig] = None,
) -> "capo_sesv2.types.get_email_identity_policies_response.GetEmailIdentityPoliciesResponse":
"""<p>Returns the requested sending authorization policies for the given identity (an email address or a domain). The policies are returned as a map of policy names to policy contents. You can retrieve a maximum of 20 policies at a time.</p> <note> <p>This API is for the identity owner only. If you have not verified the identity, this API will return an error.</p> </note> <p>Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p> <p>You can execute this operation no more than once per second.</p>
Args:
email_identity: <p>The email identity.</p>
Raises:
capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
capo_sesv2.errors.not_found_exception.NotFoundException: <p>The resource you attempted to access doesn't exist.</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_sesv2.types.get_email_identity_policies_request.GetEmailIdentityPoliciesRequest]",
) -> AsyncOperationResponse[
"capo_sesv2.types.get_email_identity_policies_response.GetEmailIdentityPoliciesResponse"
]:
import capo_sesv2._operations.simple_email_service_v2.get_email_identity_policies
(
output,
http_response,
) = await capo_sesv2._operations.simple_email_service_v2.get_email_identity_policies.async_get_email_identity_policies(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetEmailIdentityPolicies")
)
input_: capo_sesv2.types.get_email_identity_policies_request.GetEmailIdentityPoliciesRequest = {
"email_identity": email_identity
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|