@maxim_mazurok/gapi.client.cloudasset-v1 0.0.20230401 → 0.0.20230414

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 +108 -4
  2. package/package.json +1 -1
  3. package/tests.ts +5 -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://cloudasset.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20230401
12
+ // Revision: 20230414
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -288,6 +288,12 @@ declare namespace gapi.client {
288
288
  /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */
289
289
  year?: number;
290
290
  }
291
+ interface DeniedAccess {
292
+ /** A denied access tuple that is either fully or partially denied by IAM deny rules. This access tuple should match at least one access tuple derived from IamPolicyAnalysisResult. */
293
+ deniedAccessTuple?: GoogleCloudAssetV1DeniedAccessAccessTuple;
294
+ /** The details about how denied_access_tuple is denied. */
295
+ denyDetails?: GoogleCloudAssetV1DeniedAccessDenyDetail[];
296
+ }
291
297
  interface EffectiveIamPolicy {
292
298
  /**
293
299
  * The [full_resource_name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) for which the policies are computed. This is one of the
@@ -447,7 +453,7 @@ declare namespace gapi.client {
447
453
  }
448
454
  interface GoogleCloudAssetV1AnalyzeOrgPolicyGovernedAssetsResponseGovernedIamPolicy {
449
455
  /**
450
- * The full resource name of the resource associated with this IAM policy. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. See [Cloud Asset
456
+ * The full resource name of the resource on which this IAM policy is set. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. See [Cloud Asset
451
457
  * Inventory Resource Name Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) for more information.
452
458
  */
453
459
  attachedResource?: string;
@@ -545,6 +551,55 @@ declare namespace gapi.client {
545
551
  /** The Resource Instance type on which this policy applies to. Format will be of the form : "/" Example: * `compute.googleapis.com/Instance`. */
546
552
  resourceTypes?: string[];
547
553
  }
554
+ interface GoogleCloudAssetV1DeniedAccessAccess {
555
+ /** The IAM permission in [v1 format](https://cloud.google.com/iam/docs/permissions-reference) */
556
+ permission?: string;
557
+ /** The IAM role. */
558
+ role?: string;
559
+ }
560
+ interface GoogleCloudAssetV1DeniedAccessAccessTuple {
561
+ /** One access from IamPolicyAnalysisResult.AccessControlList.accesses. */
562
+ access?: GoogleCloudAssetV1DeniedAccessAccess;
563
+ /** One identity from IamPolicyAnalysisResult.IdentityList.identities. */
564
+ identity?: GoogleCloudAssetV1DeniedAccessIdentity;
565
+ /** One resource from IamPolicyAnalysisResult.AccessControlList.resources. */
566
+ resource?: GoogleCloudAssetV1DeniedAccessResource;
567
+ }
568
+ interface GoogleCloudAssetV1DeniedAccessDenyDetail {
569
+ /**
570
+ * The denied accesses. If this deny_rule fully denies the denied_access_tuple, this field will be same as AccessTuple.access. Otherwise, this field can contain AccessTuple.access and
571
+ * its descendant accesses, such as a subset of IAM permissions contained in an IAM role.
572
+ */
573
+ accesses?: GoogleCloudAssetV1DeniedAccessAccess[];
574
+ /** A deny rule in an IAM deny policy. */
575
+ denyRule?: GoogleIamV2DenyRule;
576
+ /**
577
+ * Whether the deny_rule fully denies all access granted by the denied_access_tuple. `True` means the deny rule fully blocks the access tuple. `False` means the deny rule partially
578
+ * blocks the access tuple."
579
+ */
580
+ fullyDenied?: boolean;
581
+ /**
582
+ * If this deny_rule fully denies the denied_access_tuple, this field will be same as AccessTuple.identity. Otherwise, this field can contain AccessTuple.identity and its descendant
583
+ * identities, such as a subset of users in a group.
584
+ */
585
+ identities?: GoogleCloudAssetV1DeniedAccessIdentity[];
586
+ /**
587
+ * The resources that the identities are denied access to. If this deny_rule fully denies the denied_access_tuple, this field will be same as AccessTuple.resource. Otherwise, this
588
+ * field can contain AccessTuple.resource and its descendant resources.
589
+ */
590
+ resources?: GoogleCloudAssetV1DeniedAccessResource[];
591
+ }
592
+ interface GoogleCloudAssetV1DeniedAccessIdentity {
593
+ /**
594
+ * The identity of members, formatted as appear in an [IAM policy binding](https://cloud.google.com/iam/reference/rest/v1/Binding). For example, they might be formatted like the
595
+ * following: - user:foo@google.com - group:group1@google.com - serviceAccount:s1@prj1.iam.gserviceaccount.com - projectOwner:some_project_id - domain:google.com - allUsers
596
+ */
597
+ name?: string;
598
+ }
599
+ interface GoogleCloudAssetV1DeniedAccessResource {
600
+ /** The [full resource name](https://cloud.google.com/asset-inventory/docs/resource-name-format) */
601
+ fullResourceName?: string;
602
+ }
548
603
  interface GoogleCloudAssetV1Edge {
549
604
  /** The source node of the edge. For example, it could be a full resource name for a resource node or an email of an identity. */
550
605
  sourceNode?: string;
@@ -583,8 +638,8 @@ declare namespace gapi.client {
583
638
  /** The analysis state of this identity. */
584
639
  analysisState?: IamPolicyAnalysisState;
585
640
  /**
586
- * The identity name in any form of members appear in [IAM policy binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such as: - user:foo@google.com -
587
- * group:group1@google.com - serviceAccount:s1@prj1.iam.gserviceaccount.com - projectOwner:some_project_id - domain:google.com - allUsers - etc.
641
+ * The identity of members, formatted as appear in an [IAM policy binding](https://cloud.google.com/iam/reference/rest/v1/Binding). For example, they might be formatted like the
642
+ * following: - user:foo@google.com - group:group1@google.com - serviceAccount:s1@prj1.iam.gserviceaccount.com - projectOwner:some_project_id - domain:google.com - allUsers
588
643
  */
589
644
  name?: string;
590
645
  }
@@ -832,6 +887,46 @@ declare namespace gapi.client {
832
887
  // tslint:disable-next-line:no-empty-interface
833
888
  interface GoogleCloudOrgpolicyV1RestoreDefault {
834
889
  }
890
+ interface GoogleIamV2DenyRule {
891
+ /**
892
+ * The condition that determines whether this deny rule applies to a request. If the condition expression evaluates to `true`, then the deny rule is applied; otherwise, the deny rule
893
+ * is not applied. Each deny rule is evaluated independently. If this deny rule does not apply to a request, other deny rules might still apply. The condition can use CEL functions
894
+ * that evaluate [resource tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other functions and operators are not supported.
895
+ */
896
+ denialCondition?: Expr;
897
+ /**
898
+ * The permissions that are explicitly denied by this rule. Each permission uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` is the fully qualified domain
899
+ * name for the service. For example, `iam.googleapis.com/roles.list`.
900
+ */
901
+ deniedPermissions?: string[];
902
+ /**
903
+ * The identities that are prevented from using one or more permissions on Google Cloud resources. This field can contain the following values: * `principalSet://goog/public:all`: A
904
+ * special identifier that represents any principal that is on the internet, even if they do not have a Google Account or are not logged in. * `principal://goog/subject/{email_id}`: A
905
+ * specific Google Account. Includes Gmail, Cloud Identity, and Google Workspace user accounts. For example, `principal://goog/subject/alice@example.com`. *
906
+ * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific Google Account that was deleted recently. For example,
907
+ * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If the Google Account is recovered, this identifier reverts to the standard identifier for a Google Account. *
908
+ * `principalSet://goog/group/{group_id}`: A Google group. For example, `principalSet://goog/group/admins@example.com`. * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A
909
+ * Google group that was deleted recently. For example, `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If the Google group is restored, this identifier reverts
910
+ * to the standard identifier for a Google group. * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: A Google Cloud service account. For example,
911
+ * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. *
912
+ * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: A Google Cloud service account that was deleted recently. For example,
913
+ * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. If the service account is undeleted, this identifier
914
+ * reverts to the standard identifier for a service account. * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the principals associated with the specified Google
915
+ * Workspace or Cloud Identity customer ID. For example, `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
916
+ */
917
+ deniedPrincipals?: string[];
918
+ /**
919
+ * Specifies the permissions that this rule excludes from the set of denied permissions given by `denied_permissions`. If a permission appears in `denied_permissions` _and_ in
920
+ * `exception_permissions` then it will _not_ be denied. The excluded permissions can be specified using the same syntax as `denied_permissions`.
921
+ */
922
+ exceptionPermissions?: string[];
923
+ /**
924
+ * The identities that are excluded from the deny rule, even if they are listed in the `denied_principals`. For example, you could add a Google group to the `denied_principals`, then
925
+ * exclude specific users who belong to that group. This field can contain the same values as the `denied_principals` field, excluding `principalSet://goog/public:all`, which
926
+ * represents all users on the internet.
927
+ */
928
+ exceptionPrincipals?: string[];
929
+ }
835
930
  interface GoogleIdentityAccesscontextmanagerV1AccessLevel {
836
931
  /** A `BasicLevel` composed of `Conditions`. */
837
932
  basic?: GoogleIdentityAccesscontextmanagerV1BasicLevel;
@@ -1099,6 +1194,11 @@ declare namespace gapi.client {
1099
1194
  analysisQuery?: IamPolicyAnalysisQuery;
1100
1195
  /** A list of IamPolicyAnalysisResult that matches the analysis query, or empty if no result is found. */
1101
1196
  analysisResults?: IamPolicyAnalysisResult[];
1197
+ /**
1198
+ * A list of DeniedAccess, which contains all access tuples in the analysis_results that are denied by IAM deny policies. If no access tuples are denied, the list is empty. This is
1199
+ * only populated when IamPolicyAnalysisQuery.Options.include_deny_policy_analysis is true.
1200
+ */
1201
+ deniedAccesses?: DeniedAccess[];
1102
1202
  /** Represents whether all entries in the analysis_results have been fully explored to answer the query. */
1103
1203
  fullyExplored?: boolean;
1104
1204
  /** A list of non-critical errors happened during the query handling. */
@@ -1322,6 +1422,8 @@ declare namespace gapi.client {
1322
1422
  * specified, the access section of the result will be determined by the selector, and this flag is not allowed to set. Default is false.
1323
1423
  */
1324
1424
  expandRoles?: boolean;
1425
+ /** Optional. If true, the response includes deny policy analysis results, and you can see which access tuples are denied. Default is false. */
1426
+ includeDenyPolicyAnalysis?: boolean;
1325
1427
  /** Optional. If true, the result will output the relevant membership relationships between groups and other groups, and between groups and principals. Default is false. */
1326
1428
  outputGroupEdges?: boolean;
1327
1429
  /** Optional. If true, the result will output the relevant parent/child relationships between resources. Default is false. */
@@ -2540,6 +2642,8 @@ declare namespace gapi.client {
2540
2642
  * specified, the access section of the result will be determined by the selector, and this flag is not allowed to set. Default is false.
2541
2643
  */
2542
2644
  "analysisQuery.options.expandRoles"?: boolean;
2645
+ /** Optional. If true, the response includes deny policy analysis results, and you can see which access tuples are denied. Default is false. */
2646
+ "analysisQuery.options.includeDenyPolicyAnalysis"?: boolean;
2543
2647
  /** Optional. If true, the result will output the relevant membership relationships between groups and other groups, and between groups and principals. Default is false. */
2544
2648
  "analysisQuery.options.outputGroupEdges"?: boolean;
2545
2649
  /** Optional. If true, the result will output the relevant parent/child relationships between resources. Default is false. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.cloudasset-v1",
3
- "version": "0.0.20230401",
3
+ "version": "0.0.20230414",
4
4
  "description": "TypeScript typings for Cloud Asset 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: 20230401
6
+ // Revision: 20230414
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -146,6 +146,7 @@ gapi.load('client', async () => {
146
146
  expandGroups: true,
147
147
  expandResources: true,
148
148
  expandRoles: true,
149
+ includeDenyPolicyAnalysis: true,
149
150
  outputGroupEdges: true,
150
151
  outputResourceEdges: true,
151
152
  },
@@ -206,6 +207,7 @@ gapi.load('client', async () => {
206
207
  expandGroups: true,
207
208
  expandResources: true,
208
209
  expandRoles: true,
210
+ includeDenyPolicyAnalysis: true,
209
211
  outputGroupEdges: true,
210
212
  outputResourceEdges: true,
211
213
  },
@@ -235,6 +237,7 @@ gapi.load('client', async () => {
235
237
  "analysisQuery.options.expandGroups": true,
236
238
  "analysisQuery.options.expandResources": true,
237
239
  "analysisQuery.options.expandRoles": true,
240
+ "analysisQuery.options.includeDenyPolicyAnalysis": true,
238
241
  "analysisQuery.options.outputGroupEdges": true,
239
242
  "analysisQuery.options.outputResourceEdges": true,
240
243
  "analysisQuery.resourceSelector.fullResourceName": "Test string",
@@ -271,6 +274,7 @@ gapi.load('client', async () => {
271
274
  expandGroups: true,
272
275
  expandResources: true,
273
276
  expandRoles: true,
277
+ includeDenyPolicyAnalysis: true,
274
278
  outputGroupEdges: true,
275
279
  outputResourceEdges: true,
276
280
  },