Class: Google::Cloud::Recommender::V1::Operation
- Inherits:
-
Object
- Object
- Google::Cloud::Recommender::V1::Operation
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/recommender/v1/recommendation.rb
Overview
Contains an operation for a resource loosely based on the JSON-PATCH format with support for:
- Custom filters for describing partial array patch.
- Extended path values for describing nested arrays.
- Custom fields for describing the resource for which the operation is being described.
- Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
Defined Under Namespace
Classes: PathFiltersEntry, PathValueMatchersEntry
Instance Attribute Summary collapse
-
#action ⇒ ::String
Type of this operation.
-
#path ⇒ ::String
Path to the target field being operated on.
-
#path_filters ⇒ ::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}
Set of filters to apply if
path
refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. -
#path_value_matchers ⇒ ::Google::Protobuf::Map{::String => ::Google::Cloud::Recommender::V1::ValueMatcher}
Similar to path_filters, this contains set of filters to apply if
path
field refers to array elements. -
#resource ⇒ ::String
Contains the fully qualified resource name.
-
#resource_type ⇒ ::String
Type of GCP resource being modified/tested.
-
#source_path ⇒ ::String
Can be set with action 'copy' or 'move' to indicate the source field within resource or source_resource, ignored if provided for other operation types.
-
#source_resource ⇒ ::String
Can be set with action 'copy' to copy resource configuration across different resources of the same type.
-
#value ⇒ ::Google::Protobuf::Value
Value for the
path
field. -
#value_matcher ⇒ ::Google::Cloud::Recommender::V1::ValueMatcher
Can be set for action 'test' for advanced matching for the value of 'path' field.
Instance Attribute Details
#action ⇒ ::String
Returns Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and custom operations. This field is case-insensitive and always populated.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/cloud/recommender/v1/recommendation.rb', line 221 class Operation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class PathFiltersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Recommender::V1::ValueMatcher] class PathValueMatchersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#path ⇒ ::String
Returns Path to the target field being operated on. If the operation is at the resource level, then path should be "/". This field is always populated.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/cloud/recommender/v1/recommendation.rb', line 221 class Operation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class PathFiltersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Recommender::V1::ValueMatcher] class PathValueMatchersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#path_filters ⇒ ::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}
Returns Set of filters to apply if path
refers to array elements or nested array
elements in order to narrow down to a single unique element that is being
tested/modified.
This is intended to be an exact match per filter. To perform advanced
matching, use path_value_matchers.
- Example:
{ "/versions/*/name" : "it-123" "/versions/*/targetSize/percent": 20 }
- Example:
{ "/bindings/*/role": "roles/owner" "/bindings/*/condition" : null }
- Example:
{ "/bindings/*/role": "roles/owner" "/bindings/*/members/*" : ["[email protected]", "[email protected]"] }
When both path_filters and path_value_matchers are set, an implicit AND must be performed.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/cloud/recommender/v1/recommendation.rb', line 221 class Operation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class PathFiltersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Recommender::V1::ValueMatcher] class PathValueMatchersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#path_value_matchers ⇒ ::Google::Protobuf::Map{::String => ::Google::Cloud::Recommender::V1::ValueMatcher}
Returns Similar to path_filters, this contains set of filters to apply if path
field refers to array elements. This is meant to support value matching
beyond exact match. To perform exact match, use path_filters.
When both path_filters and path_value_matchers are set, an implicit AND
must be performed.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/cloud/recommender/v1/recommendation.rb', line 221 class Operation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class PathFiltersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Recommender::V1::ValueMatcher] class PathValueMatchersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#resource ⇒ ::String
Returns Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/cloud/recommender/v1/recommendation.rb', line 221 class Operation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class PathFiltersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Recommender::V1::ValueMatcher] class PathValueMatchersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#resource_type ⇒ ::String
Returns Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/cloud/recommender/v1/recommendation.rb', line 221 class Operation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class PathFiltersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Recommender::V1::ValueMatcher] class PathValueMatchersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#source_path ⇒ ::String
Returns Can be set with action 'copy' or 'move' to indicate the source field within resource or source_resource, ignored if provided for other operation types.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/cloud/recommender/v1/recommendation.rb', line 221 class Operation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class PathFiltersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Recommender::V1::ValueMatcher] class PathValueMatchersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#source_resource ⇒ ::String
Returns Can be set with action 'copy' to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = 'copy', path = "/", from = "/", source_resource =
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/cloud/recommender/v1/recommendation.rb', line 221 class Operation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class PathFiltersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Recommender::V1::ValueMatcher] class PathValueMatchersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#value ⇒ ::Google::Protobuf::Value
Returns Value for the path
field. Will be set for actions:'add'/'replace'.
Maybe set for action: 'test'. Either this or value_matcher
will be set
for 'test' operation. An exact match must be performed.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/cloud/recommender/v1/recommendation.rb', line 221 class Operation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class PathFiltersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Recommender::V1::ValueMatcher] class PathValueMatchersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#value_matcher ⇒ ::Google::Cloud::Recommender::V1::ValueMatcher
Returns Can be set for action 'test' for advanced matching for the value of
'path' field. Either this or value
will be set for 'test' operation.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/cloud/recommender/v1/recommendation.rb', line 221 class Operation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class PathFiltersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Recommender::V1::ValueMatcher] class PathValueMatchersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |