# Network Services V1 API - Class Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher (v2.10.1)

2.10.1 (latest) 2.10.0 2.9.0 2.8.0 2.7.0 2.6.1 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.1 1.2.0 1.1.0 1.0.1 0.2.0 0.1.0 Reference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher.

The matcher that is based on node metadata presented by xDS clients.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #metadata_label_match_criteria

    def metadata_label_match_criteria() -> ::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria

**Returns**

- ([::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-EndpointMatcher-MetadataLabelMatcher-MetadataLabelMatchCriteria)) --- Specifies how matching should be done.


  Supported values are:
  MATCH_ANY: At least one of the Labels specified in the
  matcher should match the metadata presented by xDS client.
  MATCH_ALL: The metadata presented by the xDS client should
  contain all of the labels specified here.

  The selection is determined based on the best match. For
  example, suppose there are three EndpointPolicy
  resources P1, P2 and P3 and if P1 has a the matcher as
  MATCH_ANY


  If a client with label


  If a client with label


  If a client with label


  If there is more than one best match, (for example, if a
  config P4 with selector

### #metadata_label_match_criteria=

    def metadata_label_match_criteria=(value) -> ::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria

**Parameter**

- **value** ([::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-EndpointMatcher-MetadataLabelMatcher-MetadataLabelMatchCriteria)) --- Specifies how matching should be done.


  Supported values are:
  MATCH_ANY: At least one of the Labels specified in the
  matcher should match the metadata presented by xDS client.
  MATCH_ALL: The metadata presented by the xDS client should
  contain all of the labels specified here.

  The selection is determined based on the best match. For
  example, suppose there are three EndpointPolicy
  resources P1, P2 and P3 and if P1 has a the matcher as
  MATCH_ANY


  If a client with label


  If a client with label


  If a client with label


  If there is more than one best match, (for example, if a
  config P4 with selector
**Returns**

- ([::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-EndpointMatcher-MetadataLabelMatcher-MetadataLabelMatchCriteria)) --- Specifies how matching should be done.


  Supported values are:
  MATCH_ANY: At least one of the Labels specified in the
  matcher should match the metadata presented by xDS client.
  MATCH_ALL: The metadata presented by the xDS client should
  contain all of the labels specified here.

  The selection is determined based on the best match. For
  example, suppose there are three EndpointPolicy
  resources P1, P2 and P3 and if P1 has a the matcher as
  MATCH_ANY


  If a client with label


  If a client with label


  If a client with label


  If there is more than one best match, (for example, if a
  config P4 with selector

### #metadata_labels

    def metadata_labels() -> ::Array<::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabels>

**Returns**

- (::Array\<[::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabels](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-EndpointMatcher-MetadataLabelMatcher-MetadataLabels)\>) --- The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

### #metadata_labels=

    def metadata_labels=(value) -> ::Array<::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabels>

**Parameter**

- **value** (::Array\<[::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabels](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-EndpointMatcher-MetadataLabelMatcher-MetadataLabels)\>) --- The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).
**Returns**

- (::Array\<[::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabels](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-EndpointMatcher-MetadataLabelMatcher-MetadataLabels)\>) --- The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).