google-apis-cloudasset_v1 0.6.0 → 0.11.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: 89aa38950b0f61e325ec426c22c4e303dae057a70c39819b52e558883dc33717
4
- data.tar.gz: dd1fd00b994780ff52f394199af03ffeeeae7e56f42a9c06cbd57002767475c8
3
+ metadata.gz: 96056a4dab9fe27dcef98e70e3be48fb7b0eb310a031f4221872f51b963d40fd
4
+ data.tar.gz: d78608bea7d4c775803cbe15f89b8491b3977db6bdc294198bf791739dd95725
5
5
  SHA512:
6
- metadata.gz: e714f23434b0fbc0331600c7b5dcfdb355e51392b2609cbd283bd6de973edebba1b477a5af7520e190558f71e28160f37a015575bdeeec9e1ac7a7107a4928e0
7
- data.tar.gz: 60549c56ae38a9680ecfa42fd4877f629172f3f7c3f82df9d48be3a682748422b67d038a07a86ade2397904765172953c5649db9f59854b88f99a1ffa4b09b4e
6
+ metadata.gz: f116def195bdc557c96d191dd92d33cdccb90af4ee73c0b32f0f12b2bfabcbc920eabb90ca4a63597d77ce2f7ab263bda4ef7b457176b20b09915ec1104a95e0
7
+ data.tar.gz: 6339411725ca423360885299ecf8051f425263dabe9a54ce33c17a4e78516cb5e13688ae78139583b1436d1647d98c14adb0802a14d972e3cac145d314b9f5d6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Release history for google-apis-cloudasset_v1
2
2
 
3
+ ### v0.11.0 (2021-06-30)
4
+
5
+ * Regenerated from discovery document revision 20210625
6
+ * Regenerated using generator version 0.4.0
7
+
8
+ ### v0.10.0 (2021-06-24)
9
+
10
+ * Unspecified changes
11
+
12
+ ### v0.9.0 (2021-06-16)
13
+
14
+ * Regenerated from discovery document revision 20210611
15
+ * Regenerated using generator version 0.3.0
16
+
17
+ ### v0.8.0 (2021-05-20)
18
+
19
+ * Regenerated from discovery document revision 20210518
20
+ * Unspecified changes
21
+
22
+ ### v0.7.0 (2021-05-12)
23
+
24
+ * Regenerated from discovery document revision 20210507
25
+
3
26
  ### v0.6.0 (2021-03-31)
4
27
 
5
28
  * Regenerated from discovery document revision 20210326
@@ -123,12 +123,33 @@ module Google
123
123
  end
124
124
  end
125
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
+
126
146
  # An asset in Google Cloud. An asset can be any resource in the Google Cloud [
127
147
  # resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-
128
148
  # platform-resource-hierarchy), a resource outside the Google Cloud resource
129
149
  # hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy
130
- # (e.g. Cloud IAM policy). See [Supported asset types](https://cloud.google.com/
131
- # 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.
132
153
  class Asset
133
154
  include Google::Apis::Core::Hashable
134
155
 
@@ -493,6 +514,46 @@ module Google
493
514
  end
494
515
  end
495
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
+
496
557
  # Create asset feed request.
497
558
  class CreateFeedRequest
498
559
  include Google::Apis::Core::Hashable
@@ -857,6 +918,11 @@ module Google
857
918
  # @return [Array<Google::Apis::CloudassetV1::GoogleCloudAssetV1Access>]
858
919
  attr_accessor :accesses
859
920
 
921
+ # The Condition evaluation.
922
+ # Corresponds to the JSON property `conditionEvaluation`
923
+ # @return [Google::Apis::CloudassetV1::ConditionEvaluation]
924
+ attr_accessor :condition_evaluation
925
+
860
926
  # Resource edges of the graph starting from the policy attached resource to any
861
927
  # descendant resources. The Edge.source_node contains the full resource name of
862
928
  # a parent resource and Edge.target_node contains the full resource name of a
