{
  "typeName" : "AWS::ACMPCA::Certificate",
  "description" : "The ``AWS::ACMPCA::Certificate`` resource is used to issue a certificate using your private certificate authority. For more information, see the [IssueCertificate](https://docs.aws.amazon.com/privateca/latest/APIReference/API_IssueCertificate.html) action.",
  "sourceUrl" : "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_ACMPCA.html",
  "definitions" : {
    "ApiPassthrough" : {
      "description" : "Contains X.509 certificate information to be placed in an issued certificate. An ``APIPassthrough`` or ``APICSRPassthrough`` template variant must be selected, or else this parameter is ignored. \n If conflicting or duplicate certificate information is supplied from other sources, AWS Private CA applies [order of operation rules](https://docs.aws.amazon.com/privateca/latest/userguide/UsingTemplates.html#template-order-of-operations) to determine what information is used.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Extensions" : {
          "$ref" : "#/definitions/Extensions",
          "description" : "Specifies X.509 extension information for a certificate."
        },
        "Subject" : {
          "$ref" : "#/definitions/Subject",
          "description" : "Contains information about the certificate subject. The Subject field in the certificate identifies the entity that owns or controls the public key in the certificate. The entity can be a user, computer, device, or service. The Subject must contain an X.500 distinguished name (DN). A DN is a sequence of relative distinguished names (RDNs). The RDNs are separated by commas in the certificate."
        }
      }
    },
    "Arn" : {
      "type" : "string"
    },
    "CertificatePolicyList" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/PolicyInformation"
      }
    },
    "ExtendedKeyUsage" : {
      "description" : "Specifies additional purposes for which the certified public key may be used other than basic purposes indicated in the ``KeyUsage`` extension.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ExtendedKeyUsageType" : {
          "type" : "string",
          "description" : "Specifies a standard ``ExtendedKeyUsage`` as defined as in [RFC 5280](https://docs.aws.amazon.com/https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.12)."
        },
        "ExtendedKeyUsageObjectIdentifier" : {
          "$ref" : "#/definitions/CustomObjectIdentifier",
          "description" : "Specifies a custom ``ExtendedKeyUsage`` with an object identifier (OID)."
        }
      }
    },
    "ExtendedKeyUsageList" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/ExtendedKeyUsage"
      }
    },
    "Extensions" : {
      "description" : "Contains X.509 extension information for a certificate.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "CertificatePolicies" : {
          "$ref" : "#/definitions/CertificatePolicyList",
          "description" : "Contains a sequence of one or more policy information terms, each of which consists of an object identifier (OID) and optional qualifiers. For more information, see NIST's definition of [Object Identifier (OID)](https://docs.aws.amazon.com/https://csrc.nist.gov/glossary/term/Object_Identifier).\n In an end-entity certificate, these terms indicate the policy under which the certificate was issued and the purposes for which it may be used. In a CA certificate, these terms limit the set of policies for certification paths that include this certificate."
        },
        "ExtendedKeyUsage" : {
          "$ref" : "#/definitions/ExtendedKeyUsageList",
          "description" : "Specifies additional purposes for which the certified public key may be used other than basic purposes indicated in the ``KeyUsage`` extension."
        },
        "KeyUsage" : {
          "$ref" : "#/definitions/KeyUsage",
          "description" : "Defines one or more purposes for which the key contained in the certificate can be used. Default value for each option is false."
        },
        "SubjectAlternativeNames" : {
          "$ref" : "#/definitions/GeneralNameList",
          "description" : "The subject alternative name extension allows identities to be bound to the subject of the certificate. These identities may be included in addition to or in place of the identity in the subject field of the certificate."
        },
        "CustomExtensions" : {
          "$ref" : "#/definitions/CustomExtensionList",
          "description" : "Contains a sequence of one or more X.509 extensions, each of which consists of an object identifier (OID), a base64-encoded value, and the critical flag. For more information, see the [Global OID reference database.](https://docs.aws.amazon.com/https://oidref.com/2.5.29)"
        }
      }
    },
    "CustomExtensionList" : {
      "description" : "Array of X.509 extensions for a certificate.",
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/CustomExtension"
      }
    },
    "CustomExtension" : {
      "description" : "Specifies the X.509 extension information for a certificate.\n Extensions present in ``CustomExtensions`` follow the ``ApiPassthrough``[template rules](https://docs.aws.amazon.com/privateca/latest/userguide/UsingTemplates.html#template-order-of-operations).",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Critical" : {
          "type" : "boolean",
          "description" : "Specifies the critical flag of the X.509 extension."
        },
        "ObjectIdentifier" : {
          "$ref" : "#/definitions/CustomObjectIdentifier",
          "description" : "Specifies the object identifier (OID) of the X.509 extension. For more information, see the [Global OID reference database.](https://docs.aws.amazon.com/https://oidref.com/2.5.29)"
        },
        "Value" : {
          "type" : "string",
          "description" : "Specifies the base64-encoded value of the X.509 extension."
        }
      },
      "required" : [ "ObjectIdentifier", "Value" ]
    },
    "GeneralNameList" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/GeneralName"
      }
    },
    "GeneralName" : {
      "description" : "Describes an ASN.1 X.400 ``GeneralName`` as defined in [RFC 5280](https://docs.aws.amazon.com/https://datatracker.ietf.org/doc/html/rfc5280). Only one of the following naming options should be provided. Providing more than one option results in an ``InvalidArgsException`` error.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "OtherName" : {
          "$ref" : "#/definitions/OtherName",
          "description" : "Represents ``GeneralName`` using an ``OtherName`` object."
        },
        "Rfc822Name" : {
          "$ref" : "#/definitions/Rfc822Name",
          "description" : "Represents ``GeneralName`` as an [RFC 822](https://docs.aws.amazon.com/https://datatracker.ietf.org/doc/html/rfc822) email address."
        },
        "DnsName" : {
          "$ref" : "#/definitions/DnsName",
          "description" : "Represents ``GeneralName`` as a DNS name."
        },
        "DirectoryName" : {
          "$ref" : "#/definitions/Subject",
          "description" : "Contains information about the certificate subject. The certificate can be one issued by your private certificate authority (CA) or it can be your private CA certificate. The Subject field in the certificate identifies the entity that owns or controls the public key in the certificate. The entity can be a user, computer, device, or service. The Subject must contain an X.500 distinguished name (DN). A DN is a sequence of relative distinguished names (RDNs). The RDNs are separated by commas in the certificate. The DN must be unique for each entity, but your private CA can issue more than one certificate with the same DN to the same entity."
        },
        "EdiPartyName" : {
          "$ref" : "#/definitions/EdiPartyName",
          "description" : "Represents ``GeneralName`` as an ``EdiPartyName`` object."
        },
        "UniformResourceIdentifier" : {
          "$ref" : "#/definitions/UniformResourceIdentifier",
          "description" : "Represents ``GeneralName`` as a URI."
        },
        "IpAddress" : {
          "$ref" : "#/definitions/IpAddress",
          "description" : "Represents ``GeneralName`` as an IPv4 or IPv6 address."
        },
        "RegisteredId" : {
          "$ref" : "#/definitions/CustomObjectIdentifier",
          "description" : "Represents ``GeneralName`` as an object identifier (OID)."
        }
      }
    },
    "KeyUsage" : {
      "description" : "Defines one or more purposes for which the key contained in the certificate can be used. Default value for each option is false.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "DigitalSignature" : {
          "type" : "boolean",
          "default" : false,
          "description" : "Key can be used for digital signing."
        },
        "NonRepudiation" : {
          "type" : "boolean",
          "default" : false,
          "description" : "Key can be used for non-repudiation."
        },
        "KeyEncipherment" : {
          "type" : "boolean",
          "default" : false,
          "description" : "Key can be used to encipher data."
        },
        "DataEncipherment" : {
          "type" : "boolean",
          "default" : false,
          "description" : "Key can be used to decipher data."
        },
        "KeyAgreement" : {
          "type" : "boolean",
          "default" : false,
          "description" : "Key can be used in a key-agreement protocol."
        },
        "KeyCertSign" : {
          "type" : "boolean",
          "default" : false,
          "description" : "Key can be used to sign certificates."
        },
        "CRLSign" : {
          "type" : "boolean",
          "default" : false,
          "description" : "Key can be used to sign CRLs."
        },
        "EncipherOnly" : {
          "type" : "boolean",
          "default" : false,
          "description" : "Key can be used only to encipher data."
        },
        "DecipherOnly" : {
          "type" : "boolean",
          "default" : false,
          "description" : "Key can be used only to decipher data."
        }
      }
    },
    "PolicyInformation" : {
      "description" : "Defines the X.509 ``CertificatePolicies`` extension.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "CertPolicyId" : {
          "$ref" : "#/definitions/CustomObjectIdentifier",
          "description" : "Specifies the object identifier (OID) of the certificate policy under which the certificate was issued. For more information, see NIST's definition of [Object Identifier (OID)](https://docs.aws.amazon.com/https://csrc.nist.gov/glossary/term/Object_Identifier)."
        },
        "PolicyQualifiers" : {
          "$ref" : "#/definitions/PolicyQualifierInfoList",
          "description" : "Modifies the given ``CertPolicyId`` with a qualifier. AWS Private CA supports the certification practice statement (CPS) qualifier."
        }
      },
      "required" : [ "CertPolicyId" ]
    },
    "PolicyQualifierInfo" : {
      "description" : "Modifies the ``CertPolicyId`` of a ``PolicyInformation`` object with a qualifier. AWS Private CA supports the certification practice statement (CPS) qualifier.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "PolicyQualifierId" : {
          "type" : "string",
          "description" : "Identifies the qualifier modifying a ``CertPolicyId``."
        },
        "Qualifier" : {
          "$ref" : "#/definitions/Qualifier",
          "description" : "Defines the qualifier type. AWS Private CA supports the use of a URI for a CPS qualifier in this field."
        }
      },
      "required" : [ "PolicyQualifierId", "Qualifier" ]
    },
    "PolicyQualifierInfoList" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/PolicyQualifierInfo"
      }
    },
    "Qualifier" : {
      "description" : "Defines a ``PolicyInformation`` qualifier. AWS Private CA supports the [certification practice statement (CPS) qualifier](https://docs.aws.amazon.com/https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.4) defined in RFC 5280.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "CpsUri" : {
          "type" : "string",
          "description" : "Contains a pointer to a certification practice statement (CPS) published by the CA."
        }
      },
      "required" : [ "CpsUri" ]
    },
    "Subject" : {
      "description" : "Contains information about the certificate subject. The ``Subject`` field in the certificate identifies the entity that owns or controls the public key in the certificate. The entity can be a user, computer, device, or service. The ``Subject``must contain an X.500 distinguished name (DN). A DN is a sequence of relative distinguished names (RDNs). The RDNs are separated by commas in the certificate.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Country" : {
          "type" : "string",
          "description" : "Two-digit code that specifies the country in which the certificate subject located."
        },
        "Organization" : {
          "type" : "string",
          "description" : "Legal name of the organization with which the certificate subject is affiliated."
        },
        "OrganizationalUnit" : {
          "type" : "string",
          "description" : "A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated."
        },
        "DistinguishedNameQualifier" : {
          "type" : "string",
          "description" : "Disambiguating information for the certificate subject."
        },
        "State" : {
          "type" : "string",
          "description" : "State in which the subject of the certificate is located."
        },
        "CommonName" : {
          "type" : "string",
          "description" : "For CA and end-entity certificates in a private PKI, the common name (CN) can be any string within the length limit.\n Note: In publicly trusted certificates, the common name must be a fully qualified domain name (FQDN) associated with the certificate subject."
        },
        "SerialNumber" : {
          "type" : "string",
          "description" : "The certificate serial number."
        },
        "Locality" : {
          "type" : "string",
          "description" : "The locality (such as a city or town) in which the certificate subject is located."
        },
        "Title" : {
          "type" : "string",
          "description" : "A title such as Mr. or Ms., which is pre-pended to the name to refer formally to the certificate subject."
        },
        "Surname" : {
          "type" : "string",
          "description" : "Family name. In the US and the UK, for example, the surname of an individual is ordered last. In Asian cultures the surname is typically ordered first."
        },
        "GivenName" : {
          "type" : "string",
          "description" : "First name."
        },
        "Initials" : {
          "type" : "string",
          "description" : "Concatenation that typically contains the first letter of the *GivenName*, the first letter of the middle name if one exists, and the first letter of the *Surname*."
        },
        "Pseudonym" : {
          "type" : "string",
          "description" : "Typically a shortened version of a longer *GivenName*. For example, Jonathan is often shortened to John. Elizabeth is often shortened to Beth, Liz, or Eliza."
        },
        "GenerationQualifier" : {
          "type" : "string",
          "description" : "Typically a qualifier appended to the name of an individual. Examples include Jr. for junior, Sr. for senior, and III for third."
        },
        "CustomAttributes" : {
          "$ref" : "#/definitions/CustomAttributeList",
          "description" : "Contains a sequence of one or more X.500 relative distinguished names (RDNs), each of which consists of an object identifier (OID) and a value. For more information, see NIST’s definition of [Object Identifier (OID)](https://docs.aws.amazon.com/https://csrc.nist.gov/glossary/term/Object_Identifier).\n  Custom attributes cannot be used in combination with standard attributes."
        }
      }
    },
    "CustomAttributeList" : {
      "description" : "Array of X.500 attribute type and value. CustomAttributes cannot be used along with pre-defined attributes.",
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/CustomAttribute"
      }
    },
    "CustomAttribute" : {
      "description" : "Defines the X.500 relative distinguished name (RDN).",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ObjectIdentifier" : {
          "$ref" : "#/definitions/CustomObjectIdentifier",
          "description" : "Specifies the object identifier (OID) of the attribute type of the relative distinguished name (RDN)."
        },
        "Value" : {
          "type" : "string",
          "description" : "Specifies the attribute value of relative distinguished name (RDN)."
        }
      },
      "required" : [ "ObjectIdentifier", "Value" ]
    },
    "Validity" : {
      "description" : "Length of time for which the certificate issued by your private certificate authority (CA), or by the private CA itself, is valid in days, months, or years. You can issue a certificate by calling the ``IssueCertificate`` operation.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Value" : {
          "type" : "number",
          "description" : "A long integer interpreted according to the value of ``Type``, below."
        },
        "Type" : {
          "type" : "string",
          "description" : "Specifies whether the ``Value`` parameter represents days, months, or years."
        }
      },
      "required" : [ "Value", "Type" ]
    },
    "CustomObjectIdentifier" : {
      "description" : "String that contains X.509 ObjectIdentifier information.",
      "type" : "string"
    },
    "OtherName" : {
      "description" : "Defines a custom ASN.1 X.400 ``GeneralName`` using an object identifier (OID) and value. The OID must satisfy the regular expression shown below. For more information, see NIST's definition of [Object Identifier (OID)](https://docs.aws.amazon.com/https://csrc.nist.gov/glossary/term/Object_Identifier).",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "TypeId" : {
          "$ref" : "#/definitions/CustomObjectIdentifier",
          "description" : "Specifies an OID."
        },
        "Value" : {
          "type" : "string",
          "description" : "Specifies an OID value."
        }
      },
      "required" : [ "TypeId", "Value" ]
    },
    "Rfc822Name" : {
      "description" : "String that contains X.509 Rfc822Name information.",
      "type" : "string"
    },
    "DnsName" : {
      "description" : "String that contains X.509 DnsName information.",
      "type" : "string"
    },
    "EdiPartyName" : {
      "description" : "Describes an Electronic Data Interchange (EDI) entity as described in as defined in [Subject Alternative Name](https://docs.aws.amazon.com/https://datatracker.ietf.org/doc/html/rfc5280) in RFC 5280.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "PartyName" : {
          "type" : "string",
          "description" : "Specifies the party name."
        },
        "NameAssigner" : {
          "type" : "string",
          "description" : "Specifies the name assigner."
        }
      },
      "required" : [ "PartyName", "NameAssigner" ]
    },
    "UniformResourceIdentifier" : {
      "description" : "String that contains X.509 UniformResourceIdentifier information.",
      "type" : "string"
    },
    "IpAddress" : {
      "description" : "String that contains X.509 IpAddress information.",
      "type" : "string"
    }
  },
  "properties" : {
    "ApiPassthrough" : {
      "description" : "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.",
      "$ref" : "#/definitions/ApiPassthrough"
    },
    "CertificateAuthorityArn" : {
      "description" : "The Amazon Resource Name (ARN) for the private CA issues the certificate.",
      "$ref" : "#/definitions/Arn"
    },
    "CertificateSigningRequest" : {
      "description" : "The certificate signing request (CSR) for the certificate.",
      "type" : "string",
      "minLength" : 1
    },
    "SigningAlgorithm" : {
      "description" : "The name of the algorithm that will be used to sign the certificate to be issued. \n This parameter should not be confused with the ``SigningAlgorithm`` parameter used to sign a CSR in the ``CreateCertificateAuthority`` action.\n  The specified signing algorithm family (RSA or ECDSA) must match the algorithm family of the CA's secret key.",
      "type" : "string"
    },
    "TemplateArn" : {
      "description" : "Specifies a custom configuration template to use when issuing a certificate. If this parameter is not provided, PCAshort defaults to the ``EndEntityCertificate/V1`` template. For more information about PCAshort templates, see [Using Templates](https://docs.aws.amazon.com/privateca/latest/userguide/UsingTemplates.html).",
      "$ref" : "#/definitions/Arn"
    },
    "Validity" : {
      "description" : "The period of time during which the certificate will be valid.",
      "$ref" : "#/definitions/Validity"
    },
    "ValidityNotBefore" : {
      "description" : "Information describing the start of the validity period of the certificate. This parameter sets the “Not Before\" date for the certificate.\n By default, when issuing a certificate, PCAshort 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. \n Unlike the ``Validity`` parameter, the ``ValidityNotBefore`` parameter is optional.\n The ``ValidityNotBefore`` value is expressed as an explicit date and time, using the ``Validity`` type value ``ABSOLUTE``.",
      "$ref" : "#/definitions/Validity"
    },
    "Certificate" : {
      "description" : "",
      "type" : "string"
    },
    "Arn" : {
      "description" : "",
      "$ref" : "#/definitions/Arn"
    }
  },
  "additionalProperties" : false,
  "tagging" : {
    "taggable" : false,
    "tagOnCreate" : false,
    "tagUpdatable" : false,
    "cloudFormationSystemTags" : false
  },
  "required" : [ "CertificateAuthorityArn", "CertificateSigningRequest", "SigningAlgorithm", "Validity" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/Certificate" ],
  "createOnlyProperties" : [ "/properties/ApiPassthrough", "/properties/CertificateAuthorityArn", "/properties/CertificateSigningRequest", "/properties/SigningAlgorithm", "/properties/TemplateArn", "/properties/Validity", "/properties/ValidityNotBefore" ],
  "writeOnlyProperties" : [ "/properties/ApiPassthrough", "/properties/CertificateSigningRequest", "/properties/SigningAlgorithm", "/properties/TemplateArn", "/properties/Validity", "/properties/ValidityNotBefore" ],
  "primaryIdentifier" : [ "/properties/Arn", "/properties/CertificateAuthorityArn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "acm-pca:IssueCertificate", "acm-pca:GetCertificate" ]
    },
    "read" : {
      "permissions" : [ "acm-pca:GetCertificate" ]
    },
    "delete" : {
      "permissions" : [ "acm-pca:GetCertificate" ]
    }
  }
}