google-apis-cloudasset_v1 0.4.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d32094b60417d5b0be65ca6ede4506106897899799b74c9738301f578f577a59
4
- data.tar.gz: 501c92c0fb7a189714022498d11270df22d6a526c6dd29866cfaf3969a312c97
3
+ metadata.gz: 558a06e37bce99cf51a7c6fbc13888f2ba23212ae707fea12ee49cc5e310badf
4
+ data.tar.gz: 2986b2615d0b7508a6ba66b826f4c9aeb59a6bf166b7eec0048aefa88d0e6067
5
5
  SHA512:
6
- metadata.gz: 981c1be1d5940d37ae20449aa5d9816fc1cf32067469f18b232372a8693c0cf861ae6d2fc74f33977c557cc370ddcbc7f0716a21f6d729635dcf20755f188c12
7
- data.tar.gz: e8e54fc05a9f67ec270325f5d536053f083f42ac048c55747649b32dc2cee3c6da84758f20f0ff08d3d6a0bed1b367d0b90dd905b43e5801755cd55d43b67dbd
6
+ metadata.gz: abb0f7f0990887b3590047b883f96ef50193e11eda30f302699550460924f0424d642598d43c98e013f80528575815ebe57d858a2dd3bcc0023b61102e54cbb9
7
+ data.tar.gz: 5c5a2bd69c6dcec6567b68b6cfc5e0305e0b41ab2ce137e749ef3e8dd80b4703438b1c394ba0ae5fd8a9ec5defb72ffed58ff41c51a2a2db43a69735af43a2ba
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Release history for google-apis-cloudasset_v1
2
2
 
3
+ ### v0.9.0 (2021-06-16)
4
+
5
+ * Regenerated from discovery document revision 20210611
6
+ * Regenerated using generator version 0.3.0
7
+
8
+ ### v0.8.0 (2021-05-20)
9
+
10
+ * Regenerated from discovery document revision 20210518
11
+ * Unspecified changes
12
+
13
+ ### v0.7.0 (2021-05-12)
14
+
15
+ * Regenerated from discovery document revision 20210507
16
+
17
+ ### v0.6.0 (2021-03-31)
18
+
19
+ * Regenerated from discovery document revision 20210326
20
+
21
+ ### v0.5.0 (2021-03-09)
22
+
23
+ * Regenerated from discovery document revision 20210305
24
+ * Regenerated using generator version 0.2.0
25
+
3
26
  ### v0.4.0 (2021-03-04)
4
27
 
5
28
  * Regenerated from discovery document revision 20210226
@@ -29,7 +29,7 @@ module Google
29
29
  # This is NOT the gem version.
30
30
  VERSION = 'V1'
31
31
 
32
- # View and manage your data across Google Cloud Platform services
32
+ # See, edit, configure, and delete your Google Cloud Platform data
33
33
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
34
  end
35
35
  end
@@ -75,6 +75,19 @@ module Google
75
75
  end
76
76
  end
77
77
 
78
+ # A response message for AssetService.AnalyzeIamPolicyLongrunning.
79
+ class AnalyzeIamPolicyLongrunningResponse
80
+ include Google::Apis::Core::Hashable
81
+
82
+ def initialize(**args)
83
+ update!(**args)
84
+ end
85
+
86
+ # Update properties of this object
87
+ def update!(**args)
88
+ end
89
+ end
90
+
78
91
  # A response message for AssetService.AnalyzeIamPolicy.
79
92
  class AnalyzeIamPolicyResponse
80
93
  include Google::Apis::Core::Hashable
@@ -110,12 +123,33 @@ module Google
110
123
  end
111
124
  end
112
125
 
126
+ # The response message for resource move analysis.
127
+ class AnalyzeMoveResponse
128
+ include Google::Apis::Core::Hashable
129
+
130
+ # The list of analyses returned from performing the intended resource move
131
+ # analysis. The analysis is grouped by different Cloud services.
132
+ # Corresponds to the JSON property `moveAnalysis`
133
+ # @return [Array<Google::Apis::CloudassetV1::MoveAnalysis>]
134
+ attr_accessor :move_analysis
135
+
136
+ def initialize(**args)
137
+ update!(**args)
138
+ end
139
+
140
+ # Update properties of this object
141
+ def update!(**args)
142
+ @move_analysis = args[:move_analysis] if args.key?(:move_analysis)
143
+ end
144
+ end
145
+
113
146
  # An asset in Google Cloud. An asset can be any resource in the Google Cloud [
114
147
  # resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-
115
148
  # platform-resource-hierarchy), a resource outside the Google Cloud resource
116
149
  # hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy
117
- # (e.g. Cloud IAM policy). See [Supported asset types](https://cloud.google.com/
118
- # asset-inventory/docs/supported-asset-types) for more information.
150
+ # (e.g. Cloud IAM policy), or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP
151
+ # relationship). See [Supported asset types](https://cloud.google.com/asset-
152
+ # inventory/docs/supported-asset-types) for more information.
119
153
  class Asset
120
154
  include Google::Apis::Core::Hashable
121
155
 
@@ -480,6 +514,46 @@ module Google
480
514
  end
481
515
  end
482
516
 
517
+ # The IAM conditions context.
518
+ class ConditionContext
519
+ include Google::Apis::Core::Hashable
520
+
521
+ # The hypothetical access timestamp to evaluate IAM conditions. Note that this
522
+ # value must not be earlier than the current time; otherwise, an
523
+ # INVALID_ARGUMENT error will be returned.
524
+ # Corresponds to the JSON property `accessTime`
525
+ # @return [String]
526
+ attr_accessor :access_time
527
+
528
+ def initialize(**args)
529
+ update!(**args)
530
+ end
531
+
532
+ # Update properties of this object
533
+ def update!(**args)
534
+ @access_time = args[:access_time] if args.key?(:access_time)
535
+ end
536
+ end
537
+
538
+ # The Condition evaluation.
539
+ class ConditionEvaluation
540
+ include Google::Apis::Core::Hashable
541
+
542
+ # The evaluation result.
543
+ # Corresponds to the JSON property `evaluationValue`
544
+ # @return [String]
545
+ attr_accessor :evaluation_value
546
+
547
+ def initialize(**args)
548
+ update!(**args)
549
+ end
550
+
551
+ # Update properties of this object
552
+ def update!(**args)
553
+ @evaluation_value = args[:evaluation_value] if args.key?(:evaluation_value)
554
+ end
555
+ end
556
+
483
557
  # Create asset feed request.
484
558
  class CreateFeedRequest
485
559
  include Google::Apis::Core::Hashable
@@ -844,6 +918,11 @@ module Google
844
918
  # @return [Array<Google::Apis::CloudassetV1::GoogleCloudAssetV1Access>]
845
919
  attr_accessor :accesses
846
920
 
921
+ # The Condition evaluation.
922
+ # Corresponds to the JSON property `conditionEvaluation`
923
+ # @return [Google::Apis::CloudassetV1::ConditionEvaluation]
924
+ attr_accessor :condition_evaluation
925
+
847
926
  # Resource edges of the graph starting from the policy attached resource to any
