Lists the S/MIME certificates that are associated with the specified email identity. The results include certificates in all states, such as PROVISIONING, ACTIVE, INACTIVE, DEPROVISIONING, and FAILED.
If a certificate has passed its expiration time, it's returned with a status of FAILED.
We recommend using pagination to ensure that the operation returns quickly and successfully. When there are more results than fit in a single response, the response includes a NextToken value that you use in a subsequent call to retrieve the next set of results.
Parameters:
-
email_identity
(Identity)
–
The email identity whose certificate associations you want to list.
-
next_token
(Optional[NextToken], default:
None
)
–
A token returned from a previous call to ListEmailIdentityCertificates to indicate the position in the list of certificates.
-
page_size
(Optional[MaxItems], default:
None
)
–
The number of results to show in a single call to ListEmailIdentityCertificates. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.
Raises:
Source code in docs_src/capo_sesv2/_services/se_sv2.py
| def list_email_identity_certificates(
self,
email_identity: "capo_sesv2.types.identity.Identity",
*,
config_overrides: Optional[SESv2ClientConfig] = None,
next_token: Optional["capo_sesv2.types.next_token.NextToken"] = None,
page_size: Optional["capo_sesv2.types.max_items.MaxItems"] = None,
) -> "capo_sesv2.types.list_email_identity_certificates_response.ListEmailIdentityCertificatesResponse":
"""<p>Lists the S/MIME certificates that are associated with the specified email identity. The results include certificates in all states, such as <code>PROVISIONING</code>, <code>ACTIVE</code>, <code>INACTIVE</code>, <code>DEPROVISIONING</code>, and <code>FAILED</code>.</p> <p>If a certificate has passed its expiration time, it's returned with a status of <code>FAILED</code>.</p> <p>We recommend using pagination to ensure that the operation returns quickly and successfully. When there are more results than fit in a single response, the response includes a <code>NextToken</code> value that you use in a subsequent call to retrieve the next set of results.</p>
Args:
email_identity: <p>The email identity whose certificate associations you want to list.</p>
next_token: <p>A token returned from a previous call to <code>ListEmailIdentityCertificates</code> to indicate the position in the list of certificates.</p>
page_size: <p>The number of results to show in a single call to <code>ListEmailIdentityCertificates</code>. If the number of results is larger than the number you specified in this parameter, then the response includes a <code>NextToken</code> element, which you can use to obtain additional results.</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.
"""
def _handler(
req: "OperationRequest[capo_sesv2.types.list_email_identity_certificates_request.ListEmailIdentityCertificatesRequest]",
) -> OperationResponse[
"capo_sesv2.types.list_email_identity_certificates_response.ListEmailIdentityCertificatesResponse"
]:
import capo_sesv2._operations.simple_email_service_v2.list_email_identity_certificates
output, http_response = (
capo_sesv2._operations.simple_email_service_v2.list_email_identity_certificates.list_email_identity_certificates(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListEmailIdentityCertificates")
)
input_: capo_sesv2.types.list_email_identity_certificates_request.ListEmailIdentityCertificatesRequest = {
"email_identity": email_identity
}
if next_token is not None:
input_["next_token"] = next_token
if page_size is not None:
input_["page_size"] = page_size
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|