# REST Resource: projects.locations.scopes.namespaces

- [Resource: Namespace](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces#Namespace)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces#Namespace.SCHEMA_REPRESENTATION)
- [NamespaceLifecycleState](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces#NamespaceLifecycleState)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces#NamespaceLifecycleState.SCHEMA_REPRESENTATION)
- [NamespaceLifecycleState.Code](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces#NamespaceLifecycleState.Code)
- [Methods](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces#METHODS_SUMMARY)

## Resource: Namespace

Namespace represents a namespace across the Fleet

| JSON representation |
|---|
| ``` { "name": string, "uid": string, "createTime": string, "updateTime": string, "deleteTime": string, "state": { object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces#NamespaceLifecycleState`) }, "scope": string, "namespaceLabels": { string: string, ... }, "labels": { string: string, ... } } ``` |

| Fields ||
|---|---|
| `name` | `string` The resource name for the namespace `projects/{project}/locations/{location}/namespaces/{namespace}` |
| `uid` | `string` Output only. Google-generated UUID for this resource. This is unique across all namespace resources. If a namespace resource is deleted and another resource with the same name is created, it gets a different uid. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. When the namespace was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. When the namespace was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `deleteTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. When the namespace was deleted. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `state` | ``object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces#NamespaceLifecycleState`)`` Output only. State of the namespace resource. |
| `scope` | `string` Required. Scope associated with the namespace |
| `namespaceLabels` | `map (key: string, value: string)` Optional. Namespace-level cluster namespace labels. These labels are applied to the related namespace of the member clusters bound to the parent Scope. Scope-level labels (`namespaceLabels` in the Fleet Scope resource) take precedence over Namespace-level labels if they share a key. Keys and values must be Kubernetes-conformant. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `labels` | `map (key: string, value: string)` Optional. Labels for this Namespace. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

## NamespaceLifecycleState

NamespaceLifecycleState describes the state of a Namespace resource.

| JSON representation |
|---|
| ``` { "code": enum (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces#NamespaceLifecycleState.Code`) } ``` |

| Fields ||
|---|---|
| `code` | ``enum (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces#NamespaceLifecycleState.Code`)`` Output only. The current state of the Namespace resource. |

## NamespaceLifecycleState.Code

Code describes the state of a Namespace resource.

| Enums ||
|---|---|
| `CODE_UNSPECIFIED` | The code is not set. |
| `CREATING` | The namespace is being created. |
| `READY` | The namespace active. |
| `DELETING` | The namespace is being deleted. |
| `UPDATING` | The namespace is being updated. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces/create` | Creates a fleet namespace. |
| ### `https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces/delete` | Deletes a fleet namespace. |
| ### `https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces/get` | Returns the details of a fleet namespace. |
| ### `https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces/list` | Lists fleet namespaces. |
| ### `https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1beta/projects.locations.scopes.namespaces/patch` | Updates a fleet namespace. |