848
927
  # descendant resources. The Edge.source_node contains the full resource name of
849
928
  # a parent resource and Edge.target_node contains the full resource name of a
@@ -867,6 +946,7 @@ module Google
867
946
  # Update properties of this object
868
947
  def update!(**args)
869
948
  @accesses = args[:accesses] if args.key?(:accesses)
949
+ @condition_evaluation = args[:condition_evaluation] if args.key?(:condition_evaluation)
870
950
  @resource_edges = args[:resource_edges] if args.key?(:resource_edges)
871
951
  @resources = args[:resources] if args.key?(:resources)
872
952
  end
@@ -1987,9 +2067,9 @@ module Google
1987
2067
 
1988
2068
  # Defines the conditions under which an EgressPolicy matches a request.
1989
2069
  # Conditions based on information about the source of the request. Note that if
1990
- # the destination of the request is protected by a ServicePerimeter, then that
1991
- # ServicePerimeter must have an IngressPolicy which allows access in order for
1992
- # this request to succeed.
2070
+ # the destination of the request is also protected by a ServicePerimeter, then
2071
+ # that ServicePerimeter must have an IngressPolicy which allows access in order
2072
+ # for this request to succeed.
1993
2073
  class GoogleIdentityAccesscontextmanagerV1EgressFrom
1994
2074
  include Google::Apis::Core::Hashable
1995
2075
 
@@ -2035,9 +2115,9 @@ module Google
2035
2115
 
2036
2116
  # Defines the conditions under which an EgressPolicy matches a request.
2037
2117
  # Conditions based on information about the source of the request. Note that if
2038
- # the destination of the request is protected by a ServicePerimeter, then that
2039
- # ServicePerimeter must have an IngressPolicy which allows access in order for
2040
- # this request to succeed.
2118
+ # the destination of the request is also protected by a ServicePerimeter, then
2119
+ # that ServicePerimeter must have an IngressPolicy which allows access in order
2120
+ # for this request to succeed.
2041
2121
  # Corresponds to the JSON property `egressFrom`
2042
2122
  # @return [Google::Apis::CloudassetV1::GoogleIdentityAccesscontextmanagerV1EgressFrom]
2043
2123
  attr_accessor :egress_from
@@ -2045,8 +2125,10 @@ module Google
2045
2125
  # Defines the conditions under which an EgressPolicy matches a request.
2046
2126
  # Conditions are based on information about the ApiOperation intended to be
2047
2127
  # performed on the `resources` specified. Note that if the destination of the
2048
- # request is protected by a ServicePerimeter, then that ServicePerimeter must
2049
- # have an IngressPolicy which allows access in order for this request to succeed.
2128
+ # request is also protected by a ServicePerimeter, then that ServicePerimeter
2129
+ # must have an IngressPolicy which allows access in order for this request to
2130
+ # succeed. The request must match `operations` AND `resources` fields in order
2131
+ # to be allowed egress out of the perimeter.
2050
2132
  # Corresponds to the JSON property `egressTo`
2051
2133
  # @return [Google::Apis::CloudassetV1::GoogleIdentityAccesscontextmanagerV1EgressTo]
2052
2134
  attr_accessor :egress_to
@@ -2065,21 +2147,25 @@ module Google
2065
2147
  # Defines the conditions under which an EgressPolicy matches a request.
2066
2148
  # Conditions are based on information about the ApiOperation intended to be
2067
2149
  # performed on the `resources` specified. Note that if the destination of the
2068
- # request is protected by a ServicePerimeter, then that ServicePerimeter must
2069
- # have an IngressPolicy which allows access in order for this request to succeed.
2150
+ # request is also protected by a ServicePerimeter, then that ServicePerimeter
2151
+ # must have an IngressPolicy which allows access in order for this request to
2152
+ # succeed. The request must match `operations` AND `resources` fields in order
2153
+ # to be allowed egress out of the perimeter.
2070
2154
  class GoogleIdentityAccesscontextmanagerV1EgressTo
2071
2155
  include Google::Apis::Core::Hashable
2072
2156
 
2073
- # A list of ApiOperations that this egress rule applies to. A request matches if
2074
- # it contains an operation/service in this list.
2157
+ # A list of ApiOperations allowed to be performed by the sources specified in
2158
+ # the corresponding EgressFrom. A request matches if it uses an operation/
2159
+ # service in this list.
2075
2160
  # Corresponds to the JSON property `operations`
2076
2161
  # @return [Array<Google::Apis::CloudassetV1::GoogleIdentityAccesscontextmanagerV1ApiOperation>]
2077
2162
  attr_accessor :operations
2078
2163
 
2079
- # A list of resources, currently only projects in the form `projects/`, that
2080
- # match this to stanza. A request matches if it contains a resource in this list.
2081
- # If `*` is specified for resources, then this EgressTo rule will authorize
2082
- # access to all resources outside the perimeter.
2164
+ # A list of resources, currently only projects in the form `projects/`, that are
2165
+ # allowed to be accessed by sources defined in the corresponding EgressFrom. A
2166
+ # request matches if it contains a resource in this list. If `*` is specified
2167
+ # for `resources`, then this EgressTo rule will authorize access to all
2168
+ # resources outside the perimeter.
2083
2169
  # Corresponds to the JSON property `resources`
2084
2170
  # @return [Array<String>]
2085
2171
  attr_accessor :resources
@@ -2096,7 +2182,9 @@ module Google
2096
2182
  end
2097
2183
 
2098
2184
  # Defines the conditions under which an IngressPolicy matches a request.
2099
- # Conditions are based on information about the source of the request.
2185
+ # Conditions are based on information about the source of the request. The
2186
+ # request must satisfy what is defined in `sources` AND identity related fields
2187
+ # in order to match.
2100
2188
  class GoogleIdentityAccesscontextmanagerV1IngressFrom
2101
2189
  include Google::Apis::Core::Hashable
2102
2190
 
@@ -2145,14 +2233,17 @@ module Google
2145
2233
  include Google::Apis::Core::Hashable
2146
2234
 
2147
2235
  # Defines the conditions under which an IngressPolicy matches a request.
2148
- # Conditions are based on information about the source of the request.
2236
+ # Conditions are based on information about the source of the request. The
2237
+ # request must satisfy what is defined in `sources` AND identity related fields
2238
+ # in order to match.
2149
2239
  # Corresponds to the JSON property `ingressFrom`
2150
2240
  # @return [Google::Apis::CloudassetV1::GoogleIdentityAccesscontextmanagerV1IngressFrom]
2151
2241
  attr_accessor :ingress_from
2152
2242
 
2153
2243
  # Defines the conditions under which an IngressPolicy matches a request.
2154
2244
  # Conditions are based on information about the ApiOperation intended to be
