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"> |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [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"> |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [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"> |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [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) |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 105 | host: string, Host of the user in the instance. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [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 | |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -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. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 116 | "backupContext": { # Backup context. # The context for backup operation, if applicable. |
| 117 | "backupId": "A String", # The identifier of the backup. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 118 | "kind": "A String", # This is always **sql#backupContext**. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 119 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 120 | "endTime": "A String", # The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 121 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 122 | "errors": [ # The list of errors encountered while processing this operation. |
| 123 | { # Database instance operation error. |
| 124 | "code": "A String", # Identifies the specific error that occurred. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 125 | "kind": "A String", # This is always **sql#operationError**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 126 | "message": "A String", # Additional information about the error encountered. |
| 127 | }, |
| 128 | ], |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 129 | "kind": "A String", # This is always **sql#operationErrors**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 130 | }, |
| 131 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 132 | "csvExportOptions": { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only. |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 133 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 134 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 135 | "linesTerminatedBy": "A String", # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values. |
| 136 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 137 | "selectQuery": "A String", # The select query used to extract the data. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 138 | }, |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 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. **SQL Server instances:** You must specify one database to be exported, and the **fileType** must be **BAK**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 140 | "A String", |
| 141 | ], |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 142 | "fileType": "A String", # The file type for the specified uri. |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 143 | "kind": "A String", # This is always **sql#exportContext**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 144 | "offload": True or False, # Option for export offload. |
| 145 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 146 | "mysqlExportOptions": { # Options for exporting from MySQL. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 147 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to **1**, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to **2**, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than **1**, --set-gtid-purged is set to OFF. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 148 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 149 | "schemaOnly": True or False, # Export only schemas. |
| 150 | "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. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 151 | "A String", |
| 152 | ], |
| 153 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 154 | "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 request succeeds, but the operation fails. If **fileType** is **SQL** and the filename ends with .gz, the contents are compressed. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 155 | }, |
| 156 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 157 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 158 | "encryptionOptions": { |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 159 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form **gs://bucketName/fileName**. The instance must have write permissions to the bucket and read access to the file. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 160 | "pvkPassword": "A String", # Password that encrypts the private key |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 161 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form **gs://bucketName/fileName**. The instance must have write permissions to the bucket and read access to the file. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 162 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 163 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 164 | "csvImportOptions": { # Options for importing data as CSV. |
| 165 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 166 | "A String", |
| 167 | ], |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 168 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 169 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 170 | "linesTerminatedBy": "A String", # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values. |
| 171 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 172 | "table": "A String", # The table to which CSV data is imported. |
| 173 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 174 | "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. |
| 175 | "fileType": "A String", # The file type for the specified uri. * **SQL**: The file contains SQL statements. * **CSV**: The file contains CSV data. * **BAK**: The file contains backup data for a SQL Server instance. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 176 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 177 | "kind": "A String", # This is always **sql#importContext**. |
| 178 | "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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 179 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 180 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. |
| 181 | "kind": "A String", # This is always **sql#operation**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 182 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 183 | "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** |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 184 | "selfLink": "A String", # The URI of this resource. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 185 | "startTime": "A String", # The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 186 | "status": "A String", # The status of an operation. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 187 | "targetId": "A String", # Name of the database instance related to this operation. |
| 188 | "targetLink": "A String", |
| 189 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 190 | "user": "A String", # The email address of the user who initiated this operation. |
| 191 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 192 | </div> |
| 193 | |
| 194 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 195 | <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] | 196 | <pre>Creates a new user in a Cloud SQL instance. |
| 197 | |
| 198 | Args: |
| 199 | project: string, Project ID of the project that contains the instance. (required) |
| 200 | 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] | 201 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 202 | The object takes the form of: |
| 203 | |
| 204 | { # A Cloud SQL user resource. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 205 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 206 | "host": "A String", # Optional. 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. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 207 | "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. |
| 208 | "kind": "A String", # This is always *sql#user*. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 209 | "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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 210 | "password": "A String", # The password for the user. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 211 | "passwordPolicy": { # User level password validation policy. # User level password validation policy. |
| 212 | "allowedFailedAttempts": 42, # Number of failed login attempts allowed before user get locked. |
| 213 | "enableFailedAttemptsCheck": True or False, # If true, failed login attempts check will be enabled. |
| 214 | "passwordExpirationDuration": "A String", # Expiration duration after password is updated. |
| 215 | "status": { # Read-only password status. # Output only. Read-only password status. |
| 216 | "locked": True or False, # If true, user does not have login privileges. |
| 217 | "passwordExpirationTime": "A String", # The expiration time of the current password. |
| 218 | }, |
| 219 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 220 | "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. |
| 221 | "sqlserverUserDetails": { # Represents a Sql Server user on the Cloud SQL instance. |
| 222 | "disabled": True or False, # If the user has been disabled |
| 223 | "serverRoles": [ # The server roles for this user |
| 224 | "A String", |
| 225 | ], |
| 226 | }, |
| 227 | "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. |
| 228 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 229 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 230 | x__xgafv: string, V1 error format. |
| 231 | Allowed values |
| 232 | 1 - v1 error format |
| 233 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 234 | |
| 235 | Returns: |
| 236 | An object of the form: |
| 237 | |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 238 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 239 | "backupContext": { # Backup context. # The context for backup operation, if applicable. |
| 240 | "backupId": "A String", # The identifier of the backup. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 241 | "kind": "A String", # This is always **sql#backupContext**. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 242 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 243 | "endTime": "A String", # The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 244 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 245 | "errors": [ # The list of errors encountered while processing this operation. |
| 246 | { # Database instance operation error. |
| 247 | "code": "A String", # Identifies the specific error that occurred. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 248 | "kind": "A String", # This is always **sql#operationError**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 249 | "message": "A String", # Additional information about the error encountered. |
| 250 | }, |
| 251 | ], |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 252 | "kind": "A String", # This is always **sql#operationErrors**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 253 | }, |
| 254 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 255 | "csvExportOptions": { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only. |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 256 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 257 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 258 | "linesTerminatedBy": "A String", # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values. |
| 259 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 260 | "selectQuery": "A String", # The select query used to extract the data. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 261 | }, |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 262 | "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. **SQL Server instances:** You must specify one database to be exported, and the **fileType** must be **BAK**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 263 | "A String", |
| 264 | ], |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 265 | "fileType": "A String", # The file type for the specified uri. |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 266 | "kind": "A String", # This is always **sql#exportContext**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 267 | "offload": True or False, # Option for export offload. |
| 268 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 269 | "mysqlExportOptions": { # Options for exporting from MySQL. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 270 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to **1**, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to **2**, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than **1**, --set-gtid-purged is set to OFF. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 271 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 272 | "schemaOnly": True or False, # Export only schemas. |
| 273 | "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. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 274 | "A String", |
| 275 | ], |
| 276 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 277 | "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 request succeeds, but the operation fails. If **fileType** is **SQL** and the filename ends with .gz, the contents are compressed. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 278 | }, |
| 279 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 280 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 281 | "encryptionOptions": { |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 282 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form **gs://bucketName/fileName**. The instance must have write permissions to the bucket and read access to the file. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 283 | "pvkPassword": "A String", # Password that encrypts the private key |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 284 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form **gs://bucketName/fileName**. The instance must have write permissions to the bucket and read access to the file. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 285 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 286 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 287 | "csvImportOptions": { # Options for importing data as CSV. |
| 288 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 289 | "A String", |
| 290 | ], |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 291 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 292 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 293 | "linesTerminatedBy": "A String", # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values. |
| 294 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 295 | "table": "A String", # The table to which CSV data is imported. |
| 296 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 297 | "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. |
| 298 | "fileType": "A String", # The file type for the specified uri. * **SQL**: The file contains SQL statements. * **CSV**: The file contains CSV data. * **BAK**: The file contains backup data for a SQL Server instance. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 299 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 300 | "kind": "A String", # This is always **sql#importContext**. |
| 301 | "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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 302 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 303 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. |
| 304 | "kind": "A String", # This is always **sql#operation**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 305 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 306 | "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** |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 307 | "selfLink": "A String", # The URI of this resource. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 308 | "startTime": "A String", # The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 309 | "status": "A String", # The status of an operation. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 310 | "targetId": "A String", # Name of the database instance related to this operation. |
| 311 | "targetLink": "A String", |
| 312 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 313 | "user": "A String", # The email address of the user who initiated this operation. |
| 314 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 315 | </div> |
| 316 | |
| 317 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 318 | <code class="details" id="list">list(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 319 | <pre>Lists users in the specified Cloud SQL instance. |
| 320 | |
| 321 | Args: |
| 322 | project: string, Project ID of the project that contains the instance. (required) |
| 323 | 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] | 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 | { # User list response. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 333 | "items": [ # List of user resources in the instance. |
| 334 | { # A Cloud SQL user resource. |
| 335 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 336 | "host": "A String", # Optional. 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. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 337 | "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. |
| 338 | "kind": "A String", # This is always *sql#user*. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 339 | "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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 340 | "password": "A String", # The password for the user. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 341 | "passwordPolicy": { # User level password validation policy. # User level password validation policy. |
| 342 | "allowedFailedAttempts": 42, # Number of failed login attempts allowed before user get locked. |
| 343 | "enableFailedAttemptsCheck": True or False, # If true, failed login attempts check will be enabled. |
| 344 | "passwordExpirationDuration": "A String", # Expiration duration after password is updated. |
| 345 | "status": { # Read-only password status. # Output only. Read-only password status. |
| 346 | "locked": True or False, # If true, user does not have login privileges. |
| 347 | "passwordExpirationTime": "A String", # The expiration time of the current password. |
| 348 | }, |
| 349 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 350 | "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. |
| 351 | "sqlserverUserDetails": { # Represents a Sql Server user on the Cloud SQL instance. |
| 352 | "disabled": True or False, # If the user has been disabled |
| 353 | "serverRoles": [ # The server roles for this user |
| 354 | "A String", |
| 355 | ], |
| 356 | }, |
| 357 | "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. |
| 358 | }, |
| 359 | ], |
| 360 | "kind": "A String", # This is always *sql#usersList*. |
| 361 | "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. |
| 362 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 363 | </div> |
| 364 | |
| 365 | <div class="method"> |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 366 | <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] | 367 | <pre>Updates an existing user in a Cloud SQL instance. |
| 368 | |
| 369 | Args: |
| 370 | project: string, Project ID of the project that contains the instance. (required) |
| 371 | 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] | 372 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 373 | The object takes the form of: |
| 374 | |
| 375 | { # A Cloud SQL user resource. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 376 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 377 | "host": "A String", # Optional. 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. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 378 | "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. |
| 379 | "kind": "A String", # This is always *sql#user*. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 380 | "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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 381 | "password": "A String", # The password for the user. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 382 | "passwordPolicy": { # User level password validation policy. # User level password validation policy. |
| 383 | "allowedFailedAttempts": 42, # Number of failed login attempts allowed before user get locked. |
| 384 | "enableFailedAttemptsCheck": True or False, # If true, failed login attempts check will be enabled. |
| 385 | "passwordExpirationDuration": "A String", # Expiration duration after password is updated. |
| 386 | "status": { # Read-only password status. # Output only. Read-only password status. |
| 387 | "locked": True or False, # If true, user does not have login privileges. |
| 388 | "passwordExpirationTime": "A String", # The expiration time of the current password. |
| 389 | }, |
| 390 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 391 | "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. |
| 392 | "sqlserverUserDetails": { # Represents a Sql Server user on the Cloud SQL instance. |
| 393 | "disabled": True or False, # If the user has been disabled |
| 394 | "serverRoles": [ # The server roles for this user |
| 395 | "A String", |
| 396 | ], |
| 397 | }, |
| 398 | "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. |
| 399 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 400 | |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 401 | host: string, Optional. Host of the user in the instance. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 402 | name: string, Name of the user in the instance. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 403 | x__xgafv: string, V1 error format. |
| 404 | Allowed values |
| 405 | 1 - v1 error format |
| 406 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 407 | |
| 408 | Returns: |
| 409 | An object of the form: |
| 410 | |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 411 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 412 | "backupContext": { # Backup context. # The context for backup operation, if applicable. |
| 413 | "backupId": "A String", # The identifier of the backup. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 414 | "kind": "A String", # This is always **sql#backupContext**. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 415 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 416 | "endTime": "A String", # The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 417 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 418 | "errors": [ # The list of errors encountered while processing this operation. |
| 419 | { # Database instance operation error. |
| 420 | "code": "A String", # Identifies the specific error that occurred. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 421 | "kind": "A String", # This is always **sql#operationError**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 422 | "message": "A String", # Additional information about the error encountered. |
| 423 | }, |
| 424 | ], |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 425 | "kind": "A String", # This is always **sql#operationErrors**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 426 | }, |
| 427 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 428 | "csvExportOptions": { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only. |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 429 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 430 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 431 | "linesTerminatedBy": "A String", # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values. |
| 432 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 433 | "selectQuery": "A String", # The select query used to extract the data. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 434 | }, |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 435 | "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. **SQL Server instances:** You must specify one database to be exported, and the **fileType** must be **BAK**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 436 | "A String", |
| 437 | ], |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 438 | "fileType": "A String", # The file type for the specified uri. |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 439 | "kind": "A String", # This is always **sql#exportContext**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 440 | "offload": True or False, # Option for export offload. |
| 441 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 442 | "mysqlExportOptions": { # Options for exporting from MySQL. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 443 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to **1**, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to **2**, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than **1**, --set-gtid-purged is set to OFF. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 444 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 445 | "schemaOnly": True or False, # Export only schemas. |
| 446 | "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. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 447 | "A String", |
| 448 | ], |
| 449 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 450 | "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 request succeeds, but the operation fails. If **fileType** is **SQL** and the filename ends with .gz, the contents are compressed. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 451 | }, |
| 452 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 453 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 454 | "encryptionOptions": { |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 455 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form **gs://bucketName/fileName**. The instance must have write permissions to the bucket and read access to the file. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 456 | "pvkPassword": "A String", # Password that encrypts the private key |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 457 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form **gs://bucketName/fileName**. The instance must have write permissions to the bucket and read access to the file. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 458 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 459 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 460 | "csvImportOptions": { # Options for importing data as CSV. |
| 461 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 462 | "A String", |
| 463 | ], |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 464 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 465 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 466 | "linesTerminatedBy": "A String", # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values. |
| 467 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 468 | "table": "A String", # The table to which CSV data is imported. |
| 469 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 470 | "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. |
| 471 | "fileType": "A String", # The file type for the specified uri. * **SQL**: The file contains SQL statements. * **CSV**: The file contains CSV data. * **BAK**: The file contains backup data for a SQL Server instance. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 472 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 473 | "kind": "A String", # This is always **sql#importContext**. |
| 474 | "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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 475 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 476 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. |
| 477 | "kind": "A String", # This is always **sql#operation**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 478 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 479 | "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** |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 480 | "selfLink": "A String", # The URI of this resource. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 481 | "startTime": "A String", # The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame^] | 482 | "status": "A String", # The status of an operation. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 483 | "targetId": "A String", # Name of the database instance related to this operation. |
| 484 | "targetLink": "A String", |
| 485 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 486 | "user": "A String", # The email address of the user who initiated this operation. |
| 487 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 488 | </div> |
| 489 | |
| 490 | </body></html> |