ssl_certs
Creates, updates, deletes, gets or lists a ssl_certs
resource.
Overview
Name | ssl_certs |
Type | Resource |
Id | google.sqladmin.ssl_certs |
Fields
Name | Datatype | Description |
---|---|---|
cert | string | PEM representation. |
certSerialNumber | string | Serial number, as extracted from the certificate. |
commonName | string | User supplied name. Constrained to [a-zA-Z.-_ ]+. |
createTime | string | The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z |
expirationTime | string | The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z . |
instance | string | Name of the database instance. |
kind | string | This is always sql#sslCert . |
selfLink | string | The URI of this resource. |
sha1Fingerprint | string | Sha1 Fingerprint. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | instance, project, sha1Fingerprint | Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation. |
list | SELECT | instance, project | Lists all of the current SSL certificates for the instance. |
insert | INSERT | instance, project | Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted. |
delete | DELETE | instance, project, sha1Fingerprint | Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted. |
SELECT
examples
Lists all of the current SSL certificates for the instance.
SELECT
cert,
certSerialNumber,
commonName,
createTime,
expirationTime,
instance,
kind,
selfLink,
sha1Fingerprint
FROM google.sqladmin.ssl_certs
WHERE instance = '{{ instance }}'
AND project = '{{ project }}';
INSERT
example
Use the following StackQL query and manifest file to create a new ssl_certs
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.sqladmin.ssl_certs (
instance,
project,
commonName
)
SELECT
'{{ instance }}',
'{{ project }}',
'{{ commonName }}'
;
- name: your_resource_model_name
props:
- name: commonName
value: string
DELETE
example
Deletes the specified ssl_certs
resource.
/*+ delete */
DELETE FROM google.sqladmin.ssl_certs
WHERE instance = '{{ instance }}'
AND project = '{{ project }}'
AND sha1Fingerprint = '{{ sha1Fingerprint }}';