namespaces
Creates, updates, deletes, gets or lists a namespaces
resource.
Overview
Name | namespaces |
Type | Resource |
Id | google.iam.namespaces |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the namespace. |
description | string | Optional. A description of the namespace. Cannot exceed 256 characters. |
disabled | boolean | Optional. Whether the namespace is disabled. If disabled, credentials may no longer be issued for identities within this namespace, however existing credentials will still be accepted until they expire. |
expireTime | string (google-datetime) | Output only. Time after which the namespace will be permanently purged and cannot be recovered. |
ownerService | object | Output only. The Google Cloud service that owns this namespace. (id: OwnerService) |
state | string | Output only. The state of the namespace. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the namespace. |
description | string | Optional. A description of the namespace. Cannot exceed 256 characters. |
disabled | boolean | Optional. Whether the namespace is disabled. If disabled, credentials may no longer be issued for identities within this namespace, however existing credentials will still be accepted until they expire. |
expireTime | string (google-datetime) | Output only. Time after which the namespace will be permanently purged and cannot be recovered. |
ownerService | object | Output only. The Google Cloud service that owns this namespace. (id: OwnerService) |
state | string | Output only. The state of the namespace. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , workloadIdentityPoolsId , namespacesId | Gets an individual WorkloadIdentityPoolNamespace. | |
list | select | projectsId , locationsId , workloadIdentityPoolsId | pageSize , pageToken , showDeleted | Lists all non-deleted WorkloadIdentityPoolNamespaces in a workload identity pool. If show_deleted is set to true , then deleted namespaces are also listed. |
create | insert | projectsId , locationsId , workloadIdentityPoolsId | workloadIdentityPoolNamespaceId | Creates a new WorkloadIdentityPoolNamespace in a WorkloadIdentityPool. |
patch | update | projectsId , locationsId , workloadIdentityPoolsId , namespacesId | updateMask | Updates an existing WorkloadIdentityPoolNamespace in a WorkloadIdentityPool. |
delete | delete | projectsId , locationsId , workloadIdentityPoolsId , namespacesId | Deletes a WorkloadIdentityPoolNamespace. You can undelete a namespace for 30 days. After 30 days, deletion is permanent. | |
undelete | exec | projectsId , locationsId , workloadIdentityPoolsId , namespacesId | Undeletes a WorkloadIdentityPoolNamespace, as long as it was deleted fewer than 30 days ago. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
namespacesId | string | |
projectsId | string | |
workloadIdentityPoolsId | string | |
pageSize | integer (int32) | |
pageToken | string | |
showDeleted | boolean | |
updateMask | string (google-fieldmask) | |
workloadIdentityPoolNamespaceId | string |
SELECT
examples
- get
- list
Gets an individual WorkloadIdentityPoolNamespace.
SELECT
name,
description,
disabled,
expireTime,
ownerService,
state
FROM google.iam.namespaces
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND workloadIdentityPoolsId = '{{ workloadIdentityPoolsId }}' -- required
AND namespacesId = '{{ namespacesId }}' -- required;
Lists all non-deleted WorkloadIdentityPoolNamespaces in a workload identity pool. If show_deleted
is set to true
, then deleted namespaces are also listed.
SELECT
name,
description,
disabled,
expireTime,
ownerService,
state
FROM google.iam.namespaces
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND workloadIdentityPoolsId = '{{ workloadIdentityPoolsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND showDeleted = '{{ showDeleted }}';
INSERT
examples
- create
- Manifest
Creates a new WorkloadIdentityPoolNamespace in a WorkloadIdentityPool.
INSERT INTO google.iam.namespaces (
data__description,
data__disabled,
projectsId,
locationsId,
workloadIdentityPoolsId,
workloadIdentityPoolNamespaceId
)
SELECT
'{{ description }}',
{{ disabled }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ workloadIdentityPoolsId }}',
'{{ workloadIdentityPoolNamespaceId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: namespaces
props:
- name: projectsId
value: string
description: Required parameter for the namespaces resource.
- name: locationsId
value: string
description: Required parameter for the namespaces resource.
- name: workloadIdentityPoolsId
value: string
description: Required parameter for the namespaces resource.
- name: description
value: string
description: >
Optional. A description of the namespace. Cannot exceed 256 characters.
- name: disabled
value: boolean
description: >
Optional. Whether the namespace is disabled. If disabled, credentials may no longer be issued for identities within this namespace, however existing credentials will still be accepted until they expire.
- name: workloadIdentityPoolNamespaceId
value: string
UPDATE
examples
- patch
Updates an existing WorkloadIdentityPoolNamespace in a WorkloadIdentityPool.
UPDATE google.iam.namespaces
SET
data__description = '{{ description }}',
data__disabled = {{ disabled }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND workloadIdentityPoolsId = '{{ workloadIdentityPoolsId }}' --required
AND namespacesId = '{{ namespacesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a WorkloadIdentityPoolNamespace. You can undelete a namespace for 30 days. After 30 days, deletion is permanent.
DELETE FROM google.iam.namespaces
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND workloadIdentityPoolsId = '{{ workloadIdentityPoolsId }}' --required
AND namespacesId = '{{ namespacesId }}' --required;
Lifecycle Methods
- undelete
Undeletes a WorkloadIdentityPoolNamespace, as long as it was deleted fewer than 30 days ago.
EXEC google.iam.namespaces.undelete
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@workloadIdentityPoolsId='{{ workloadIdentityPoolsId }}' --required,
@namespacesId='{{ namespacesId }}' --required;