@@ -880,6 +946,7 @@ module Google
880
946
  # Update properties of this object
881
947
  def update!(**args)
882
948
  @accesses = args[:accesses] if args.key?(:accesses)
949
+ @condition_evaluation = args[:condition_evaluation] if args.key?(:condition_evaluation)
883
950
  @resource_edges = args[:resource_edges] if args.key?(:resource_edges)
884
951
  @resources = args[:resources] if args.key?(:resources)
885
952
  end
@@ -2000,9 +2067,9 @@ module Google
2000
2067
 
2001
2068
  # Defines the conditions under which an EgressPolicy matches a request.
2002
2069
  # Conditions based on information about the source of the request. Note that if
2003
- # the destination of the request is protected by a ServicePerimeter, then that
2004
- # ServicePerimeter must have an IngressPolicy which allows access in order for
2005
- # 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.
2006
2073
  class GoogleIdentityAccesscontextmanagerV1EgressFrom
2007
2074
  include Google::Apis::Core::Hashable
2008
2075
 
@@ -2048,9 +2115,9 @@ module Google
2048
2115
 
2049
2116
  # Defines the conditions under which an EgressPolicy matches a request.
2050
2117
  # Conditions based on information about the source of the request. Note that if
2051
- # the destination of the request is protected by a ServicePerimeter, then that
2052
- # ServicePerimeter must have an IngressPolicy which allows access in order for
2053
- # 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.
2054
2121
  # Corresponds to the JSON property `egressFrom`
2055
2122
  # @return [Google::Apis::CloudassetV1::GoogleIdentityAccesscontextmanagerV1EgressFrom]
2056
2123
  attr_accessor :egress_from
@@ -2058,8 +2125,10 @@ module Google
2058
2125
  # Defines the conditions under which an EgressPolicy matches a request.
2059
2126
  # Conditions are based on information about the ApiOperation intended to be
2060
2127
  # performed on the `resources` specified. Note that if the destination of the
2061
- # request is protected by a ServicePerimeter, then that ServicePerimeter must
2062
- # 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.
2063
2132
  # Corresponds to the JSON property `egressTo`
2064
2133
  # @return [Google::Apis::CloudassetV1::GoogleIdentityAccesscontextmanagerV1EgressTo]
2065
2134
  attr_accessor :egress_to
@@ -2078,21 +2147,25 @@ module Google
2078
2147
  # Defines the conditions under which an EgressPolicy matches a request.
2079
2148
  # Conditions are based on information about the ApiOperation intended to be
2080
2149
  # performed on the `resources` specified. Note that if the destination of the
2081
- # request is protected by a ServicePerimeter, then that ServicePerimeter must
2082
- # 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.
2083
2154
  class GoogleIdentityAccesscontextmanagerV1EgressTo
2084
2155
  include Google::Apis::Core::Hashable
2085
2156
 
2086
- # A list of ApiOperations that this egress rule applies to. A request matches if
2087
- # 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.
2088
2160
  # Corresponds to the JSON property `operations`
2089
2161
  # @return [Array<Google::Apis::CloudassetV1::GoogleIdentityAccesscontextmanagerV1ApiOperation>]
2090
2162
  attr_accessor :operations
2091
2163
 
2092
- # A list of resources, currently only projects in the form `projects/`, that
2093
- # match this to stanza. A request matches if it contains a resource in this list.
2094
- # If `*` is specified for resources, then this EgressTo rule will authorize
2095
- # 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.
2096
2169
  # Corresponds to the JSON property `resources`
2097
2170
  # @return [Array<String>]
2098
2171
  attr_accessor :resources
@@ -2109,7 +2182,9 @@ module Google
2109
2182
  end
2110
2183
 
2111
2184
  # Defines the conditions under which an IngressPolicy matches a request.
2112
- # 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.
2113
2188
  class GoogleIdentityAccesscontextmanagerV1IngressFrom