2155
- # performed on the destination of the request.
2245
+ # performed on the target resource of the request. The request must satisfy what
2246
+ # is defined in `operations` AND `resources` in order to match.
2156
2247
  # Corresponds to the JSON property `ingressTo`
2157
2248
  # @return [Google::Apis::CloudassetV1::GoogleIdentityAccesscontextmanagerV1IngressTo]
2158
2249
  attr_accessor :ingress_to
@@ -2178,7 +2269,8 @@ module Google
2178
2269
  # cause an error. If no AccessLevel names are listed, resources within the
2179
2270
  # perimeter can only be accessed via Google Cloud calls with request origins
2180
2271
  # within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`
2181
- # . If `*` is specified, then all IngressSources will be allowed.
2272
+ # . If a single `*` is specified for `access_level`, then all IngressSources
2273
+ # will be allowed.
2182
2274
  # Corresponds to the JSON property `accessLevel`
2183
2275
  # @return [String]
2184
2276
  attr_accessor :access_level
@@ -2206,22 +2298,21 @@ module Google
2206
2298
 
2207
2299
  # Defines the conditions under which an IngressPolicy matches a request.
2208
2300
  # Conditions are based on information about the ApiOperation intended to be
2209
- # performed on the destination of the request.
2301
+ # performed on the target resource of the request. The request must satisfy what
2302
+ # is defined in `operations` AND `resources` in order to match.
2210
2303
  class GoogleIdentityAccesscontextmanagerV1IngressTo
2211
2304
  include Google::Apis::Core::Hashable
2212
2305
 
2213
- # A list of ApiOperations the sources specified in corresponding IngressFrom are
2214
- # allowed to perform in this ServicePerimeter.
2306
+ # A list of ApiOperations allowed to be performed by the sources specified in
2307
+ # corresponding IngressFrom in this ServicePerimeter.
2215
2308
  # Corresponds to the JSON property `operations`
2216
2309
  # @return [Array<Google::Apis::CloudassetV1::GoogleIdentityAccesscontextmanagerV1ApiOperation>]
2217
2310
  attr_accessor :operations
2218
2311
 
2219
2312
  # A list of resources, currently only projects in the form `projects/`,
2220
2313
  # protected by this ServicePerimeter that are allowed to be accessed by sources
2221
- # defined in the corresponding IngressFrom. A request matches if it contains a
2222
- # resource in this list. If `*` is specified for resources, then this IngressTo
2223
- # rule will authorize access to all resources inside the perimeter, provided
2224
- # that the request also matches the `operations` field.
2314
+ # defined in the corresponding IngressFrom. If a single `*` is specified, then
2315
+ # access to all resources inside the perimeter are allowed.
2225
2316
  # Corresponds to the JSON property `resources`
2226
2317
  # @return [Array<String>]
2227
2318
  attr_accessor :resources
@@ -2552,6 +2643,11 @@ module Google
2552
2643
  # @return [Google::Apis::CloudassetV1::AccessSelector]
2553
2644
  attr_accessor :access_selector
2554
2645
 
2646
+ # The IAM conditions context.
2647
+ # Corresponds to the JSON property `conditionContext`
2648
+ # @return [Google::Apis::CloudassetV1::ConditionContext]
2649
+ attr_accessor :condition_context
2650
+
2555
2651
  # Specifies an identity for which to determine resource access, based on roles
2556
2652
  # assigned either directly to them or to the groups they belong to, directly or
2557
2653
  # indirectly.
@@ -2591,6 +2687,7 @@ module Google
2591
2687
  # Update properties of this object
2592
2688
  def update!(**args)
2593
2689
  @access_selector = args[:access_selector] if args.key?(:access_selector)
2690
+ @condition_context = args[:condition_context] if args.key?(:condition_context)
2594
2691
  @identity_selector = args[:identity_selector] if args.key?(:identity_selector)
2595
2692
  @options = args[:options] if args.key?(:options)
2596
2693
  @resource_selector = args[:resource_selector] if args.key?(:resource_selector)
@@ -2679,11 +2776,36 @@ module Google
2679
2776
  class IamPolicySearchResult
2680
2777
  include Google::Apis::Core::Hashable
2681
2778
 
2779
+ # The type of the resource associated with this IAM policy. Example: `compute.
2780
+ # googleapis.com/Disk`. To search against the `asset_type`: * specify the `
2781
+ # asset_types` field in your search request.
2782
+ # Corresponds to the JSON property `assetType`
2783
+ # @return [String]
2784
+ attr_accessor :asset_type
2785
+
2682
2786
  # Explanation about the IAM policy search result.
2683
2787
  # Corresponds to the JSON property `explanation`
2684
2788
  # @return [Google::Apis::CloudassetV1::Explanation]
2685
2789
  attr_accessor :explanation
2686
2790
 
2791
+ # The folder(s) that the IAM policy belongs to, in the form of folders/`
2792
+ # FOLDER_NUMBER`. This field is available when the IAM policy belongs to one or
2793
+ # more folders. To search against `folders`: * use a field query. Example: `
2794
+ # folders:(123 OR 456)` * use a free text query. Example: `123` * specify the `
2795
+ # scope` field as this folder in your search request.
2796
+ # Corresponds to the JSON property `folders`
2797
+ # @return [Array<String>]
2798
+ attr_accessor :folders
2799
+
2800
+ # The organization that the IAM policy belongs to, in the form of organizations/`
2801
+ # ORGANIZATION_NUMBER`. This field is available when the IAM policy belongs to
2802
+ # an organization. To search against `organization`: * use a field query.
2803
+ # Example: `organization:123` * use a free text query. Example: `123` * specify
2804
+ # the `scope` field as this organization in your search request.
2805
+ # Corresponds to the JSON property `organization`
2806
+ # @return [String]
2807
+ attr_accessor :organization
2808
+
2687
2809
  # An Identity and Access Management (IAM) policy, which specifies access
2688
2810
  # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
2689
2811
  # A `binding` binds one or more `members` to a single `role`. Members can be
@@ -2741,7 +2863,10 @@ module Google
2741
2863
 
2742
2864
  # Update properties of this object
2743
2865
  def update!(**args)
2866
+ @asset_type = args[:asset_type] if args.key?(:asset_type)
2744
2867
  @explanation = args[:explanation] if args.key?(:explanation)
2868
+ @folders = args[:folders] if args.key?(:folders)
2869
+ @organization = args[:organization] if args.key?(:organization)
2745
2870
  @policy = args[:policy] if args.key?(:policy)
2746
2871
  @project = args[:project] if args.key?(:project)
2747
2872
  @resource = args[:resource] if args.key?(:resource)
@@ -2856,6 +2981,39 @@ module Google
2856
2981
  end
2857
2982
  end
2858
2983
 
