Update a Certificate. Currently, the only field you can update is the labels field.

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-patch ...

Required Scalar Argument

  • <name> (string)
    • Output only. The resource name for this Certificate in the format projects/*/locations/*/caPools/*/certificates/*.

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=invidunt
    • 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=sed

    • 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=nonumy

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

    • 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=ipsum
    • Required. The format of the public key.
  • key=kasd

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

    • The serial number encoded in lowercase hexadecimal.
  • lifetime=ea
    • For convenience, the actual lifetime of an issued certificate.
  • not-after-time=at
    • 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=erat
    • The time at which the certificate becomes valid.
  • subject common-name=clita
    • The "common name" of the subject.
  • country-code=vero
    • The country code of the subject.
  • locality=invidunt
    • The locality or city of the subject.
  • organization=nonumy
    • The organization of the subject.
  • organizational-unit=erat
    • The organizational_unit of the subject.
  • postal-code=erat
    • The postal code of the subject.
  • province=dolores
    • The province, territory, or regional state of the subject.
  • street-address=ipsum

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

    • Contains only valid, fully-qualified host names.
    • Each invocation of this argument appends the given value to the array.
  • email-addresses=eos
    • Contains only valid RFC 2822 E-mail addresses.
    • Each invocation of this argument appends the given value to the array.
  • ip-addresses=duo
    • 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=elitr

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

    • 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=et

    • 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=42

    • 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=false
    • The key may be used sign certificate revocation lists.
  • data-encipherment=false
    • The key may be used to encipher data.
  • decipher-only=false
    • 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=true
    • 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=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=false
    • 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=true

    • Indicates whether or not the name constraints are marked critical.
  • excluded-dns-names=rebum.
    • 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=et
    • 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=sed
    • 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=stet
    • 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=aliquyam
    • 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=kasd
    • 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=lorem
    • 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=sit

    • 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=kasd

    • 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=tempor
    • Required. The format of the public key.
  • key=dolor

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

    • The "common name" of the subject.
  • country-code=sit
    • The country code of the subject.
  • locality=rebum.
    • The locality or city of the subject.
  • organization=sea
    • The organization of the subject.
  • organizational-unit=ipsum
    • The organizational_unit of the subject.
  • postal-code=ipsum
    • The postal code of the subject.
  • province=et
    • The province, territory, or regional state of the subject.
  • street-address=elitr

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

    • Contains only valid, fully-qualified host names.
    • Each invocation of this argument appends the given value to the array.
  • email-addresses=dolor
    • Contains only valid RFC 2822 E-mail addresses.
    • Each invocation of this argument appends the given value to the array.
  • ip-addresses=sadipscing
    • 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=dolor

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

    • 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=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=50

    • 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=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=false
    • 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=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=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=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=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=consetetur
    • 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=dolor
    • 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=amet
    • 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=et
    • 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=aliquyam
    • 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=ipsum
    • 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=gubergren
    • 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=invidunt

    • 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=sea

    • Output only. The time at which this Certificate was created.
  • issuer-certificate-authority=duo
    • Output only. The resource name of the issuing CertificateAuthority in the format projects/*/locations/*/caPools/*/certificateAuthorities/*.
  • labels=key=sea
    • 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=sadipscing
    • Output only. The resource name for this Certificate in the format projects/*/locations/*/caPools/*/certificates/*.
  • pem-certificate=no
    • Output only. The pem-encoded, signed X.509 certificate.
  • pem-certificate-chain=tempor
    • 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=ipsum
    • Immutable. A pem-encoded X.509 certificate signing request (CSR).
  • revocation-details revocation-state=sea
    • Indicates why a Certificate was revoked.
  • revocation-time=sit

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

    • 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=ipsum
    • 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 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 update-mask=string

    • Required. A list of fields to be updated in this request.

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").