2114
2189
  include Google::Apis::Core::Hashable
2115
2190
 
@@ -2158,14 +2233,17 @@ module Google
2158
2233
  include Google::Apis::Core::Hashable
2159
2234
 
2160
2235
  # Defines the conditions under which an IngressPolicy matches a request.
2161
- # 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.
2162
2239
  # Corresponds to the JSON property `ingressFrom`
2163
2240
  # @return [Google::Apis::CloudassetV1::GoogleIdentityAccesscontextmanagerV1IngressFrom]
2164
2241
  attr_accessor :ingress_from
2165
2242
 
2166
2243
  # Defines the conditions under which an IngressPolicy matches a request.
2167
2244
  # Conditions are based on information about the ApiOperation intended to be
2168
- # 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.
2169
2247
  # Corresponds to the JSON property `ingressTo`
2170
2248
  # @return [Google::Apis::CloudassetV1::GoogleIdentityAccesscontextmanagerV1IngressTo]
2171
2249
  attr_accessor :ingress_to
@@ -2191,7 +2269,8 @@ module Google
2191
2269
  # cause an error. If no AccessLevel names are listed, resources within the
2192
2270
  # perimeter can only be accessed via Google Cloud calls with request origins
2193
2271
  # within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`
2194
- # . 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.
2195
2274
  # Corresponds to the JSON property `accessLevel`
2196
2275
  # @return [String]
2197
2276
  attr_accessor :access_level
@@ -2219,22 +2298,21 @@ module Google
2219
2298
 
2220
2299
  # Defines the conditions under which an IngressPolicy matches a request.
2221
2300
  # Conditions are based on information about the ApiOperation intended to be
2222
- # 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.
2223
2303
  class GoogleIdentityAccesscontextmanagerV1IngressTo
2224
2304
  include Google::Apis::Core::Hashable
2225
2305
 
2226
- # A list of ApiOperations the sources specified in corresponding IngressFrom are
2227
- # 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.
2228
2308
  # Corresponds to the JSON property `operations`
2229
2309
  # @return [Array<Google::Apis::CloudassetV1::GoogleIdentityAccesscontextmanagerV1ApiOperation>]
2230
2310
  attr_accessor :operations
2231
2311
 
2232
2312
  # A list of resources, currently only projects in the form `projects/`,
2233
2313
  # protected by this ServicePerimeter that are allowed to be accessed by sources
2234
- # defined in the corresponding IngressFrom. A request matches if it contains a
2235
- # resource in this list. If `*` is specified for resources, then this IngressTo
2236
- # rule will authorize access to all resources inside the perimeter, provided
2237
- # 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.
2238
2316
  # Corresponds to the JSON property `resources`
2239
2317
  # @return [Array<String>]
2240
2318
  attr_accessor :resources
@@ -2565,6 +2643,11 @@ module Google
2565
2643
  # @return [Google::Apis::CloudassetV1::AccessSelector]
2566
2644
  attr_accessor :access_selector
2567
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
+
2568
2651
  # Specifies an identity for which to determine resource access, based on roles
2569
2652
  # assigned either directly to them or to the groups they belong to, directly or
2570
2653
  # indirectly.
@@ -2604,6 +2687,7 @@ module Google
2604
2687
  # Update properties of this object
2605
2688
  def update!(**args)
2606
2689
  @access_selector = args[:access_selector] if args.key?(:access_selector)
2690
+ @condition_context = args[:condition_context] if args.key?(:condition_context)
2607
2691
  @identity_selector = args[:identity_selector] if args.key?(:identity_selector)
2608
2692
  @options = args[:options] if args.key?(:options)
2609
2693
  @resource_selector = args[:resource_selector] if args.key?(:resource_selector)
@@ -2692,11 +2776,36 @@ module Google
2692
2776
  class IamPolicySearchResult
2693
2777
  include Google::Apis::Core::Hashable
2694
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
+
2695
2786
  # Explanation about the IAM policy search result.
