Create a new Certificate in a given Project, Location from a particular CaPool.

Scopes

You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform. You can set the scope for this method like this: privateca1 --scope <scope> projects locations-ca-pools-certificates-create ...

Required Scalar Argument

  • <parent> (string)
    • Required. The resource name of the CaPool associated with the Certificate, in the format projects/*/locations/*/caPools/*.

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

Certificate:
  certificate-description:
    aia-issuing-certificate-urls: [string]
    authority-key-id:
      key-id: string
    cert-fingerprint:
      sha256-hash: string
    crl-distribution-points: [string]
    public-key:
      format: string
      key: string
    subject-description:
      hex-serial-number: string
      lifetime: string
      not-after-time: string
      not-before-time: string
      subject:
        common-name: string
        country-code: string
        locality: string
        organization: string
        organizational-unit: string
        postal-code: string
        province: string
        street-address: string
      subject-alt-name:
        dns-names: [string]
        email-addresses: [string]
        ip-addresses: [string]
        uris: [string]
    subject-key-id:
      key-id: string
    x509-description:
      aia-ocsp-servers: [string]
      ca-options:
        is-ca: boolean
        max-issuer-path-length: integer
      key-usage:
        base-key-usage:
          cert-sign: boolean
          content-commitment: boolean
          crl-sign: boolean
          data-encipherment: boolean
          decipher-only: boolean
          digital-signature: boolean
          encipher-only: boolean
          key-agreement: boolean
          key-encipherment: boolean
        extended-key-usage:
          client-auth: boolean
          code-signing: boolean
          email-protection: boolean
          ocsp-signing: boolean
          server-auth: boolean
          time-stamping: boolean
      name-constraints:
        critical: boolean
        excluded-dns-names: [string]
        excluded-email-addresses: [string]
        excluded-ip-ranges: [string]
        excluded-uris: [string]
        permitted-dns-names: [string]
        permitted-email-addresses: [string]
        permitted-ip-ranges: [string]
        permitted-uris: [string]
  certificate-template: string
  config:
    public-key:
      format: string
      key: string
    subject-config:
      subject:
        common-name: string
        country-code: string
        locality: string
        organization: string
        organizational-unit: string
        postal-code: string
        province: string
        street-address: string
      subject-alt-name:
        dns-names: [string]
        email-addresses: [string]
        ip-addresses: [string]
        uris: [string]
    subject-key-id:
      key-id: string
    x509-config:
      aia-ocsp-servers: [string]
      ca-options:
        is-ca: boolean
        max-issuer-path-length: integer
      key-usage:
        base-key-usage:
          cert-sign: boolean
          content-commitment: boolean
          crl-sign: boolean
          data-encipherment: boolean
          decipher-only: boolean
          digital-signature: boolean
          encipher-only: boolean
          key-agreement: boolean
          key-encipherment: boolean
        extended-key-usage:
          client-auth: boolean
          code-signing: boolean
          email-protection: boolean
          ocsp-signing: boolean
          server-auth: boolean
          time-stamping: boolean
      name-constraints:
        critical: boolean
        excluded-dns-names: [string]
        excluded-email-addresses: [string]
        excluded-ip-ranges: [string]
        excluded-uris: [string]
        permitted-dns-names: [string]
        permitted-email-addresses: [string]
        permitted-ip-ranges: [string]
        permitted-uris: [string]
  create-time: string
  issuer-certificate-authority: string
  labels: { string: string }
  lifetime: string
  name: string
  pem-certificate: string
  pem-certificate-chain: [string]
  pem-csr: string
  revocation-details:
    revocation-state: string
    revocation-time: string
  subject-mode: string
  update-time: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r .certificate-description aia-issuing-certificate-urls=erat
    • Describes lists of issuer CA certificate URLs that appear in the "Authority Information Access" extension in the certificate.
    • Each invocation of this argument appends the given value to the array.
  • authority-key-id key-id=accusam

    • Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most likely the 160 bit SHA-1 hash of the public key.
  • ..cert-fingerprint sha256-hash=sea

    • The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
  • .. crl-distribution-points=takimata

    • Describes a list of locations to obtain CRL information, i.e. the DistributionPoint.fullName described by https://tools.ietf.org/html/rfc5280#section-4.2.1.13
    • Each invocation of this argument appends the given value to the array.
  • public-key format=lorem
    • Required. The format of the public key.
  • key=et

    • Required. A public key. The padding and encoding must match with the KeyFormat value specified for the format field.
  • ..subject-description hex-serial-number=at

    • The serial number encoded in lowercase hexadecimal.
  • lifetime=dolor
    • For convenience, the actual lifetime of an issued certificate.
  • not-after-time=et
    • The time after which the certificate is expired. Per RFC 5280, the validity period for a certificate is the period of time from not_before_time through not_after_time, inclusive. Corresponds to 'not_before_time' + 'lifetime' - 1 second.
  • not-before-time=sit
    • The time at which the certificate becomes valid.
  • subject common-name=erat
    • The "common name" of the subject.
  • country-code=sea
    • The country code of the subject.
  • locality=nonumy
    • The locality or city of the subject.
  • organization=et
    • The organization of the subject.
  • organizational-unit=gubergren
    • The organizational_unit of the subject.
  • postal-code=justo
    • The postal code of the subject.
  • province=sea
    • The province, territory, or regional state of the subject.
  • street-address=consetetur

    • The street address of the subject.
  • ..subject-alt-name dns-names=sit

    • Contains only valid, fully-qualified host names.
    • Each invocation of this argument appends the given value to the array.
  • email-addresses=aliquyam
    • Contains only valid RFC 2822 E-mail addresses.
    • Each invocation of this argument appends the given value to the array.
  • ip-addresses=eos
    • Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
    • Each invocation of this argument appends the given value to the array.
  • uris=at

    • Contains only valid RFC 3986 URIs.
    • Each invocation of this argument appends the given value to the array.
  • ...subject-key-id key-id=dolores

    • Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most likely the 160 bit SHA-1 hash of the public key.
  • ..x509-description aia-ocsp-servers=consetetur

    • Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses that appear in the "Authority Information Access" extension in the certificate.
    • Each invocation of this argument appends the given value to the array.
  • ca-options is-ca=true
    • Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this value is missing, the extension will be omitted from the CA certificate.
  • max-issuer-path-length=97

    • Optional. Refers to the path length restriction 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 CA certificate.
  • ..key-usage.base-key-usage cert-sign=true

    • The key may be used to sign certificates.
  • content-commitment=true
    • The key may be used for cryptographic commitments. Note that this may also be referred to as "non-repudiation".
  • crl-sign=true
    • The key may be used sign certificate revocation lists.
  • data-encipherment=false
    • The key may be used to encipher data.
  • decipher-only=true
    • The key may be used to decipher only.
  • digital-signature=true
    • The key may be used for digital signatures.
  • encipher-only=true
    • The key may be used to encipher only.
  • key-agreement=true
    • The key may be used in a key agreement protocol.
  • key-encipherment=false

    • The key may be used to encipher other keys.
  • ..extended-key-usage client-auth=true

    • 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.
  • code-signing=false
    • Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of downloadable executable code client authentication".
  • email-protection=true
    • Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email protection".
  • ocsp-signing=false
    • Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing OCSP responses".
  • server-auth=true
    • 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.
  • time-stamping=false

    • Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding the hash of an object to a time".
  • ...name-constraints critical=true

    • Indicates whether or not the name constraints are marked critical.
  • excluded-dns-names=nonumy
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • excluded-email-addresses=rebum.
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • excluded-ip-ranges=tempor
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • excluded-uris=dolore
    • 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)
    • Each invocation of this argument appends the given value to the array.
  • permitted-dns-names=eos
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • permitted-email-addresses=amet.
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • permitted-ip-ranges=dolore
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • permitted-uris=amet

    • 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)
    • Each invocation of this argument appends the given value to the array.
  • .... certificate-template=ut

    • Immutable. The resource name for a CertificateTemplate used to issue this certificate, in the format projects/*/locations/*/certificateTemplates/*. If this is specified, the caller must have the necessary permission to use this template. If this is omitted, no template will be used. This template must be in the same location as the Certificate.
  • config.public-key format=at
    • Required. The format of the public key.
  • key=sit

    • Required. A public key. The padding and encoding must match with the KeyFormat value specified for the format field.
  • ..subject-config.subject common-name=vero

    • The "common name" of the subject.
  • country-code=duo
    • The country code of the subject.
  • locality=sadipscing
    • The locality or city of the subject.
  • organization=ut
    • The organization of the subject.
  • organizational-unit=rebum.
    • The organizational_unit of the subject.
  • postal-code=duo
    • The postal code of the subject.
  • province=kasd
    • The province, territory, or regional state of the subject.
  • street-address=sadipscing

    • The street address of the subject.
  • ..subject-alt-name dns-names=tempor

    • Contains only valid, fully-qualified host names.
    • Each invocation of this argument appends the given value to the array.
  • email-addresses=sea
    • Contains only valid RFC 2822 E-mail addresses.
    • Each invocation of this argument appends the given value to the array.
  • ip-addresses=et
    • Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
    • Each invocation of this argument appends the given value to the array.
  • uris=lorem

    • Contains only valid RFC 3986 URIs.
    • Each invocation of this argument appends the given value to the array.
  • ...subject-key-id key-id=magna

    • Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most likely the 160 bit SHA-1 hash of the public key.
  • ..x509-config aia-ocsp-servers=takimata

    • Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses that appear in the "Authority Information Access" extension in the certificate.
    • Each invocation of this argument appends the given value to the array.
  • ca-options is-ca=true
    • Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this value is missing, the extension will be omitted from the CA certificate.
  • max-issuer-path-length=74

    • Optional. Refers to the path length restriction 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 CA certificate.
  • ..key-usage.base-key-usage cert-sign=false

    • The key may be used to sign certificates.
  • content-commitment=false
    • The key may be used for cryptographic commitments. Note that this may also be referred to as "non-repudiation".
  • crl-sign=false
    • The key may be used sign certificate revocation lists.
  • data-encipherment=true
    • The key may be used to encipher data.
  • decipher-only=true
    • The key may be used to decipher only.
  • digital-signature=false
    • The key may be used for digital signatures.
  • encipher-only=false
    • The key may be used to encipher only.
  • key-agreement=false
    • The key may be used in a key agreement protocol.
  • key-encipherment=true

    • The key may be used to encipher other keys.
  • ..extended-key-usage client-auth=false

    • 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.
  • code-signing=true
    • Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of downloadable executable code client authentication".
  • email-protection=true
    • Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email protection".
  • ocsp-signing=false
    • Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing OCSP responses".
  • server-auth=false
    • 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.
  • time-stamping=false

    • Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding the hash of an object to a time".
  • ...name-constraints critical=false

    • Indicates whether or not the name constraints are marked critical.
  • excluded-dns-names=justo
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • excluded-email-addresses=ipsum
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • excluded-ip-ranges=accusam
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • excluded-uris=dolores
    • 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)
    • Each invocation of this argument appends the given value to the array.
  • permitted-dns-names=consetetur
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • permitted-email-addresses=no
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • permitted-ip-ranges=justo
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • permitted-uris=sadipscing

    • 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)
    • Each invocation of this argument appends the given value to the array.
  • .... create-time=diam

    • Output only. The time at which this Certificate was created.
  • issuer-certificate-authority=sea
    • Output only. The resource name of the issuing CertificateAuthority in the format projects/*/locations/*/caPools/*/certificateAuthorities/*.
  • labels=key=ipsum
    • Optional. Labels with user-defined metadata.
    • the value will be associated with the given key
  • lifetime=stet
    • Required. Immutable. The desired lifetime of a certificate. Used to create the "not_before_time" and "not_after_time" fields inside an X.509 certificate. Note that the lifetime may be truncated if it would extend past the life of any certificate authority in the issuing chain.
  • name=gubergren
    • Output only. The resource name for this Certificate in the format projects/*/locations/*/caPools/*/certificates/*.
  • pem-certificate=ipsum
    • Output only. The pem-encoded, signed X.509 certificate.
  • pem-certificate-chain=no
    • Output only. The chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246.
    • Each invocation of this argument appends the given value to the array.
  • pem-csr=sit
    • Immutable. A pem-encoded X.509 certificate signing request (CSR).
  • revocation-details revocation-state=kasd
    • Indicates why a Certificate was revoked.
  • revocation-time=amet

    • The time at which this Certificate was revoked.
  • .. subject-mode=lorem

    • Immutable. Specifies how the Certificate's identity fields are to be decided. If this is omitted, the DEFAULT subject mode will be used.
  • update-time=justo
    • Output only. The time at which this Certificate was updated.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p certificate-id=string

    • Optional. It must be unique within a location and match the regular expression [a-zA-Z0-9_-]{1,63}. This field is required when using a CertificateAuthority in the Enterprise CertificateAuthority.Tier, but is optional and its value is ignored otherwise.
  • -p issuing-certificate-authority-id=string

    • Optional. The resource ID of the CertificateAuthority that should issue the certificate. This optional field will ignore the load-balancing scheme of the Pool and directly issue the certificate from the CA with the specified ID, contained in the same CaPool referenced by parent. Per-CA quota rules apply. If left empty, a CertificateAuthority will be chosen from the CaPool by the service. For example, to issue a Certificate from a Certificate Authority with resource name "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", you can set the parent to "projects/my-project/locations/us-central1/caPools/my-pool" and the issuing_certificate_authority_id to "my-ca".
  • -p request-id=string

    • Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
  • -p validate-only=boolean

    • Optional. If this is true, no Certificate resource will be persisted regardless of the CaPool's tier, and the returned Certificate will not contain the pem_certificate field.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").