google-apis-cloudasset_v1 0.26.0 → 0.29.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2179b0b4c1d8c2397fa87c06482ba446fca76f31bd5d4752ebaa6fed4dbbc17
4
- data.tar.gz: '097bbf7bcbe6fa226a609cd2113caa034f02d467239101390b66c5b642bb7086'
3
+ metadata.gz: 6394ca318b1b5457c36b094414951ad8fc39e0cf4d3f1ab971471a6d2e19ea40
4
+ data.tar.gz: 3d2c9839dac9afaf6c11ea449c886dd3ae0ccb839bb4e8122dea5b029ea174d8
5
5
  SHA512:
6
- metadata.gz: a0855f2e508f5ed4e1a65d88df1154661b4dbc67516fdcc0b2eeb8cc2aa87b346008ef9f8deb29291309361007d506979ec0a4400b5a037f5fb892ceb7191f14
7
- data.tar.gz: dea7b4f5b49c54081181c8ac001e3685a2ceca0194b81c31654f4bdf85850285eb4b5154d013ebdfceb614b8ac24e2b09262a1aa07df968e47889bfb12ed2523
6
+ metadata.gz: 05b1640b88ffefd6e3dae9c91f7a7a013bbbbb466ebe5869a56f9b1486a2b1bb70f1c2a44988b185ba34bbd1280c3c7fcf01f8fce362d31c4eb6057ec7aa79b9
7
+ data.tar.gz: b55e4e54d6a849826ef5cbf98806b627ef60fe05f7abbb3d10d0fc5ec85abe9c119c6ff9126d6b969dc5fc0bbc7e772857949e252c44e08a505c10861d0f4f66
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Release history for google-apis-cloudasset_v1
2
2
 
3
+ ### v0.29.0 (2022-03-02)
4
+
5
+ * Regenerated from discovery document revision 20220225
6
+
7
+ ### v0.28.0 (2022-02-16)
8
+
9
+ * Regenerated from discovery document revision 20220211
10
+
11
+ ### v0.27.0 (2022-02-03)
12
+
13
+ * Regenerated from discovery document revision 20220131
14
+
3
15
  ### v0.26.0 (2022-01-26)
4
16
 
5
17
  * Regenerated from discovery document revision 20220121
@@ -449,13 +449,38 @@ module Google
449
449
  end
450
450
  end
451
451
 
452
+ # A response message for AssetService.BatchGetEffectiveIamPolicies.
453
+ class BatchGetEffectiveIamPoliciesResponse
454
+ include Google::Apis::Core::Hashable
455
+
456
+ # The effective policies for a batch of resources. Note that the results order
457
+ # is the same as the order of BatchGetEffectiveIamPoliciesRequest.names. When a
458
+ # resource does not have any effective IAM policies, its corresponding
459
+ # policy_result will contain empty EffectiveIamPolicy.policies.
460
+ # Corresponds to the JSON property `policyResults`
461
+ # @return [Array<Google::Apis::CloudassetV1::EffectiveIamPolicy>]
462
+ attr_accessor :policy_results
463
+
464
+ def initialize(**args)
465
+ update!(**args)
466
+ end
467
+
468
+ # Update properties of this object
469
+ def update!(**args)
470
+ @policy_results = args[:policy_results] if args.key?(:policy_results)
471
+ end
472
+ end
473
+
452
474
  # A BigQuery destination for exporting assets to.
453
475
  class BigQueryDestination
454
476
  include Google::Apis::Core::Hashable
455
477
 
456
478
  # Required. The BigQuery dataset in format "projects/projectId/datasets/
457
479
  # datasetId", to which the snapshot result should be exported. If this dataset
458
- # does not exist, the export call returns an INVALID_ARGUMENT error.
480
+ # does not exist, the export call returns an INVALID_ARGUMENT error. Setting the
481
+ # `contentType` for `exportAssets` determines the [schema](/asset-inventory/docs/
482
+ # exporting-to-bigquery#bigquery-schema) of the BigQuery table. Setting `
483
+ # separateTablesPerAssetType` to `TRUE` also influences the schema.
459
484
  # Corresponds to the JSON property `dataset`
460
485
  # @return [String]
461
486
  attr_accessor :dataset
@@ -664,10 +689,10 @@ module Google
664
689
  # day and time zone are either specified elsewhere or are insignificant. The
665
690
  # date is relative to the Gregorian Calendar. This can represent one of the
666
691
  # following: * A full date, with non-zero year, month, and day values * A month
