certificates
Creates, updates, deletes, gets or lists a certificates resource.
Overview
| Name | certificates |
| Type | Resource |
| Id | google.certificatemanager.certificates |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. A user-defined name of the certificate. Certificate names must be unique globally and match pattern projects/*/locations/*/certificates/*. |
createTime | string (google-datetime) | Output only. The creation timestamp of a Certificate. |
description | string | Optional. One or more paragraphs of text description of a certificate. |
expireTime | string (google-datetime) | Output only. The expiry timestamp of a Certificate. |
labels | object | Optional. Set of labels associated with a Certificate. |
managed | object | If set, contains configuration and state of a managed certificate. (id: ManagedCertificate) |
managedIdentity | object | If set, contains configuration and state of a managed identity certificate. (id: ManagedIdentityCertificate) |
pemCertificate | string | Output only. The PEM-encoded certificate chain. |
sanDnsnames | array | Output only. The list of Subject Alternative Names of dnsName type defined in the certificate (see RFC 5280 4.2.1.6). Managed certificates that haven't been provisioned yet have this field populated with a value of the managed.domains field. |
scope | string | Optional. Immutable. The scope of the certificate. (DEFAULT, EDGE_CACHE, ALL_REGIONS, CLIENT_AUTH) |
selfManaged | object | If set, defines data of a self-managed certificate. (id: SelfManagedCertificate) |
tags | object | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" |
updateTime | string (google-datetime) | Output only. The last update timestamp of a Certificate. |
usedBy | array | Output only. The list of resources that use this Certificate. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. A user-defined name of the certificate. Certificate names must be unique globally and match pattern projects/*/locations/*/certificates/*. |
createTime | string (google-datetime) | Output only. The creation timestamp of a Certificate. |
description | string | Optional. One or more paragraphs of text description of a certificate. |
expireTime | string (google-datetime) | Output only. The expiry timestamp of a Certificate. |
labels | object | Optional. Set of labels associated with a Certificate. |
managed | object | If set, contains configuration and state of a managed certificate. (id: ManagedCertificate) |
managedIdentity | object | If set, contains configuration and state of a managed identity certificate. (id: ManagedIdentityCertificate) |
pemCertificate | string | Output only. The PEM-encoded certificate chain. |
sanDnsnames | array | Output only. The list of Subject Alternative Names of dnsName type defined in the certificate (see RFC 5280 4.2.1.6). Managed certificates that haven't been provisioned yet have this field populated with a value of the managed.domains field. |
scope | string | Optional. Immutable. The scope of the certificate. (DEFAULT, EDGE_CACHE, ALL_REGIONS, CLIENT_AUTH) |
selfManaged | object | If set, defines data of a self-managed certificate. (id: SelfManagedCertificate) |
tags | object | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" |
updateTime | string (google-datetime) | Output only. The last update timestamp of a Certificate. |
usedBy | array | Output only. The list of resources that use this Certificate. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, certificatesId | Gets details of a single Certificate. | |
list | select | projectsId, locationsId | filter, pageSize, pageToken, orderBy | Lists Certificates in a given project and location. |
create | insert | projectsId, locationsId | certificateId | Creates a new Certificate in a given project and location. |
patch | update | projectsId, locationsId, certificatesId | updateMask | Updates a Certificate. |
delete | delete | projectsId, locationsId, certificatesId | Deletes a single Certificate. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
certificatesId | string | |
locationsId | string | |
projectsId | string | |
certificateId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets details of a single Certificate.
SELECT
name,
createTime,
description,
expireTime,
labels,
managed,
managedIdentity,
pemCertificate,
sanDnsnames,
scope,
selfManaged,
tags,
updateTime,
usedBy
FROM google.certificatemanager.certificates
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND certificatesId = '{{ certificatesId }}' -- required
;
Lists Certificates in a given project and location.
SELECT
name,
createTime,
description,
expireTime,
labels,
managed,
managedIdentity,
pemCertificate,
sanDnsnames,
scope,
selfManaged,
tags,
updateTime,
usedBy
FROM google.certificatemanager.certificates
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
;
INSERT examples
- create
- Manifest
Creates a new Certificate in a given project and location.
INSERT INTO google.certificatemanager.certificates (
data__selfManaged,
data__tags,
data__description,
data__managed,
data__labels,
data__name,
data__managedIdentity,
data__scope,
projectsId,
locationsId,
certificateId
)
SELECT
'{{ selfManaged }}',
'{{ tags }}',
'{{ description }}',
'{{ managed }}',
'{{ labels }}',
'{{ name }}',
'{{ managedIdentity }}',
'{{ scope }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ certificateId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: certificates
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the certificates resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the certificates resource.
- name: selfManaged
description: |
If set, defines data of a self-managed certificate.
value:
pemCertificate: "{{ pemCertificate }}"
pemPrivateKey: "{{ pemPrivateKey }}"
- name: tags
value: "{{ tags }}"
description: |
Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing"
- name: description
value: "{{ description }}"
description: |
Optional. One or more paragraphs of text description of a certificate.
- name: managed
description: |
If set, contains configuration and state of a managed certificate.
value:
dnsAuthorizations:
- "{{ dnsAuthorizations }}"
state: "{{ state }}"
authorizationAttemptInfo:
- state: "{{ state }}"
troubleshooting:
issues:
- "{{ issues }}"
cname:
name: "{{ name }}"
resolvedData:
- "{{ resolvedData }}"
expectedData: "{{ expectedData }}"
ips:
serving:
- "{{ serving }}"
servingOnAltPorts:
- "{{ servingOnAltPorts }}"
resolved:
- "{{ resolved }}"
details: "{{ details }}"
domain: "{{ domain }}"
attemptTime: "{{ attemptTime }}"
failureReason: "{{ failureReason }}"
issuanceConfig: "{{ issuanceConfig }}"
domains:
- "{{ domains }}"
provisioningIssue:
reason: "{{ reason }}"
details: "{{ details }}"
- name: labels
value: "{{ labels }}"
description: |
Optional. Set of labels associated with a Certificate.
- name: name
value: "{{ name }}"
description: |
Identifier. A user-defined name of the certificate. Certificate names must be unique globally and match pattern `projects/*/locations/*/certificates/*`.
- name: managedIdentity
description: |
If set, contains configuration and state of a managed identity certificate.
value:
state: "{{ state }}"
identity: "{{ identity }}"
provisioningIssue:
reason: "{{ reason }}"
details: "{{ details }}"
- name: scope
value: "{{ scope }}"
description: |
Optional. Immutable. The scope of the certificate.
valid_values: ['DEFAULT', 'EDGE_CACHE', 'ALL_REGIONS', 'CLIENT_AUTH']
- name: certificateId
value: "{{ certificateId }}"
UPDATE examples
- patch
Updates a Certificate.
UPDATE google.certificatemanager.certificates
SET
data__selfManaged = '{{ selfManaged }}',
data__tags = '{{ tags }}',
data__description = '{{ description }}',
data__managed = '{{ managed }}',
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__managedIdentity = '{{ managedIdentity }}',
data__scope = '{{ scope }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND certificatesId = '{{ certificatesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a single Certificate.
DELETE FROM google.certificatemanager.certificates
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND certificatesId = '{{ certificatesId }}' --required
;