groups
Creates, updates, deletes, gets or lists a groups
resource.
Overview
Name | groups |
Type | Resource |
Id | google.migrationcenter.groups |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The name of the group. |
createTime | string (google-datetime) | Output only. The timestamp when the group was created. |
description | string | Optional. The description of the group. |
displayName | string | Optional. User-friendly display name. |
labels | object | Labels as key value pairs. |
updateTime | string (google-datetime) | Output only. The timestamp when the group was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The name of the group. |
createTime | string (google-datetime) | Output only. The timestamp when the group was created. |
description | string | Optional. The description of the group. |
displayName | string | Optional. User-friendly display name. |
labels | object | Labels as key value pairs. |
updateTime | string (google-datetime) | Output only. The timestamp when the group was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , groupsId | Gets the details of a group. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Lists all groups in a given project and location. |
create | insert | projectsId , locationsId | groupId , requestId | Creates a new group in a given project and location. |
patch | update | projectsId , locationsId , groupsId | updateMask , requestId | Updates the parameters of a group. |
delete | delete | projectsId , locationsId , groupsId | requestId | Deletes a group. |
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 |
---|---|---|
groupsId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
groupId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets the details of a group.
SELECT
name,
createTime,
description,
displayName,
labels,
updateTime
FROM google.migrationcenter.groups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND groupsId = '{{ groupsId }}' -- required;
Lists all groups in a given project and location.
SELECT
name,
createTime,
description,
displayName,
labels,
updateTime
FROM google.migrationcenter.groups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new group in a given project and location.
INSERT INTO google.migrationcenter.groups (
data__labels,
data__displayName,
data__description,
projectsId,
locationsId,
groupId,
requestId
)
SELECT
'{{ labels }}',
'{{ displayName }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ groupId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: groups
props:
- name: projectsId
value: string
description: Required parameter for the groups resource.
- name: locationsId
value: string
description: Required parameter for the groups resource.
- name: labels
value: object
description: >
Labels as key value pairs.
- name: displayName
value: string
description: >
Optional. User-friendly display name.
- name: description
value: string
description: >
Optional. The description of the group.
- name: groupId
value: string
- name: requestId
value: string
UPDATE
examples
- patch
Updates the parameters of a group.
UPDATE google.migrationcenter.groups
SET
data__labels = '{{ labels }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND groupsId = '{{ groupsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a group.
DELETE FROM google.migrationcenter.groups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND groupsId = '{{ groupsId }}' --required
AND requestId = '{{ requestId }}';