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
Successful response
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) |
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. |
selfManaged | object | If set, defines data of a self-managed certificate. (id: SelfManagedCertificate) |
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. |
Successful response
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) |
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. |
selfManaged | object | If set, defines data of a self-managed certificate. (id: SelfManagedCertificate) |
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 | pageSize , pageToken , filter , 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,
pemCertificate,
sanDnsnames,
scope,
selfManaged,
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,
pemCertificate,
sanDnsnames,
scope,
selfManaged,
updateTime,
usedBy
FROM google.certificatemanager.certificates
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new Certificate in a given project and location.
INSERT INTO google.certificatemanager.certificates (
data__name,
data__description,
data__labels,
data__selfManaged,
data__managed,
data__scope,
projectsId,
locationsId,
certificateId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ labels }}',
'{{ selfManaged }}',
'{{ managed }}',
'{{ scope }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ certificateId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: certificates
props:
- name: projectsId
value: string
description: Required parameter for the certificates resource.
- name: locationsId
value: string
description: Required parameter for the certificates resource.
- name: name
value: string
description: >
Identifier. A user-defined name of the certificate. Certificate names must be unique globally and match pattern `projects/*/locations/*/certificates/*`.
- name: description
value: string
description: >
Optional. One or more paragraphs of text description of a certificate.
- name: labels
value: object
description: >
Optional. Set of labels associated with a Certificate.
- name: selfManaged
value: object
description: >
If set, defines data of a self-managed certificate.
- name: managed
value: object
description: >
If set, contains configuration and state of a managed certificate.
- name: scope
value: string
description: >
Optional. Immutable. The scope of the certificate.
valid_values: ['DEFAULT', 'EDGE_CACHE', 'ALL_REGIONS', 'CLIENT_AUTH']
- name: certificateId
value: string
UPDATE
examples
- patch
Updates a Certificate.
UPDATE google.certificatemanager.certificates
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__labels = '{{ labels }}',
data__selfManaged = '{{ selfManaged }}',
data__managed = '{{ managed }}',
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;