google-apis-cloudasset_v1 0.20.0 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/OVERVIEW.md +1 -1
- data/lib/google/apis/cloudasset_v1/classes.rb +153 -4
- data/lib/google/apis/cloudasset_v1/gem_version.rb +3 -3
- data/lib/google/apis/cloudasset_v1/representations.rb +52 -0
- data/lib/google/apis/cloudasset_v1/service.rb +219 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 415a8e4ae7683d4e8b98f17ee656c787f06e022557612cc2e36afb185414b515
|
4
|
+
data.tar.gz: 2ecd65c8ecf64fadd28de90e03c991a6db37090c206b827b6c7054efb921a4a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dca13d4a6d954fd0f8244262dc4dbf340d783cfa9d34f0a5f9b7581ac667ff00c3f24e97c8f90d232bffa6274b4aed8f868ddb4ee0b15e3adc485b19f60c8ee
|
7
|
+
data.tar.gz: 470b9f34f6d8604e00ea85b8d08132e670fc6a84d50ba3c8feed277ea2230784e57946eee13439e5d35a09e638ca193a28ac95bbb46f5efd26fd37a4c8e97acd
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# Release history for google-apis-cloudasset_v1
|
2
2
|
|
3
|
+
### v0.24.0 (2022-01-12)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20220110
|
6
|
+
* Regenerated using generator version 0.4.1
|
7
|
+
|
8
|
+
### v0.23.0 (2021-12-14)
|
9
|
+
|
10
|
+
* Unspecified changes
|
11
|
+
|
12
|
+
### v0.22.0 (2021-12-02)
|
13
|
+
|
14
|
+
* Regenerated from discovery document revision 20211125
|
15
|
+
|
16
|
+
### v0.21.0 (2021-11-10)
|
17
|
+
|
18
|
+
* Regenerated from discovery document revision 20211105
|
19
|
+
|
3
20
|
### v0.20.0 (2021-10-27)
|
4
21
|
|
5
22
|
* Regenerated from discovery document revision 20211022
|
data/OVERVIEW.md
CHANGED
@@ -51,7 +51,7 @@ require "google/apis/cloudasset_v1"
|
|
51
51
|
client = Google::Apis::CloudassetV1::CloudAssetService.new
|
52
52
|
|
53
53
|
# Authenticate calls
|
54
|
-
client.
|
54
|
+
client.authorization = # ... use the googleauth gem to create credentials
|
55
55
|
```
|
56
56
|
|
57
57
|
See the class reference docs for information on the methods you can call from a client.
|
@@ -74,7 +74,7 @@ module Google
|
|
74
74
|
class AnalyzeIamPolicyLongrunningRequest
|
75
75
|
include Google::Apis::Core::Hashable
|
76
76
|
|
77
|
-
#
|
77
|
+
# IAM policy analysis query message.
|
78
78
|
# Corresponds to the JSON property `analysisQuery`
|
79
79
|
# @return [Google::Apis::CloudassetV1::IamPolicyAnalysisQuery]
|
80
80
|
attr_accessor :analysis_query
|
@@ -84,6 +84,21 @@ module Google
|
|
84
84
|
# @return [Google::Apis::CloudassetV1::IamPolicyAnalysisOutputConfig]
|
85
85
|
attr_accessor :output_config
|
86
86
|
|
87
|
+
# Optional. The name of a saved query, which must be in the format of: *
|
88
|
+
# projects/project_number/savedQueries/saved_query_id * folders/folder_number/
|
89
|
+
# savedQueries/saved_query_id * organizations/organization_number/savedQueries/
|
90
|
+
# saved_query_id If both `analysis_query` and `saved_analysis_query` are
|
91
|
+
# provided, they will be merged together with the `saved_analysis_query` as base
|
92
|
+
# and the `analysis_query` as overrides. For more details of the merge behavior,
|
93
|
+
# please refer to the [MergeFrom](https://developers.google.com/protocol-buffers/
|
94
|
+
# docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) doc.
|
95
|
+
# Note that you cannot override primitive fields with default value, such as 0
|
96
|
+
# or empty string, etc., because we use proto3, which doesn't support field
|
97
|
+
# presence yet.
|
98
|
+
# Corresponds to the JSON property `savedAnalysisQuery`
|
99
|
+
# @return [String]
|
100
|
+
attr_accessor :saved_analysis_query
|
101
|
+
|
87
102
|
def initialize(**args)
|
88
103
|
update!(**args)
|
89
104
|
end
|
@@ -92,6 +107,7 @@ module Google
|
|
92
107
|
def update!(**args)
|
93
108
|
@analysis_query = args[:analysis_query] if args.key?(:analysis_query)
|
94
109
|
@output_config = args[:output_config] if args.key?(:output_config)
|
110
|
+
@saved_analysis_query = args[:saved_analysis_query] if args.key?(:saved_analysis_query)
|
95
111
|
end
|
96
112
|
end
|
97
113
|
|
@@ -1954,6 +1970,21 @@ module Google
|
|
1954
1970
|
# @return [String]
|
1955
1971
|
attr_accessor :parent
|
1956
1972
|
|
1973
|
+
# The scopes of a policy define which resources an ACM policy can restrict, and
|
1974
|
+
# where ACM resources can be referenced. For example, a policy with scopes=["
|
1975
|
+
# folders/123"] has the following behavior: - vpcsc perimeters can only restrict
|
1976
|
+
# projects within folders/123 - access levels can only be referenced by
|
1977
|
+
# resources within folders/123. If empty, there are no limitations on which
|
1978
|
+
# resources can be restricted by an ACM policy, and there are no limitations on
|
1979
|
+
# where ACM resources can be referenced. Only one policy can include a given
|
1980
|
+
# scope (attempting to create a second policy which includes "folders/123" will
|
1981
|
+
# result in an error). Currently, scopes cannot be modified after a policy is
|
1982
|
+
# created. Currently, policies can only have a single scope. Format: list of `
|
1983
|
+
# folders/`folder_number`` or `projects/`project_number``
|
1984
|
+
# Corresponds to the JSON property `scopes`
|
1985
|
+
# @return [Array<String>]
|
1986
|
+
attr_accessor :scopes
|
1987
|
+
|
1957
1988
|
# Required. Human readable title. Does not affect behavior.
|
1958
1989
|
# Corresponds to the JSON property `title`
|
1959
1990
|
# @return [String]
|
@@ -1968,6 +1999,7 @@ module Google
|
|
1968
1999
|
@etag = args[:etag] if args.key?(:etag)
|
1969
2000
|
@name = args[:name] if args.key?(:name)
|
1970
2001
|
@parent = args[:parent] if args.key?(:parent)
|
2002
|
+
@scopes = args[:scopes] if args.key?(:scopes)
|
1971
2003
|
@title = args[:title] if args.key?(:title)
|
1972
2004
|
end
|
1973
2005
|
end
|
@@ -2706,7 +2738,7 @@ module Google
|
|
2706
2738
|
class IamPolicyAnalysis
|
2707
2739
|
include Google::Apis::Core::Hashable
|
2708
2740
|
|
2709
|
-
#
|
2741
|
+
# IAM policy analysis query message.
|
2710
2742
|
# Corresponds to the JSON property `analysisQuery`
|
2711
2743
|
# @return [Google::Apis::CloudassetV1::IamPolicyAnalysisQuery]
|
2712
2744
|
attr_accessor :analysis_query
|
@@ -2767,7 +2799,7 @@ module Google
|
|
2767
2799
|
end
|
2768
2800
|
end
|
2769
2801
|
|
2770
|
-
#
|
2802
|
+
# IAM policy analysis query message.
|
2771
2803
|
class IamPolicyAnalysisQuery
|
2772
2804
|
include Google::Apis::Core::Hashable
|
2773
2805
|
|
@@ -3186,6 +3218,32 @@ module Google
|
|
3186
3218
|
end
|
3187
3219
|
end
|
3188
3220
|
|
3221
|
+
# Response of listing saved queries.
|
3222
|
+
class ListSavedQueriesResponse
|
3223
|
+
include Google::Apis::Core::Hashable
|
3224
|
+
|
3225
|
+
# A token, which can be sent as `page_token` to retrieve the next page. If this
|
3226
|
+
# field is omitted, there are no subsequent pages.
|
3227
|
+
# Corresponds to the JSON property `nextPageToken`
|
3228
|
+
# @return [String]
|
3229
|
+
attr_accessor :next_page_token
|
3230
|
+
|
3231
|
+
# A list of savedQueries.
|
3232
|
+
# Corresponds to the JSON property `savedQueries`
|
3233
|
+
# @return [Array<Google::Apis::CloudassetV1::SavedQuery>]
|
3234
|
+
attr_accessor :saved_queries
|
3235
|
+
|
3236
|
+
def initialize(**args)
|
3237
|
+
update!(**args)
|
3238
|
+
end
|
3239
|
+
|
3240
|
+
# Update properties of this object
|
3241
|
+
def update!(**args)
|
3242
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
3243
|
+
@saved_queries = args[:saved_queries] if args.key?(:saved_queries)
|
3244
|
+
end
|
3245
|
+
end
|
3246
|
+
|
3189
3247
|
# A message to group the analysis information.
|
3190
3248
|
class MoveAnalysis
|
3191
3249
|
include Google::Apis::Core::Hashable
|
@@ -3352,7 +3410,11 @@ module Google
|
|
3352
3410
|
# service account SA has permission P to the GCP folder F, then user A
|
3353
3411
|
# potentially has access to the GCP folder F. And those advanced analysis
|
3354
3412
|
# results will be included in AnalyzeIamPolicyResponse.
|
3355
|
-
# service_account_impersonation_analysis.
|
3413
|
+
# service_account_impersonation_analysis. Only the following permissions are
|
3414
|
+
# considered in this analysis: * `iam.serviceAccounts.actAs` * `iam.
|
3415
|
+
# serviceAccounts.signBlob` * `iam.serviceAccounts.signJwt` * `iam.
|
3416
|
+
# serviceAccounts.getAccessToken` * `iam.serviceAccounts.getOpenIdToken` * `iam.
|
3417
|
+
# serviceAccounts.implicitDelegation` Default is false.
|
3356
3418
|
# Corresponds to the JSON property `analyzeServiceAccountImpersonation`
|
3357
3419
|
# @return [Boolean]
|
3358
3420
|
attr_accessor :analyze_service_account_impersonation
|
@@ -3665,6 +3727,25 @@ module Google
|
|
3665
3727
|
end
|
3666
3728
|
end
|
3667
3729
|
|
3730
|
+
# The query content.
|
3731
|
+
class QueryContent
|
3732
|
+
include Google::Apis::Core::Hashable
|
3733
|
+
|
3734
|
+
# IAM policy analysis query message.
|
3735
|
+
# Corresponds to the JSON property `iamPolicyAnalysisQuery`
|
3736
|
+
# @return [Google::Apis::CloudassetV1::IamPolicyAnalysisQuery]
|
3737
|
+
attr_accessor :iam_policy_analysis_query
|
3738
|
+
|
3739
|
+
def initialize(**args)
|
3740
|
+
update!(**args)
|
3741
|
+
end
|
3742
|
+
|
3743
|
+
# Update properties of this object
|
3744
|
+
def update!(**args)
|
3745
|
+
@iam_policy_analysis_query = args[:iam_policy_analysis_query] if args.key?(:iam_policy_analysis_query)
|
3746
|
+
end
|
3747
|
+
end
|
3748
|
+
|
3668
3749
|
# An asset identifier in Google Cloud which contains its name, type and
|
3669
3750
|
# ancestors. An asset can be any resource in the Google Cloud [resource
|
3670
3751
|
# hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-
|
@@ -4150,6 +4231,74 @@ module Google
|
|
4150
4231
|
end
|
4151
4232
|
end
|
4152
4233
|
|
4234
|
+
# A saved query which can be shared with others or used later.
|
4235
|
+
class SavedQuery
|
4236
|
+
include Google::Apis::Core::Hashable
|
4237
|
+
|
4238
|
+
# The query content.
|
4239
|
+
# Corresponds to the JSON property `content`
|
4240
|
+
# @return [Google::Apis::CloudassetV1::QueryContent]
|
4241
|
+
attr_accessor :content
|
4242
|
+
|
4243
|
+
# Output only. The create time of this saved query.
|
4244
|
+
# Corresponds to the JSON property `createTime`
|
4245
|
+
# @return [String]
|
4246
|
+
attr_accessor :create_time
|
4247
|
+
|
4248
|
+
# Output only. The account's email address who has created this saved query.
|
4249
|
+
# Corresponds to the JSON property `creator`
|
4250
|
+
# @return [String]
|
4251
|
+
attr_accessor :creator
|
4252
|
+
|
4253
|
+
# The description of this saved query. This value should be fewer than 255
|
4254
|
+
# characters.
|
4255
|
+
# Corresponds to the JSON property `description`
|
4256
|
+
# @return [String]
|
4257
|
+
attr_accessor :description
|
4258
|
+
|
4259
|
+
# Labels applied on the resource. This value should not contain more than 10
|
4260
|
+
# entries. The key and value of each entry must be non-empty and fewer than 64
|
4261
|
+
# characters.
|
4262
|
+
# Corresponds to the JSON property `labels`
|
4263
|
+
# @return [Hash<String,String>]
|
4264
|
+
attr_accessor :labels
|
4265
|
+
|
4266
|
+
# Output only. The last update time of this saved query.
|
4267
|
+
# Corresponds to the JSON property `lastUpdateTime`
|
4268
|
+
# @return [String]
|
4269
|
+
attr_accessor :last_update_time
|
4270
|
+
|
4271
|
+
# Output only. The account's email address who has updated this saved query most
|
4272
|
+
# recently.
|
4273
|
+
# Corresponds to the JSON property `lastUpdater`
|
4274
|
+
# @return [String]
|
4275
|
+
attr_accessor :last_updater
|
4276
|
+
|
4277
|
+
# The resource name of the saved query. The format must be: * projects/
|
4278
|
+
# project_number/savedQueries/saved_query_id * folders/folder_number/
|
4279
|
+
# savedQueries/saved_query_id * organizations/organization_number/savedQueries/
|
4280
|
+
# saved_query_id
|
4281
|
+
# Corresponds to the JSON property `name`
|
4282
|
+
# @return [String]
|
4283
|
+
attr_accessor :name
|
4284
|
+
|
4285
|
+
def initialize(**args)
|
4286
|
+
update!(**args)
|
4287
|
+
end
|
4288
|
+
|
4289
|
+
# Update properties of this object
|
4290
|
+
def update!(**args)
|
4291
|
+
@content = args[:content] if args.key?(:content)
|
4292
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
4293
|
+
@creator = args[:creator] if args.key?(:creator)
|
4294
|
+
@description = args[:description] if args.key?(:description)
|
4295
|
+
@labels = args[:labels] if args.key?(:labels)
|
4296
|
+
@last_update_time = args[:last_update_time] if args.key?(:last_update_time)
|
4297
|
+
@last_updater = args[:last_updater] if args.key?(:last_updater)
|
4298
|
+
@name = args[:name] if args.key?(:name)
|
4299
|
+
end
|
4300
|
+
end
|
4301
|
+
|
4153
4302
|
# Search all IAM policies response.
|
4154
4303
|
class SearchAllIamPoliciesResponse
|
4155
4304
|
include Google::Apis::Core::Hashable
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module CloudassetV1
|
18
18
|
# Version of the google-apis-cloudasset_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.24.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.4.
|
22
|
+
GENERATOR_VERSION = "0.4.1"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20220110"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -448,6 +448,12 @@ module Google
|
|
448
448
|
include Google::Apis::Core::JsonObjectSupport
|
449
449
|
end
|
450
450
|
|
451
|
+
class ListSavedQueriesResponse
|
452
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
453
|
+
|
454
|
+
include Google::Apis::Core::JsonObjectSupport
|
455
|
+
end
|
456
|
+
|
451
457
|
class MoveAnalysis
|
452
458
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
453
459
|
|
@@ -514,6 +520,12 @@ module Google
|
|
514
520
|
include Google::Apis::Core::JsonObjectSupport
|
515
521
|
end
|
516
522
|
|
523
|
+
class QueryContent
|
524
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
525
|
+
|
526
|
+
include Google::Apis::Core::JsonObjectSupport
|
527
|
+
end
|
528
|
+
|
517
529
|
class RelatedAsset
|
518
530
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
519
531
|
|
@@ -562,6 +574,12 @@ module Google
|
|
562
574
|
include Google::Apis::Core::JsonObjectSupport
|
563
575
|
end
|
564
576
|
|
577
|
+
class SavedQuery
|
578
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
579
|
+
|
580
|
+
include Google::Apis::Core::JsonObjectSupport
|
581
|
+
end
|
582
|
+
|
565
583
|
class SearchAllIamPoliciesResponse
|
566
584
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
567
585
|
|
@@ -668,6 +686,7 @@ module Google
|
|
668
686
|
|
669
687
|
property :output_config, as: 'outputConfig', class: Google::Apis::CloudassetV1::IamPolicyAnalysisOutputConfig, decorator: Google::Apis::CloudassetV1::IamPolicyAnalysisOutputConfig::Representation
|
670
688
|
|
689
|
+
property :saved_analysis_query, as: 'savedAnalysisQuery'
|
671
690
|
end
|
672
691
|
end
|
673
692
|
|
@@ -1079,6 +1098,7 @@ module Google
|
|
1079
1098
|
property :etag, as: 'etag'
|
1080
1099
|
property :name, as: 'name'
|
1081
1100
|
property :parent, as: 'parent'
|
1101
|
+
collection :scopes, as: 'scopes'
|
1082
1102
|
property :title, as: 'title'
|
1083
1103
|
end
|
1084
1104
|
end
|
@@ -1383,6 +1403,15 @@ module Google
|
|
1383
1403
|
end
|
1384
1404
|
end
|
1385
1405
|
|
1406
|
+
class ListSavedQueriesResponse
|
1407
|
+
# @private
|
1408
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
1409
|
+
property :next_page_token, as: 'nextPageToken'
|
1410
|
+
collection :saved_queries, as: 'savedQueries', class: Google::Apis::CloudassetV1::SavedQuery, decorator: Google::Apis::CloudassetV1::SavedQuery::Representation
|
1411
|
+
|
1412
|
+
end
|
1413
|
+
end
|
1414
|
+
|
1386
1415
|
class MoveAnalysis
|
1387
1416
|
# @private
|
1388
1417
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -1492,6 +1521,14 @@ module Google
|
|
1492
1521
|
end
|
1493
1522
|
end
|
1494
1523
|
|
1524
|
+
class QueryContent
|
1525
|
+
# @private
|
1526
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
1527
|
+
property :iam_policy_analysis_query, as: 'iamPolicyAnalysisQuery', class: Google::Apis::CloudassetV1::IamPolicyAnalysisQuery, decorator: Google::Apis::CloudassetV1::IamPolicyAnalysisQuery::Representation
|
1528
|
+
|
1529
|
+
end
|
1530
|
+
end
|
1531
|
+
|
1495
1532
|
class RelatedAsset
|
1496
1533
|
# @private
|
1497
1534
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -1586,6 +1623,21 @@ module Google
|
|
1586
1623
|
end
|
1587
1624
|
end
|
1588
1625
|
|
1626
|
+
class SavedQuery
|
1627
|
+
# @private
|
1628
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
1629
|
+
property :content, as: 'content', class: Google::Apis::CloudassetV1::QueryContent, decorator: Google::Apis::CloudassetV1::QueryContent::Representation
|
1630
|
+
|
1631
|
+
property :create_time, as: 'createTime'
|
1632
|
+
property :creator, as: 'creator'
|
1633
|
+
property :description, as: 'description'
|
1634
|
+
hash :labels, as: 'labels'
|
1635
|
+
property :last_update_time, as: 'lastUpdateTime'
|
1636
|
+
property :last_updater, as: 'lastUpdater'
|
1637
|
+
property :name, as: 'name'
|
1638
|
+
end
|
1639
|
+
end
|
1640
|
+
|
1589
1641
|
class SearchAllIamPoliciesResponse
|
1590
1642
|
# @private
|
1591
1643
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -331,6 +331,206 @@ module Google
|
|
331
331
|
execute_or_queue_command(command, &block)
|
332
332
|
end
|
333
333
|
|
334
|
+
# Creates a saved query in a parent project/folder/organization.
|
335
|
+
# @param [String] parent
|
336
|
+
# Required. The name of the project/folder/organization where this saved_query
|
337
|
+
# should be created in. It can only be an organization number (such as "
|
338
|
+
# organizations/123"), a folder number (such as "folders/123"), a project ID (
|
339
|
+
# such as "projects/my-project-id")", or a project number (such as "projects/
|
340
|
+
# 12345").
|
341
|
+
# @param [Google::Apis::CloudassetV1::SavedQuery] saved_query_object
|
342
|
+
# @param [String] saved_query_id
|
343
|
+
# Required. The ID to use for the saved query, which must be unique in the
|
344
|
+
# specified parent. It will become the final component of the saved query's
|
345
|
+
# resource name. This value should be 4-63 characters, and valid characters are /
|
346
|
+
# a-z-/. Notice that this field is required in the saved query creation, and the
|
347
|
+
# `name` field of the `saved_query` will be ignored.
|
348
|
+
# @param [String] fields
|
349
|
+
# Selector specifying which fields to include in a partial response.
|
350
|
+
# @param [String] quota_user
|
351
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
352
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
353
|
+
# @param [Google::Apis::RequestOptions] options
|
354
|
+
# Request-specific options
|
355
|
+
#
|
356
|
+
# @yield [result, err] Result & error if block supplied
|
357
|
+
# @yieldparam result [Google::Apis::CloudassetV1::SavedQuery] parsed result object
|
358
|
+
# @yieldparam err [StandardError] error object if request failed
|
359
|
+
#
|
360
|
+
# @return [Google::Apis::CloudassetV1::SavedQuery]
|
361
|
+
#
|
362
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
363
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
364
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
365
|
+
def create_saved_query(parent, saved_query_object = nil, saved_query_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
366
|
+
command = make_simple_command(:post, 'v1/{+parent}/savedQueries', options)
|
367
|
+
command.request_representation = Google::Apis::CloudassetV1::SavedQuery::Representation
|
368
|
+
command.request_object = saved_query_object
|
369
|
+
command.response_representation = Google::Apis::CloudassetV1::SavedQuery::Representation
|
370
|
+
command.response_class = Google::Apis::CloudassetV1::SavedQuery
|
371
|
+
command.params['parent'] = parent unless parent.nil?
|
372
|
+
command.query['savedQueryId'] = saved_query_id unless saved_query_id.nil?
|
373
|
+
command.query['fields'] = fields unless fields.nil?
|
374
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
375
|
+
execute_or_queue_command(command, &block)
|
376
|
+
end
|
377
|
+
|
378
|
+
# Deletes a saved query.
|
379
|
+
# @param [String] name
|
380
|
+
# Required. The name of the saved query to delete. It must be in the format of: *
|
381
|
+
# projects/project_number/savedQueries/saved_query_id * folders/folder_number/
|
382
|
+
# savedQueries/saved_query_id * organizations/organization_number/savedQueries/
|
383
|
+
# saved_query_id
|
384
|
+
# @param [String] fields
|
385
|
+
# Selector specifying which fields to include in a partial response.
|
386
|
+
# @param [String] quota_user
|
387
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
388
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
389
|
+
# @param [Google::Apis::RequestOptions] options
|
390
|
+
# Request-specific options
|
391
|
+
#
|
392
|
+
# @yield [result, err] Result & error if block supplied
|
393
|
+
# @yieldparam result [Google::Apis::CloudassetV1::Empty] parsed result object
|
394
|
+
# @yieldparam err [StandardError] error object if request failed
|
395
|
+
#
|
396
|
+
# @return [Google::Apis::CloudassetV1::Empty]
|
397
|
+
#
|
398
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
399
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
400
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
401
|
+
def delete_saved_query(name, fields: nil, quota_user: nil, options: nil, &block)
|
402
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
403
|
+
command.response_representation = Google::Apis::CloudassetV1::Empty::Representation
|
404
|
+
command.response_class = Google::Apis::CloudassetV1::Empty
|
405
|
+
command.params['name'] = name unless name.nil?
|
406
|
+
command.query['fields'] = fields unless fields.nil?
|
407
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
408
|
+
execute_or_queue_command(command, &block)
|
409
|
+
end
|
410
|
+
|
411
|
+
# Gets details about a saved query.
|
412
|
+
# @param [String] name
|
413
|
+
# Required. The name of the saved query and it must be in the format of: *
|
414
|
+
# projects/project_number/savedQueries/saved_query_id * folders/folder_number/
|
415
|
+
# savedQueries/saved_query_id * organizations/organization_number/savedQueries/
|
416
|
+
# saved_query_id
|
417
|
+
# @param [String] fields
|
418
|
+
# Selector specifying which fields to include in a partial response.
|
419
|
+
# @param [String] quota_user
|
420
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
421
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
422
|
+
# @param [Google::Apis::RequestOptions] options
|
423
|
+
# Request-specific options
|
424
|
+
#
|
425
|
+
# @yield [result, err] Result & error if block supplied
|
426
|
+
# @yieldparam result [Google::Apis::CloudassetV1::SavedQuery] parsed result object
|
427
|
+
# @yieldparam err [StandardError] error object if request failed
|
428
|
+
#
|
429
|
+
# @return [Google::Apis::CloudassetV1::SavedQuery]
|
430
|
+
#
|
431
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
432
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
433
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
434
|
+
def get_saved_query(name, fields: nil, quota_user: nil, options: nil, &block)
|
435
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
436
|
+
command.response_representation = Google::Apis::CloudassetV1::SavedQuery::Representation
|
437
|
+
command.response_class = Google::Apis::CloudassetV1::SavedQuery
|
438
|
+
command.params['name'] = name unless name.nil?
|
439
|
+
command.query['fields'] = fields unless fields.nil?
|
440
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
441
|
+
execute_or_queue_command(command, &block)
|
442
|
+
end
|
443
|
+
|
444
|
+
# Lists all saved queries in a parent project/folder/organization.
|
445
|
+
# @param [String] parent
|
446
|
+
# Required. The parent project/folder/organization whose savedQueries are to be
|
447
|
+
# listed. It can only be using project/folder/organization number (such as "
|
448
|
+
# folders/12345")", or a project ID (such as "projects/my-project-id").
|
449
|
+
# @param [String] filter
|
450
|
+
# Optional. The expression to filter resources. The expression is a list of zero
|
451
|
+
# or more restrictions combined via logical operators `AND` and `OR`. When `AND`
|
452
|
+
# and `OR` are both used in the expression, parentheses must be appropriately
|
453
|
+
# used to group the combinations. The expression may also contain regular
|
454
|
+
# expressions. See https://google.aip.dev/160 for more information on the
|
455
|
+
# grammar.
|
456
|
+
# @param [Fixnum] page_size
|
457
|
+
# Optional. The maximum number of saved queries to return per page. The service
|
458
|
+
# may return fewer than this value. If unspecified, at most 50 will be returned.
|
459
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
460
|
+
# @param [String] page_token
|
461
|
+
# Optional. A page token, received from a previous `ListSavedQueries` call.
|
462
|
+
# Provide this to retrieve the subsequent page. When paginating, all other
|
463
|
+
# parameters provided to `ListSavedQueries` must match the call that provided
|
464
|
+
# the page token.
|
465
|
+
# @param [String] fields
|
466
|
+
# Selector specifying which fields to include in a partial response.
|
467
|
+
# @param [String] quota_user
|
468
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
469
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
470
|
+
# @param [Google::Apis::RequestOptions] options
|
471
|
+
# Request-specific options
|
472
|
+
#
|
473
|
+
# @yield [result, err] Result & error if block supplied
|
474
|
+
# @yieldparam result [Google::Apis::CloudassetV1::ListSavedQueriesResponse] parsed result object
|
475
|
+
# @yieldparam err [StandardError] error object if request failed
|
476
|
+
#
|
477
|
+
# @return [Google::Apis::CloudassetV1::ListSavedQueriesResponse]
|
478
|
+
#
|
479
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
480
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
481
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
482
|
+
def list_saved_queries(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
483
|
+
command = make_simple_command(:get, 'v1/{+parent}/savedQueries', options)
|
484
|
+
command.response_representation = Google::Apis::CloudassetV1::ListSavedQueriesResponse::Representation
|
485
|
+
command.response_class = Google::Apis::CloudassetV1::ListSavedQueriesResponse
|
486
|
+
command.params['parent'] = parent unless parent.nil?
|
487
|
+
command.query['filter'] = filter unless filter.nil?
|
488
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
489
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
490
|
+
command.query['fields'] = fields unless fields.nil?
|
491
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
492
|
+
execute_or_queue_command(command, &block)
|
493
|
+
end
|
494
|
+
|
495
|
+
# Updates a saved query.
|
496
|
+
# @param [String] name
|
497
|
+
# The resource name of the saved query. The format must be: * projects/
|
498
|
+
# project_number/savedQueries/saved_query_id * folders/folder_number/
|
499
|
+
# savedQueries/saved_query_id * organizations/organization_number/savedQueries/
|
500
|
+
# saved_query_id
|
501
|
+
# @param [Google::Apis::CloudassetV1::SavedQuery] saved_query_object
|
502
|
+
# @param [String] update_mask
|
503
|
+
# Required. The list of fields to update.
|
504
|
+
# @param [String] fields
|
505
|
+
# Selector specifying which fields to include in a partial response.
|
506
|
+
# @param [String] quota_user
|
507
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
508
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
509
|
+
# @param [Google::Apis::RequestOptions] options
|
510
|
+
# Request-specific options
|
511
|
+
#
|
512
|
+
# @yield [result, err] Result & error if block supplied
|
513
|
+
# @yieldparam result [Google::Apis::CloudassetV1::SavedQuery] parsed result object
|
514
|
+
# @yieldparam err [StandardError] error object if request failed
|
515
|
+
#
|
516
|
+
# @return [Google::Apis::CloudassetV1::SavedQuery]
|
517
|
+
#
|
518
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
519
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
520
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
521
|
+
def patch_saved_query(name, saved_query_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
522
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
523
|
+
command.request_representation = Google::Apis::CloudassetV1::SavedQuery::Representation
|
524
|
+
command.request_object = saved_query_object
|
525
|
+
command.response_representation = Google::Apis::CloudassetV1::SavedQuery::Representation
|
526
|
+
command.response_class = Google::Apis::CloudassetV1::SavedQuery
|
527
|
+
command.params['name'] = name unless name.nil?
|
528
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
529
|
+
command.query['fields'] = fields unless fields.nil?
|
530
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
531
|
+
execute_or_queue_command(command, &block)
|
532
|
+
end
|
533
|
+
|
334
534
|
# Analyzes IAM policies to answer which identities have what accesses on which
|
335
535
|
# resources.
|
336
536
|
# @param [String] scope
|
@@ -375,7 +575,11 @@ module Google
|
|
375
575
|
# service account SA has permission P to the GCP folder F, then user A
|
376
576
|
# potentially has access to the GCP folder F. And those advanced analysis
|
377
577
|
# results will be included in AnalyzeIamPolicyResponse.
|
378
|
-
# service_account_impersonation_analysis.
|
578
|
+
# service_account_impersonation_analysis. Only the following permissions are
|
579
|
+
# considered in this analysis: * `iam.serviceAccounts.actAs` * `iam.
|
580
|
+
# serviceAccounts.signBlob` * `iam.serviceAccounts.signJwt` * `iam.
|
581
|
+
# serviceAccounts.getAccessToken` * `iam.serviceAccounts.getOpenIdToken` * `iam.
|
582
|
+
# serviceAccounts.implicitDelegation` Default is false.
|
379
583
|
# @param [Boolean] analysis_query_options_expand_groups
|
380
584
|
# Optional. If true, the identities section of the result will expand any Google
|
381
585
|
# groups appearing in an IAM policy binding. If IamPolicyAnalysisQuery.
|
@@ -421,6 +625,18 @@ module Google
|
|
421
625
|
# you will get a response with partial result. Otherwise, your query's execution
|
422
626
|
# will continue until the RPC deadline. If it's not finished until then, you
|
423
627
|
# will get a DEADLINE_EXCEEDED error. Default is empty.
|
628
|
+
# @param [String] saved_analysis_query
|
629
|
+
# Optional. The name of a saved query, which must be in the format of: *
|
630
|
+
# projects/project_number/savedQueries/saved_query_id * folders/folder_number/
|
631
|
+
# savedQueries/saved_query_id * organizations/organization_number/savedQueries/
|
632
|
+
# saved_query_id If both `analysis_query` and `saved_analysis_query` are
|
633
|
+
# provided, they will be merged together with the `saved_analysis_query` as base
|
634
|
+
# and the `analysis_query` as overrides. For more details of the merge behavior,
|
635
|
+
# please refer to the [MergeFrom](https://developers.google.com/protocol-buffers/
|
636
|
+
# docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) page.
|
637
|
+
# Note that you cannot override primitive fields with default value, such as 0
|
638
|
+
# or empty string, etc., because we use proto3, which doesn't support field
|
639
|
+
# presence yet.
|
424
640
|
# @param [String] fields
|
425
641
|
# Selector specifying which fields to include in a partial response.
|
426
642
|
# @param [String] quota_user
|
@@ -438,7 +654,7 @@ module Google
|
|
438
654
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
439
655
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
440
656
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
441
|
-
def analyze_iam_policy(scope, analysis_query_access_selector_permissions: nil, analysis_query_access_selector_roles: nil, analysis_query_condition_context_access_time: nil, analysis_query_identity_selector_identity: nil, analysis_query_options_analyze_service_account_impersonation: nil, analysis_query_options_expand_groups: nil, analysis_query_options_expand_resources: nil, analysis_query_options_expand_roles: nil, analysis_query_options_output_group_edges: nil, analysis_query_options_output_resource_edges: nil, analysis_query_resource_selector_full_resource_name: nil, execution_timeout: nil, fields: nil, quota_user: nil, options: nil, &block)
|
657
|
+
def analyze_iam_policy(scope, analysis_query_access_selector_permissions: nil, analysis_query_access_selector_roles: nil, analysis_query_condition_context_access_time: nil, analysis_query_identity_selector_identity: nil, analysis_query_options_analyze_service_account_impersonation: nil, analysis_query_options_expand_groups: nil, analysis_query_options_expand_resources: nil, analysis_query_options_expand_roles: nil, analysis_query_options_output_group_edges: nil, analysis_query_options_output_resource_edges: nil, analysis_query_resource_selector_full_resource_name: nil, execution_timeout: nil, saved_analysis_query: nil, fields: nil, quota_user: nil, options: nil, &block)
|
442
658
|
command = make_simple_command(:get, 'v1/{+scope}:analyzeIamPolicy', options)
|
443
659
|
command.response_representation = Google::Apis::CloudassetV1::AnalyzeIamPolicyResponse::Representation
|
444
660
|
command.response_class = Google::Apis::CloudassetV1::AnalyzeIamPolicyResponse
|
@@ -455,6 +671,7 @@ module Google
|
|
455
671
|
command.query['analysisQuery.options.outputResourceEdges'] = analysis_query_options_output_resource_edges unless analysis_query_options_output_resource_edges.nil?
|
456
672
|
command.query['analysisQuery.resourceSelector.fullResourceName'] = analysis_query_resource_selector_full_resource_name unless analysis_query_resource_selector_full_resource_name.nil?
|
457
673
|
command.query['executionTimeout'] = execution_timeout unless execution_timeout.nil?
|
674
|
+
command.query['savedAnalysisQuery'] = saved_analysis_query unless saved_analysis_query.nil?
|
458
675
|
command.query['fields'] = fields unless fields.nil?
|
459
676
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
460
677
|
execute_or_queue_command(command, &block)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-cloudasset_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
@@ -58,7 +58,7 @@ licenses:
|
|
58
58
|
metadata:
|
59
59
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
60
60
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-cloudasset_v1/CHANGELOG.md
|
61
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-cloudasset_v1/v0.
|
61
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-cloudasset_v1/v0.24.0
|
62
62
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-cloudasset_v1
|
63
63
|
post_install_message:
|
64
64
|
rdoc_options: []
|
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
requirements: []
|
78
|
-
rubygems_version: 3.
|
78
|
+
rubygems_version: 3.3.5
|
79
79
|
signing_key:
|
80
80
|
specification_version: 4
|
81
81
|
summary: Simple REST client for Cloud Asset API V1
|