667
- # and day value, with a zero year, such as an anniversary * A year on its own,
668
- # with zero month and day values * A year and month value, with a zero day, such
669
- # as a credit card expiration date Related types are google.type.TimeOfDay and `
670
- # google.protobuf.Timestamp`.
692
+ # and day, with a zero year (e.g., an anniversary) * A year on its own, with a
693
+ # zero month and a zero day * A year and month, with a zero day (e.g., a credit
694
+ # card expiration date) Related types: * google.type.TimeOfDay * google.type.
695
+ # DateTime * google.protobuf.Timestamp
671
696
  class Date
672
697
  include Google::Apis::Core::Hashable
673
698
 
@@ -701,6 +726,40 @@ module Google
701
726
  end
702
727
  end
703
728
 
729
+ # The effective IAM policies on one resource.
730
+ class EffectiveIamPolicy
731
+ include Google::Apis::Core::Hashable
732
+
733
+ # The [full_resource_name] (https://cloud.google.com/asset-inventory/docs/
734
+ # resource-name-format) for which the policies are computed. This is one of the
735
+ # BatchGetEffectiveIamPoliciesRequest.names the caller provides in the request.
736
+ # Corresponds to the JSON property `fullResourceName`
737
+ # @return [String]
738
+ attr_accessor :full_resource_name
739
+
740
+ # The effective policies for the full_resource_name. These policies include the
741
+ # policy set on the full_resource_name and those set on its parents and
742
+ # ancestors up to the BatchGetEffectiveIamPoliciesRequest.scope. Note that these
743
+ # policies are not filtered according to the resource type of the
744
+ # full_resource_name. These policies are hierarchically ordered by PolicyInfo.
745
+ # attached_resource starting from full_resource_name itself to its parents and
746
+ # ancestors, such that policies[i]'s PolicyInfo.attached_resource is the child
747
+ # of policies[i+1]'s PolicyInfo.attached_resource, if policies[i+1] exists.
748
+ # Corresponds to the JSON property `policies`
749
+ # @return [Array<Google::Apis::CloudassetV1::PolicyInfo>]
750
+ attr_accessor :policies
751
+
752
+ def initialize(**args)
753
+ update!(**args)
754
+ end
755
+
756
+ # Update properties of this object
757
+ def update!(**args)
758
+ @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
759
+ @policies = args[:policies] if args.key?(:policies)
760
+ end
761
+ end
762
+
704
763
  # A generic empty message that you can re-use to avoid defining duplicated empty
705
764
  # messages in your APIs. A typical example is to use it as the request or the
706
765
  # response type of an API method. For instance: service Foo ` rpc Bar(google.
@@ -877,8 +936,8 @@ module Google
877
936
  # either or both of asset_names and asset_types. Only asset updates matching
878
937
  # specified asset_names or asset_types are exported to the feed. Example: `//
879
938
  # compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
880
- # . See [Resource Names](https://cloud.google.com/apis/design/resource_names#
881
- # full_resource_name) for more info.
939
+ # . For a list of the full names for supported asset types, see [Resource name
940
+ # format](/asset-inventory/docs/resource-name-format).
882
941
  # Corresponds to the JSON property `assetNames`
883
942
  # @return [Array<String>]
884
943
  attr_accessor :asset_names
@@ -886,8 +945,8 @@ module Google
886
945
  # A list of types of the assets to receive updates. You must specify either or
887
946
  # both of asset_names and asset_types. Only asset updates matching specified
888
947
  # asset_names or asset_types are exported to the feed. Example: `"compute.
889
- # googleapis.com/Disk"` See [this topic](https://cloud.google.com/asset-
890
- # inventory/docs/supported-asset-types) for a list of all supported asset types.
948
+ # googleapis.com/Disk"` For a list of all supported asset types, see [Supported
949
+ # asset types](/asset-inventory/docs/supported-asset-types).
891
950
  # Corresponds to the JSON property `assetTypes`
892
951
  # @return [Array<String>]
893
952
  attr_accessor :asset_types
@@ -3711,6 +3770,57 @@ module Google
3711
3770
  end
3712
3771
  end
3713
3772
 