2984
+ # ListAssets response.
2985
+ class ListAssetsResponse
2986
+ include Google::Apis::Core::Hashable
2987
+
2988
+ # Assets.
2989
+ # Corresponds to the JSON property `assets`
2990
+ # @return [Array<Google::Apis::CloudassetV1::Asset>]
2991
+ attr_accessor :assets
2992
+
2993
+ # Token to retrieve the next page of results. It expires 72 hours after the page
2994
+ # token for the first page is generated. Set to empty if there are no remaining
2995
+ # results.
2996
+ # Corresponds to the JSON property `nextPageToken`
2997
+ # @return [String]
2998
+ attr_accessor :next_page_token
2999
+
3000
+ # Time the snapshot was taken.
3001
+ # Corresponds to the JSON property `readTime`
3002
+ # @return [String]
3003
+ attr_accessor :read_time
3004
+
3005
+ def initialize(**args)
3006
+ update!(**args)
3007
+ end
3008
+
3009
+ # Update properties of this object
3010
+ def update!(**args)
3011
+ @assets = args[:assets] if args.key?(:assets)
3012
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
3013
+ @read_time = args[:read_time] if args.key?(:read_time)
3014
+ end
3015
+ end
3016
+
2859
3017
  #
2860
3018
  class ListFeedsResponse
2861
3019
  include Google::Apis::Core::Hashable
@@ -2875,6 +3033,90 @@ module Google
2875
3033
  end
2876
3034
  end
2877
3035
 
3036
+ # A message to group the analysis information.
3037
+ class MoveAnalysis
3038
+ include Google::Apis::Core::Hashable
3039
+
3040
+ # An analysis result including blockers and warnings.
3041
+ # Corresponds to the JSON property `analysis`
3042
+ # @return [Google::Apis::CloudassetV1::MoveAnalysisResult]
3043
+ attr_accessor :analysis
3044
+
3045
+ # The user friendly display name of the analysis. E.g. IAM, Organization Policy
3046
+ # etc.
3047
+ # Corresponds to the JSON property `displayName`
3048
+ # @return [String]
3049
+ attr_accessor :display_name
3050
+
3051
+ # The `Status` type defines a logical error model that is suitable for different
3052
+ # programming environments, including REST APIs and RPC APIs. It is used by [
3053
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
3054
+ # data: error code, error message, and error details. You can find out more
3055
+ # about this error model and how to work with it in the [API Design Guide](https:
3056
+ # //cloud.google.com/apis/design/errors).
3057
+ # Corresponds to the JSON property `error`
3058
+ # @return [Google::Apis::CloudassetV1::Status]
3059
+ attr_accessor :error
3060
+
3061
+ def initialize(**args)
3062
+ update!(**args)
3063
+ end
3064
+
3065
+ # Update properties of this object
3066
+ def update!(**args)
3067
+ @analysis = args[:analysis] if args.key?(:analysis)
3068
+ @display_name = args[:display_name] if args.key?(:display_name)
3069
+ @error = args[:error] if args.key?(:error)
3070
+ end
3071
+ end
3072
+
3073
+ # An analysis result including blockers and warnings.
3074
+ class MoveAnalysisResult
3075
+ include Google::Apis::Core::Hashable
3076
+
3077
+ # Blocking information that would prevent the target resource from moving to the
3078
+ # specified destination at runtime.
3079
+ # Corresponds to the JSON property `blockers`
3080
+ # @return [Array<Google::Apis::CloudassetV1::MoveImpact>]
3081
+ attr_accessor :blockers
3082
+
3083
+ # Warning information indicating that moving the target resource to the
3084
+ # specified destination might be unsafe. This can include important policy
3085
+ # information and configuration changes, but will not block moves at runtime.
3086
+ # Corresponds to the JSON property `warnings`
3087
+ # @return [Array<Google::Apis::CloudassetV1::MoveImpact>]
3088
+ attr_accessor :warnings
3089
+
3090
+ def initialize(**args)
3091
+ update!(**args)
3092
+ end
3093
+
3094
+ # Update properties of this object
3095
+ def update!(**args)
3096
+ @blockers = args[:blockers] if args.key?(:blockers)
3097
+ @warnings = args[:warnings] if args.key?(:warnings)
3098
+ end
3099
+ end
3100
+
3101
+ # A message to group impacts of moving the target resource.
3102
+ class MoveImpact
3103
+ include Google::Apis::Core::Hashable
3104
+
3105
+ # User friendly impact detail in a free form message.
3106
+ # Corresponds to the JSON property `detail`
3107
+ # @return [String]
3108
+ attr_accessor :detail
3109
+
3110
+ def initialize(**args)
3111
+ update!(**args)
3112
+ end
3113
+
3114
+ # Update properties of this object
3115
+ def update!(**args)
3116
+ @detail = args[:detail] if args.key?(:detail)
3117
+ end
3118
+ end
3119
+
2878
3120
  # This resource represents a long-running operation that is the result of a
2879
3121
  # network API call.
2880
3122
  class Operation
@@ -3366,8 +3608,10 @@ module Google
3366
3608
  # The create timestamp of this resource, at which the resource was created. The
3367
3609
  # granularity is in seconds. Timestamp.nanos will always be 0. This field is
3368
3610
  # available only when the resource's proto contains it. To search against `
3369
- # create_time`: * use a field query (value in seconds). Example: `createTime >=
3370
- # 1594294238`
3611
+ # create_time`: * use a field query. - value in seconds since unix epoch.
3612
+ # Example: `createTime > 1609459200` - value in date string. Example: `
3613
+ # createTime > 2021-01-01` - value in date-time string (must be quoted). Example:
3614
+ # `createTime > "2021-01-01T00:00:00"`
3371
3615
  # Corresponds to the JSON property `createTime`
3372
3616
  # @return [String]
3373
3617
  attr_accessor :create_time
@@ -3466,7 +3710,10 @@ module Google
3466
3710
  # @return [String]
3467
3711
  attr_accessor :parent_asset_type
3468
3712
 
3469
- # The full resource name of this resource's parent, if it has one.
3713
+ # The full resource name of this resource's parent, if it has one. To search
3714
+ # against the `parent_full_resource_name`: * use a field query. Example: `
3715
+ # parentFullResourceName:"project-name"` * use a free text query. Example: `
3716
+ # project-name`
3470
3717
  # Corresponds to the JSON property `parentFullResourceName`
3471
3718
  # @return [String]
3472
3719
  attr_accessor :parent_full_resource_name
@@ -3500,8 +3747,10 @@ module Google
3500
3747
  # The last update timestamp of this resource, at which the resource was last
3501
3748
  # modified or deleted. The granularity is in seconds. Timestamp.nanos will
3502
3749
  # always be 0. This field is available only when the resource's proto contains
3503
- # it. To search against `update_time`: * use a field query (value in seconds).
3504
- # Example: `updateTime < 1594294238`
3750
+ # it. To search against `update_time`: * use a field query. - value in seconds
3751
+ # since unix epoch. Example: `updateTime < 1609459200` - value in date string.
3752
+ # Example: `updateTime < 2021-01-01` - value in date-time string (must be quoted)
3753
+ # . Example: `updateTime < "2021-01-01T00:00:00"`
3505
3754
  # Corresponds to the JSON property `updateTime`
