Reference documentation and code samples for the Google Cloud Gke Backup V1 Client class ResourceSelector.
Defines a selector to identify a single or a group of resources.
Conditions in the selector are optional, but at least one field
should be set to a non-empty value. If a condition is not specified,
no restrictions will be applied on that dimension.
If more than one condition is specified, a resource will be selected
if and only if all conditions are met.
Generated from protobuf messagegoogle.cloud.gkebackup.v1.ResourceSelector
Optional. Selects resources using their Kubernetes GroupKinds. If specified, only resources of provided GroupKind will be selected.
↳ name
string
Optional. Selects resources using their resource names. If specified, only resources with the provided name will be selected.
↳ namespace
string
Optional. Selects resources using their namespaces. This only applies to namespace scoped resources and cannot be used for selecting cluster scoped resources. If specified, only resources in the provided namespace will be selected. If not specified, the filter will apply to both cluster scoped and namespace scoped resources (e.g. name or label). TheNamespaceresource itself will be restored if and only if any resources within the namespace are restored.
Optional. Selects resources using Kuberneteslabels. If specified, a resource will be selected if and only if the resource has all of the provided labels and all the label values match.
getGroupKind
Optional. Selects resources using their Kubernetes GroupKinds. If
specified, only resources of provided GroupKind will be selected.
Optional. Selects resources using their resource names. If specified,
only resources with the provided name will be selected.
Returns
Type
Description
string
setName
Optional. Selects resources using their resource names. If specified,
only resources with the provided name will be selected.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getNamespace
Optional. Selects resources using their namespaces. This only applies to
namespace scoped resources and cannot be used for selecting
cluster scoped resources. If specified, only resources in the provided
namespace will be selected. If not specified, the filter will apply to
both cluster scoped and namespace scoped resources (e.g. name or label).
TheNamespaceresource
itself will be restored if and only if any resources within the namespace
are restored.
Returns
Type
Description
string
setNamespace
Optional. Selects resources using their namespaces. This only applies to
namespace scoped resources and cannot be used for selecting
cluster scoped resources. If specified, only resources in the provided
namespace will be selected. If not specified, the filter will apply to
both cluster scoped and namespace scoped resources (e.g. name or label).
TheNamespaceresource
itself will be restored if and only if any resources within the namespace
are restored.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getLabels
Optional. Selects resources using Kuberneteslabels.
If specified, a resource will be selected if and only if the resource
has all of the provided labels and all the label values match.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Gke Backup V1 Client - Class ResourceSelector (1.2.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.1 (latest)](/php/docs/reference/cloud-gke-backup/latest/V1.ResourceSelector)\n- [1.2.0](/php/docs/reference/cloud-gke-backup/1.2.0/V1.ResourceSelector)\n- [1.0.3](/php/docs/reference/cloud-gke-backup/1.0.3/V1.ResourceSelector)\n- [0.8.1](/php/docs/reference/cloud-gke-backup/0.8.1/V1.ResourceSelector)\n- [0.7.2](/php/docs/reference/cloud-gke-backup/0.7.2/V1.ResourceSelector)\n- [0.6.0](/php/docs/reference/cloud-gke-backup/0.6.0/V1.ResourceSelector)\n- [0.5.3](/php/docs/reference/cloud-gke-backup/0.5.3/V1.ResourceSelector)\n- [0.4.0](/php/docs/reference/cloud-gke-backup/0.4.0/V1.ResourceSelector)\n- [0.3.1](/php/docs/reference/cloud-gke-backup/0.3.1/V1.ResourceSelector)\n- [0.2.0](/php/docs/reference/cloud-gke-backup/0.2.0/V1.ResourceSelector)\n- [0.1.7](/php/docs/reference/cloud-gke-backup/0.1.7/V1.ResourceSelector) \nReference documentation and code samples for the Google Cloud Gke Backup V1 Client class ResourceSelector.\n\nDefines a selector to identify a single or a group of resources.\n\nConditions in the selector are optional, but at least one field\nshould be set to a non-empty value. If a condition is not specified,\nno restrictions will be applied on that dimension.\nIf more than one condition is specified, a resource will be selected\nif and only if all conditions are met.\n\nGenerated from protobuf message `google.cloud.gkebackup.v1.ResourceSelector`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ GkeBackup \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getGroupKind\n\nOptional. Selects resources using their Kubernetes GroupKinds. If\nspecified, only resources of provided GroupKind will be selected.\n\n### hasGroupKind\n\n### clearGroupKind\n\n### setGroupKind\n\nOptional. Selects resources using their Kubernetes GroupKinds. If\nspecified, only resources of provided GroupKind will be selected.\n\n### getName\n\nOptional. Selects resources using their resource names. If specified,\nonly resources with the provided name will be selected.\n\n### setName\n\nOptional. Selects resources using their resource names. If specified,\nonly resources with the provided name will be selected.\n\n### getNamespace\n\nOptional. Selects resources using their namespaces. This only applies to\nnamespace scoped resources and cannot be used for selecting\ncluster scoped resources. If specified, only resources in the provided\nnamespace will be selected. If not specified, the filter will apply to\nboth cluster scoped and namespace scoped resources (e.g. name or label).\n\nThe [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource\nitself will be restored if and only if any resources within the namespace\nare restored.\n\n### setNamespace\n\nOptional. Selects resources using their namespaces. This only applies to\nnamespace scoped resources and cannot be used for selecting\ncluster scoped resources. If specified, only resources in the provided\nnamespace will be selected. If not specified, the filter will apply to\nboth cluster scoped and namespace scoped resources (e.g. name or label).\n\nThe [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource\nitself will be restored if and only if any resources within the namespace\nare restored.\n\n### getLabels\n\nOptional. Selects resources using Kubernetes\n[labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).\n\nIf specified, a resource will be selected if and only if the resource\nhas all of the provided labels and all the label values match.\n\n### setLabels\n\nOptional. Selects resources using Kubernetes\n[labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).\n\nIf specified, a resource will be selected if and only if the resource\nhas all of the provided labels and all the label values match."]]