libZSservicesZSamazonka-certificatemanager-pcaZSamazonka-certificatemanager-pca
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CertificateManagerPCA.IssueCertificate

Description

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 ACM Private CA.

Synopsis

Creating a Request

data IssueCertificate Source #

See: newIssueCertificate smart constructor.

Constructors

IssueCertificate' 

Fields

  • idempotencyToken :: Maybe Text

    Alphanumeric string that can be used to distinguish between calls to the IssueCertificate action. Idempotency tokens for IssueCertificate time out after one minute. Therefore, if you call IssueCertificate multiple times with the same idempotency token within one minute, ACM Private CA recognizes that you are requesting only one certificate and will issue only one. If you change the idempotency token for each call, PCA recognizes that you are requesting multiple certificates.

  • apiPassthrough :: Maybe ApiPassthrough

    Specifies X.509 certificate information to be included in the issued certificate. An APIPassthrough or APICSRPassthrough template 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, ACM Private CA applies order of operation rules to determine what information is used.

  • templateArn :: Maybe Text

    Specifies a custom configuration template to use when issuing a certificate. If this parameter is not provided, ACM Private CA defaults to the EndEntityCertificate/V1 template. 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 TemplateArn values supported by ACM Private CA, see Understanding Certificate Templates.

  • validityNotBefore :: Maybe Validity

    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, ACM Private CA sets the "Not Before" date to the issuance time minus 60 minutes. This compensates for clock inconsistencies across computer systems. The ValidityNotBefore parameter can be used to customize the “Not Before” value.

    Unlike the Validity parameter, the ValidityNotBefore parameter is optional.

    The ValidityNotBefore value is expressed as an explicit date and time, using the Validity type value ABSOLUTE. For more information, see Validity in this API reference and Validity in RFC 5280.

  • certificateAuthorityArn :: Text

    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 :: Base64

    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_.csr

    If you have a configuration file, you can then use the following OpenSSL command. The usr_cert block 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_.csr

    Note: A CSR must provide either a subject name or a /subject alternative name/ or the request will be rejected.

  • signingAlgorithm :: 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 SigningAlgorithm parameter used to sign a CSR in the CreateCertificateAuthority action.

  • 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 ValidityNotBefore is also specified. For example, if Validity is set to 20 days in the future, the certificate will expire 20 days from issuance time regardless of the ValidityNotBefore value.

    The end of the validity period configured on a certificate must not exceed the limit set on its parents in the CA hierarchy.

Instances

Instances details
Eq IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

Read IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

Show IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

Generic IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

Associated Types

type Rep IssueCertificate :: Type -> Type #

NFData IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

Methods

rnf :: IssueCertificate -> () #

Hashable IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

ToJSON IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

AWSRequest IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

Associated Types

type AWSResponse IssueCertificate #

ToHeaders IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

ToPath IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

ToQuery IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

type Rep IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

type Rep IssueCertificate = D1 ('MetaData "IssueCertificate" "Amazonka.CertificateManagerPCA.IssueCertificate" "libZSservicesZSamazonka-certificatemanager-pcaZSamazonka-certificatemanager-pca" 'False) (C1 ('MetaCons "IssueCertificate'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "idempotencyToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "apiPassthrough") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ApiPassthrough))) :*: (S1 ('MetaSel ('Just "templateArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "validityNotBefore") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Validity)))) :*: ((S1 ('MetaSel ('Just "certificateAuthorityArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "csr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Base64)) :*: (S1 ('MetaSel ('Just "signingAlgorithm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SigningAlgorithm) :*: S1 ('MetaSel ('Just "validity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Validity)))))
type AWSResponse IssueCertificate Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

newIssueCertificate Source #

Create a value of IssueCertificate with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:idempotencyToken:IssueCertificate', issueCertificate_idempotencyToken - Alphanumeric string that can be used to distinguish between calls to the IssueCertificate action. Idempotency tokens for IssueCertificate time out after one minute. Therefore, if you call IssueCertificate multiple times with the same idempotency token within one minute, ACM Private CA recognizes that you are requesting only one certificate and will issue only one. If you change the idempotency token for each call, PCA recognizes that you are requesting multiple certificates.

$sel:apiPassthrough:IssueCertificate', issueCertificate_apiPassthrough - Specifies X.509 certificate information to be included in the issued certificate. An APIPassthrough or APICSRPassthrough template 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, ACM Private CA applies order of operation rules to determine what information is used.

$sel:templateArn:IssueCertificate', issueCertificate_templateArn - Specifies a custom configuration template to use when issuing a certificate. If this parameter is not provided, ACM Private CA defaults to the EndEntityCertificate/V1 template. 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 TemplateArn values supported by ACM Private CA, see Understanding Certificate Templates.

$sel:validityNotBefore:IssueCertificate', issueCertificate_validityNotBefore - 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, ACM Private CA sets the "Not Before" date to the issuance time minus 60 minutes. This compensates for clock inconsistencies across computer systems. The ValidityNotBefore parameter can be used to customize the “Not Before” value.

Unlike the Validity parameter, the ValidityNotBefore parameter is optional.

The ValidityNotBefore value is expressed as an explicit date and time, using the Validity type value ABSOLUTE. For more information, see Validity in this API reference and Validity in RFC 5280.

$sel:certificateAuthorityArn:IssueCertificate', issueCertificate_certificateAuthorityArn - 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

$sel:csr:IssueCertificate', issueCertificate_csr - 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_.csr