2696
2787
  # Corresponds to the JSON property `explanation`
2697
2788
  # @return [Google::Apis::CloudassetV1::Explanation]
2698
2789
  attr_accessor :explanation
2699
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
+
2700
2809
  # An Identity and Access Management (IAM) policy, which specifies access
2701
2810
  # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
2702
2811
  # A `binding` binds one or more `members` to a single `role`. Members can be
@@ -2754,7 +2863,10 @@ module Google
2754
2863
 
2755
2864
  # Update properties of this object
2756
2865
  def update!(**args)
2866
+ @asset_type = args[:asset_type] if args.key?(:asset_type)
2757
2867
  @explanation = args[:explanation] if args.key?(:explanation)
2868
+ @folders = args[:folders] if args.key?(:folders)
2869
+ @organization = args[:organization] if args.key?(:organization)
2758
2870
  @policy = args[:policy] if args.key?(:policy)
2759
2871
  @project = args[:project] if args.key?(:project)
2760
2872
  @resource = args[:resource] if args.key?(:resource)
@@ -2869,6 +2981,39 @@ module Google
2869
2981
  end
2870
2982
  end
2871
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
+
2872
3017
  #
2873
3018
  class ListFeedsResponse
2874
3019
  include Google::Apis::Core::Hashable
@@ -2888,6 +3033,90 @@ module Google
2888
3033
  end
2889
3034
  end
2890
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
+
2891
3120
  # This resource represents a long-running operation that is the result of a
2892
3121
  # network API call.
2893
3122
  class Operation
@@ -3379,8 +3608,10 @@ module Google
3379
3608
  # The create timestamp of this resource, at which the resource was created. The
3380
3609
  # granularity is in seconds. Timestamp.nanos will always be 0. This field is
3381
3610
  # available only when the resource's proto contains it. To search against `
3382
- # create_time`: * use a field query (value in seconds). Example: `createTime >=
3383
- # 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"`
3384
3615
  # Corresponds to the JSON property `createTime`
3385
3616
  # @return [String]
3386
3617
  attr_accessor :create_time
@@ -3516,12 +3747,23 @@ module Google
3516
3747
  # The last update timestamp of this resource, at which the resource was last
3517
3748
  # modified or deleted. The granularity is in seconds. Timestamp.nanos will
3518
3749
  # always be 0. This field is available only when the resource's proto contains
3519
- # it. To search against `update_time`: * use a field query (value in seconds).
3520
- # 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"`
3521
3754
  # Corresponds to the JSON property `updateTime`
3522
3755
  # @return [String]
3523
3756
  attr_accessor :update_time
3524
3757
 
3758
+ # Versioned resource representations of this resource. This is repeated because
3759
+ # there could be multiple versions of resource representations during version
3760
+ # migration. This `versioned_resources` field is not searchable. Some attributes
3761
+ # of the resource representations are exposed in `additional_attributes` field,
3762
+ # so as to allow users to search on them.
3763
+ # Corresponds to the JSON property `versionedResources`
3764
+ # @return [Array<Google::Apis::CloudassetV1::VersionedResource>]
3765
+ attr_accessor :versioned_resources
3766
+
3525
3767
  def initialize(**args)
3526
3768
  update!(**args)
3527
3769
  end
@@ -3545,6 +3787,7 @@ module Google
3545
3787
  @project = args[:project] if args.key?(:project)
3546
3788
  @state = args[:state] if args.key?(:state)
3547
3789
  @update_time = args[:update_time] if args.key?(:update_time)
3790
+ @versioned_resources = args[:versioned_resources] if args.key?(:versioned_resources)
3548
3791
  end
3549
3792
  end
3550
3793
 
@@ -3747,8 +3990,9 @@ module Google
3747
3990
  # resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-
3748
3991
  # platform-resource-hierarchy), a resource outside the Google Cloud resource
3749
3992
  # 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.