3773
+ # The IAM policy and its attached resource.
3774
+ class PolicyInfo
3775
+ include Google::Apis::Core::Hashable
3776
+
3777
+ # The full resource name the policy is directly attached to.
3778
+ # Corresponds to the JSON property `attachedResource`
3779
+ # @return [String]
3780
+ attr_accessor :attached_resource
3781
+
3782
+ # An Identity and Access Management (IAM) policy, which specifies access
3783
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
3784
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
3785
+ # Principals can be user accounts, service accounts, Google groups, and domains (
3786
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
3787
+ # an IAM predefined role or a user-created custom role. For some types of Google
3788
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
3789
+ # logical expression that allows access to a resource only if the expression
3790
+ # evaluates to `true`. A condition can add constraints based on attributes of
3791
+ # the request, the resource, or both. To learn which resources support
3792
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
3793
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
3794
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
3795
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
3796
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
3797
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
3798
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
3799
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
3800
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
3801
+ # bindings: - members: - user:mike@example.com - group:admins@example.com -
3802
+ # domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
3803
+ # role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
3804
+ # com role: roles/resourcemanager.organizationViewer condition: title: expirable
3805
+ # access description: Does not grant access after Sep 2020 expression: request.
3806
+ # time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
3807
+ # a description of IAM and its features, see the [IAM documentation](https://
3808
+ # cloud.google.com/iam/docs/).
3809
+ # Corresponds to the JSON property `policy`
3810
+ # @return [Google::Apis::CloudassetV1::Policy]
3811
+ attr_accessor :policy
3812
+
3813
+ def initialize(**args)
3814
+ update!(**args)
3815
+ end
3816
+
3817
+ # Update properties of this object
3818
+ def update!(**args)
3819
+ @attached_resource = args[:attached_resource] if args.key?(:attached_resource)
3820
+ @policy = args[:policy] if args.key?(:policy)
3821
+ end
3822
+ end
3823
+
3714
3824
  # A Pub/Sub destination.
3715
3825
  class PubsubDestination
3716
3826
  include Google::Apis::Core::Hashable
@@ -4681,10 +4791,10 @@ module Google
4681
4791
  # day and time zone are either specified elsewhere or are insignificant. The
4682
4792
  # date is relative to the Gregorian Calendar. This can represent one of the
4683
4793
  # following: * A full date, with non-zero year, month, and day values * A month
4684
- # and day value, with a zero year, such as an anniversary * A year on its own,
4685
- # with zero month and day values * A year and month value, with a zero day, such
4686
- # as a credit card expiration date Related types are google.type.TimeOfDay and `
4687
- # google.protobuf.Timestamp`.
4794
+ # and day, with a zero year (e.g., an anniversary) * A year on its own, with a
4795
+ # zero month and a zero day * A year and month, with a zero day (e.g., a credit
4796
+ # card expiration date) Related types: * google.type.TimeOfDay * google.type.
4797
+ # DateTime * google.protobuf.Timestamp
4688
4798
  # Corresponds to the JSON property `installDate`
4689
4799
  # @return [Google::Apis::CloudassetV1::Date]
4690
4800
  attr_accessor :install_date
@@ -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.26.0"
19
+ GEM_VERSION = "0.29.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.4.1"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20220121"
25
+ REVISION = "20220225"
26
26
  end
27
27
  end
28
28
  end
@@ -88,6 +88,12 @@ module Google
88
88
  include Google::Apis::Core::JsonObjectSupport
89
89
  end
90
90
 
91
+ class BatchGetEffectiveIamPoliciesResponse
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
91
97
  class BigQueryDestination
92
98
  class Representation < Google::Apis::Core::JsonRepresentation; end
93
99
 
@@ -124,6 +130,12 @@ module Google
124
130
  include Google::Apis::Core::JsonObjectSupport
125
131
  end
126
132
 
133
+ class EffectiveIamPolicy
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
127
139
  class Empty
128
140
  class Representation < Google::Apis::Core::JsonRepresentation; end
129
141
 
@@ -514,6 +526,12 @@ module Google
514
526
  include Google::Apis::Core::JsonObjectSupport
515
527
  end
516
528
 
529
+ class PolicyInfo
530
+ class Representation < Google::Apis::Core::JsonRepresentation; end
531
+
532
+ include Google::Apis::Core::JsonObjectSupport
533
+ end
534
+
517
535
  class PubsubDestination
518
536
  class Representation < Google::Apis::Core::JsonRepresentation; end
519
537
 
@@ -775,6 +793,14 @@ module Google
775
793
  end
776
794
  end
777
795
 
796
+ class BatchGetEffectiveIamPoliciesResponse
797
+ # @private
798
+ class Representation < Google::Apis::Core::JsonRepresentation
799
+ collection :policy_results, as: 'policyResults', class: Google::Apis::CloudassetV1::EffectiveIamPolicy, decorator: Google::Apis::CloudassetV1::EffectiveIamPolicy::Representation
800
+
801
+ end
802
+ end
803
+
778
804
  class BigQueryDestination
779
805
  # @private
780
806
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -829,6 +855,15 @@ module Google
829
855
  end
830
856
  end
831
857
 
858
+ class EffectiveIamPolicy
859
+ # @private
860
+ class Representation < Google::Apis::Core::JsonRepresentation
861
+ property :full_resource_name, as: 'fullResourceName'
862
+ collection :policies, as: 'policies', class: Google::Apis::CloudassetV1::PolicyInfo, decorator: Google::Apis::CloudassetV1::PolicyInfo::Representation
863
+
864
+ end
865
+ end
866
+
832
867
  class Empty
