Google Cloud Workload Manager V1 Client - Class ResourceFilter (0.1.0)

Reference documentation and code samples for the Google Cloud Workload Manager V1 Client class ResourceFilter.

Resource filter for an evaluation defining the scope of resources to be evaluated.

Generated from protobuf message google.cloud.workloadmanager.v1.ResourceFilter

Namespace

Google \ Cloud \ WorkloadManager \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ scopes
array

The scopes of evaluation resource. Format: * * projects/{project_id} * * folders/{folder_id} * * organizations/{organization_id}

↳ resource_id_patterns
array

The pattern to filter resources by their id For example, a pattern of ". prod-cluster. " will match all resources that contain "prod-cluster" in their ID.

↳ inclusion_labels
array| Google\Protobuf\Internal\MapField

Labels to filter resources by. Each key-value pair in the map must exist on the resource for it to be included (e.g. VM instance labels). For example, specifying { "env": "prod", "database": "nosql" } will only include resources that have labels env=prod and database=nosql .

↳ gce_instance_filter
GceInstanceFilter

Filter compute engine resources.

getScopes

The scopes of evaluation resource.

Format:

  • projects/{project_id}
  • folders/{folder_id}
  • organizations/{organization_id}
Returns
Type
Description

setScopes

The scopes of evaluation resource.

Format:

  • projects/{project_id}
  • folders/{folder_id}
  • organizations/{organization_id}
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this

getResourceIdPatterns

The pattern to filter resources by their id For example, a pattern of ". prod-cluster. " will match all resources that contain "prod-cluster" in their ID.

Returns
Type
Description

setResourceIdPatterns

The pattern to filter resources by their id For example, a pattern of ". prod-cluster. " will match all resources that contain "prod-cluster" in their ID.

Parameter
Name
Description
var
string[]
Returns
Type
Description
$this

getInclusionLabels

Labels to filter resources by. Each key-value pair in the map must exist on the resource for it to be included (e.g. VM instance labels).

For example, specifying { "env": "prod", "database": "nosql" } will only include resources that have labels env=prod and database=nosql .

Returns
Type
Description

setInclusionLabels

Labels to filter resources by. Each key-value pair in the map must exist on the resource for it to be included (e.g. VM instance labels).

For example, specifying { "env": "prod", "database": "nosql" } will only include resources that have labels env=prod and database=nosql .

Parameter
Name
Description
Returns
Type
Description
$this

getGceInstanceFilter

Filter compute engine resources.

Returns
Type
Description

hasGceInstanceFilter

clearGceInstanceFilter

setGceInstanceFilter

Filter compute engine resources.

Parameter
Name
Description
Returns
Type
Description
$this
Create a Mobile Website
View Site in Mobile | Classic
Share by: