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"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 81 | <code><a href="#delete">delete(project, instance, host=None, name=None, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 82 | <p class="firstline">Deletes a user from 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="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 85 | <p class="firstline">Creates a new user in a 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="#list">list(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 88 | <p class="firstline">Lists users in the specified Cloud SQL instance.</p> |
| 89 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 90 | <code><a href="#update">update(project, instance, body=None, host=None, name=None, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 91 | <p class="firstline">Updates an existing user in a Cloud SQL instance.</p> |
| 92 | <h3>Method Details</h3> |
| 93 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 94 | <code class="details" id="close">close()</code> |
| 95 | <pre>Close httplib2 connections.</pre> |
| 96 | </div> |
| 97 | |
| 98 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 99 | <code class="details" id="delete">delete(project, instance, host=None, name=None, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 100 | <pre>Deletes a user from a Cloud SQL instance. |
| 101 | |
| 102 | Args: |
| 103 | project: string, Project ID of the project that contains the instance. (required) |
| 104 | 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] | 105 | host: string, Host of the user in the instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 106 | name: string, Name of the user in the instance. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 107 | x__xgafv: string, V1 error format. |
| 108 | Allowed values |
| 109 | 1 - v1 error format |
| 110 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 111 | |
| 112 | Returns: |
| 113 | An object of the form: |
| 114 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 115 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 116 | "kind": "A String", # This is always *sql#operation*. |
| 117 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 118 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 119 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 120 | "errors": [ # The list of errors encountered while processing this operation. |
| 121 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 122 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 123 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 124 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 125 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 126 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 127 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 128 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 129 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 130 | "selfLink": "A String", # The URI of this resource. |
| 131 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 132 | "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] | 133 | "csvExportOptions": { # Options for exporting data as CSV. |
| 134 | "selectQuery": "A String", # The select query used to extract the data. |
| 135 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 136 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 137 | "kind": "A String", # This is always *sql#exportContext*. |
| 138 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 139 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 140 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 141 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 142 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 143 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 144 | "schemaOnly": True or False, # Export only schemas. |
| 145 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 146 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 147 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 148 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 149 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 150 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 151 | }, |
| 152 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 153 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 154 | "targetId": "A String", # Name of the database instance related to this operation. |
| 155 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 156 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 157 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 158 | "targetLink": "A String", |
| 159 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 160 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 161 | "kind": "A String", # This is always *sql#importContext*. |
| 162 | "csvImportOptions": { # Options for importing data as CSV. |
| 163 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 164 | "A String", |
| 165 | ], |
| 166 | "table": "A String", # The table to which CSV data is imported. |
| 167 | }, |
| 168 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 169 | "encryptionOptions": { |
| 170 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 171 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 172 | "pvkPassword": "A String", # Password that encrypts the private key |
| 173 | }, |
| 174 | }, |
| 175 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 176 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 177 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 178 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 179 | }</pre> |
| 180 | </div> |
| 181 | |
| 182 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 183 | <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] | 184 | <pre>Creates a new user in a Cloud SQL instance. |
| 185 | |
| 186 | Args: |
| 187 | project: string, Project ID of the project that contains the instance. (required) |
| 188 | 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] | 189 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 190 | The object takes the form of: |
| 191 | |
| 192 | { # A Cloud SQL user resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 193 | "sqlserverUserDetails": { # Represents a Sql Server user on the Cloud SQL instance. |
| 194 | "serverRoles": [ # The server roles for this user |
| 195 | "A String", |
| 196 | ], |
| 197 | "disabled": True or False, # If the user has been disabled |
| 198 | }, |
| 199 | "name": "A String", # The name of the user in the Cloud SQL instance. Can be omitted for *update* since it is already specified in the URL. |
| 200 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for *update* since it is already specified on the URL. |
| 201 | "host": "A String", # The host name from which the user can connect. For *insert* operations, host defaults to an empty string. For *update* operations, host is specified as part of the request URL. The host name cannot be updated after insertion. |
| 202 | "type": "A String", # The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type. |
| 203 | "kind": "A String", # This is always *sql#user*. |
| 204 | "password": "A String", # The password for the user. |
| 205 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 206 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for *update* since it is already specified on the URL. |
| 207 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 208 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 209 | x__xgafv: string, V1 error format. |
| 210 | Allowed values |
| 211 | 1 - v1 error format |
| 212 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 213 | |
| 214 | Returns: |
| 215 | An object of the form: |
| 216 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 217 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 218 | "kind": "A String", # This is always *sql#operation*. |
| 219 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 220 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 221 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 222 | "errors": [ # The list of errors encountered while processing this operation. |
| 223 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 224 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 225 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 226 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 227 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 228 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 229 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 230 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 231 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 232 | "selfLink": "A String", # The URI of this resource. |
| 233 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 234 | "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] | 235 | "csvExportOptions": { # Options for exporting data as CSV. |
| 236 | "selectQuery": "A String", # The select query used to extract the data. |
| 237 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 238 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 239 | "kind": "A String", # This is always *sql#exportContext*. |
| 240 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 241 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 242 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 243 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 244 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 245 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 246 | "schemaOnly": True or False, # Export only schemas. |
| 247 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 248 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 249 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 250 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 251 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 252 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 253 | }, |
| 254 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 255 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 256 | "targetId": "A String", # Name of the database instance related to this operation. |
| 257 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 258 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 259 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 260 | "targetLink": "A String", |
| 261 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 262 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 263 | "kind": "A String", # This is always *sql#importContext*. |
| 264 | "csvImportOptions": { # Options for importing data as CSV. |
| 265 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 266 | "A String", |
| 267 | ], |
| 268 | "table": "A String", # The table to which CSV data is imported. |
| 269 | }, |
| 270 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 271 | "encryptionOptions": { |
| 272 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 273 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 274 | "pvkPassword": "A String", # Password that encrypts the private key |
| 275 | }, |
| 276 | }, |
| 277 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 278 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 279 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 280 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 281 | }</pre> |
| 282 | </div> |
| 283 | |
| 284 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 285 | <code class="details" id="list">list(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 286 | <pre>Lists users in the specified Cloud SQL instance. |
| 287 | |
| 288 | Args: |
| 289 | project: string, Project ID of the project that contains the instance. (required) |
| 290 | 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] | 291 | x__xgafv: string, V1 error format. |
| 292 | Allowed values |
| 293 | 1 - v1 error format |
| 294 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 295 | |
| 296 | Returns: |
| 297 | An object of the form: |
| 298 | |
| 299 | { # User list response. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 300 | "nextPageToken": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 301 | "items": [ # List of user resources in the instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 302 | { # A Cloud SQL user resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 303 | "sqlserverUserDetails": { # Represents a Sql Server user on the Cloud SQL instance. |
| 304 | "serverRoles": [ # The server roles for this user |
| 305 | "A String", |
| 306 | ], |
| 307 | "disabled": True or False, # If the user has been disabled |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 308 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 309 | "name": "A String", # The name of the user in the Cloud SQL instance. Can be omitted for *update* since it is already specified in the URL. |
| 310 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for *update* since it is already specified on the URL. |
| 311 | "host": "A String", # The host name from which the user can connect. For *insert* operations, host defaults to an empty string. For *update* operations, host is specified as part of the request URL. The host name cannot be updated after insertion. |
| 312 | "type": "A String", # The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type. |
| 313 | "kind": "A String", # This is always *sql#user*. |
| 314 | "password": "A String", # The password for the user. |
| 315 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 316 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for *update* since it is already specified on the URL. |
| 317 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 318 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 319 | "kind": "A String", # This is always *sql#usersList*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 320 | }</pre> |
| 321 | </div> |
| 322 | |
| 323 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 324 | <code class="details" id="update">update(project, instance, body=None, host=None, name=None, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 325 | <pre>Updates an existing user in a Cloud SQL instance. |
| 326 | |
| 327 | Args: |
| 328 | project: string, Project ID of the project that contains the instance. (required) |
| 329 | 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] | 330 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 331 | The object takes the form of: |
| 332 | |
| 333 | { # A Cloud SQL user resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 334 | "sqlserverUserDetails": { # Represents a Sql Server user on the Cloud SQL instance. |
| 335 | "serverRoles": [ # The server roles for this user |
| 336 | "A String", |
| 337 | ], |
| 338 | "disabled": True or False, # If the user has been disabled |
| 339 | }, |
| 340 | "name": "A String", # The name of the user in the Cloud SQL instance. Can be omitted for *update* since it is already specified in the URL. |
| 341 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for *update* since it is already specified on the URL. |
| 342 | "host": "A String", # The host name from which the user can connect. For *insert* operations, host defaults to an empty string. For *update* operations, host is specified as part of the request URL. The host name cannot be updated after insertion. |
| 343 | "type": "A String", # The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type. |
| 344 | "kind": "A String", # This is always *sql#user*. |
| 345 | "password": "A String", # The password for the user. |
| 346 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 347 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for *update* since it is already specified on the URL. |
| 348 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 349 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 350 | host: string, Optional. Host of the user in the instance. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 351 | name: string, Name of the user in the instance. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 352 | x__xgafv: string, V1 error format. |
| 353 | Allowed values |
| 354 | 1 - v1 error format |
| 355 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 356 | |
| 357 | Returns: |
| 358 | An object of the form: |
| 359 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 360 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 361 | "kind": "A String", # This is always *sql#operation*. |
| 362 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 363 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 364 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 365 | "errors": [ # The list of errors encountered while processing this operation. |
| 366 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 367 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 368 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 369 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 370 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 371 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 372 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 373 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 374 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 375 | "selfLink": "A String", # The URI of this resource. |
| 376 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 377 | "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] | 378 | "csvExportOptions": { # Options for exporting data as CSV. |
| 379 | "selectQuery": "A String", # The select query used to extract the data. |
| 380 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 381 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 382 | "kind": "A String", # This is always *sql#exportContext*. |
| 383 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 384 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 385 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 386 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 387 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 388 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 389 | "schemaOnly": True or False, # Export only schemas. |
| 390 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 391 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 392 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 393 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 394 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 395 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 396 | }, |
| 397 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 398 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 399 | "targetId": "A String", # Name of the database instance related to this operation. |
| 400 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 401 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 402 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 403 | "targetLink": "A String", |
| 404 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 405 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 406 | "kind": "A String", # This is always *sql#importContext*. |
| 407 | "csvImportOptions": { # Options for importing data as CSV. |
| 408 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 409 | "A String", |
| 410 | ], |
| 411 | "table": "A String", # The table to which CSV data is imported. |
| 412 | }, |
| 413 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 414 | "encryptionOptions": { |
| 415 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 416 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 417 | "pvkPassword": "A String", # Password that encrypts the private key |
| 418 | }, |
| 419 | }, |
| 420 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 421 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 422 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 423 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 424 | }</pre> |
| 425 | </div> |
| 426 | |
| 427 | </body></html> |