certificates
Creates, updates, deletes, gets or lists a certificates
resource.
Overview
Name | certificates |
Type | Resource |
Id | google.certificatemanager.certificates |
Fields
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/* . |
description | string | Optional. One or more paragraphs of text description of a certificate. |
createTime | string | Output only. The creation timestamp of a Certificate. |
expireTime | string | Output only. The expiry timestamp of a Certificate. |
labels | object | Optional. Set of labels associated with a Certificate. |
managed | object | Configuration and state of a Managed Certificate. Certificate Manager provisions and renews Managed Certificates automatically, for as long as it's authorized to do so. |
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 | Certificate data for a SelfManaged Certificate. SelfManaged Certificates are uploaded by the user. Updating such certificates before they expire remains the user's responsibility. |
updateTime | string | Output only. The last update timestamp of a Certificate. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | certificatesId, locationsId, projectsId | Gets details of a single Certificate. |
list | SELECT | locationsId, projectsId | Lists Certificates in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new Certificate in a given project and location. |
delete | DELETE | certificatesId, locationsId, projectsId | Deletes a single Certificate. |
patch | UPDATE | certificatesId, locationsId, projectsId | Updates a Certificate. |
SELECT
examples
Lists Certificates in a given project and location.
SELECT
name,
description,
createTime,
expireTime,
labels,
managed,
pemCertificate,
sanDnsnames,
scope,
selfManaged,
updateTime
FROM google.certificatemanager.certificates
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new certificates
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.certificatemanager.certificates (
locationsId,
projectsId,
name,
description,
labels,
selfManaged,
managed,
scope
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ description }}',
'{{ labels }}',
'{{ selfManaged }}',
'{{ managed }}',
'{{ scope }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: description
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: labels
value: object
- name: selfManaged
value:
- name: pemCertificate
value: string
- name: pemPrivateKey
value: string
- name: managed
value:
- name: domains
value:
- string
- name: dnsAuthorizations
value:
- string
- name: issuanceConfig
value: string
- name: state
value: string
- name: provisioningIssue
value:
- name: reason
value: string
- name: details
value: string
- name: authorizationAttemptInfo
value:
- - name: domain
value: string
- name: state
value: string
- name: failureReason
value: string
- name: details
value: string
- name: sanDnsnames
value:
- string
- name: pemCertificate
value: string
- name: expireTime
value: string
- name: scope
value: string
UPDATE
example
Updates a certificates
resource.
/*+ update */
UPDATE google.certificatemanager.certificates
SET
name = '{{ name }}',
description = '{{ description }}',
labels = '{{ labels }}',
selfManaged = '{{ selfManaged }}',
managed = '{{ managed }}',
scope = '{{ scope }}'
WHERE
certificatesId = '{{ certificatesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified certificates
resource.
/*+ delete */
DELETE FROM google.certificatemanager.certificates
WHERE certificatesId = '{{ certificatesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';