Reference documentation and code samples for the Stackdriver Monitoring V3 Client class GkeWorkload.
A GKE Workload (Deployment, StatefulSet, etc). The field names correspond
to the metadata labels on monitored resources that fall under a workload
(for example,k8s_containerork8s_pod).
Generated from protobuf messagegoogle.monitoring.v3.Service.GkeWorkload
Namespace
Google \ Cloud \ Monitoring \ V3 \ Service
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ project_id
string
Output only. The project this resource lives in. For legacy services migrated from theCustomtype, this may be a distinct project from the one parenting the service itself.
↳ location
string
The location of the parent cluster. This may be a zone or region.
↳ cluster_name
string
The name of the parent cluster.
↳ namespace_name
string
The name of the parent namespace.
↳ top_level_controller_type
string
The type of this workload (for example, "Deployment" or "DaemonSet")
↳ top_level_controller_name
string
The name of this workload.
getProjectId
Output only. The project this resource lives in. For legacy services
migrated from theCustomtype, this may be a distinct project from the
one parenting the service itself.
Returns
Type
Description
string
setProjectId
Output only. The project this resource lives in. For legacy services
migrated from theCustomtype, this may be a distinct project from the
one parenting the service itself.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getLocation
The location of the parent cluster. This may be a zone or region.
Returns
Type
Description
string
setLocation
The location of the parent cluster. This may be a zone or region.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getClusterName
The name of the parent cluster.
Returns
Type
Description
string
setClusterName
The name of the parent cluster.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getNamespaceName
The name of the parent namespace.
Returns
Type
Description
string
setNamespaceName
The name of the parent namespace.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getTopLevelControllerType
The type of this workload (for example, "Deployment" or "DaemonSet")
Returns
Type
Description
string
setTopLevelControllerType
The type of this workload (for example, "Deployment" or "DaemonSet")
[[["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,["# Stackdriver Monitoring V3 Client - Class GkeWorkload (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-monitoring/latest/V3.Service.GkeWorkload)\n- [2.1.1](/php/docs/reference/cloud-monitoring/2.1.1/V3.Service.GkeWorkload)\n- [2.0.1](/php/docs/reference/cloud-monitoring/2.0.1/V3.Service.GkeWorkload)\n- [1.12.1](/php/docs/reference/cloud-monitoring/1.12.1/V3.Service.GkeWorkload)\n- [1.11.1](/php/docs/reference/cloud-monitoring/1.11.1/V3.Service.GkeWorkload)\n- [1.10.3](/php/docs/reference/cloud-monitoring/1.10.3/V3.Service.GkeWorkload)\n- [1.9.0](/php/docs/reference/cloud-monitoring/1.9.0/V3.Service.GkeWorkload)\n- [1.8.0](/php/docs/reference/cloud-monitoring/1.8.0/V3.Service.GkeWorkload)\n- [1.7.1](/php/docs/reference/cloud-monitoring/1.7.1/V3.Service.GkeWorkload)\n- [1.6.0](/php/docs/reference/cloud-monitoring/1.6.0/V3.Service.GkeWorkload)\n- [1.5.1](/php/docs/reference/cloud-monitoring/1.5.1/V3.Service.GkeWorkload)\n- [1.4.0](/php/docs/reference/cloud-monitoring/1.4.0/V3.Service.GkeWorkload)\n- [1.3.2](/php/docs/reference/cloud-monitoring/1.3.2/V3.Service.GkeWorkload)\n- [1.2.2](/php/docs/reference/cloud-monitoring/1.2.2/V3.Service.GkeWorkload) \nReference documentation and code samples for the Stackdriver Monitoring V3 Client class GkeWorkload.\n\nA GKE Workload (Deployment, StatefulSet, etc). The field names correspond\nto the metadata labels on monitored resources that fall under a workload\n(for example, `k8s_container` or `k8s_pod`).\n\nGenerated from protobuf message `google.monitoring.v3.Service.GkeWorkload`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Monitoring \\\\ V3 \\\\ Service\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getProjectId\n\nOutput only. The project this resource lives in. For legacy services\nmigrated from the `Custom` type, this may be a distinct project from the\none parenting the service itself.\n\n### setProjectId\n\nOutput only. The project this resource lives in. For legacy services\nmigrated from the `Custom` type, this may be a distinct project from the\none parenting the service itself.\n\n### getLocation\n\nThe location of the parent cluster. This may be a zone or region.\n\n### setLocation\n\nThe location of the parent cluster. This may be a zone or region.\n\n### getClusterName\n\nThe name of the parent cluster.\n\n### setClusterName\n\nThe name of the parent cluster.\n\n### getNamespaceName\n\nThe name of the parent namespace.\n\n### setNamespaceName\n\nThe name of the parent namespace.\n\n### getTopLevelControllerType\n\nThe type of this workload (for example, \"Deployment\" or \"DaemonSet\")\n\n### setTopLevelControllerType\n\nThe type of this workload (for example, \"Deployment\" or \"DaemonSet\")\n\n### getTopLevelControllerName\n\nThe name of this workload.\n\n### setTopLevelControllerName\n\nThe name of this workload."]]