3993
+ # (e.g. Cloud IAM policy), or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP
3994
+ # relationship). See [Supported asset types](https://cloud.google.com/asset-
3995
+ # inventory/docs/supported-asset-types) for more information.
3752
3996
  # Corresponds to the JSON property `asset`
3753
3997
  # @return [Google::Apis::CloudassetV1::Asset]
3754
3998
  attr_accessor :asset
@@ -3763,8 +4007,9 @@ module Google
3763
4007
  # resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-
3764
4008
  # platform-resource-hierarchy), a resource outside the Google Cloud resource
3765
4009
  # hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy
3766
- # (e.g. Cloud IAM policy). See [Supported asset types](https://cloud.google.com/
3767
- # asset-inventory/docs/supported-asset-types) for more information.
4010
+ # (e.g. Cloud IAM policy), or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP
4011
+ # relationship). See [Supported asset types](https://cloud.google.com/asset-
4012
+ # inventory/docs/supported-asset-types) for more information.
3768
4013
  # Corresponds to the JSON property `priorAsset`
3769
4014
  # @return [Google::Apis::CloudassetV1::Asset]
3770
4015
  attr_accessor :prior_asset
@@ -3881,6 +4126,40 @@ module Google
3881
4126
  end
3882
4127
  end
3883
4128
 
4129
+ # Resource representation as defined by the corresponding service providing the
4130
+ # resource for a given API version.
4131
+ class VersionedResource
4132
+ include Google::Apis::Core::Hashable
4133
+
4134
+ # JSON representation of the resource as defined by the corresponding service
4135
+ # providing this resource. Example: If the resource is an instance provided by
4136
+ # Compute Engine, this field will contain the JSON representation of the
4137
+ # instance as defined by Compute Engine: `https://cloud.google.com/compute/docs/
4138
+ # reference/rest/v1/instances`. You can find the resource definition for each
4139
+ # supported resource type in this table: `https://cloud.google.com/asset-
4140
+ # inventory/docs/supported-asset-types#searchable_asset_types`
4141
+ # Corresponds to the JSON property `resource`
4142
+ # @return [Hash<String,Object>]
4143
+ attr_accessor :resource
4144
+
4145
+ # API version of the resource. Example: If the resource is an instance provided
4146
+ # by Compute Engine v1 API as defined in `https://cloud.google.com/compute/docs/
4147
+ # reference/rest/v1/instances`, version will be "v1".
4148
+ # Corresponds to the JSON property `version`
4149
+ # @return [String]
4150
+ attr_accessor :version
4151
+
4152
+ def initialize(**args)
4153
+ update!(**args)
4154
+ end
4155
+
4156
+ # Update properties of this object
4157
+ def update!(**args)
4158
+ @resource = args[:resource] if args.key?(:resource)
4159
+ @version = args[:version] if args.key?(:version)
4160
+ end
4161
+ end
4162
+
3884
4163
  # Information related to a Quick Fix Engineering package. Fields are taken from
3885
4164
  # Windows QuickFixEngineering Interface and match the source names: https://docs.
3886
4165
  # microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
@@ -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.6.0"
19
+ GEM_VERSION = "0.11.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.2.0"
22
+ GENERATOR_VERSION = "0.4.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210326"
25
+ REVISION = "20210625"
26
26
  end
27
27
  end
28
28
  end
@@ -46,6 +46,12 @@ module Google
46
46
  include Google::Apis::Core::JsonObjectSupport
47
47
  end
48
48
 
49
+ class AnalyzeMoveResponse
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
49
55
  class Asset
50
56
  class Representation < Google::Apis::Core::JsonRepresentation; end
51
57
 
@@ -82,6 +88,18 @@ module Google
82
88
  include Google::Apis::Core::JsonObjectSupport
83
89
  end
84
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
+
85
103
  class CreateFeedRequest
86
104
  class Representation < Google::Apis::Core::JsonRepresentation; end
87
105
 
@@ -400,12 +418,36 @@ module Google
400
418
  include Google::Apis::Core::JsonObjectSupport
401
419
  end
402
420
 
421
+ class ListAssetsResponse
422
+ class Representation < Google::Apis::Core::JsonRepresentation; end
423
+
424
+ include Google::Apis::Core::JsonObjectSupport
425
+ end
426
+
403
427
  class ListFeedsResponse
404
428
  class Representation < Google::Apis::Core::JsonRepresentation; end
405
429
 
406
430
  include Google::Apis::Core::JsonObjectSupport
407
431
  end
408
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
+
409
451
  class Operation
410
452
  class Representation < Google::Apis::Core::JsonRepresentation; end
411
453
 
@@ -520,6 +562,12 @@ module Google
520
562
  include Google::Apis::Core::JsonObjectSupport
521
563
  end
522
564
 
565
+ class VersionedResource
566
+ class Representation < Google::Apis::Core::JsonRepresentation; end
567
+
568
+ include Google::Apis::Core::JsonObjectSupport
569
+ end
570
+
523
571
  class WindowsQuickFixEngineeringPackage
524
572
  class Representation < Google::Apis::Core::JsonRepresentation; end
525
573
 
@@ -579,6 +627,14 @@ module Google
579
627
  end
580
628
  end
581
629
 
630
+ class AnalyzeMoveResponse
631
+ # @private
632
+ class Representation < Google::Apis::Core::JsonRepresentation
633
+ collection :move_analysis, as: 'moveAnalysis', class: Google::Apis::CloudassetV1::MoveAnalysis, decorator: Google::Apis::CloudassetV1::MoveAnalysis::Representation
634
+
635
+ end
636
+ end
637
+
582
638
  class Asset
583
639
  # @private
584
640
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -650,6 +706,20 @@ module Google
650
706
  end
651
707
  end
652
708
 
709
+ class ConditionContext
710
+ # @private
711
+ class Representation < Google::Apis::Core::JsonRepresentation
712
+ property :access_time, as: 'accessTime'
713
+ end
714
+ end
715
+
716
+ class ConditionEvaluation
717
+ # @private
718
+ class Representation < Google::Apis::Core::JsonRepresentation
719
+ property :evaluation_value, as: 'evaluationValue'
720
+ end
721
+ end
722
+
653
723
  class CreateFeedRequest
654
724
  # @private
655
725
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -739,6 +809,8 @@ module Google
739
809
  class Representation < Google::Apis::Core::JsonRepresentation
740
810
  collection :accesses, as: 'accesses', class: Google::Apis::CloudassetV1::GoogleCloudAssetV1Access, decorator: Google::Apis::CloudassetV1::GoogleCloudAssetV1Access::Representation
741
811
 
812
+ property :condition_evaluation, as: 'conditionEvaluation', class: Google::Apis::CloudassetV1::ConditionEvaluation, decorator: Google::Apis::CloudassetV1::ConditionEvaluation::Representation
813
+
742
814
  collection :resource_edges, as: 'resourceEdges', class: Google::Apis::CloudassetV1::GoogleCloudAssetV1Edge, decorator: Google::Apis::CloudassetV1::GoogleCloudAssetV1Edge::Representation
743
815
 
744
816
  collection :resources, as: 'resources', class: Google::Apis::CloudassetV1::GoogleCloudAssetV1Resource, decorator: Google::Apis::CloudassetV1::GoogleCloudAssetV1Resource::Representation
@@ -1127,6 +1199,8 @@ module Google
1127
1199
  class Representation < Google::Apis::Core::JsonRepresentation
1128
1200
  property :access_selector, as: 'accessSelector', class: Google::Apis::CloudassetV1::AccessSelector, decorator: Google::Apis::CloudassetV1::AccessSelector::Representation
1129
1201
 
