---
title: "POST /v1/{+parent}/caPools"
method: POST
path: "/v1/{+parent}/caPools"
tags: ["projects"]
---

# POST /v1/{+parent}/caPools

`POST /v1/{+parent}/caPools`

Create a CaPool.

## Path parameters

- `parent` string, required

## Query parameters

- `caPoolId` string
- `requestId` string

## Request body

- CaPool — A CaPool represents a group of CertificateAuthorities that form a trust anchor. A CaPool can be used to manage issuance policies for one or more CertificateAuthority resources and to rotate CA certificates in and out of the trust anchor.
  - `issuancePolicy` IssuancePolicy — Defines controls over all certificate issuance within a CaPool.
    - `backdateDuration` string, google-duration — Optional. If set, all certificates issued from this CaPool will be backdated by this duration. The 'not_before_time' will be the issuance time minus this backdate_duration, and the 'not_after_time' will be adjusted to preserve the requested lifetime. The maximum duration that a certificate can be backdated with these options is 48 hours in the past. This option cannot be set if allow_requester_specified_not_before_time is set.
    - `identityConstraints` CertificateIdentityConstraints — Describes constraints on a Certificate's Subject and SubjectAltNames.
      - `allowSubjectAltNamesPassthrough` boolean — Required. If this is true, the SubjectAltNames extension may be copied from a certificate request into the signed certificate. Otherwise, the requested SubjectAltNames will be discarded.
      - `celExpression` Expr — Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
        - `title` string — Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        - `location` string — Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
        - `description` string — Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
        - `expression` string — Textual representation of an expression in Common Expression Language syntax.
      - `allowSubjectPassthrough` boolean — Required. If this is true, the Subject field may be copied from a certificate request into the signed certificate. Otherwise, the requested Subject will be discarded.
    - `passthroughExtensions` CertificateExtensionConstraints — Describes a set of X.509 extensions that may be part of some certificate issuance controls.
      - `knownExtensions` string[] — Optional. A set of named X.509 extensions. Will be combined with additional_extensions to determine the full set of X.509 extensions.
      - `additionalExtensions` ObjectId[] — Optional. A set of ObjectIds identifying custom X.509 extensions. Will be combined with known_extensions to determine the full set of X.509 extensions.
        - `objectIdPath` integer[] — Required. The parts of an OID path. The most significant parts of the path come first.
    - `baselineValues` X509Parameters — An X509Parameters is used to describe certain fields of an X.509 certificate, such as the key usage fields, fields specific to CA certificates, certificate policy extensions and custom extensions.
      - `nameConstraints` NameConstraints — Describes the X.509 name constraints extension, per https://tools.ietf.org/html/rfc5280#section-4.2.1.10
        - `excludedIpRanges` string[] — Contains the excluded IP ranges. For IPv4 addresses, the ranges are expressed using CIDR notation as specified in RFC 4632. For IPv6 addresses, the ranges are expressed in similar encoding as IPv4 addresses.
        - `excludedEmailAddresses` string[] — Contains the excluded email addresses. The value can be a particular email address, a hostname to indicate all email addresses on that host or a domain with a leading period (e.g. `.example.com`) to indicate all email addresses in that domain.
        - `permittedUris` string[] — Contains the permitted URIs that apply to the host part of the name. The value can be a hostname or a domain with a leading period (like `.example.com`)
        - `permittedDnsNames` string[] — Contains permitted DNS names. Any DNS name that can be constructed by simply adding zero or more labels to the left-hand side of the name satisfies the name constraint. For example, `example.com`, `www.example.com`, `www.sub.example.com` would satisfy `example.com` while `example1.com` does not.
        - `critical` boolean — Indicates whether or not the name constraints are marked critical.
        - `excludedUris` string[] — Contains the excluded URIs that apply to the host part of the name. The value can be a hostname or a domain with a leading period (like `.example.com`)
        - `excludedDnsNames` string[] — Contains excluded DNS names. Any DNS name that can be constructed by simply adding zero or more labels to the left-hand side of the name satisfies the name constraint. For example, `example.com`, `www.example.com`, `www.sub.example.com` would satisfy `example.com` while `example1.com` does not.
        - `permittedIpRanges` string[] — Contains the permitted IP ranges. For IPv4 addresses, the ranges are expressed using CIDR notation as specified in RFC 4632. For IPv6 addresses, the ranges are expressed in similar encoding as IPv4 addresses.
        - `permittedEmailAddresses` string[] — Contains the permitted email addresses. The value can be a particular email address, a hostname to indicate all email addresses on that host or a domain with a leading period (e.g. `.example.com`) to indicate all email addresses in that domain.
      - `additionalExtensions` X509Extension[] — Optional. Describes custom X.509 extensions.
        - `objectId` ObjectId — An ObjectId specifies an object identifier (OID). These provide context and describe types in ASN.1 messages.
          - `objectIdPath` integer[] — Required. The parts of an OID path. The most significant parts of the path come first.
        - `critical` boolean — Optional. Indicates whether or not this extension is critical (i.e., if the client does not know how to handle this extension, the client should consider this to be an error).
        - `value` string, byte — Required. The value of this X.509 extension.
      - `keyUsage` KeyUsage — A KeyUsage describes key usage values that may appear in an X.509 certificate.
        - `baseKeyUsage` KeyUsageOptions — KeyUsage.KeyUsageOptions corresponds to the key usage values described in https://tools.ietf.org/html/rfc5280#section-4.2.1.3.
          - `certSign` boolean — The key may be used to sign certificates.
          - `keyAgreement` boolean — The key may be used in a key agreement protocol.
          - `dataEncipherment` boolean — The key may be used to encipher data.
          - `digitalSignature` boolean — The key may be used for digital signatures.
          - `contentCommitment` boolean — The key may be used for cryptographic commitments. Note that this may also be referred to as "non-repudiation".
          - `keyEncipherment` boolean — The key may be used to encipher other keys.
          - `encipherOnly` boolean — The key may be used to encipher only.
          - `decipherOnly` boolean — The key may be used to decipher only.
          - `crlSign` boolean — The key may be used sign certificate revocation lists.
        - `extendedKeyUsage` ExtendedKeyUsageOptions — KeyUsage.ExtendedKeyUsageOptions has fields that correspond to certain common OIDs that could be specified as an extended key usage value.
          - `serverAuth` boolean — Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW server authentication", though regularly used for non-WWW TLS.
          - `clientAuth` boolean — Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW client authentication", though regularly used for non-WWW TLS.
          - `codeSigning` boolean — Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of downloadable executable code client authentication".
          - `emailProtection` boolean — Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email protection".
          - `ocspSigning` boolean — Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing OCSP responses".
          - `timeStamping` boolean — Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding the hash of an object to a time".
        - `unknownExtendedKeyUsages` ObjectId[] — Used to describe extended key usages that are not listed in the KeyUsage.ExtendedKeyUsageOptions message.
          - `objectIdPath` integer[] — Required. The parts of an OID path. The most significant parts of the path come first.
      - `policyIds` ObjectId[] — Optional. Describes the X.509 certificate policy object identifiers, per https://tools.ietf.org/html/rfc5280#section-4.2.1.4.
        - `objectIdPath` integer[] — Required. The parts of an OID path. The most significant parts of the path come first.
      - `caOptions` CaOptions — Describes the X.509 basic constraints extension, per [RFC 5280 section 4.2.1.9](https://tools.ietf.org/html/rfc5280#section-4.2.1.9)
        - `maxIssuerPathLength` integer — Optional. Refers to the path length constraint field in the X.509 extension. For a CA certificate, this value describes the depth of subordinate CA certificates that are allowed. If this value is less than 0, the request will fail. If this value is missing, the max path length will be omitted from the certificate.
        - `isCa` boolean — Optional. Refers to the "CA" boolean field in the X.509 extension. When this value is missing, the basic constraints extension will be omitted from the certificate.
      - `aiaOcspServers` string[] — Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses that appear in the "Authority Information Access" extension in the certificate.
    - `allowedKeyTypes` AllowedKeyType[] — Optional. If any AllowedKeyType is specified, then the certificate request's public key must match one of the key types listed here. Otherwise, any key may be used.
      - `ellipticCurve` EcKeyType — Describes an Elliptic Curve key that may be used in a Certificate issued from a CaPool.
        - `signatureAlgorithm` 'EC_SIGNATURE_ALGORITHM_UNSPECIFIED' | 'ECDSA_P256' | 'ECDSA_P384' | 'EDDSA_25519' — Optional. A signature algorithm that must be used. If this is omitted, any EC-based signature algorithm will be allowed.
      - `rsa` RsaKeyType — Describes an RSA key that may be used in a Certificate issued from a CaPool.
        - `minModulusSize` string, int64 — Optional. The minimum allowed RSA modulus size (inclusive), in bits. If this is not set, or if set to zero, the service-level min RSA modulus size will continue to apply.
        - `maxModulusSize` string, int64 — Optional. The maximum allowed RSA modulus size (inclusive), in bits. If this is not set, or if set to zero, the service will not enforce an explicit upper bound on RSA modulus sizes.
    - `maximumLifetime` string, google-duration — Optional. The maximum lifetime allowed for issued Certificates. Note that if the issuing CertificateAuthority expires before a Certificate resource's requested maximum_lifetime, the effective lifetime will be explicitly truncated to match it.
    - `allowedIssuanceModes` IssuanceModes — IssuanceModes specifies the allowed ways in which Certificates may be requested from this CaPool.
      - `allowCsrBasedIssuance` boolean — Optional. When true, allows callers to create Certificates by specifying a CSR.
      - `allowConfigBasedIssuance` boolean — Optional. When true, allows callers to create Certificates by specifying a CertificateConfig.
    - `allowRequesterSpecifiedNotBeforeTime` boolean — Optional. If set to true, allows requesters to specify the requested_not_before_time field when creating a Certificate. Certificates requested with this option enabled will have a 'not_before_time' equal to the value specified in the request. The 'not_after_time' will be adjusted to preserve the requested lifetime. The maximum time that a certificate can be backdated with these options is 48 hours in the past. This option cannot be set if backdate_duration is set.
  - `encryptionSpec` EncryptionSpec — The configuration used for encrypting data at rest.
    - `cloudKmsKey` string — The resource name for a Cloud KMS key in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
  - `publishingOptions` PublishingOptions — Options relating to the publication of each CertificateAuthority's CA certificate and CRLs and their inclusion as extensions in issued Certificates. The options set here apply to certificates issued by any CertificateAuthority in the CaPool.
    - `publishCrl` boolean — Optional. When true, publishes each CertificateAuthority's CRL and includes its URL in the "CRL Distribution Points" X.509 extension in all issued Certificates. If this is false, CRLs will not be published and the corresponding X.509 extension will not be written in issued certificates. CRLs will expire 7 days from their creation. However, we will rebuild daily. CRLs are also rebuilt shortly after a certificate is revoked.
    - `encodingFormat` 'ENCODING_FORMAT_UNSPECIFIED' | 'PEM' | 'DER' — Optional. Specifies the encoding format of each CertificateAuthority resource's CA certificate and CRLs. If this is omitted, CA certificates and CRLs will be published in PEM.
    - `publishCaCert` boolean — Optional. When true, publishes each CertificateAuthority's CA certificate and includes its URL in the "Authority Information Access" X.509 extension in all issued Certificates. If this is false, the CA certificate will not be published and the corresponding X.509 extension will not be written in issued certificates.
  - `name` string — Identifier. The resource name for this CaPool in the format `projects/*/locations/*/caPools/*`.
  - `tier` 'TIER_UNSPECIFIED' | 'ENTERPRISE' | 'DEVOPS' — Required. Immutable. The Tier of this CaPool.
  - `labels` object — Optional. Labels with user-defined metadata.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/privateca.md) · [All operations](https://skmtc.dev/google/apis/privateca/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/privateca/revisions/23453098738d/schema)
