@googleapis/sqladmin 4.0.1 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1beta4.ts CHANGED
@@ -308,7 +308,11 @@ export namespace sqladmin_v1beta4 {
308
308
  */
309
309
  status?: string | null;
310
310
  /**
311
- * The type of this run; can be either "AUTOMATED" or "ON_DEMAND". This field defaults to "ON_DEMAND" and is ignored, when specified for insert requests.
311
+ * Backup time zone to prevent restores to an instance with a different time zone. Now relevant only for SQL Server.
312
+ */
313
+ timeZone?: string | null;
314
+ /**
315
+ * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". This field defaults to "ON_DEMAND" and is ignored, when specified for insert requests.
312
316
  */
313
317
  type?: string | null;
314
318
  /**
@@ -355,13 +359,17 @@ export namespace sqladmin_v1beta4 {
355
359
  */
356
360
  export interface Schema$CloneContext {
357
361
  /**
358
- * The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Reserved for future use.
362
+ * The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Reserved for future use.
359
363
  */
360
364
  allocatedIpRange?: string | null;
361
365
  /**
362
366
  * Binary log coordinates, if specified, identify the position up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates.
363
367
  */
364
368
  binLogCoordinates?: Schema$BinLogCoordinates;
369
+ /**
370
+ * (SQL Server only) Clone only the specified databases from the source instance. Clone all databases if empty.
371
+ */
372
+ databaseNames?: string[] | null;
365
373
  /**
366
374
  * Name of the Cloud SQL instance to be created as a clone.
367
375
  */
@@ -568,7 +576,7 @@ export namespace sqladmin_v1beta4 {
568
576
  */
569
577
  replicaNames?: string[] | null;
570
578
  /**
571
- * Initial root password. Use only on creation.
579
+ * Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.
572
580
  */
573
581
  rootPassword?: string | null;
574
582
  /**
@@ -735,6 +743,7 @@ export namespace sqladmin_v1beta4 {
735
743
  * Database instance export context.
736
744
  */
737
745
  export interface Schema$ExportContext {
746
+ bakExportOptions?: {stripeCount?: number; striped?: boolean} | null;
738
747
  /**
739
748
  * Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.
740
749
  */
@@ -888,6 +897,7 @@ export namespace sqladmin_v1beta4 {
888
897
  pvkPassword?: string;
889
898
  pvkPath?: string;
890
899
  };
900
+ striped?: boolean;
891
901
  } | null;
892
902
  /**
893
903
  * Options for importing data as CSV.
@@ -1075,13 +1085,17 @@ export namespace sqladmin_v1beta4 {
1075
1085
  */
1076
1086
  export interface Schema$IpConfiguration {
1077
1087
  /**
1078
- * The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.`
1088
+ * The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.`
1079
1089
  */
1080
1090
  allocatedIpRange?: string | null;
1081
1091
  /**
1082
1092
  * The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).
1083
1093
  */
1084
1094
  authorizedNetworks?: Schema$AclEntry[];
1095
+ /**
1096
+ * Controls connectivity to private IP instances from Google services, such as BigQuery.
1097
+ */
1098
+ enablePrivatePathForGoogleCloudServices?: boolean | null;
1085
1099
  /**
1086
1100
  * Whether the instance is assigned a public IP address or not.
1087
1101
  */
@@ -1497,6 +1511,10 @@ export namespace sqladmin_v1beta4 {
1497
1511
  * The name of server Instance collation.
1498
1512
  */
1499
1513
  collation?: string | null;
1514
+ /**
1515
+ * Specifies if connections must use Cloud SQL connectors. Option values include the following: `NOT_REQUIRED` (Cloud SQL instances can be connected without Cloud SQL Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL Connectors) Note that using REQUIRED disables all existing authorized networks. If this field is not specified when creating a new instance, NOT_REQUIRED is used. If this field is not specified when patching or updating an existing instance, it is left unchanged in the instance.
1516
+ */
1517
+ connectorEnforcement?: string | null;
1500
1518
  /**
1501
1519
  * Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.
1502
1520
  */
@@ -1517,6 +1535,10 @@ export namespace sqladmin_v1beta4 {
1517
1535
  * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for First Generation instances.
1518
1536
  */
1519
1537
  dataDiskType?: string | null;
1538
+ /**
1539
+ * Configuration to protect against accidental instance deletion.
1540
+ */
1541
+ deletionProtectionEnabled?: boolean | null;
1520
1542
  /**
1521
1543
  * Deny maintenance periods
1522
1544
  */
@@ -1573,6 +1595,10 @@ export namespace sqladmin_v1beta4 {
1573
1595
  * The tier (or machine type) for this instance, for example `db-custom-1-3840`. WARNING: Changing this restarts the instance.
1574
1596
  */
1575
1597
  tier?: string | null;
1598
+ /**
1599
+ * Server timezone, relevant only for Cloud SQL for SQL Server.
1600
+ */
1601
+ timeZone?: string | null;
1576
1602
  /**
1577
1603
  * User-provided labels, represented as a dictionary where each label is a single key value pair.
1578
1604
  */
@@ -1922,6 +1948,10 @@ export namespace sqladmin_v1beta4 {
1922
1948
  * A Cloud SQL user resource.
1923
1949
  */
1924
1950
  export interface Schema$User {
1951
+ /**
1952
+ * Dual password status for the user.
1953
+ */
1954
+ dualPasswordType?: string | null;
1925
1955
  /**
1926
1956
  * This field is deprecated and will be removed from a future version of the API.
1927
1957
  */
@@ -1972,6 +2002,10 @@ export namespace sqladmin_v1beta4 {
1972
2002
  * If true, failed login attempts check will be enabled.
1973
2003
  */
1974
2004
  enableFailedAttemptsCheck?: boolean | null;
2005
+ /**
2006
+ * If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.
2007
+ */
2008
+ enablePasswordVerification?: boolean | null;
1975
2009
  /**
1976
2010
  * Expiration duration after password is updated.
1977
2011
  */
@@ -2211,6 +2245,7 @@ export namespace sqladmin_v1beta4 {
2211
2245
  * // "selfLink": "my_selfLink",
2212
2246
  * // "startTime": "my_startTime",
2213
2247
  * // "status": "my_status",
2248
+ * // "timeZone": "my_timeZone",
2214
2249
  * // "type": "my_type",
2215
2250
  * // "windowStartTime": "my_windowStartTime"
2216
2251
  * // }
@@ -2359,6 +2394,7 @@ export namespace sqladmin_v1beta4 {
2359
2394
  * // "selfLink": "my_selfLink",
2360
2395
  * // "startTime": "my_startTime",
2361
2396
  * // "status": "my_status",
2397
+ * // "timeZone": "my_timeZone",
2362
2398
  * // "type": "my_type",
2363
2399
  * // "windowStartTime": "my_windowStartTime"
2364
2400
  * // }
@@ -5915,7 +5951,7 @@ export namespace sqladmin_v1beta4 {
5915
5951
  }
5916
5952
 
5917
5953
  /**
5918
- * Updates settings of a Cloud SQL instance. This method supports patch semantics.
5954
+ * Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics.
5919
5955
  * @example
5920
5956
  * ```js
5921
5957
  * // Before running the sample:
@@ -9775,6 +9811,153 @@ export namespace sqladmin_v1beta4 {
9775
9811
  }
9776
9812
  }
9777
9813
 
9814
+ /**
9815
+ * Retrieves a resource containing information about a user.
9816
+ * @example
9817
+ * ```js
9818
+ * // Before running the sample:
9819
+ * // - Enable the API at:
9820
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
9821
+ * // - Login into gcloud by running:
9822
+ * // `$ gcloud auth application-default login`
9823
+ * // - Install the npm module by running:
9824
+ * // `$ npm install googleapis`
9825
+ *
9826
+ * const {google} = require('googleapis');
9827
+ * const sqladmin = google.sqladmin('v1beta4');
9828
+ *
9829
+ * async function main() {
9830
+ * const auth = new google.auth.GoogleAuth({
9831
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9832
+ * scopes: [
9833
+ * 'https://www.googleapis.com/auth/cloud-platform',
9834
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
9835
+ * ],
9836
+ * });
9837
+ *
9838
+ * // Acquire an auth client, and bind it to all future calls
9839
+ * const authClient = await auth.getClient();
9840
+ * google.options({auth: authClient});
9841
+ *
9842
+ * // Do the magic
9843
+ * const res = await sql.users.get({
9844
+ * // Host of a user of the instance.
9845
+ * host: 'placeholder-value',
9846
+ * // Database instance ID. This does not include the project ID.
9847
+ * instance: 'placeholder-value',
9848
+ * // User of the instance.
9849
+ * name: 'placeholder-value',
9850
+ * // Project ID of the project that contains the instance.
9851
+ * project: 'placeholder-value',
9852
+ * });
9853
+ * console.log(res.data);
9854
+ *
9855
+ * // Example response
9856
+ * // {
9857
+ * // "dualPasswordType": "my_dualPasswordType",
9858
+ * // "etag": "my_etag",
9859
+ * // "host": "my_host",
9860
+ * // "instance": "my_instance",
9861
+ * // "kind": "my_kind",
9862
+ * // "name": "my_name",
9863
+ * // "password": "my_password",
9864
+ * // "passwordPolicy": {},
9865
+ * // "project": "my_project",
9866
+ * // "sqlserverUserDetails": {},
9867
+ * // "type": "my_type"
9868
+ * // }
9869
+ * }
9870
+ *
9871
+ * main().catch(e => {
9872
+ * console.error(e);
9873
+ * throw e;
9874
+ * });
9875
+ *
9876
+ * ```
9877
+ *
9878
+ * @param params - Parameters for request
9879
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
9880
+ * @param callback - Optional callback that handles the response.
9881
+ * @returns A promise if used with async/await, or void if used with a callback.
9882
+ */
9883
+ get(
9884
+ params: Params$Resource$Users$Get,
9885
+ options: StreamMethodOptions
9886
+ ): GaxiosPromise<Readable>;
9887
+ get(
9888
+ params?: Params$Resource$Users$Get,
9889
+ options?: MethodOptions
9890
+ ): GaxiosPromise<Schema$User>;
9891
+ get(
9892
+ params: Params$Resource$Users$Get,
9893
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
9894
+ callback: BodyResponseCallback<Readable>
9895
+ ): void;
9896
+ get(
9897
+ params: Params$Resource$Users$Get,
9898
+ options: MethodOptions | BodyResponseCallback<Schema$User>,
9899
+ callback: BodyResponseCallback<Schema$User>
9900
+ ): void;
9901
+ get(
9902
+ params: Params$Resource$Users$Get,
9903
+ callback: BodyResponseCallback<Schema$User>
9904
+ ): void;
9905
+ get(callback: BodyResponseCallback<Schema$User>): void;
9906
+ get(
9907
+ paramsOrCallback?:
9908
+ | Params$Resource$Users$Get
9909
+ | BodyResponseCallback<Schema$User>
9910
+ | BodyResponseCallback<Readable>,
9911
+ optionsOrCallback?:
9912
+ | MethodOptions
9913
+ | StreamMethodOptions
9914
+ | BodyResponseCallback<Schema$User>
9915
+ | BodyResponseCallback<Readable>,
9916
+ callback?:
9917
+ | BodyResponseCallback<Schema$User>
9918
+ | BodyResponseCallback<Readable>
9919
+ ): void | GaxiosPromise<Schema$User> | GaxiosPromise<Readable> {
9920
+ let params = (paramsOrCallback || {}) as Params$Resource$Users$Get;
9921
+ let options = (optionsOrCallback || {}) as MethodOptions;
9922
+
9923
+ if (typeof paramsOrCallback === 'function') {
9924
+ callback = paramsOrCallback;
9925
+ params = {} as Params$Resource$Users$Get;
9926
+ options = {};
9927
+ }
9928
+
9929
+ if (typeof optionsOrCallback === 'function') {
9930
+ callback = optionsOrCallback;
9931
+ options = {};
9932
+ }
9933
+
9934
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
9935
+ const parameters = {
9936
+ options: Object.assign(
9937
+ {
9938
+ url: (
9939
+ rootUrl +
9940
+ '/sql/v1beta4/projects/{project}/instances/{instance}/users/{name}'
9941
+ ).replace(/([^:]\/)\/+/g, '$1'),
9942
+ method: 'GET',
9943
+ },
9944
+ options
9945
+ ),
9946
+ params,
9947
+ requiredParams: ['project', 'instance', 'name'],
9948
+ pathParams: ['instance', 'name', 'project'],
9949
+ context: this.context,
9950
+ };
9951
+ if (callback) {
9952
+ createAPIRequest<Schema$User>(
9953
+ parameters,
9954
+ callback as BodyResponseCallback<unknown>
9955
+ );
9956
+ } else {
9957
+ return createAPIRequest<Schema$User>(parameters);
9958
+ }
9959
+ }
9960
+
9778
9961
  /**
9779
9962
  * Creates a new user in a Cloud SQL instance.
9780
9963
  * @example
@@ -9814,6 +9997,7 @@ export namespace sqladmin_v1beta4 {
9814
9997
  * requestBody: {
9815
9998
  * // request body parameters
9816
9999
  * // {
10000
+ * // "dualPasswordType": "my_dualPasswordType",
9817
10001
  * // "etag": "my_etag",
9818
10002
  * // "host": "my_host",
9819
10003
  * // "instance": "my_instance",
@@ -10121,6 +10305,7 @@ export namespace sqladmin_v1beta4 {
10121
10305
  * requestBody: {
10122
10306
  * // request body parameters
10123
10307
  * // {
10308
+ * // "dualPasswordType": "my_dualPasswordType",
10124
10309
  * // "etag": "my_etag",
10125
10310
  * // "host": "my_host",
10126
10311
  * // "instance": "my_instance",
@@ -10266,6 +10451,24 @@ export namespace sqladmin_v1beta4 {
10266
10451
  */
10267
10452
  project?: string;
10268
10453
  }
10454
+ export interface Params$Resource$Users$Get extends StandardParameters {
10455
+ /**
10456
+ * Host of a user of the instance.
10457
+ */
10458
+ host?: string;
10459
+ /**
10460
+ * Database instance ID. This does not include the project ID.
10461
+ */
10462
+ instance?: string;
10463
+ /**
10464
+ * User of the instance.
10465
+ */
10466
+ name?: string;
10467
+ /**
10468
+ * Project ID of the project that contains the instance.
10469
+ */
10470
+ project?: string;
10471
+ }
10269
10472
  export interface Params$Resource$Users$Insert extends StandardParameters {
10270
10473
  /**
10271
10474
  * Database instance ID. This does not include the project ID.