@googleapis/sqladmin 3.5.0 → 4.1.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
@@ -12,7 +12,6 @@
12
12
  // limitations under the License.
13
13
 
14
14
  /* eslint-disable @typescript-eslint/no-explicit-any */
15
- /* eslint-disable @typescript-eslint/class-name-casing */
16
15
  /* eslint-disable @typescript-eslint/no-unused-vars */
17
16
  /* eslint-disable @typescript-eslint/no-empty-interface */
18
17
  /* eslint-disable @typescript-eslint/no-namespace */
@@ -1681,7 +1680,7 @@ export namespace sqladmin_v1beta4 {
1681
1680
  sqlOutOfDiskState?: string | null;
1682
1681
  }
1683
1682
  /**
1684
- * Any scheduled maintenancce for this instance.
1683
+ * Any scheduled maintenance for this instance.
1685
1684
  */
1686
1685
  export interface Schema$SqlScheduledMaintenance {
1687
1686
  canDefer?: boolean | null;
@@ -1923,6 +1922,10 @@ export namespace sqladmin_v1beta4 {
1923
1922
  * A Cloud SQL user resource.
1924
1923
  */
1925
1924
  export interface Schema$User {
1925
+ /**
1926
+ * Dual password status for the user.
1927
+ */
1928
+ dualPasswordType?: string | null;
1926
1929
  /**
1927
1930
  * This field is deprecated and will be removed from a future version of the API.
1928
1931
  */
@@ -1973,6 +1976,10 @@ export namespace sqladmin_v1beta4 {
1973
1976
  * If true, failed login attempts check will be enabled.
1974
1977
  */
1975
1978
  enableFailedAttemptsCheck?: boolean | null;
1979
+ /**
1980
+ * If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.
1981
+ */
1982
+ enablePasswordVerification?: boolean | null;
1976
1983
  /**
1977
1984
  * Expiration duration after password is updated.
1978
1985
  */
@@ -5658,7 +5665,7 @@ export namespace sqladmin_v1beta4 {
5658
5665
  * const res = await sql.instances.list({
5659
5666
  * // A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.
5660
5667
  * filter: 'placeholder-value',
5661
- * // The maximum number of results to return per response.
5668
+ * // The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000.
5662
5669
  * maxResults: 'placeholder-value',
5663
5670
  * // A previously-returned page token representing part of the larger set of results to view.
5664
5671
  * pageToken: 'placeholder-value',
@@ -7637,7 +7644,7 @@ export namespace sqladmin_v1beta4 {
7637
7644
  */
7638
7645
  filter?: string;
7639
7646
  /**
7640
- * The maximum number of results to return per response.
7647
+ * The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000.
7641
7648
  */
7642
7649
  maxResults?: number;
7643
7650
  /**
@@ -9776,6 +9783,151 @@ export namespace sqladmin_v1beta4 {
9776
9783
  }
9777
9784
  }
9778
9785
 
9786
+ /**
9787
+ * Retrieves a resource containing information about a user.
9788
+ * @example
9789
+ * ```js
9790
+ * // Before running the sample:
9791
+ * // - Enable the API at:
9792
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
9793
+ * // - Login into gcloud by running:
9794
+ * // `$ gcloud auth application-default login`
9795
+ * // - Install the npm module by running:
9796
+ * // `$ npm install googleapis`
9797
+ *
9798
+ * const {google} = require('googleapis');
9799
+ * const sqladmin = google.sqladmin('v1beta4');
9800
+ *
9801
+ * async function main() {
9802
+ * const auth = new google.auth.GoogleAuth({
9803
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9804
+ * scopes: [
9805
+ * 'https://www.googleapis.com/auth/cloud-platform',
9806
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
9807
+ * ],
9808
+ * });
9809
+ *
9810
+ * // Acquire an auth client, and bind it to all future calls
9811
+ * const authClient = await auth.getClient();
9812
+ * google.options({auth: authClient});
9813
+ *
9814
+ * // Do the magic
9815
+ * const res = await sql.users.get({
9816
+ * // Database instance ID. This does not include the project ID.
9817
+ * instance: 'placeholder-value',
9818
+ * // User of the instance. If the database user has a host, this is specified as {username\}@{host\} else as {username\}.
9819
+ * name: 'placeholder-value',
9820
+ * // Project ID of the project that contains the instance.
9821
+ * project: 'placeholder-value',
9822
+ * });
9823
+ * console.log(res.data);
9824
+ *
9825
+ * // Example response
9826
+ * // {
9827
+ * // "dualPasswordType": "my_dualPasswordType",
9828
+ * // "etag": "my_etag",
9829
+ * // "host": "my_host",
9830
+ * // "instance": "my_instance",
9831
+ * // "kind": "my_kind",
9832
+ * // "name": "my_name",
9833
+ * // "password": "my_password",
9834
+ * // "passwordPolicy": {},
9835
+ * // "project": "my_project",
9836
+ * // "sqlserverUserDetails": {},
9837
+ * // "type": "my_type"
9838
+ * // }
9839
+ * }
9840
+ *
9841
+ * main().catch(e => {
9842
+ * console.error(e);
9843
+ * throw e;
9844
+ * });
9845
+ *
9846
+ * ```
9847
+ *
9848
+ * @param params - Parameters for request
9849
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
9850
+ * @param callback - Optional callback that handles the response.
9851
+ * @returns A promise if used with async/await, or void if used with a callback.
9852
+ */
9853
+ get(
9854
+ params: Params$Resource$Users$Get,
9855
+ options: StreamMethodOptions
9856
+ ): GaxiosPromise<Readable>;
9857
+ get(
9858
+ params?: Params$Resource$Users$Get,
9859
+ options?: MethodOptions
9860
+ ): GaxiosPromise<Schema$User>;
9861
+ get(
9862
+ params: Params$Resource$Users$Get,
9863
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
9864
+ callback: BodyResponseCallback<Readable>
9865
+ ): void;
9866
+ get(
9867
+ params: Params$Resource$Users$Get,
9868
+ options: MethodOptions | BodyResponseCallback<Schema$User>,
9869
+ callback: BodyResponseCallback<Schema$User>
9870
+ ): void;
9871
+ get(
9872
+ params: Params$Resource$Users$Get,
9873
+ callback: BodyResponseCallback<Schema$User>
9874
+ ): void;
9875
+ get(callback: BodyResponseCallback<Schema$User>): void;
9876
+ get(
9877
+ paramsOrCallback?:
9878
+ | Params$Resource$Users$Get
9879
+ | BodyResponseCallback<Schema$User>
9880
+ | BodyResponseCallback<Readable>,
9881
+ optionsOrCallback?:
9882
+ | MethodOptions
9883
+ | StreamMethodOptions
9884
+ | BodyResponseCallback<Schema$User>
9885
+ | BodyResponseCallback<Readable>,
9886
+ callback?:
9887
+ | BodyResponseCallback<Schema$User>
9888
+ | BodyResponseCallback<Readable>
9889
+ ): void | GaxiosPromise<Schema$User> | GaxiosPromise<Readable> {
9890
+ let params = (paramsOrCallback || {}) as Params$Resource$Users$Get;
9891
+ let options = (optionsOrCallback || {}) as MethodOptions;
9892
+
9893
+ if (typeof paramsOrCallback === 'function') {
9894
+ callback = paramsOrCallback;
9895
+ params = {} as Params$Resource$Users$Get;
9896
+ options = {};
9897
+ }
9898
+
9899
+ if (typeof optionsOrCallback === 'function') {
9900
+ callback = optionsOrCallback;
9901
+ options = {};
9902
+ }
9903
+
9904
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
9905
+ const parameters = {
9906
+ options: Object.assign(
9907
+ {
9908
+ url: (
9909
+ rootUrl +
9910
+ '/sql/v1beta4/projects/{project}/instances/{instance}/users/{name}'
9911
+ ).replace(/([^:]\/)\/+/g, '$1'),
9912
+ method: 'GET',
9913
+ },
9914
+ options
9915
+ ),
9916
+ params,
9917
+ requiredParams: ['project', 'instance', 'name'],
9918
+ pathParams: ['instance', 'name', 'project'],
9919
+ context: this.context,
9920
+ };
9921
+ if (callback) {
9922
+ createAPIRequest<Schema$User>(
9923
+ parameters,
9924
+ callback as BodyResponseCallback<unknown>
9925
+ );
9926
+ } else {
9927
+ return createAPIRequest<Schema$User>(parameters);
9928
+ }
9929
+ }
9930
+
9779
9931
  /**
9780
9932
  * Creates a new user in a Cloud SQL instance.
9781
9933
  * @example
@@ -9815,6 +9967,7 @@ export namespace sqladmin_v1beta4 {
9815
9967
  * requestBody: {
9816
9968
  * // request body parameters
9817
9969
  * // {
9970
+ * // "dualPasswordType": "my_dualPasswordType",
9818
9971
  * // "etag": "my_etag",
9819
9972
  * // "host": "my_host",
9820
9973
  * // "instance": "my_instance",
@@ -10122,6 +10275,7 @@ export namespace sqladmin_v1beta4 {
10122
10275
  * requestBody: {
10123
10276
  * // request body parameters
10124
10277
  * // {
10278
+ * // "dualPasswordType": "my_dualPasswordType",
10125
10279
  * // "etag": "my_etag",
10126
10280
  * // "host": "my_host",
10127
10281
  * // "instance": "my_instance",
@@ -10267,6 +10421,20 @@ export namespace sqladmin_v1beta4 {
10267
10421
  */
10268
10422
  project?: string;
10269
10423
  }
10424
+ export interface Params$Resource$Users$Get extends StandardParameters {
10425
+ /**
10426
+ * Database instance ID. This does not include the project ID.
10427
+ */
10428
+ instance?: string;
10429
+ /**
10430
+ * User of the instance. If the database user has a host, this is specified as {username\}@{host\} else as {username\}.
10431
+ */
10432
+ name?: string;
10433
+ /**
10434
+ * Project ID of the project that contains the instance.
10435
+ */
10436
+ project?: string;
10437
+ }
10270
10438
  export interface Params$Resource$Users$Insert extends StandardParameters {
10271
10439
  /**
10272
10440
  * Database instance ID. This does not include the project ID.