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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 | <code><a href="#createEphemeral">createEphemeral(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Generates a short-lived X509 certificate containing the provided public key</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <code><a href="#delete">delete(project, instance, sha1Fingerprint, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Deletes the SSL certificate. For First Generation instances, the</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 83 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 84 | <code><a href="#get">get(project, instance, sha1Fingerprint, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Retrieves a particular SSL certificate. Does not include the private key</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="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 88 | <p class="firstline">Creates an SSL certificate and returns it along with the private key and</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="#list">list(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 91 | <p class="firstline">Lists all of the current SSL certificates for the instance.</p> |
| 92 | <h3>Method Details</h3> |
| 93 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 94 | <code class="details" id="createEphemeral">createEphemeral(project, instance, body=None, x__xgafv=None)</code> |
| 95 | <pre>Generates a short-lived X509 certificate containing the provided public key |
| 96 | and signed by a private key specific to the target instance. Users may use |
| 97 | the certificate to authenticate as themselves when connecting to the |
| 98 | database. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 99 | |
| 100 | Args: |
| 101 | project: string, Project ID of the Cloud SQL project. (required) |
| 102 | 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] | 103 | body: object, The request body. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 104 | The object takes the form of: |
| 105 | |
| 106 | { # SslCerts create ephemeral certificate request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 107 | "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] | 108 | } |
| 109 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 110 | x__xgafv: string, V1 error format. |
| 111 | Allowed values |
| 112 | 1 - v1 error format |
| 113 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 114 | |
| 115 | Returns: |
| 116 | An object of the form: |
| 117 | |
| 118 | { # SslCerts Resource |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 119 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 120 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 121 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 122 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 123 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 124 | "cert": "A String", # PEM representation. |
| 125 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 126 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 127 | "createTime": "A String", # The time when the certificate was created in <a |
| 128 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 129 | # <code>2012-11-15T16:19:00.094Z</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 130 | "instance": "A String", # Name of the database instance. |
| 131 | "selfLink": "A String", # The URI of this resource. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 132 | }</pre> |
| 133 | </div> |
| 134 | |
| 135 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 136 | <code class="details" id="delete">delete(project, instance, sha1Fingerprint, x__xgafv=None)</code> |
| 137 | <pre>Deletes the SSL certificate. For First Generation instances, the |
| 138 | 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 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 152 | { # An Operation resource.&nbsp;For successful operations that return an |
| 153 | # Operation resource, only the fields relevant to the operation are populated |
| 154 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 155 | "targetLink": "A String", |
| 156 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 157 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 158 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 159 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 160 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 161 | # <code>DELETE_DATABASE</code> . |
| 162 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 163 | # populated. |
| 164 | "errors": [ # The list of errors encountered while processing this operation. |
| 165 | { # Database instance operation error. |
| 166 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 167 | "code": "A String", # Identifies the specific error that occurred. |
| 168 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 169 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 170 | ], |
| 171 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 172 | }, |
| 173 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 174 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 175 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 176 | # <code>SQL</code>, this field is required only if the import file does not |
| 177 | # specify a database, and is overridden by any database specification in the |
| 178 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 179 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 180 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 181 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 182 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 183 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 184 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 185 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 186 | # write permissions to the bucket and read access to the file. |
| 187 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 188 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 189 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 190 | }, |
| 191 | }, |
| 192 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 193 | # <code>gs: |
| 194 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 195 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 196 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 197 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 198 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 199 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 200 | "csvImportOptions": { # Options for importing data as CSV. |
| 201 | "table": "A String", # The table to which CSV data is imported. |
| 202 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 203 | # of the database table are loaded with CSV data. |
| 204 | "A String", |
| 205 | ], |
| 206 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 207 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 208 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 209 | # <code>RUNNING</code>, <code>DONE</code>, |
| 210 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 211 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 212 | # identifier to retrieve the Operations resource that has information about |
| 213 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 214 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 215 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 216 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 217 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 218 | # stored. The URI is in the form <code>gs: |
| 219 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 220 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 221 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 222 | # // compressed. |
| 223 | "csvExportOptions": { # Options for exporting data as CSV. |
| 224 | "selectQuery": "A String", # The select query used to extract the data. |
| 225 | }, |
| 226 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 227 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 228 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 229 | # databases are exported, except for the <code>mysql</code> system database. |
| 230 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 231 | # either by using this property or by using the |
| 232 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 233 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 234 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 235 | # this database must match the one specified in the |
| 236 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 237 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 238 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 239 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 240 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 241 | # you specify tables, specify one and only one database. For PostgreSQL |
| 242 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 243 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 244 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 245 | "schemaOnly": True or False, # Export only schemas. |
| 246 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 247 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 248 | # If set to <code>1</code>, the dump file includes |
| 249 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 250 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 251 | # a SQL comment, and has no effect. |
| 252 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 253 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 254 | }, |
| 255 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 256 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 257 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 258 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 259 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 260 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 261 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 262 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 263 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 264 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 265 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 266 | "user": "A String", # The email address of the user who initiated this operation. |
| 267 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 268 | "selfLink": "A String", # The URI of this resource. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 269 | }</pre> |
| 270 | </div> |
| 271 | |
| 272 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 273 | <code class="details" id="get">get(project, instance, sha1Fingerprint, x__xgafv=None)</code> |
| 274 | <pre>Retrieves a particular SSL certificate. Does not include the private key |
| 275 | (required for usage). The private key must be saved from the response to |
| 276 | initial creation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 277 | |
| 278 | Args: |
| 279 | project: string, Project ID of the project that contains the instance. (required) |
| 280 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 281 | sha1Fingerprint: string, Sha1 FingerPrint. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 282 | x__xgafv: string, V1 error format. |
| 283 | Allowed values |
| 284 | 1 - v1 error format |
| 285 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 286 | |
| 287 | Returns: |
| 288 | An object of the form: |
| 289 | |
| 290 | { # SslCerts Resource |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 291 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 292 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 293 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 294 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 295 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 296 | "cert": "A String", # PEM representation. |
| 297 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 298 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 299 | "createTime": "A String", # The time when the certificate was created in <a |
| 300 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 301 | # <code>2012-11-15T16:19:00.094Z</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 302 | "instance": "A String", # Name of the database instance. |
| 303 | "selfLink": "A String", # The URI of this resource. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 304 | }</pre> |
| 305 | </div> |
| 306 | |
| 307 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 308 | <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code> |
| 309 | <pre>Creates an SSL certificate and returns it along with the private key and |
| 310 | server certificate authority. The new certificate will not be usable until |
| 311 | the instance is restarted. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 312 | |
| 313 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 314 | project: string, Project ID of the project that contains the instance. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 315 | 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] | 316 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 317 | The object takes the form of: |
| 318 | |
| 319 | { # SslCerts insert request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 320 | "commonName": "A String", # User supplied name. Must be a distinct name from the other certificates |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 321 | # for this instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 322 | } |
| 323 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 324 | x__xgafv: string, V1 error format. |
| 325 | Allowed values |
| 326 | 1 - v1 error format |
| 327 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 328 | |
| 329 | Returns: |
| 330 | An object of the form: |
| 331 | |
| 332 | { # SslCert insert response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 333 | "operation": { # An Operation resource.&nbsp;For successful operations that return an # The operation to track the ssl certs insert request. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 334 | # Operation resource, only the fields relevant to the operation are populated |
| 335 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 336 | "targetLink": "A String", |
| 337 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 338 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 339 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 340 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 341 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 342 | # <code>DELETE_DATABASE</code> . |
| 343 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 344 | # populated. |
| 345 | "errors": [ # The list of errors encountered while processing this operation. |
| 346 | { # Database instance operation error. |
| 347 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 348 | "code": "A String", # Identifies the specific error that occurred. |
| 349 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 350 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 351 | ], |
| 352 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 353 | }, |
| 354 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 355 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 356 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 357 | # <code>SQL</code>, this field is required only if the import file does not |
| 358 | # specify a database, and is overridden by any database specification in the |
| 359 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 360 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 361 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 362 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 363 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 364 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 365 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 366 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 367 | # write permissions to the bucket and read access to the file. |
| 368 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 369 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 370 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 371 | }, |
| 372 | }, |
| 373 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 374 | # <code>gs: |
| 375 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 376 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 377 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 378 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 379 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 380 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 381 | "csvImportOptions": { # Options for importing data as CSV. |
| 382 | "table": "A String", # The table to which CSV data is imported. |
| 383 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 384 | # of the database table are loaded with CSV data. |
| 385 | "A String", |
| 386 | ], |
| 387 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 388 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 389 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 390 | # <code>RUNNING</code>, <code>DONE</code>, |
| 391 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 392 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 393 | # identifier to retrieve the Operations resource that has information about |
| 394 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 395 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 396 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 397 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 398 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 399 | # stored. The URI is in the form <code>gs: |
| 400 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 401 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 402 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 403 | # // compressed. |
| 404 | "csvExportOptions": { # Options for exporting data as CSV. |
| 405 | "selectQuery": "A String", # The select query used to extract the data. |
| 406 | }, |
| 407 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 408 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 409 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 410 | # databases are exported, except for the <code>mysql</code> system database. |
| 411 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 412 | # either by using this property or by using the |
| 413 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 414 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 415 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 416 | # this database must match the one specified in the |
| 417 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 418 | "A String", |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 419 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 420 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 421 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 422 | # you specify tables, specify one and only one database. For PostgreSQL |
| 423 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 424 | "A String", |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 425 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 426 | "schemaOnly": True or False, # Export only schemas. |
| 427 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 428 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 429 | # If set to <code>1</code>, the dump file includes |
| 430 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 431 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 432 | # a SQL comment, and has no effect. |
| 433 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 434 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 435 | }, |
| 436 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 437 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 438 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 439 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 440 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 441 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 442 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 443 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 444 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 445 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 446 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 447 | "user": "A String", # The email address of the user who initiated this operation. |
| 448 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 449 | "selfLink": "A String", # The URI of this resource. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 450 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 451 | "kind": "A String", # This is always <code>sql#sslCertsInsert</code>. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 452 | "serverCaCert": { # SslCerts Resource # The server Certificate Authority's certificate. If this is missing you can |
| 453 | # force a new one to be generated by calling resetSslConfig method on |
| 454 | # instances resource. |
| 455 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 456 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 457 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 458 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 459 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 460 | "cert": "A String", # PEM representation. |
| 461 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 462 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 463 | "createTime": "A String", # The time when the certificate was created in <a |
| 464 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 465 | # <code>2012-11-15T16:19:00.094Z</code> |
| 466 | "instance": "A String", # Name of the database instance. |
| 467 | "selfLink": "A String", # The URI of this resource. |
| 468 | }, |
| 469 | "clientCert": { # SslCertDetail. # The new client certificate and private key. For First Generation |
| 470 | # instances, the new certificate does not take effect until the instance is |
| 471 | # restarted. |
| 472 | "certPrivateKey": "A String", # The private key for the client cert, in pem format. Keep private in order |
| 473 | # to protect your security. |
| 474 | "certInfo": { # SslCerts Resource # The public information about the cert. |
| 475 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 476 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 477 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 478 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 479 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 480 | "cert": "A String", # PEM representation. |
| 481 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 482 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 483 | "createTime": "A String", # The time when the certificate was created in <a |
| 484 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 485 | # <code>2012-11-15T16:19:00.094Z</code> |
| 486 | "instance": "A String", # Name of the database instance. |
| 487 | "selfLink": "A String", # The URI of this resource. |
| 488 | }, |
| 489 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 490 | }</pre> |
| 491 | </div> |
| 492 | |
| 493 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 494 | <code class="details" id="list">list(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 495 | <pre>Lists all of the current SSL certificates for the instance. |
| 496 | |
| 497 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 498 | project: string, Project ID of the project that contains the instance. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 499 | 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] | 500 | x__xgafv: string, V1 error format. |
| 501 | Allowed values |
| 502 | 1 - v1 error format |
| 503 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 504 | |
| 505 | Returns: |
| 506 | An object of the form: |
| 507 | |
| 508 | { # SslCerts list response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 509 | "kind": "A String", # This is always <code>sql#sslCertsList</code>. |
| 510 | "items": [ # List of client certificates for the instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 511 | { # SslCerts Resource |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 512 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 513 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 514 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 515 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 516 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 517 | "cert": "A String", # PEM representation. |
| 518 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 519 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 520 | "createTime": "A String", # The time when the certificate was created in <a |
| 521 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 522 | # <code>2012-11-15T16:19:00.094Z</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 523 | "instance": "A String", # Name of the database instance. |
| 524 | "selfLink": "A String", # The URI of this resource. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 525 | }, |
| 526 | ], |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 527 | }</pre> |
| 528 | </div> |
| 529 | |
| 530 | </body></html> |