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.users.html">users</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="#delete">delete(project, instance, name=None, host=None, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 79 | <p class="firstline">Deletes a user from a Cloud SQL instance.</p> |
| 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 81 | <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 82 | <p class="firstline">Creates a new user in a Cloud SQL instance.</p> |
| 83 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 84 | <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] | 85 | <p class="firstline">Lists users in the specified Cloud SQL instance.</p> |
| 86 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 87 | <code><a href="#update">update(project, instance, body=None, name=None, host=None, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 88 | <p class="firstline">Updates an existing user in a Cloud SQL instance.</p> |
| 89 | <h3>Method Details</h3> |
| 90 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 91 | <code class="details" id="delete">delete(project, instance, name=None, host=None, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 92 | <pre>Deletes a user from a Cloud SQL instance. |
| 93 | |
| 94 | Args: |
| 95 | project: string, Project ID of the project that contains the instance. (required) |
| 96 | instance: string, Database instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 97 | name: string, Name of the user in the instance. |
| 98 | host: string, Host of the user in the instance. |
| 99 | x__xgafv: string, V1 error format. |
| 100 | Allowed values |
| 101 | 1 - v1 error format |
| 102 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 103 | |
| 104 | Returns: |
| 105 | An object of the form: |
| 106 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 107 | { # An Operation resource.&nbsp;For successful operations that return an |
| 108 | # Operation resource, only the fields relevant to the operation are populated |
| 109 | # in the resource. |
| 110 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 111 | # <code>RUNNING</code>, <code>DONE</code>, |
| 112 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 113 | "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^] | 114 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 115 | "encryptionOptions": { |
| 116 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 117 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 118 | # write permissions to the bucket and read access to the file. |
| 119 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 120 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 121 | # write permissions to the bucket and read access to the file. |
| 122 | "pvkPassword": "A String", # Password that encrypts the private key |
| 123 | }, |
| 124 | }, |
| 125 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 126 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 127 | # <code>SQL</code>, this field is required only if the import file does not |
| 128 | # specify a database, and is overridden by any database specification in the |
| 129 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 130 | # must be specified. |
| 131 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 132 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 133 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 134 | # <code>gs: |
| 135 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 136 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 137 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 138 | "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] | 139 | "csvImportOptions": { # Options for importing data as CSV. |
| 140 | "table": "A String", # The table to which CSV data is imported. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 141 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 142 | # of the database table are loaded with CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 143 | "A String", |
| 144 | ], |
| 145 | }, |
| 146 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 147 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 148 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 149 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 150 | # identifier to retrieve the Operations resource that has information about |
| 151 | # the operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 152 | "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^] | 153 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 154 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 155 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 156 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 157 | # stored. The URI is in the form <code>gs: |
| 158 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 159 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 160 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 161 | # // compressed. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 162 | "csvExportOptions": { # Options for exporting data as CSV. |
| 163 | "selectQuery": "A String", # The select query used to extract the data. |
| 164 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 165 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 166 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 167 | # databases are exported, except for the <code>mysql</code> system database. |
| 168 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 169 | # either by using this property or by using the |
| 170 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 171 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 172 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 173 | # this database must match the one specified in the |
| 174 | # <code>csvExportOptions.selectQuery</code> property. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 175 | "A String", |
| 176 | ], |
| 177 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 178 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 179 | # you specify tables, specify one and only one database. For PostgreSQL |
| 180 | # instances, you can specify only one table. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 181 | "A String", |
| 182 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 183 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 184 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 185 | # If set to <code>1</code>, the dump file includes |
| 186 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 187 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 188 | # a SQL comment, and has no effect. |
| 189 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 190 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 191 | "schemaOnly": True or False, # Export only schemas. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 192 | }, |
| 193 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 194 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 195 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 196 | # <code>2012-11-15T16:19:00.094Z</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 197 | "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^] | 198 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 199 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 200 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 201 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 202 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 203 | # <code>DELETE_DATABASE</code> . |
| 204 | "user": "A String", # The email address of the user who initiated this operation. |
| 205 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 206 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 207 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 208 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 209 | # populated. |
| 210 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 211 | "errors": [ # The list of errors encountered while processing this operation. |
| 212 | { # Database instance operation error. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 213 | "kind": "A String", # This is always <code>sql#operationError</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 214 | "code": "A String", # Identifies the specific error that occurred. |
| 215 | "message": "A String", # Additional information about the error encountered. |
| 216 | }, |
| 217 | ], |
| 218 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 219 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 220 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 221 | # <code>2012-11-15T16:19:00.094Z</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 222 | "selfLink": "A String", # The URI of this resource. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 223 | "targetLink": "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 224 | }</pre> |
| 225 | </div> |
| 226 | |
| 227 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 228 | <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 229 | <pre>Creates a new user in a Cloud SQL instance. |
| 230 | |
| 231 | Args: |
| 232 | project: string, Project ID of the project that contains the instance. (required) |
| 233 | instance: string, Database instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 234 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 235 | The object takes the form of: |
| 236 | |
| 237 | { # A Cloud SQL user resource. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 238 | "kind": "A String", # This is always <code>sql#user</code>. |
| 239 | "name": "A String", # The name of the user in the Cloud SQL instance. Can be omitted for |
| 240 | # <code>update</code> since it is already specified in the URL. |
| 241 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 242 | # apps domain is prefixed if applicable. Can be omitted for |
| 243 | # <code>update</code> since it is already specified on the URL. |
| 244 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 245 | # Can be omitted for <code>update</code> since it is already specified on the |
| 246 | # URL. |
| 247 | "host": "A String", # The host name from which the user can connect. For <code>insert</code> |
| 248 | # operations, host defaults to an empty string. For <code>update</code> |
| 249 | # operations, host is specified as part of the request URL. The host name |
| 250 | # cannot be updated after insertion. |
| 251 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 252 | # API. |
| 253 | "sqlserverUserDetails": { # Represents a Sql Server user on the Cloud SQL instance. |
| 254 | "disabled": True or False, # If the user has been disabled |
| 255 | "serverRoles": [ # The server roles for this user |
| 256 | "A String", |
| 257 | ], |
| 258 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 259 | "password": "A String", # The password for the user. |
| 260 | } |
| 261 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 262 | x__xgafv: string, V1 error format. |
| 263 | Allowed values |
| 264 | 1 - v1 error format |
| 265 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 266 | |
| 267 | Returns: |
| 268 | An object of the form: |
| 269 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 270 | { # An Operation resource.&nbsp;For successful operations that return an |
| 271 | # Operation resource, only the fields relevant to the operation are populated |
| 272 | # in the resource. |
| 273 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 274 | # <code>RUNNING</code>, <code>DONE</code>, |
| 275 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 276 | "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^] | 277 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 278 | "encryptionOptions": { |
| 279 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 280 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 281 | # write permissions to the bucket and read access to the file. |
| 282 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 283 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 284 | # write permissions to the bucket and read access to the file. |
| 285 | "pvkPassword": "A String", # Password that encrypts the private key |
| 286 | }, |
| 287 | }, |
| 288 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 289 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 290 | # <code>SQL</code>, this field is required only if the import file does not |
| 291 | # specify a database, and is overridden by any database specification in the |
| 292 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 293 | # must be specified. |
| 294 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 295 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 296 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 297 | # <code>gs: |
| 298 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 299 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 300 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 301 | "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] | 302 | "csvImportOptions": { # Options for importing data as CSV. |
| 303 | "table": "A String", # The table to which CSV data is imported. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 304 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 305 | # of the database table are loaded with CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 306 | "A String", |
| 307 | ], |
| 308 | }, |
| 309 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 310 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 311 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 312 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 313 | # identifier to retrieve the Operations resource that has information about |
| 314 | # the operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 315 | "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^] | 316 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 317 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 318 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 319 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 320 | # stored. The URI is in the form <code>gs: |
| 321 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 322 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 323 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 324 | # // compressed. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 325 | "csvExportOptions": { # Options for exporting data as CSV. |
| 326 | "selectQuery": "A String", # The select query used to extract the data. |
| 327 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 328 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 329 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 330 | # databases are exported, except for the <code>mysql</code> system database. |
| 331 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 332 | # either by using this property or by using the |
| 333 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 334 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 335 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 336 | # this database must match the one specified in the |
| 337 | # <code>csvExportOptions.selectQuery</code> property. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 338 | "A String", |
| 339 | ], |
| 340 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 341 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 342 | # you specify tables, specify one and only one database. For PostgreSQL |
| 343 | # instances, you can specify only one table. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 344 | "A String", |
| 345 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 346 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 347 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 348 | # If set to <code>1</code>, the dump file includes |
| 349 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 350 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 351 | # a SQL comment, and has no effect. |
| 352 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 353 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 354 | "schemaOnly": True or False, # Export only schemas. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 355 | }, |
| 356 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 357 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 358 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 359 | # <code>2012-11-15T16:19:00.094Z</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 360 | "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^] | 361 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 362 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 363 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 364 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 365 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 366 | # <code>DELETE_DATABASE</code> . |
| 367 | "user": "A String", # The email address of the user who initiated this operation. |
| 368 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 369 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 370 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 371 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 372 | # populated. |
| 373 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 374 | "errors": [ # The list of errors encountered while processing this operation. |
| 375 | { # Database instance operation error. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 376 | "kind": "A String", # This is always <code>sql#operationError</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 377 | "code": "A String", # Identifies the specific error that occurred. |
| 378 | "message": "A String", # Additional information about the error encountered. |
| 379 | }, |
| 380 | ], |
| 381 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 382 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 383 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 384 | # <code>2012-11-15T16:19:00.094Z</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 385 | "selfLink": "A String", # The URI of this resource. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 386 | "targetLink": "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 387 | }</pre> |
| 388 | </div> |
| 389 | |
| 390 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 391 | <code class="details" id="list">list(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 392 | <pre>Lists users in the specified Cloud SQL instance. |
| 393 | |
| 394 | Args: |
| 395 | project: string, Project ID of the project that contains the instance. (required) |
| 396 | instance: string, Database instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 397 | x__xgafv: string, V1 error format. |
| 398 | Allowed values |
| 399 | 1 - v1 error format |
| 400 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 401 | |
| 402 | Returns: |
| 403 | An object of the form: |
| 404 | |
| 405 | { # User list response. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 406 | "nextPageToken": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 407 | # identifier to retrieve the Operations resource that has information about |
| 408 | # the operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 409 | "items": [ # List of user resources in the instance. |
| 410 | { # A Cloud SQL user resource. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 411 | "kind": "A String", # This is always <code>sql#user</code>. |
| 412 | "name": "A String", # The name of the user in the Cloud SQL instance. Can be omitted for |
| 413 | # <code>update</code> since it is already specified in the URL. |
| 414 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 415 | # apps domain is prefixed if applicable. Can be omitted for |
| 416 | # <code>update</code> since it is already specified on the URL. |
| 417 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 418 | # Can be omitted for <code>update</code> since it is already specified on the |
| 419 | # URL. |
| 420 | "host": "A String", # The host name from which the user can connect. For <code>insert</code> |
| 421 | # operations, host defaults to an empty string. For <code>update</code> |
| 422 | # operations, host is specified as part of the request URL. The host name |
| 423 | # cannot be updated after insertion. |
| 424 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 425 | # API. |
| 426 | "sqlserverUserDetails": { # Represents a Sql Server user on the Cloud SQL instance. |
| 427 | "disabled": True or False, # If the user has been disabled |
| 428 | "serverRoles": [ # The server roles for this user |
| 429 | "A String", |
| 430 | ], |
| 431 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 432 | "password": "A String", # The password for the user. |
| 433 | }, |
| 434 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 435 | "kind": "A String", # This is always <code>sql#usersList</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 436 | }</pre> |
| 437 | </div> |
| 438 | |
| 439 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 440 | <code class="details" id="update">update(project, instance, body=None, name=None, host=None, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 441 | <pre>Updates an existing user in a Cloud SQL instance. |
| 442 | |
| 443 | Args: |
| 444 | project: string, Project ID of the project that contains the instance. (required) |
| 445 | instance: string, Database instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 446 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 447 | The object takes the form of: |
| 448 | |
| 449 | { # A Cloud SQL user resource. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 450 | "kind": "A String", # This is always <code>sql#user</code>. |
| 451 | "name": "A String", # The name of the user in the Cloud SQL instance. Can be omitted for |
| 452 | # <code>update</code> since it is already specified in the URL. |
| 453 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 454 | # apps domain is prefixed if applicable. Can be omitted for |
| 455 | # <code>update</code> since it is already specified on the URL. |
| 456 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 457 | # Can be omitted for <code>update</code> since it is already specified on the |
| 458 | # URL. |
| 459 | "host": "A String", # The host name from which the user can connect. For <code>insert</code> |
| 460 | # operations, host defaults to an empty string. For <code>update</code> |
| 461 | # operations, host is specified as part of the request URL. The host name |
| 462 | # cannot be updated after insertion. |
| 463 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 464 | # API. |
| 465 | "sqlserverUserDetails": { # Represents a Sql Server user on the Cloud SQL instance. |
| 466 | "disabled": True or False, # If the user has been disabled |
| 467 | "serverRoles": [ # The server roles for this user |
| 468 | "A String", |
| 469 | ], |
| 470 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 471 | "password": "A String", # The password for the user. |
| 472 | } |
| 473 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 474 | name: string, Name of the user in the instance. |
| 475 | host: string, Optional. Host of the user in the instance. |
| 476 | x__xgafv: string, V1 error format. |
| 477 | Allowed values |
| 478 | 1 - v1 error format |
| 479 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 480 | |
| 481 | Returns: |
| 482 | An object of the form: |
| 483 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 484 | { # An Operation resource.&nbsp;For successful operations that return an |
| 485 | # Operation resource, only the fields relevant to the operation are populated |
| 486 | # in the resource. |
| 487 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 488 | # <code>RUNNING</code>, <code>DONE</code>, |
| 489 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 490 | "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^] | 491 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 492 | "encryptionOptions": { |
| 493 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 494 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 495 | # write permissions to the bucket and read access to the file. |
| 496 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 497 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 498 | # write permissions to the bucket and read access to the file. |
| 499 | "pvkPassword": "A String", # Password that encrypts the private key |
| 500 | }, |
| 501 | }, |
| 502 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 503 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 504 | # <code>SQL</code>, this field is required only if the import file does not |
| 505 | # specify a database, and is overridden by any database specification in the |
| 506 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 507 | # must be specified. |
| 508 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 509 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 510 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 511 | # <code>gs: |
| 512 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 513 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 514 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 515 | "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] | 516 | "csvImportOptions": { # Options for importing data as CSV. |
| 517 | "table": "A String", # The table to which CSV data is imported. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 518 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 519 | # of the database table are loaded with CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 520 | "A String", |
| 521 | ], |
| 522 | }, |
| 523 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 524 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 525 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 526 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 527 | # identifier to retrieve the Operations resource that has information about |
| 528 | # the operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 529 | "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^] | 530 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 531 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 532 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 533 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 534 | # stored. The URI is in the form <code>gs: |
| 535 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 536 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 537 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 538 | # // compressed. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 539 | "csvExportOptions": { # Options for exporting data as CSV. |
| 540 | "selectQuery": "A String", # The select query used to extract the data. |
| 541 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 542 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 543 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 544 | # databases are exported, except for the <code>mysql</code> system database. |
| 545 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 546 | # either by using this property or by using the |
| 547 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 548 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 549 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 550 | # this database must match the one specified in the |
| 551 | # <code>csvExportOptions.selectQuery</code> property. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 552 | "A String", |
| 553 | ], |
| 554 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 555 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 556 | # you specify tables, specify one and only one database. For PostgreSQL |
| 557 | # instances, you can specify only one table. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 558 | "A String", |
| 559 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 560 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 561 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 562 | # If set to <code>1</code>, the dump file includes |
| 563 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 564 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 565 | # a SQL comment, and has no effect. |
| 566 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 567 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 568 | "schemaOnly": True or False, # Export only schemas. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 569 | }, |
| 570 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 571 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 572 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 573 | # <code>2012-11-15T16:19:00.094Z</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 574 | "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^] | 575 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 576 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 577 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 578 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 579 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 580 | # <code>DELETE_DATABASE</code> . |
| 581 | "user": "A String", # The email address of the user who initiated this operation. |
| 582 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 583 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 584 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 585 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 586 | # populated. |
| 587 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 588 | "errors": [ # The list of errors encountered while processing this operation. |
| 589 | { # Database instance operation error. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 590 | "kind": "A String", # This is always <code>sql#operationError</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 591 | "code": "A String", # Identifies the specific error that occurred. |
| 592 | "message": "A String", # Additional information about the error encountered. |
| 593 | }, |
| 594 | ], |
| 595 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 596 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 597 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 598 | # <code>2012-11-15T16:19:00.094Z</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 599 | "selfLink": "A String", # The URI of this resource. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 600 | "targetLink": "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 601 | }</pre> |
| 602 | </div> |
| 603 | |
| 604 | </body></html> |