If you have a configuration file, you can then use the following OpenSSL command. The usr_cert block 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_.csr

Note: A CSR must provide either a subject name or a /subject alternative name/ or the request will be rejected.-- -- Note: This Lens automatically encodes and decodes Base64 data. -- The underlying isomorphism will encode to Base64 representation during -- serialisation, and decode from Base64 representation during deserialisation. -- This Lens accepts and returns only raw unencoded data.

$sel:signingAlgorithm:IssueCertificate', issueCertificate_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 SigningAlgorithm parameter used to sign a CSR in the CreateCertificateAuthority action.

$sel:validity:IssueCertificate', issueCertificate_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 ValidityNotBefore is also specified. For example, if Validity is set to 20 days in the future, the certificate will expire 20 days from issuance time regardless of the ValidityNotBefore value.

The end of the validity period configured on a certificate must not exceed the limit set on its parents in the CA hierarchy.

Request Lenses

issueCertificate_idempotencyToken :: Lens' IssueCertificate (Maybe Text) Source #

Alphanumeric string that can be used to distinguish between calls to the IssueCertificate action. Idempotency tokens for IssueCertificate time out after one minute. Therefore, if you call IssueCertificate multiple times with the same idempotency token within one minute, ACM Private CA recognizes that you are requesting only one certificate and will issue only one. If you change the idempotency token for each call, PCA recognizes that you are requesting multiple certificates.

issueCertificate_apiPassthrough :: Lens' IssueCertificate (Maybe ApiPassthrough) Source #

Specifies X.509 certificate information to be included in the issued certificate. An APIPassthrough or APICSRPassthrough template 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, ACM Private CA applies order of operation rules to determine what information is used.

issueCertificate_templateArn :: Lens' IssueCertificate (Maybe Text) Source #

Specifies a custom configuration template to use when issuing a certificate. If this parameter is not provided, ACM Private CA defaults to the EndEntityCertificate/V1 template. 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 TemplateArn values supported by ACM Private CA, see Understanding Certificate Templates.

issueCertificate_validityNotBefore :: Lens' IssueCertificate (Maybe Validity) Source #

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, ACM Private CA sets the "Not Before" date to the issuance time minus 60 minutes. This compensates for clock inconsistencies across computer systems. The ValidityNotBefore parameter can be used to customize the “Not Before” value.

Unlike the Validity parameter, the ValidityNotBefore parameter is optional.

The ValidityNotBefore value is expressed as an explicit date and time, using the Validity type value ABSOLUTE. For more information, see Validity in this API reference and Validity in RFC 5280.

issueCertificate_certificateAuthorityArn :: Lens' IssueCertificate Text Source #

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

issueCertificate_csr :: Lens' IssueCertificate ByteString Source #

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_.csr

If you have a configuration file, you can then use the following OpenSSL command. The usr_cert block 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_.csr

Note: A CSR must provide either a subject name or a /subject alternative name/ or the request will be rejected.-- -- Note: This Lens automatically encodes and decodes Base64 data. -- The underlying isomorphism will encode to Base64 representation during -- serialisation, and decode from Base64 representation during deserialisation. -- This Lens accepts and returns only raw unencoded data.

issueCertificate_signingAlgorithm :: Lens' IssueCertificate SigningAlgorithm Source #

The name of the algorithm that will be used to sign the certificate to be issued.

This parameter should not be confused with the SigningAlgorithm parameter used to sign a CSR in the CreateCertificateAuthority action.

issueCertificate_validity :: Lens' IssueCertificate Validity Source #

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 ValidityNotBefore is also specified. For example, if Validity is set to 20 days in the future, the certificate will expire 20 days from issuance time regardless of the ValidityNotBefore value.

The end of the validity period configured on a certificate must not exceed the limit set on its parents in the CA hierarchy.

Destructuring the Response

data IssueCertificateResponse Source #

See: newIssueCertificateResponse smart constructor.

Constructors

IssueCertificateResponse' 

Fields

  • certificateArn :: Maybe Text

    The Amazon Resource Name (ARN) of the issued certificate and the certificate serial number. This is of the form:

    arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245
  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq IssueCertificateResponse Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

Read IssueCertificateResponse Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

Show IssueCertificateResponse Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

Generic IssueCertificateResponse Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

Associated Types

type Rep IssueCertificateResponse :: Type -> Type #

NFData IssueCertificateResponse Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

type Rep IssueCertificateResponse Source # 
Instance details

Defined in Amazonka.CertificateManagerPCA.IssueCertificate

type Rep IssueCertificateResponse = D1 ('MetaData "IssueCertificateResponse" "Amazonka.CertificateManagerPCA.IssueCertificate" "libZSservicesZSamazonka-certificatemanager-pcaZSamazonka-certificatemanager-pca" 'False) (C1 ('MetaCons "IssueCertificateResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "certificateArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newIssueCertificateResponse Source #

Create a value of IssueCertificateResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:certificateArn:IssueCertificateResponse', issueCertificateResponse_certificateArn - The Amazon Resource Name (ARN) of the issued certificate and the certificate serial number. This is of the form:

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245

$sel:httpStatus:IssueCertificateResponse', issueCertificateResponse_httpStatus - The response's http status code.

Response Lenses

issueCertificateResponse_certificateArn :: Lens' IssueCertificateResponse (Maybe Text) Source #

The Amazon Resource Name (ARN) of the issued certificate and the certificate serial number. This is of the form:

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245