3506
3755
  # @return [String]
3507
3756
  attr_accessor :update_time
@@ -3731,8 +3980,9 @@ module Google
3731
3980
  # resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-
3732
3981
  # platform-resource-hierarchy), a resource outside the Google Cloud resource
3733
3982
  # hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy
3734
- # (e.g. Cloud IAM policy). See [Supported asset types](https://cloud.google.com/
3735
- # asset-inventory/docs/supported-asset-types) for more information.
3983
+ # (e.g. Cloud IAM policy), or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP
3984
+ # relationship). See [Supported asset types](https://cloud.google.com/asset-
3985
+ # inventory/docs/supported-asset-types) for more information.
3736
3986
  # Corresponds to the JSON property `asset`
3737
3987
  # @return [Google::Apis::CloudassetV1::Asset]
3738
3988
  attr_accessor :asset
@@ -3747,8 +3997,9 @@ module Google
3747
3997
  # resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-
3748
3998
  # platform-resource-hierarchy), a resource outside the Google Cloud resource
3749
3999
  # hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy
3750
- # (e.g. Cloud IAM policy). See [Supported asset types](https://cloud.google.com/
3751
- # asset-inventory/docs/supported-asset-types) for more information.
4000
+ # (e.g. Cloud IAM policy), or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP
4001
+ # relationship). See [Supported asset types](https://cloud.google.com/asset-
4002
+ # inventory/docs/supported-asset-types) for more information.
3752
4003
  # Corresponds to the JSON property `priorAsset`
3753
4004
  # @return [Google::Apis::CloudassetV1::Asset]
3754
4005
  attr_accessor :prior_asset
@@ -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.4.0"
19
+ GEM_VERSION = "0.9.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.1.2"
22
+ GENERATOR_VERSION = "0.3.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210226"
25
+ REVISION = "20210611"
26
26
  end
27
27
  end
28
28
  end
@@ -34,12 +34,24 @@ module Google
34
34
  include Google::Apis::Core::JsonObjectSupport
35
35
  end
36
36
 
37
+ class AnalyzeIamPolicyLongrunningResponse
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
37
43
  class AnalyzeIamPolicyResponse
38
44
  class Representation < Google::Apis::Core::JsonRepresentation; end
39
45
 
40
46
  include Google::Apis::Core::JsonObjectSupport
41
47
  end
42
48
 
49
+ class AnalyzeMoveResponse
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
43
55
  class Asset
44
56
  class Representation < Google::Apis::Core::JsonRepresentation; end
45
57
 
@@ -76,6 +88,18 @@ module Google
76
88
  include Google::Apis::Core::JsonObjectSupport
77
89
  end
78
90
 
91
+ class ConditionContext
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class ConditionEvaluation
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
79
103
  class CreateFeedRequest
80
104
  class Representation < Google::Apis::Core::JsonRepresentation; end
81
105
 
@@ -394,12 +418,36 @@ module Google
394
418
  include Google::Apis::Core::JsonObjectSupport
395
419
  end
396
420
 
421
+ class ListAssetsResponse
422
+ class Representation < Google::Apis::Core::JsonRepresentation; end
423
+
424
+ include Google::Apis::Core::JsonObjectSupport
425
+ end
426
+
397
427
  class ListFeedsResponse
398
428
  class Representation < Google::Apis::Core::JsonRepresentation; end
399
429
 
400
430
  include Google::Apis::Core::JsonObjectSupport
401
431
  end
402
432
 
433
+ class MoveAnalysis
434
+ class Representation < Google::Apis::Core::JsonRepresentation; end
435
+
436
+ include Google::Apis::Core::JsonObjectSupport
437
+ end
438
+
439
+ class MoveAnalysisResult
440
+ class Representation < Google::Apis::Core::JsonRepresentation; end
441
+
442
+ include Google::Apis::Core::JsonObjectSupport
443
+ end
444
+
445
+ class MoveImpact
446
+ class Representation < Google::Apis::Core::JsonRepresentation; end
447
+
448
+ include Google::Apis::Core::JsonObjectSupport
449
+ end
450
+
403
451
  class Operation
404
452
  class Representation < Google::Apis::Core::JsonRepresentation; end
405
453
 
@@ -556,6 +604,12 @@ module Google
556
604
  end
557
605
  end
558
606
 
607
+ class AnalyzeIamPolicyLongrunningResponse
608
+ # @private
609
+ class Representation < Google::Apis::Core::JsonRepresentation
610
+ end
611
+ end
612
+
559
613
  class AnalyzeIamPolicyResponse
560
614
  # @private
561
615
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -567,6 +621,14 @@ module Google
567
621
  end
568
622
  end
569
623
 
624
+ class AnalyzeMoveResponse
625
+ # @private
626
+ class Representation < Google::Apis::Core::JsonRepresentation
627
+ collection :move_analysis, as: 'moveAnalysis', class: Google::Apis::CloudassetV1::MoveAnalysis, decorator: Google::Apis::CloudassetV1::MoveAnalysis::Representation
628
+
629
+ end
630
+ end
631
+
570
632
  class Asset
571
633
  # @private
572
634
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -638,6 +700,20 @@ module Google
638
700
  end
639
701
  end
640
702
 
703
+ class ConditionContext
704
+ # @private
705
+ class Representation < Google::Apis::Core::JsonRepresentation
706
+ property :access_time, as: 'accessTime'
707
+ end
708
+ end
709
+
710
+ class ConditionEvaluation
711
+ # @private
712
+ class Representation < Google::Apis::Core::JsonRepresentation
713
+ property :evaluation_value, as: 'evaluationValue'
714
+ end
715
+ end
716
+
641
717
  class CreateFeedRequest
642
718
  # @private
643
719
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -727,6 +803,8 @@ module Google
727
803
  class Representation < Google::Apis::Core::JsonRepresentation
728
804
  collection :accesses, as: 'accesses', class: Google::Apis::CloudassetV1::GoogleCloudAssetV1Access, decorator: Google::Apis::CloudassetV1::GoogleCloudAssetV1Access::Representation
729
805
 
806
+ property :condition_evaluation, as: 'conditionEvaluation', class: Google::Apis::CloudassetV1::ConditionEvaluation, decorator: Google::Apis::CloudassetV1::ConditionEvaluation::Representation
807
+
730
808
  collection :resource_edges, as: 'resourceEdges', class: Google::Apis::CloudassetV1::GoogleCloudAssetV1Edge, decorator: Google::Apis::CloudassetV1::GoogleCloudAssetV1Edge::Representation
731
809
 
732
810
  collection :resources, as: 'resources', class: Google::Apis::CloudassetV1::GoogleCloudAssetV1Resource, decorator: Google::Apis::CloudassetV1::GoogleCloudAssetV1Resource::Representation
@@ -1115,6 +1193,8 @@ module Google
1115
1193
  class Representation < Google::Apis::Core::JsonRepresentation