1202
+ property :condition_context, as: 'conditionContext', class: Google::Apis::CloudassetV1::ConditionContext, decorator: Google::Apis::CloudassetV1::ConditionContext::Representation
1203
+
1130
1204
  property :identity_selector, as: 'identitySelector', class: Google::Apis::CloudassetV1::IdentitySelector, decorator: Google::Apis::CloudassetV1::IdentitySelector::Representation
1131
1205
 
1132
1206
  property :options, as: 'options', class: Google::Apis::CloudassetV1::Options, decorator: Google::Apis::CloudassetV1::Options::Representation
@@ -1162,8 +1236,11 @@ module Google
1162
1236
  class IamPolicySearchResult
1163
1237
  # @private
1164
1238
  class Representation < Google::Apis::Core::JsonRepresentation
1239
+ property :asset_type, as: 'assetType'
1165
1240
  property :explanation, as: 'explanation', class: Google::Apis::CloudassetV1::Explanation, decorator: Google::Apis::CloudassetV1::Explanation::Representation
1166
1241
 
1242
+ collection :folders, as: 'folders'
1243
+ property :organization, as: 'organization'
1167
1244
  property :policy, as: 'policy', class: Google::Apis::CloudassetV1::Policy, decorator: Google::Apis::CloudassetV1::Policy::Representation
1168
1245
 
1169
1246
  property :project, as: 'project'
@@ -1203,6 +1280,16 @@ module Google
1203
1280
  end
1204
1281
  end
1205
1282
 
1283
+ class ListAssetsResponse
1284
+ # @private
1285
+ class Representation < Google::Apis::Core::JsonRepresentation
1286
+ collection :assets, as: 'assets', class: Google::Apis::CloudassetV1::Asset, decorator: Google::Apis::CloudassetV1::Asset::Representation
1287
+
1288
+ property :next_page_token, as: 'nextPageToken'
1289
+ property :read_time, as: 'readTime'
1290
+ end
1291
+ end
1292
+
1206
1293
  class ListFeedsResponse
1207
1294
  # @private
1208
1295
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1211,6 +1298,34 @@ module Google
1211
1298
  end
1212
1299
  end
1213
1300
 
1301
+ class MoveAnalysis
1302
+ # @private
1303
+ class Representation < Google::Apis::Core::JsonRepresentation
1304
+ property :analysis, as: 'analysis', class: Google::Apis::CloudassetV1::MoveAnalysisResult, decorator: Google::Apis::CloudassetV1::MoveAnalysisResult::Representation
1305
+
1306
+ property :display_name, as: 'displayName'
1307
+ property :error, as: 'error', class: Google::Apis::CloudassetV1::Status, decorator: Google::Apis::CloudassetV1::Status::Representation
1308
+
1309
+ end
1310
+ end
1311
+
1312
+ class MoveAnalysisResult
1313
+ # @private
1314
+ class Representation < Google::Apis::Core::JsonRepresentation
1315
+ collection :blockers, as: 'blockers', class: Google::Apis::CloudassetV1::MoveImpact, decorator: Google::Apis::CloudassetV1::MoveImpact::Representation
1316
+
1317
+ collection :warnings, as: 'warnings', class: Google::Apis::CloudassetV1::MoveImpact, decorator: Google::Apis::CloudassetV1::MoveImpact::Representation
1318
+
1319
+ end
1320
+ end
1321
+
1322
+ class MoveImpact
1323
+ # @private
1324
+ class Representation < Google::Apis::Core::JsonRepresentation
1325
+ property :detail, as: 'detail'
1326
+ end
1327
+ end
1328
+
1214
1329
  class Operation
1215
1330
  # @private
1216
1331
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1325,6 +1440,8 @@ module Google
1325
1440
  property :project, as: 'project'
1326
1441
  property :state, as: 'state'
1327
1442
  property :update_time, as: 'updateTime'
1443
+ collection :versioned_resources, as: 'versionedResources', class: Google::Apis::CloudassetV1::VersionedResource, decorator: Google::Apis::CloudassetV1::VersionedResource::Representation
1444
+
1328
1445
  end
