Returns a list of sending authorization policies that are attached to the given identity (an email address or a domain). This operation returns only a list. To get the actual policy content, use GetIdentityPolicies.
This operation is for the identity owner only. If you have not verified the identity, it returns 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:
-
identity
(Identity)
–
The identity that is associated with the policy for which the policies are listed. You can specify an identity by using its name or by using its Amazon Resource Name (ARN). Examples: [email protected], example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com.
To successfully call this operation, you must own the identity.
Raises:
Examples:
ListIdentityPolicies
The following example returns a list of sending authorization policies that are attached to an identity:
>>> client.list_identity_policies(identity='example.com')
Source code in docs_src/capo_ses/_services/ses.py
| def list_identity_policies(
self,
identity: "capo_ses.types.identity.Identity",
*,
config_overrides: Optional[SESClientConfig] = None,
) -> "capo_ses.types.list_identity_policies_response.ListIdentityPoliciesResponse":
"""<p>Returns a list of sending authorization policies that are attached to the given identity (an email address or a domain). This operation returns only a list. To get the actual policy content, use <code>GetIdentityPolicies</code>.</p> <note> <p>This operation is for the identity owner only. If you have not verified the identity, it returns 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/dg/sending-authorization.html">Amazon SES Developer Guide</a>.</p> <p>You can execute this operation no more than once per second.</p>
Args:
identity: <p>The identity that is associated with the policy for which the policies are listed. You can specify an identity by using its name or by using its Amazon Resource Name (ARN). Examples: <code>[email protected]</code>, <code>example.com</code>, <code>arn:aws:ses:us-east-1:123456789012:identity/example.com</code>.</p> <p>To successfully call this operation, you must own the identity.</p>
Raises:
capo_ses.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
ListIdentityPolicies
The following example returns a list of sending authorization policies that are attached to an identity:
>>> client.list_identity_policies(identity='example.com')
"""
def _handler(
req: "OperationRequest[capo_ses.types.list_identity_policies_request.ListIdentityPoliciesRequest]",
) -> OperationResponse[
"capo_ses.types.list_identity_policies_response.ListIdentityPoliciesResponse"
]:
import capo_ses._operations.simple_email_service.list_identity_policies
output, http_response = (
capo_ses._operations.simple_email_service.list_identity_policies.list_identity_policies(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListIdentityPolicies")
)
input_: capo_ses.types.list_identity_policies_request.ListIdentityPoliciesRequest = {
"identity": identity
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|