1116
1194
  property :access_selector, as: 'accessSelector', class: Google::Apis::CloudassetV1::AccessSelector, decorator: Google::Apis::CloudassetV1::AccessSelector::Representation
1117
1195
 
1196
+ property :condition_context, as: 'conditionContext', class: Google::Apis::CloudassetV1::ConditionContext, decorator: Google::Apis::CloudassetV1::ConditionContext::Representation
1197
+
1118
1198
  property :identity_selector, as: 'identitySelector', class: Google::Apis::CloudassetV1::IdentitySelector, decorator: Google::Apis::CloudassetV1::IdentitySelector::Representation
1119
1199
 
1120
1200
  property :options, as: 'options', class: Google::Apis::CloudassetV1::Options, decorator: Google::Apis::CloudassetV1::Options::Representation
@@ -1150,8 +1230,11 @@ module Google
1150
1230
  class IamPolicySearchResult
1151
1231
  # @private
1152
1232
  class Representation < Google::Apis::Core::JsonRepresentation
1233
+ property :asset_type, as: 'assetType'
1153
1234
  property :explanation, as: 'explanation', class: Google::Apis::CloudassetV1::Explanation, decorator: Google::Apis::CloudassetV1::Explanation::Representation
1154
1235
 
1236
+ collection :folders, as: 'folders'
1237
+ property :organization, as: 'organization'
1155
1238
  property :policy, as: 'policy', class: Google::Apis::CloudassetV1::Policy, decorator: Google::Apis::CloudassetV1::Policy::Representation
1156
1239
 
1157
1240
  property :project, as: 'project'
@@ -1191,6 +1274,16 @@ module Google
1191
1274
  end
1192
1275
  end
1193
1276
 
1277
+ class ListAssetsResponse
1278
+ # @private
1279
+ class Representation < Google::Apis::Core::JsonRepresentation
1280
+ collection :assets, as: 'assets', class: Google::Apis::CloudassetV1::Asset, decorator: Google::Apis::CloudassetV1::Asset::Representation
1281
+
1282
+ property :next_page_token, as: 'nextPageToken'
1283
+ property :read_time, as: 'readTime'
1284
+ end
1285
+ end
1286
+
1194
1287
  class ListFeedsResponse
1195
1288
  # @private
1196
1289
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1199,6 +1292,34 @@ module Google
1199
1292
  end
1200
1293
  end
1201
1294
 
1295
+ class MoveAnalysis
1296
+ # @private
1297
+ class Representation < Google::Apis::Core::JsonRepresentation
1298
+ property :analysis, as: 'analysis', class: Google::Apis::CloudassetV1::MoveAnalysisResult, decorator: Google::Apis::CloudassetV1::MoveAnalysisResult::Representation
1299
+
1300
+ property :display_name, as: 'displayName'
1301
+ property :error, as: 'error', class: Google::Apis::CloudassetV1::Status, decorator: Google::Apis::CloudassetV1::Status::Representation
1302
+
1303
+ end
1304
+ end
1305
+
1306
+ class MoveAnalysisResult
1307
+ # @private
1308
+ class Representation < Google::Apis::Core::JsonRepresentation
1309
+ collection :blockers, as: 'blockers', class: Google::Apis::CloudassetV1::MoveImpact, decorator: Google::Apis::CloudassetV1::MoveImpact::Representation
1310
+
1311
+ collection :warnings, as: 'warnings', class: Google::Apis::CloudassetV1::MoveImpact, decorator: Google::Apis::CloudassetV1::MoveImpact::Representation
1312
+
1313
+ end
1314
+ end
1315
+
1316
+ class MoveImpact
1317
+ # @private
1318
+ class Representation < Google::Apis::Core::JsonRepresentation
1319
+ property :detail, as: 'detail'
1320
+ end
1321
+ end
1322
+
1202
1323
  class Operation
1203
1324
  # @private
1204
1325
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -49,6 +49,73 @@ module Google
49
49
  @batch_path = 'batch'
50
50
  end
51
51
 
52
+ # Lists assets with time and resource types and returns paged results in
53
+ # response.
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"), or "projects/[project-number]"
58
+ # (such as "projects/12345").
59
+ # @param [Array<String>, String] asset_types
60
+ # A list of asset types to take a snapshot for. For example: "compute.googleapis.
61
+ # com/Disk". Regular expression is also supported. For example: * "compute.
62
+ # googleapis.com.*" snapshots resources whose asset type starts with "compute.
63
+ # googleapis.com". * ".*Instance" snapshots resources whose asset type ends with
64
+ # "Instance". * ".*Instance.*" snapshots resources whose asset type contains "
65
+ # Instance". See [RE2](https://github.com/google/re2/wiki/Syntax) for all
66
+ # supported regular expression syntax. If the regular expression does not match
67
+ # any supported asset type, an INVALID_ARGUMENT error will be returned. If
68
+ # specified, only matching assets will be returned, otherwise, it will snapshot
69
+ # all asset types. See [Introduction to Cloud Asset Inventory](https://cloud.
70
+ # google.com/asset-inventory/docs/overview) for all supported asset types.
71
+ # @param [String] content_type
72
+ # Asset content type. If not specified, no content but the asset name will be
73
+ # returned.
74
+ # @param [Fixnum] page_size
75
+ # The maximum number of assets to be returned in a single response. Default is
76
+ # 100, minimum is 1, and maximum is 1000.
77
+ # @param [String] page_token
78
+ # The `next_page_token` returned from the previous `ListAssetsResponse`, or
79
+ # unspecified for the first `ListAssetsRequest`. It is a continuation of a prior
80
+ # `ListAssets` call, and the API should return the next page of assets.
81
+ # @param [String] read_time
82
+ # Timestamp to take an asset snapshot. This can only be set to a timestamp
83
+ # between the current time and the current time minus 35 days (inclusive). If
84
+ # not specified, the current time will be used. Due to delays in resource data
85
+ # collection and indexing, there is a volatile window during which running the
86
+ # same query may get different results.
87
+ # @param [String] fields
88
+ # Selector specifying which fields to include in a partial response.
89
+ # @param [String] quota_user
90
+ # Available to use for quota purposes for server-side applications. Can be any
91
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
92
+ # @param [Google::Apis::RequestOptions] options
93
+ # Request-specific options
94
+ #
95
+ # @yield [result, err] Result & error if block supplied
96
+ # @yieldparam result [Google::Apis::CloudassetV1::ListAssetsResponse] parsed result object
97
+ # @yieldparam err [StandardError] error object if request failed
98
+ #
99
+ # @return [Google::Apis::CloudassetV1::ListAssetsResponse]
100
+ #
101
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
102
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
103
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
104
+ def list_assets(parent, asset_types: nil, content_type: nil, page_size: nil, page_token: nil, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
105
+ command = make_simple_command(:get, 'v1/{+parent}/assets', options)
106
+ command.response_representation = Google::Apis::CloudassetV1::ListAssetsResponse::Representation
107
+ command.response_class = Google::Apis::CloudassetV1::ListAssetsResponse
108
+ command.params['parent'] = parent unless parent.nil?
109
+ command.query['assetTypes'] = asset_types unless asset_types.nil?
110
+ command.query['contentType'] = content_type unless content_type.nil?
111
+ command.query['pageSize'] = page_size unless page_size.nil?
112
+ command.query['pageToken'] = page_token unless page_token.nil?
113
+ command.query['readTime'] = read_time unless read_time.nil?
114
+ command.query['fields'] = fields unless fields.nil?
115
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
116
+ execute_or_queue_command(command, &block)
117
+ end
118
+
52
119
  # Creates a feed in a parent project/folder/organization to listen to its asset
53
120
  # updates.
54
121
  # @param [String] parent
@@ -266,6 +333,10 @@ module Google
266
333
  # Optional. The permissions to appear in result.
267
334
  # @param [Array<String>, String] analysis_query_access_selector_roles
268
335
  # Optional. The roles to appear in result.
336
+ # @param [String] analysis_query_condition_context_access_time
337
+ # The hypothetical access timestamp to evaluate IAM conditions. Note that this
338
+ # value must not be earlier than the current time; otherwise, an
339
+ # INVALID_ARGUMENT error will be returned.
269
340
  # @param [String] analysis_query_identity_selector_identity
270
341
  # Required. The identity appear in the form of members in [IAM policy binding](
271
342
  # https://cloud.google.com/iam/reference/rest/v1/Binding). The examples of
@@ -352,13 +423,14 @@ module Google
352
423
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
353
424
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
354
425
  # @raise [Google::Apis::AuthorizationError] Authorization is required
355
- def analyze_iam_policy(scope, analysis_query_access_selector_permissions: nil, analysis_query_access_selector_roles: 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)
426
+ 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)
356
427
  command = make_simple_command(:get, 'v1/{+scope}:analyzeIamPolicy', options)