833
868
  # @private
834
869
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1514,6 +1549,15 @@ module Google
1514
1549
  end
1515
1550
  end
1516
1551
 
1552
+ class PolicyInfo
1553
+ # @private
1554
+ class Representation < Google::Apis::Core::JsonRepresentation
1555
+ property :attached_resource, as: 'attachedResource'
1556
+ property :policy, as: 'policy', class: Google::Apis::CloudassetV1::Policy, decorator: Google::Apis::CloudassetV1::Policy::Representation
1557
+
1558
+ end
1559
+ end
1560
+
1517
1561
  class PubsubDestination
1518
1562
  # @private
1519
1563
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -52,11 +52,11 @@ module Google
52
52
  # Lists assets with time and resource types and returns paged results in
53
53
  # response.
54
54
  # @param [String] parent
55
- # Required. Name of the organization or project the assets belong to. Format: "
56
- # organizations/[organization-number]" (such as "organizations/123"), "projects/[
57
- # project-id]" (such as "projects/my-project-id"), "projects/[project-number]" (
58
- # such as "projects/12345"), or "folders/[folder-number]" (such as "folders/
59
- # 12345").
55
+ # Required. Name of the organization, folder, or project the assets belong to.
56
+ # Format: "organizations/[organization-number]" (such as "organizations/123"), "
57
+ # projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-
58
+ # number]" (such as "projects/12345"), or "folders/[folder-number]" (such as "
59
+ # folders/12345").
60
60
  # @param [Array<String>, String] asset_types
61
61
  # A list of asset types to take a snapshot for. For example: "compute.googleapis.
62
62
  # com/Disk". Regular expression is also supported. For example: * "compute.
@@ -131,6 +131,50 @@ module Google
131
131
  execute_or_queue_command(command, &block)
132
132
  end
133
133
 
134
+ # Gets effective IAM policies for a batch of resources.
135
+ # @param [String] scope
136
+ # Required. Only IAM policies on or below the scope will be returned. This can
137
+ # only be an organization number (such as "organizations/123"), a folder number (
138
+ # such as "folders/123"), a project ID (such as "projects/my-project-id"), or a
139
+ # project number (such as "projects/12345"). To know how to get organization id,
140
+ # visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-
141
+ # organization#retrieving_your_organization_id). To know how to get folder or
142
+ # project id, visit [here ](https://cloud.google.com/resource-manager/docs/
143
+ # creating-managing-folders#viewing_or_listing_folders_and_projects).
144
+ # @param [Array<String>, String] names
145
+ # Required. The names refer to the [full_resource_names] (https://cloud.google.
146
+ # com/asset-inventory/docs/resource-name-format) of [searchable asset types](
147
+ # https://cloud.google.com/asset-inventory/docs/supported-asset-types#
148
+ # searchable_asset_types). A maximum of 20 resources' effective policies can be
149
+ # retrieved in a batch.
150
+ # @param [String] fields
151
+ # Selector specifying which fields to include in a partial response.
152
+ # @param [String] quota_user
153
+ # Available to use for quota purposes for server-side applications. Can be any
154
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
155
+ # @param [Google::Apis::RequestOptions] options
156
+ # Request-specific options
157
+ #
158
+ # @yield [result, err] Result & error if block supplied
159
+ # @yieldparam result [Google::Apis::CloudassetV1::BatchGetEffectiveIamPoliciesResponse] parsed result object
160
+ # @yieldparam err [StandardError] error object if request failed
161
+ #
162
+ # @return [Google::Apis::CloudassetV1::BatchGetEffectiveIamPoliciesResponse]
163
+ #
164
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
165
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
166
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
167
+ def batch_effective_iam_policy_get(scope, names: nil, fields: nil, quota_user: nil, options: nil, &block)
168
+ command = make_simple_command(:get, 'v1/{+scope}/effectiveIamPolicies:batchGet', options)
169
+ command.response_representation = Google::Apis::CloudassetV1::BatchGetEffectiveIamPoliciesResponse::Representation
170
+ command.response_class = Google::Apis::CloudassetV1::BatchGetEffectiveIamPoliciesResponse
171
+ command.params['scope'] = scope unless scope.nil?
172
+ command.query['names'] = names unless names.nil?
173
+ command.query['fields'] = fields unless fields.nil?
174
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
175
+ execute_or_queue_command(command, &block)
176
+ end
177
+
134
178
  # Creates a feed in a parent project/folder/organization to listen to its asset
135
179
  # updates.
136
180
  # @param [String] parent
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.26.0
4
+ version: 0.29.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: 2022-01-31 00:00:00.000000000 Z
11
+ date: 2022-03-07 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.26.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-cloudasset_v1/v0.29.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: []