@maxim_mazurok/gapi.client.assuredworkloads-v1 0.0.20230831 → 0.0.20230907

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.
Files changed (3) hide show
  1. package/index.d.ts +105 -1
  2. package/package.json +1 -1
  3. package/tests.ts +9 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://assuredworkloads.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20230831
12
+ // Revision: 20230907
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -36,6 +36,25 @@ declare namespace gapi.client {
36
36
  // tslint:disable-next-line:no-empty-interface
37
37
  interface GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse {
38
38
  }
39
+ interface GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse {
40
+ /** List of analysis results for each asset in scope. */
41
+ assetMoveAnalyses?:
42
+ GoogleCloudAssuredworkloadsV1AssetMoveAnalysis[];
43
+ /** The next page token. Is empty if the last page is reached. */
44
+ nextPageToken?:
45
+ string;
46
+ }
47
+ interface GoogleCloudAssuredworkloadsV1AssetMoveAnalysis {
48
+ /** List of eligible analyses performed for the asset. */
49
+ analysisGroups?:
50
+ GoogleCloudAssuredworkloadsV1MoveAnalysisGroup[];
51
+ /** The full resource name of the asset being analyzed. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1 */
52
+ asset?:
53
+ string;
54
+ /** Type of the asset being analyzed. Possible values will be among the ones listed [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). */
55
+ assetType?:
56
+ string;
57
+ }
39
58
  interface GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata {
40
59
  /** Optional. Compliance controls that should be applied to the resources managed by the workload. */
41
60
  complianceRegime?:
@@ -66,6 +85,30 @@ declare namespace gapi.client {
66
85
  workloads?:
67
86
  GoogleCloudAssuredworkloadsV1Workload[];
68
87
  }
88
+ interface GoogleCloudAssuredworkloadsV1MoveAnalysisGroup {
89
+ /** Result of a successful analysis. */
90
+ analysisResult?:
91
+ GoogleCloudAssuredworkloadsV1MoveAnalysisResult;
92
+ /** Name of the analysis group. */
93
+ displayName?:
94
+ string;
95
+ /** Error details for a failed analysis. */
96
+ error?:
97
+ GoogleRpcStatus;
98
+ }
99
+ interface GoogleCloudAssuredworkloadsV1MoveAnalysisResult {
100
+ /** List of blockers. If not resolved, these will result in compliance violations in the target. */
101
+ blockers?:
102
+ GoogleCloudAssuredworkloadsV1MoveImpact[];
103
+ /** List of warnings. These are risks that may or may not result in compliance violations. */
104
+ warnings?:
105
+ GoogleCloudAssuredworkloadsV1MoveImpact[];
106
+ }
107
+ interface GoogleCloudAssuredworkloadsV1MoveImpact {
108
+ /** Explanation of the impact. */
109
+ detail?:
110
+ string;
111
+ }
69
112
  interface GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest {
70
113
  /** Optional. The etag of the workload. If this is provided, it must match the server's etag. */
71
114
  etag?:
@@ -679,6 +722,67 @@ declare namespace gapi.client {
679
722
  }): Request<GoogleCloudAssuredworkloadsV1ListViolationsResponse>;
680
723
  }
681
724
  interface WorkloadsResource {
725
+ /** Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive. */
726
+ analyzeWorkloadMove(request?: {
727
+ /** V1 error format. */
728
+ "$.xgafv"?:
729
+ string;
730
+ /** OAuth access token. */
731
+ access_token?:
732
+ string;
733
+ /** Data format for response. */
734
+ alt?:
735
+ string;
736
+ /**
737
+ * Optional. List of asset types to be analyzed, including and under the source resource. If empty, all assets are analyzed. The complete list of asset types is available
738
+ * [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
739
+ */
740
+ assetTypes?:
741
+ string | string[];
742
+ /** JSONP */
743
+ callback?:
744
+ string;
745
+ /** Selector specifying which fields to include in a partial response. */
746
+ fields?:
747
+ string;
748
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
749
+ key?:
750
+ string;
751
+ /** OAuth 2.0 token for the current user. */
752
+ oauth_token?:
753
+ string;
754
+ /** Optional. Page size. If a value is not specified, the default value of 10 is used. */
755
+ pageSize?:
756
+ number;
757
+ /** Optional. The page token from the previous response. It needs to be passed in the second and following requests. */
758
+ pageToken?:
759
+ string;
760
+ /** Returns response with indentations and line breaks. */
761
+ prettyPrint?:
762
+ boolean;
763
+ /**
764
+ * The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: "projects/{PROJECT_NUMBER}" or
765
+ * "projects/{PROJECT_ID}" For example: "projects/951040570662" when specifying a project number, or "projects/my-project-123" when specifying a project ID.
766
+ */
767
+ project?:
768
+ string;
769
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
770
+ quotaUser?:
771
+ string;
772
+ /**
773
+ * Required. The resource ID of the folder-based destination workload. This workload is where the source resource will hypothetically be moved to. Specify the workload's relative
774
+ * resource name, formatted as: "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example:
775
+ * "organizations/123/locations/us-east1/workloads/assured-workload-2"
776
+ */
777
+ target:
778
+ string;
779
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
780
+ upload_protocol?:
781
+ string;
782
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
783
+ uploadType?:
784
+ string;
785
+ }): Request<GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse>;
682
786
  /** Creates Assured Workload. */
683
787
  create(request: {
684
788
  /** V1 error format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.assuredworkloads-v1",
3
- "version": "0.0.20230831",
3
+ "version": "0.0.20230907",
4
4
  "description": "TypeScript typings for Assured Workloads API v1",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230831
6
+ // Revision: 20230907
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -40,6 +40,14 @@ gapi.load('client', async () => {
40
40
  pageSize: 42,
41
41
  pageToken: "Test string",
42
42
  });
43
+ /** Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive. */
44
+ await gapi.client.assuredworkloads.organizations.locations.workloads.analyzeWorkloadMove({
45
+ assetTypes: "Test string",
46
+ pageSize: 42,
47
+ pageToken: "Test string",
48
+ project: "Test string",
49
+ target: "Test string",
50
+ });
43
51
  /** Creates Assured Workload. */
44
52
  await gapi.client.assuredworkloads.organizations.locations.workloads.create({
45
53
  externalId: "Test string",