357
428
  command.response_representation = Google::Apis::CloudassetV1::AnalyzeIamPolicyResponse::Representation
358
429
  command.response_class = Google::Apis::CloudassetV1::AnalyzeIamPolicyResponse
359
430
  command.params['scope'] = scope unless scope.nil?
360
431
  command.query['analysisQuery.accessSelector.permissions'] = analysis_query_access_selector_permissions unless analysis_query_access_selector_permissions.nil?
361
432
  command.query['analysisQuery.accessSelector.roles'] = analysis_query_access_selector_roles unless analysis_query_access_selector_roles.nil?
433
+ command.query['analysisQuery.conditionContext.accessTime'] = analysis_query_condition_context_access_time unless analysis_query_condition_context_access_time.nil?
362
434
  command.query['analysisQuery.identitySelector.identity'] = analysis_query_identity_selector_identity unless analysis_query_identity_selector_identity.nil?
363
435
  command.query['analysisQuery.options.analyzeServiceAccountImpersonation'] = analysis_query_options_analyze_service_account_impersonation unless analysis_query_options_analyze_service_account_impersonation.nil?
364
436
  command.query['analysisQuery.options.expandGroups'] = analysis_query_options_expand_groups unless analysis_query_options_expand_groups.nil?
@@ -421,6 +493,53 @@ module Google
421
493
  execute_or_queue_command(command, &block)
422
494
  end
423
495
 