1329
1446
  end
1330
1447
 
@@ -1424,6 +1541,14 @@ module Google
1424
1541
  end
1425
1542
  end
1426
1543
 
1544
+ class VersionedResource
1545
+ # @private
1546
+ class Representation < Google::Apis::Core::JsonRepresentation
1547
+ hash :resource, as: 'resource'
1548
+ property :version, as: 'version'
1549
+ end
1550
+ end
1551
+
1427
1552
  class WindowsQuickFixEngineeringPackage
1428
1553
  # @private
1429
1554
  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,33 @@ 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.
819
+ # @param [String] read_mask
820
+ # Optional. A comma-separated list of fields specifying which fields to be
821
+ # returned in ResourceSearchResult. Only '*' or combination of top level fields
822
+ # can be specified. Field names of both snake_case and camelCase are supported.
823
+ # Examples: `"*"`, `"name,location"`, `"name,versionedResources"`. The read_mask
824
+ # paths must be valid field paths listed but not limited to (both snake_case and
825
+ # camelCase are supported): * name * asset_type or assetType * project *
826
+ # display_name or displayName * description * location * labels * network_tags
827
+ # or networkTags * kms_key or kmsKey * create_time or createTime * update_time
828
+ # or updateTime * state * additional_attributes or additionalAttributes *
829
+ # versioned_resources or versionedResources If read_mask is not specified, all
830
+ # fields except versionedResources will be returned. If only '*' is specified,
831
+ # all fields including versionedResources will be returned. Any invalid field
832
+ # path will trigger INVALID_ARGUMENT error.
671
833
  # @param [String] fields
672
834
  # Selector specifying which fields to include in a partial response.
673
835
  # @param [String] quota_user
@@ -685,7 +847,7 @@ module Google
685
847
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
686
848
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
687
849
  # @raise [Google::Apis::AuthorizationError] Authorization is required
688
- def search_all_resources(scope, asset_types: nil, order_by: nil, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
850
+ def search_all_resources(scope, asset_types: nil, order_by: nil, page_size: nil, page_token: nil, query: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
689
851
  command = make_simple_command(:get, 'v1/{+scope}:searchAllResources', options)
690
852
  command.response_representation = Google::Apis::CloudassetV1::SearchAllResourcesResponse::Representation
691
853
  command.response_class = Google::Apis::CloudassetV1::SearchAllResourcesResponse
@@ -695,6 +857,7 @@ module Google
695
857
  command.query['pageSize'] = page_size unless page_size.nil?
696
858
  command.query['pageToken'] = page_token unless page_token.nil?
697
859
  command.query['query'] = query unless query.nil?
860
+ command.query['readMask'] = read_mask unless read_mask.nil?
698
861
  command.query['fields'] = fields unless fields.nil?
699
862
  command.query['quotaUser'] = quota_user unless quota_user.nil?
700
863
  execute_or_queue_command(command, &block)
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-cloudasset_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.11.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-04-05 00:00:00.000000000 Z
11
+ date: 2021-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.1'
19
+ version: '0.4'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.4'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.1'
32
+ version: 2.a
27
33
  description: This is the simple REST client for Cloud Asset API V1. Simple REST clients
28
34
  are Ruby client libraries that provide access to Google services via their HTTP
29
35
  REST API endpoints. These libraries are generated and updated automatically based
@@ -52,7 +58,7 @@ licenses:
52
58
  metadata:
53
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
60
  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.6.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-cloudasset_v1/v0.11.0
56
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-cloudasset_v1
57
63
  post_install_message:
58
64
  rdoc_options: []
@@ -69,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
75
  - !ruby/object:Gem::Version
70
76
  version: '0'
71
77
  requirements: []
72
- rubygems_version: 3.2.13
78
+ rubygems_version: 3.2.17
73
79
  signing_key:
74
80
  specification_version: 4
75
81
  summary: Simple REST client for Cloud Asset API V1