Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="sqladmin_v1beta4.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1beta4.sslCerts.html">sslCerts</a></h1> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <code><a href="#createEphemeral">createEphemeral(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 82 | <p class="firstline">Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 83 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 84 | <code><a href="#delete">delete(project, instance, sha1Fingerprint, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 85 | <p class="firstline">Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 86 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 87 | <code><a href="#get">get(project, instance, sha1Fingerprint, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 88 | <p class="firstline">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.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 89 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 91 | <p class="firstline">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.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 94 | <p class="firstline">Lists all of the current SSL certificates for the instance.</p> |
| 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 97 | <code class="details" id="close">close()</code> |
| 98 | <pre>Close httplib2 connections.</pre> |
| 99 | </div> |
| 100 | |
| 101 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 102 | <code class="details" id="createEphemeral">createEphemeral(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 103 | <pre>Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 104 | |
| 105 | Args: |
| 106 | project: string, Project ID of the Cloud SQL project. (required) |
| 107 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 108 | body: object, The request body. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 109 | The object takes the form of: |
| 110 | |
| 111 | { # SslCerts create ephemeral certificate request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 112 | "public_key": "A String", # PEM encoded public key to include in the signed certificate. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 113 | } |
| 114 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 115 | x__xgafv: string, V1 error format. |
| 116 | Allowed values |
| 117 | 1 - v1 error format |
| 118 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 119 | |
| 120 | Returns: |
| 121 | An object of the form: |
| 122 | |
| 123 | { # SslCerts Resource |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 124 | "instance": "A String", # Name of the database instance. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 125 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 126 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 127 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 128 | "kind": "A String", # This is always *sql#sslCert*. |
| 129 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 130 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 131 | "selfLink": "A String", # The URI of this resource. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 132 | "cert": "A String", # PEM representation. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 133 | }</pre> |
| 134 | </div> |
| 135 | |
| 136 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 137 | <code class="details" id="delete">delete(project, instance, sha1Fingerprint, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 138 | <pre>Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 139 | |
| 140 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 141 | project: string, Project ID of the project that contains the instance. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 142 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 143 | sha1Fingerprint: string, Sha1 FingerPrint. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 144 | x__xgafv: string, V1 error format. |
| 145 | Allowed values |
| 146 | 1 - v1 error format |
| 147 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 148 | |
| 149 | Returns: |
| 150 | An object of the form: |
| 151 | |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 152 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18 |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 153 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 154 | "selfLink": "A String", # The URI of this resource. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 155 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 156 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 157 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 158 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 159 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 160 | "encryptionOptions": { |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 161 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 162 | "pvkPassword": "A String", # Password that encrypts the private key |
| 163 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 164 | }, |
| 165 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 166 | "kind": "A String", # This is always *sql#importContext*. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 167 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 168 | "csvImportOptions": { # Options for importing data as CSV. |
| 169 | "table": "A String", # The table to which CSV data is imported. |
| 170 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 171 | "A String", |
| 172 | ], |
| 173 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 174 | }, |
| 175 | "targetId": "A String", # Name of the database instance related to this operation. |
| 176 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
| 177 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 178 | "user": "A String", # The email address of the user who initiated this operation. |
| 179 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 180 | "kind": "A String", # This is always *sql#operationErrors*. |
| 181 | "errors": [ # The list of errors encountered while processing this operation. |
| 182 | { # Database instance operation error. |
| 183 | "kind": "A String", # This is always *sql#operationError*. |
| 184 | "message": "A String", # Additional information about the error encountered. |
| 185 | "code": "A String", # Identifies the specific error that occurred. |
| 186 | }, |
| 187 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 188 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 189 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 190 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 191 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 192 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 193 | "kind": "A String", # This is always *sql#operation*. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 194 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 195 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
| 196 | "A String", |
| 197 | ], |
| 198 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 199 | "csvExportOptions": { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only. |
| 200 | "selectQuery": "A String", # The select query used to extract the data. |
| 201 | }, |
| 202 | "offload": True or False, # Option for export offload. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 203 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance. |
| 204 | "kind": "A String", # This is always *sql#exportContext*. |
| 205 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 206 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
| 207 | "A String", |
| 208 | ], |
| 209 | "schemaOnly": True or False, # Export only schemas. |
| 210 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 211 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF. |
| 212 | }, |
| 213 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 214 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 215 | "targetLink": "A String", |
| 216 | "backupContext": { # Backup context. # The context for backup operation, if applicable. |
| 217 | "kind": "A String", # This is always *sql#backupContext*. |
| 218 | "backupId": "A String", # The identifier of the backup. |
| 219 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 220 | }</pre> |
| 221 | </div> |
| 222 | |
| 223 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 224 | <code class="details" id="get">get(project, instance, sha1Fingerprint, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 225 | <pre>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. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 226 | |
| 227 | Args: |
| 228 | project: string, Project ID of the project that contains the instance. (required) |
| 229 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 230 | sha1Fingerprint: string, Sha1 FingerPrint. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 231 | x__xgafv: string, V1 error format. |
| 232 | Allowed values |
| 233 | 1 - v1 error format |
| 234 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 235 | |
| 236 | Returns: |
| 237 | An object of the form: |
| 238 | |
| 239 | { # SslCerts Resource |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 240 | "instance": "A String", # Name of the database instance. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 241 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 242 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 243 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 244 | "kind": "A String", # This is always *sql#sslCert*. |
| 245 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 246 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 247 | "selfLink": "A String", # The URI of this resource. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 248 | "cert": "A String", # PEM representation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 249 | }</pre> |
| 250 | </div> |
| 251 | |
| 252 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 253 | <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 254 | <pre>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. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 255 | |
| 256 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 257 | project: string, Project ID of the project that contains the instance. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 258 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 259 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 260 | The object takes the form of: |
| 261 | |
| 262 | { # SslCerts insert request. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 263 | "commonName": "A String", # User supplied name. Must be a distinct name from the other certificates for this instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 264 | } |
| 265 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 266 | x__xgafv: string, V1 error format. |
| 267 | Allowed values |
| 268 | 1 - v1 error format |
| 269 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 270 | |
| 271 | Returns: |
| 272 | An object of the form: |
| 273 | |
| 274 | { # SslCert insert response. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 275 | "operation": { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18 # The operation to track the ssl certs insert request. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 276 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 277 | "selfLink": "A String", # The URI of this resource. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 278 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 279 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 280 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 281 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 282 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 283 | "encryptionOptions": { |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 284 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 285 | "pvkPassword": "A String", # Password that encrypts the private key |
| 286 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 287 | }, |
| 288 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 289 | "kind": "A String", # This is always *sql#importContext*. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 290 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 291 | "csvImportOptions": { # Options for importing data as CSV. |
| 292 | "table": "A String", # The table to which CSV data is imported. |
| 293 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 294 | "A String", |
| 295 | ], |
| 296 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 297 | }, |
| 298 | "targetId": "A String", # Name of the database instance related to this operation. |
| 299 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
| 300 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 301 | "user": "A String", # The email address of the user who initiated this operation. |
| 302 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 303 | "kind": "A String", # This is always *sql#operationErrors*. |
| 304 | "errors": [ # The list of errors encountered while processing this operation. |
| 305 | { # Database instance operation error. |
| 306 | "kind": "A String", # This is always *sql#operationError*. |
| 307 | "message": "A String", # Additional information about the error encountered. |
| 308 | "code": "A String", # Identifies the specific error that occurred. |
| 309 | }, |
| 310 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 311 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 312 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 313 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 314 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 315 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 316 | "kind": "A String", # This is always *sql#operation*. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 317 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 318 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
| 319 | "A String", |
| 320 | ], |
| 321 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 322 | "csvExportOptions": { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only. |
| 323 | "selectQuery": "A String", # The select query used to extract the data. |
| 324 | }, |
| 325 | "offload": True or False, # Option for export offload. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 326 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance. |
| 327 | "kind": "A String", # This is always *sql#exportContext*. |
| 328 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 329 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
| 330 | "A String", |
| 331 | ], |
| 332 | "schemaOnly": True or False, # Export only schemas. |
| 333 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 334 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF. |
| 335 | }, |
| 336 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 337 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 338 | "targetLink": "A String", |
| 339 | "backupContext": { # Backup context. # The context for backup operation, if applicable. |
| 340 | "kind": "A String", # This is always *sql#backupContext*. |
| 341 | "backupId": "A String", # The identifier of the backup. |
| 342 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 343 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 344 | "clientCert": { # SslCertDetail. # The new client certificate and private key. |
| 345 | "certPrivateKey": "A String", # The private key for the client cert, in pem format. Keep private in order to protect your security. |
| 346 | "certInfo": { # SslCerts Resource # The public information about the cert. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 347 | "instance": "A String", # Name of the database instance. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 348 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 349 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 350 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 351 | "kind": "A String", # This is always *sql#sslCert*. |
| 352 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 353 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 354 | "selfLink": "A String", # The URI of this resource. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 355 | "cert": "A String", # PEM representation. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 356 | }, |
| 357 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 358 | "serverCaCert": { # SslCerts Resource # The server Certificate Authority's certificate. If this is missing you can force a new one to be generated by calling resetSslConfig method on instances resource. |
| 359 | "instance": "A String", # Name of the database instance. |
| 360 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 361 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 362 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 363 | "kind": "A String", # This is always *sql#sslCert*. |
| 364 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 365 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 366 | "selfLink": "A String", # The URI of this resource. |
| 367 | "cert": "A String", # PEM representation. |
| 368 | }, |
| 369 | "kind": "A String", # This is always *sql#sslCertsInsert*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 370 | }</pre> |
| 371 | </div> |
| 372 | |
| 373 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 374 | <code class="details" id="list">list(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 375 | <pre>Lists all of the current SSL certificates for the instance. |
| 376 | |
| 377 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 378 | project: string, Project ID of the project that contains the instance. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 379 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 380 | x__xgafv: string, V1 error format. |
| 381 | Allowed values |
| 382 | 1 - v1 error format |
| 383 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 384 | |
| 385 | Returns: |
| 386 | An object of the form: |
| 387 | |
| 388 | { # SslCerts list response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 389 | "items": [ # List of client certificates for the instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 390 | { # SslCerts Resource |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 391 | "instance": "A String", # Name of the database instance. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 392 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 393 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 394 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 395 | "kind": "A String", # This is always *sql#sslCert*. |
| 396 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 397 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 398 | "selfLink": "A String", # The URI of this resource. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 399 | "cert": "A String", # PEM representation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 400 | }, |
| 401 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame^] | 402 | "kind": "A String", # This is always *sql#sslCertsList*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 403 | }</pre> |
| 404 | </div> |
| 405 | |
| 406 | </body></html> |