496
+ # Analyze moving a resource to a specified destination without kicking off the
497
+ # actual move. The analysis is best effort depending on the user's permissions
498
+ # of viewing different hierarchical policies and configurations. The policies
499
+ # and configuration are subject to change before the actual resource migration
500
+ # takes place.
501
+ # @param [String] resource
502
+ # Required. Name of the resource to perform the analysis against. Only GCP
503
+ # Project are supported as of today. Hence, this can only be Project ID (such as
504
+ # "projects/my-project-id") or a Project Number (such as "projects/12345").
505
+ # @param [String] destination_parent
506
+ # Required. Name of the GCP Folder or Organization to reparent the target
507
+ # resource. The analysis will be performed against hypothetically moving the
508
+ # resource to this specified desitination parent. This can only be a Folder
509
+ # number (such as "folders/123") or an Organization number (such as "
510
+ # organizations/123").
511
+ # @param [String] view
512
+ # Analysis view indicating what information should be included in the analysis
513
+ # response. If unspecified, the default view is FULL.
514
+ # @param [String] fields
515
+ # Selector specifying which fields to include in a partial response.
516
+ # @param [String] quota_user
517
+ # Available to use for quota purposes for server-side applications. Can be any
518
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
519
+ # @param [Google::Apis::RequestOptions] options
520
+ # Request-specific options
521
+ #
522
+ # @yield [result, err] Result & error if block supplied
523
+ # @yieldparam result [Google::Apis::CloudassetV1::AnalyzeMoveResponse] parsed result object
524
+ # @yieldparam err [StandardError] error object if request failed
525
+ #
526
+ # @return [Google::Apis::CloudassetV1::AnalyzeMoveResponse]
527
+ #
528
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
529
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
530
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
531
+ def analyze_move(resource, destination_parent: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
532
+ command = make_simple_command(:get, 'v1/{+resource}:analyzeMove', options)
533
+ command.response_representation = Google::Apis::CloudassetV1::AnalyzeMoveResponse::Representation
534
+ command.response_class = Google::Apis::CloudassetV1::AnalyzeMoveResponse
535
+ command.params['resource'] = resource unless resource.nil?
536
+ command.query['destinationParent'] = destination_parent unless destination_parent.nil?
537
+ command.query['view'] = view unless view.nil?
538
+ command.query['fields'] = fields unless fields.nil?
539
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
540
+ execute_or_queue_command(command, &block)
541
+ end
542
+
424
543
  # Batch gets the update history of assets that overlap a time window. For
425
544
  # IAM_POLICY content, this API outputs history when the asset and its attached
426
545
  # IAM POLICY both exist. This can create gaps in the output history. Otherwise,
@@ -531,6 +650,26 @@ module Google
531
650
  # bar") * projects/`PROJECT_NUMBER` (e.g., "projects/12345678") * folders/`
532
651
  # FOLDER_NUMBER` (e.g., "folders/1234567") * organizations/`ORGANIZATION_NUMBER`
533
652
  # (e.g., "organizations/123456")
653
+ # @param [Array<String>, String] asset_types
654
+ # Optional. A list of asset types that the IAM policies are attached to. If
655
+ # empty, it will search the IAM policies that are attached to all the [
656
+ # searchable asset types](https://cloud.google.com/asset-inventory/docs/
657
+ # supported-asset-types#searchable_asset_types). Regular expressions are also
658
+ # supported. For example: * "compute.googleapis.com.*" snapshots IAM policies
659
+ # attached to asset type starts with "compute.googleapis.com". * ".*Instance"
660
+ # snapshots IAM policies attached to asset type ends with "Instance". * ".*
661
+ # Instance.*" snapshots IAM policies attached to asset type contains "Instance".
662
+ # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular
663
+ # expression syntax. If the regular expression does not match any supported
664
+ # asset type, an INVALID_ARGUMENT error will be returned.
665
+ # @param [String] order_by
666
+ # Optional. A comma-separated list of fields specifying the sorting order of the
667
+ # results. The default order is ascending. Add " DESC" after the field name to
668
+ # indicate descending order. Redundant space characters are ignored. Example: "
669
+ # assetType DESC, resource". Only singular primitive fields in the response are
670
+ # sortable: * resource * assetType * project All the other fields such as
671
+ # repeated fields (e.g., `folders`) and non-primitive fields (e.g., `policy`)
672
+ # are not supported.
534
673
  # @param [Fixnum] page_size
535
674
  # Optional. The page size for search result pagination. Page size is capped at
536
675
  # 500 even if a larger value is given. If set to zero, server will pick an
@@ -569,7 +708,10 @@ module Google
569
708
  # IAM policy bindings that contain "Important" as a word in any of the
570
709
  # searchable fields (except for the included permissions). * `resource:(
571
710
  # instance1 OR instance2) policy:amy` to find IAM policy bindings that are set
572
- # on resources "instance1" or "instance2" and also specify user "amy".
711
+ # on resources "instance1" or "instance2" and also specify user "amy". * `roles:
712
+ # roles/compute.admin` to find IAM policy bindings that specify the Compute
713
+ # Admin role. * `memberTypes:user` to find IAM policy bindings that contain the "
714
+ # user" member type.
573
715
  # @param [String] fields
574
716
  # Selector specifying which fields to include in a partial response.
575
717
  # @param [String] quota_user
@@ -587,11 +729,13 @@ module Google
587
729
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
588
730
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
589
731
  # @raise [Google::Apis::AuthorizationError] Authorization is required
590
- def search_all_iam_policies(scope, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
732
+ def search_all_iam_policies(scope, asset_types: nil, order_by: nil, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
591
733
  command = make_simple_command(:get, 'v1/{+scope}:searchAllIamPolicies', options)
592
734
  command.response_representation = Google::Apis::CloudassetV1::SearchAllIamPoliciesResponse::Representation
593
735
  command.response_class = Google::Apis::CloudassetV1::SearchAllIamPoliciesResponse
594
736
  command.params['scope'] = scope unless scope.nil?
737
+ command.query['assetTypes'] = asset_types unless asset_types.nil?
738
+ command.query['orderBy'] = order_by unless order_by.nil?
595
739
  command.query['pageSize'] = page_size unless page_size.nil?
596
740
  command.query['pageToken'] = page_token unless page_token.nil?
597
741
  command.query['query'] = query unless query.nil?
@@ -625,13 +769,15 @@ module Google
625
769
  # expression syntax. If the regular expression does not match any supported
626
770
  # asset type, an INVALID_ARGUMENT error will be returned.
627
771
  # @param [String] order_by
628
- # Optional. A comma separated list of fields specifying the sorting order of the
772
+ # Optional. A comma-separated list of fields specifying the sorting order of the
629
773
  # results. The default order is ascending. Add " DESC" after the field name to
630
774
  # indicate descending order. Redundant space characters are ignored. Example: "
631
- # location DESC, name". Only string fields in the response are sortable,
632
- # including `name`, `displayName`, `description`, `location`. All the other
633
- # fields such as repeated fields (e.g., `networkTags`), map fields (e.g., `
634
- # labels`) and struct fields (e.g., `additionalAttributes`) are not supported.
775
+ # location DESC, name". Only singular primitive fields in the response are
776
+ # sortable: * name * assetType * project * displayName * description * location *
777
+ # kmsKey * createTime * updateTime * state * parentFullResourceName *
778
+ # parentAssetType All the other fields such as repeated fields (e.g., `
779
+ # networkTags`), map fields (e.g., `labels`) and struct fields (e.g., `
780
+ # additionalAttributes`) are not supported.
635
781
  # @param [Fixnum] page_size
636
782
  # Optional. The page size for search result pagination. Page size is capped at
637
783
  # 500 even if a larger value is given. If set to zero, server will pick an
@@ -657,17 +803,19 @@ module Google
657
803
  # prod". * `labels.env:*` to find Cloud resources that have a label "env". * `
658
804
  # kmsKey:key` to find Cloud resources encrypted with a customer-managed
659
805
  # encryption key whose name contains the word "key". * `state:ACTIVE` to find
660
- # Cloud resources whose state contains "ACTIVE" as a word. * `createTime<
661
- # 1609459200` to find Cloud resources that were created before "2021-01-01 00:00:
662
- # 00 UTC". 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 UTC" in
663
- # seconds. * `updateTime>1609459200` to find Cloud resources that were updated
664
- # after "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of "2021-01-
665
- # 01 00:00:00 UTC" in seconds. * `Important` to find Cloud resources that
666
- # contain "Important" as a word in any of the searchable fields. * `Impor*` to
667
- # find Cloud resources that contain "Impor" as a prefix of any word in any of
668
- # the searchable fields. * `Important location:(us-west1 OR global)` to find
669
- # Cloud resources that contain "Important" as a word in any of the searchable
670
- # fields and are also located in the "us-west1" region or the "global" location.
806
+ # Cloud resources whose state contains "ACTIVE" as a word. * `NOT state:ACTIVE`
807
+ # to find ``gcp_name`` resources whose state doesn't contain "ACTIVE" as a word.
808
+ # * `createTime<1609459200` to find Cloud resources that were created before "
809
+ # 2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of "2021-01-01 00:
810
+ # 00:00 UTC" in seconds. * `updateTime>1609459200` to find Cloud resources that
811
+ # were updated after "2021-01-01 00:00:00 UTC". 1609459200 is the epoch
812
+ # timestamp of "2021-01-01 00:00:00 UTC" in seconds. * `Important` to find Cloud
813
+ # resources that contain "Important" as a word in any of the searchable fields. *
814
+ # `Impor*` to find Cloud resources that contain "Impor" as a prefix of any word
815
+ # in any of the searchable fields. * `Important location:(us-west1 OR global)`
816
+ # to find Cloud resources that contain "Important" as a word in any of the
817
+ # searchable fields and are also located in the "us-west1" region or the "global"
818
+ # location.
671
819
  # @param [String] fields
672
820
  # Selector specifying which fields to include in a partial response.
673
821
  # @param [String] quota_user
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.0
4
+ version: 0.9.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: 2021-03-08 00:00:00.000000000 Z
11
+ date: 2021-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -52,7 +52,7 @@ licenses:
52
52
  metadata:
53
53
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
54
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-cloudasset_v1/CHANGELOG.md
55
- documentation_uri: https://googleapis.dev/ruby/google-apis-cloudasset_v1/v0.4.0
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-cloudasset_v1/v0.9.0
56
56
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-cloudasset_v1
57
57
  post_install_message:
58
58
  rdoc_options: []
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.2.13
72
+ rubygems_version: 3.2.17
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Simple REST client for Cloud Asset API V1