issue_certificate
async
¶
issue_certificate(
certificate_authority_arn: Arn,
csr: CsrBlob,
signing_algorithm: SigningAlgorithm,
validity: Validity,
*,
config_overrides: Optional[AsyncACMPCAClientConfig] = None,
api_passthrough: Optional[ApiPassthrough] = None,
template_arn: Optional[Arn] = None,
validity_not_before: Optional[Validity] = None,
idempotency_token: Optional[IdempotencyToken] = None,
return_values: Optional[IssueCertificateReturnValue] = None,
) -> IssueCertificateResponse
Uses your private certificate authority (CA), or one that has been shared with you, to issue a client certificate. This action returns the Amazon Resource Name (ARN) of the certificate. You can retrieve the certificate by calling the GetCertificate action and specifying the ARN.
You cannot use the ACM ListCertificateAuthorities action to retrieve the ARNs of the certificates that you issue by using Amazon Web Services Private CA.
Parameters:
-
api_passthrough(Optional[ApiPassthrough], default:None) –Specifies X.509 certificate information to be included in the issued certificate. An
APIPassthroughorAPICSRPassthroughtemplate variant must be selected, or else this parameter is ignored. For more information about using these templates, see Understanding Certificate Templates.If conflicting or duplicate certificate information is supplied during certificate issuance, Amazon Web Services Private CA applies order of operation rules to determine what information is used.
-
certificate_authority_arn(Arn) –The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. This must be of the form:
arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 -
csr(CsrBlob) –The certificate signing request (CSR) for the certificate you want to issue. As an example, you can use the following OpenSSL command to create the CSR and a 2048 bit RSA private key.
openssl req -new -newkey rsa:2048 -days 365 -keyout private/test_cert_priv_key.pem -out csr/test_cert_.csrIf you have a configuration file, you can then use the following OpenSSL command. The
usr_certblock in the configuration file contains your X509 version 3 extensions.openssl req -new -config openssl_rsa.cnf -extensions usr_cert -newkey rsa:2048 -days 365 -keyout private/test_cert_priv_key.pem -out csr/test_cert_.csrNote: A CSR must provide either a subject name or a subject alternative name or the request will be rejected.
-
signing_algorithm(SigningAlgorithm) –The name of the algorithm that will be used to sign the certificate to be issued.
This parameter should not be confused with the
SigningAlgorithmparameter used to sign a CSR in theCreateCertificateAuthorityaction.The specified signing algorithm family (RSA or ECDSA) must match the algorithm family of the CA's secret key.
-
template_arn(Optional[Arn], default:None) –Specifies a custom configuration template to use when issuing a certificate. If this parameter is not provided, Amazon Web Services Private CA defaults to the
EndEntityCertificate/V1template. For CA certificates, you should choose the shortest path length that meets your needs. The path length is indicated by the PathLenN portion of the ARN, where N is the CA depth.Note: The CA depth configured on a subordinate CA certificate must not exceed the limit set by its parents in the CA hierarchy.
For a list of
TemplateArnvalues supported by Amazon Web Services Private CA, see Understanding Certificate Templates. -
validity(Validity) –Information describing the end of the validity period of the certificate. This parameter sets the “Not After” date for the certificate.
Certificate validity is the period of time during which a certificate is valid. Validity can be expressed as an explicit date and time when the certificate expires, or as a span of time after issuance, stated in days, months, or years. For more information, see Validity in RFC 5280.
This value is unaffected when
ValidityNotBeforeis also specified. For example, ifValidityis set to 20 days in the future, the certificate will expire 20 days from issuance time regardless of theValidityNotBeforevalue.The end of the validity period configured on a certificate must not exceed the limit set on its parents in the CA hierarchy.
-
validity_not_before(Optional[Validity], default:None) –Information describing the start of the validity period of the certificate. This parameter sets the “Not Before" date for the certificate.
By default, when issuing a certificate, Amazon Web Services Private CA sets the "Not Before" date to the issuance time minus 60 minutes. This compensates for clock inconsistencies across computer systems. The
ValidityNotBeforeparameter can be used to customize the “Not Before” value.Unlike the
Validityparameter, theValidityNotBeforeparameter is optional.The
ValidityNotBeforevalue is expressed as an explicit date and time, using theValiditytype valueABSOLUTE. For more information, see Validity in this API reference and Validity in RFC 5280. -
idempotency_token(Optional[IdempotencyToken], default:None) –Alphanumeric string that can be used to distinguish between calls to the IssueCertificate action. Idempotency tokens for IssueCertificate time out after five minutes. Therefore, if you call IssueCertificate multiple times with the same idempotency token within five minutes, Amazon Web Services Private CA recognizes that you are requesting only one certificate and will issue only one. If you change the idempotency token for each call, Amazon Web Services Private CA recognizes that you are requesting multiple certificates.
-
return_values(Optional[IssueCertificateReturnValue], default:None) –Specifies what the response contains. With
ARN, the default, the response contains only the ARN of the issued certificate. WithCERTIFICATE, the response also contains the issued certificate and its certificate chain. To useCERTIFICATE, you must have theacm-pca:GetCertificatepermission on the private CA.
Raises:
-
ConflictException–The request was rejected because it conflicts with the current state of the specified resource.
-
InvalidArgsException–One or more of the specified arguments was not valid.
-
InvalidArnException–The requested Amazon Resource Name (ARN) does not refer to an existing resource.
-
InvalidStateException–The state of the private CA does not allow this action to occur.
-
LimitExceededException–An Amazon Web Services Private CA quota has been exceeded. See the exception message returned to determine the quota that was exceeded.
-
MalformedCSRException–The certificate signing request is invalid.
-
RequestFailedException–The request has failed for an unspecified reason.
-
RequestInProgressException–Your request is already in progress.
-
ResourceNotFoundException–A resource such as a private CA, S3 bucket, certificate, audit report, or policy cannot be found.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_acm_pca/_services/async_acmpca.py
1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 | |