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. |
| 107 | "public_key": "A String", # PEM encoded public key to include in the signed certificate. |
| 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 |
| 119 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 120 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 121 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 122 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 123 | "instance": "A String", # Name of the database instance. |
| 124 | "cert": "A String", # PEM representation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 125 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 126 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 127 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 128 | "createTime": "A String", # The time when the certificate was created in <a |
| 129 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 130 | # <code>2012-11-15T16:19:00.094Z</code> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 131 | "selfLink": "A String", # The URI of this resource. |
| 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. |
| 155 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 156 | # <code>RUNNING</code>, <code>DONE</code>, |
| 157 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 158 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 159 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 160 | "encryptionOptions": { |
| 161 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 162 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 163 | # write permissions to the bucket and read access to the file. |
| 164 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 165 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 166 | # write permissions to the bucket and read access to the file. |
| 167 | "pvkPassword": "A String", # Password that encrypts the private key |
| 168 | }, |
| 169 | }, |
| 170 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 171 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 172 | # <code>SQL</code>, this field is required only if the import file does not |
| 173 | # specify a database, and is overridden by any database specification in the |
| 174 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 175 | # must be specified. |
| 176 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 177 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 178 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 179 | # <code>gs: |
| 180 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 181 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 182 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 183 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 184 | "csvImportOptions": { # Options for importing data as CSV. |
| 185 | "table": "A String", # The table to which CSV data is imported. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 186 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 187 | # of the database table are loaded with CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 188 | "A String", |
| 189 | ], |
| 190 | }, |
| 191 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 192 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 193 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 194 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 195 | # identifier to retrieve the Operations resource that has information about |
| 196 | # the operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 197 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 198 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 199 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 200 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 201 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 202 | # stored. The URI is in the form <code>gs: |
| 203 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 204 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 205 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 206 | # // compressed. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 207 | "csvExportOptions": { # Options for exporting data as CSV. |
| 208 | "selectQuery": "A String", # The select query used to extract the data. |
| 209 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 210 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 211 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 212 | # databases are exported, except for the <code>mysql</code> system database. |
| 213 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 214 | # either by using this property or by using the |
| 215 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 216 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 217 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 218 | # this database must match the one specified in the |
| 219 | # <code>csvExportOptions.selectQuery</code> property. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 220 | "A String", |
| 221 | ], |
| 222 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 223 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 224 | # you specify tables, specify one and only one database. For PostgreSQL |
| 225 | # instances, you can specify only one table. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 226 | "A String", |
| 227 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 228 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 229 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 230 | # If set to <code>1</code>, the dump file includes |
| 231 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 232 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 233 | # a SQL comment, and has no effect. |
| 234 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 235 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 236 | "schemaOnly": True or False, # Export only schemas. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 237 | }, |
| 238 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 239 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 240 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 241 | # <code>2012-11-15T16:19:00.094Z</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 242 | "targetId": "A String", # Name of the database instance related to this operation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 243 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 244 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 245 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 246 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 247 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 248 | # <code>DELETE_DATABASE</code> . |
| 249 | "user": "A String", # The email address of the user who initiated this operation. |
| 250 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 251 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 252 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 253 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 254 | # populated. |
| 255 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 256 | "errors": [ # The list of errors encountered while processing this operation. |
| 257 | { # Database instance operation error. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 258 | "kind": "A String", # This is always <code>sql#operationError</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 259 | "code": "A String", # Identifies the specific error that occurred. |
| 260 | "message": "A String", # Additional information about the error encountered. |
| 261 | }, |
| 262 | ], |
| 263 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 264 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 265 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 266 | # <code>2012-11-15T16:19:00.094Z</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 267 | "selfLink": "A String", # The URI of this resource. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 268 | "targetLink": "A String", |
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 |
| 291 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 292 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 293 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 294 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 295 | "instance": "A String", # Name of the database instance. |
| 296 | "cert": "A String", # PEM representation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 297 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 298 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 299 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 300 | "createTime": "A String", # The time when the certificate was created in <a |
| 301 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 302 | # <code>2012-11-15T16:19:00.094Z</code> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 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. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 320 | "commonName": "A String", # User supplied name. Must be a distinct name from the other certificates |
| 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. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 333 | "clientCert": { # SslCertDetail. # The new client certificate and private key. For First Generation |
| 334 | # instances, the new certificate does not take effect until the instance is |
| 335 | # restarted. |
| 336 | "certPrivateKey": "A String", # The private key for the client cert, in pem format. Keep private in order |
| 337 | # to protect your security. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 338 | "certInfo": { # SslCerts Resource # The public information about the cert. |
| 339 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 340 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 341 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 342 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 343 | "instance": "A String", # Name of the database instance. |
| 344 | "cert": "A String", # PEM representation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 345 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 346 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 347 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 348 | "createTime": "A String", # The time when the certificate was created in <a |
| 349 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 350 | # <code>2012-11-15T16:19:00.094Z</code> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 351 | "selfLink": "A String", # The URI of this resource. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 352 | }, |
| 353 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 354 | "operation": { # An Operation resource.&nbsp;For successful operations that return an # The operation to track the ssl certs insert request. |
| 355 | # Operation resource, only the fields relevant to the operation are populated |
| 356 | # in the resource. |
| 357 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 358 | # <code>RUNNING</code>, <code>DONE</code>, |
| 359 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 360 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 361 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 362 | "encryptionOptions": { |
| 363 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 364 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 365 | # write permissions to the bucket and read access to the file. |
| 366 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 367 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 368 | # write permissions to the bucket and read access to the file. |
| 369 | "pvkPassword": "A String", # Password that encrypts the private key |
| 370 | }, |
| 371 | }, |
| 372 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 373 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 374 | # <code>SQL</code>, this field is required only if the import file does not |
| 375 | # specify a database, and is overridden by any database specification in the |
| 376 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 377 | # must be specified. |
| 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. |
| 380 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 381 | # <code>gs: |
| 382 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 383 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 384 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 385 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 386 | "csvImportOptions": { # Options for importing data as CSV. |
| 387 | "table": "A String", # The table to which CSV data is imported. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 388 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 389 | # of the database table are loaded with CSV data. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 390 | "A String", |
| 391 | ], |
| 392 | }, |
| 393 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 394 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 395 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 396 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 397 | # identifier to retrieve the Operations resource that has information about |
| 398 | # the operation. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 399 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 400 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 401 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 402 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 403 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 404 | # stored. The URI is in the form <code>gs: |
| 405 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 406 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 407 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 408 | # // compressed. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 409 | "csvExportOptions": { # Options for exporting data as CSV. |
| 410 | "selectQuery": "A String", # The select query used to extract the data. |
| 411 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 412 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 413 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 414 | # databases are exported, except for the <code>mysql</code> system database. |
| 415 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 416 | # either by using this property or by using the |
| 417 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 418 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 419 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 420 | # this database must match the one specified in the |
| 421 | # <code>csvExportOptions.selectQuery</code> property. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 422 | "A String", |
| 423 | ], |
| 424 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 425 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 426 | # you specify tables, specify one and only one database. For PostgreSQL |
| 427 | # instances, you can specify only one table. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 428 | "A String", |
| 429 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 430 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 431 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 432 | # If set to <code>1</code>, the dump file includes |
| 433 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 434 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 435 | # a SQL comment, and has no effect. |
| 436 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 437 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 438 | "schemaOnly": True or False, # Export only schemas. |
| 439 | }, |
| 440 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 441 | "insertTime": "A String", # The time this operation was enqueued 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>. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 444 | "targetId": "A String", # Name of the database instance related to this operation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 445 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 446 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 447 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 448 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 449 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 450 | # <code>DELETE_DATABASE</code> . |
| 451 | "user": "A String", # The email address of the user who initiated this operation. |
| 452 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 453 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 454 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 455 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 456 | # populated. |
| 457 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 458 | "errors": [ # The list of errors encountered while processing this operation. |
| 459 | { # Database instance operation error. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 460 | "kind": "A String", # This is always <code>sql#operationError</code>. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 461 | "code": "A String", # Identifies the specific error that occurred. |
| 462 | "message": "A String", # Additional information about the error encountered. |
| 463 | }, |
| 464 | ], |
| 465 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 466 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 467 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 468 | # <code>2012-11-15T16:19:00.094Z</code>. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 469 | "selfLink": "A String", # The URI of this resource. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 470 | "targetLink": "A String", |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 471 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 472 | "kind": "A String", # This is always <code>sql#sslCertsInsert</code>. |
| 473 | "serverCaCert": { # SslCerts Resource # The server Certificate Authority's certificate. If this is missing you can |
| 474 | # force a new one to be generated by calling resetSslConfig method on |
| 475 | # instances resource. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 476 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 477 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 478 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 479 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 480 | "instance": "A String", # Name of the database instance. |
| 481 | "cert": "A String", # PEM representation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 482 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 483 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 484 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 485 | "createTime": "A String", # The time when the certificate was created in <a |
| 486 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 487 | # <code>2012-11-15T16:19:00.094Z</code> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 488 | "selfLink": "A String", # The URI of this resource. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 489 | }, |
| 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. |
| 509 | "items": [ # List of client certificates for the instance. |
| 510 | { # SslCerts Resource |
| 511 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 512 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 513 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 514 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 515 | "instance": "A String", # Name of the database instance. |
| 516 | "cert": "A String", # PEM representation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 517 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 518 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 519 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 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 |
| 522 | # <code>2012-11-15T16:19:00.094Z</code> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 523 | "selfLink": "A String", # The URI of this resource. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 524 | }, |
| 525 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 526 | "kind": "A String", # This is always <code>sql#sslCertsList</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 527 | }</pre> |
| 528 | </div> |
| 529 | |
| 530 | </body></html> |