namespaces
Creates, updates, deletes, gets or lists a namespaces
resource.
Overview
Name | namespaces |
Type | Resource |
Id | google.servicedirectory.namespaces |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The resource name for the namespace in the format projects/*/locations/*/namespaces/* . |
labels | object | Optional. Resource labels associated with this namespace. No more than 64 user labels can be associated with a given resource. Label keys and values can be no longer than 63 characters. |
uid | string | Output only. The globally unique identifier of the namespace in the UUID4 format. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, namespacesId, projectsId | Gets a namespace. |
list | SELECT | locationsId, projectsId | Lists all namespaces. |
create | INSERT | locationsId, projectsId | Creates a namespace, and returns the new namespace. |
delete | DELETE | locationsId, namespacesId, projectsId | Deletes a namespace. This also deletes all services and endpoints in the namespace. |
patch | UPDATE | locationsId, namespacesId, projectsId | Updates a namespace. |
SELECT
examples
Lists all namespaces.
SELECT
name,
labels,
uid
FROM google.servicedirectory.namespaces
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new namespaces
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.servicedirectory.namespaces (
locationsId,
projectsId,
name,
labels
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ labels }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: labels
value: object
- name: uid
value: string
UPDATE
example
Updates a namespaces
resource.
/*+ update */
UPDATE google.servicedirectory.namespaces
SET
name = '{{ name }}',
labels = '{{ labels }}'
WHERE
locationsId = '{{ locationsId }}'
AND namespacesId = '{{ namespacesId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified namespaces
resource.
/*+ delete */
DELETE FROM google.servicedirectory.namespaces
WHERE locationsId = '{{ locationsId }}'
AND namespacesId = '{{ namespacesId }}'
AND projectsId = '{{ projectsId }}';