Reference documentation and code samples for the Stackdriver Monitoring V3 Client class GkeNamespace.
GKE Namespace. The field names correspond to the resource metadata labels
on monitored resources that fall under a namespace (for example,k8s_containerork8s_pod).
Generated from protobuf messagegoogle.monitoring.v3.Service.GkeNamespace
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 this namespace.
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.
[[["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 GkeNamespace (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-monitoring/latest/V3.Service.GkeNamespace)\n- [2.1.1](/php/docs/reference/cloud-monitoring/2.1.1/V3.Service.GkeNamespace)\n- [2.0.1](/php/docs/reference/cloud-monitoring/2.0.1/V3.Service.GkeNamespace)\n- [1.12.1](/php/docs/reference/cloud-monitoring/1.12.1/V3.Service.GkeNamespace)\n- [1.11.1](/php/docs/reference/cloud-monitoring/1.11.1/V3.Service.GkeNamespace)\n- [1.10.3](/php/docs/reference/cloud-monitoring/1.10.3/V3.Service.GkeNamespace)\n- [1.9.0](/php/docs/reference/cloud-monitoring/1.9.0/V3.Service.GkeNamespace)\n- [1.8.0](/php/docs/reference/cloud-monitoring/1.8.0/V3.Service.GkeNamespace)\n- [1.7.1](/php/docs/reference/cloud-monitoring/1.7.1/V3.Service.GkeNamespace)\n- [1.6.0](/php/docs/reference/cloud-monitoring/1.6.0/V3.Service.GkeNamespace)\n- [1.5.1](/php/docs/reference/cloud-monitoring/1.5.1/V3.Service.GkeNamespace)\n- [1.4.0](/php/docs/reference/cloud-monitoring/1.4.0/V3.Service.GkeNamespace)\n- [1.3.2](/php/docs/reference/cloud-monitoring/1.3.2/V3.Service.GkeNamespace)\n- [1.2.2](/php/docs/reference/cloud-monitoring/1.2.2/V3.Service.GkeNamespace) \nReference documentation and code samples for the Stackdriver Monitoring V3 Client class GkeNamespace.\n\nGKE Namespace. The field names correspond to the resource metadata labels\non monitored resources that fall under a namespace (for example,\n`k8s_container` or `k8s_pod`).\n\nGenerated from protobuf message `google.monitoring.v3.Service.GkeNamespace`\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 this namespace.\n\n### setNamespaceName\n\nThe name of this namespace."]]