groups_assets
Creates, updates, deletes, gets or lists a groups_assets
resource.
Overview
Name | groups_assets |
Type | Resource |
Id | google.migrationcenter.groups_assets |
Fields
The following fields are returned by SELECT
queries:
SELECT
not supported for this resource, use SHOW METHODS
to view available operations for the resource.
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
add_assets | insert | projectsId , locationsId , groupsId | Adds assets to a group. | |
remove_assets | delete | projectsId , locationsId , groupsId | Removes assets from 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 |
INSERT
examples
- add_assets
- Manifest
Adds assets to a group.
INSERT INTO google.migrationcenter.groups_assets (
data__requestId,
data__assets,
data__allowExisting,
projectsId,
locationsId,
groupsId
)
SELECT
'{{ requestId }}',
'{{ assets }}',
{{ allowExisting }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ groupsId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: groups_assets
props:
- name: projectsId
value: string
description: Required parameter for the groups_assets resource.
- name: locationsId
value: string
description: Required parameter for the groups_assets resource.
- name: groupsId
value: string
description: Required parameter for the groups_assets resource.
- name: requestId
value: string
description: >
Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- name: assets
value: object
description: >
Required. List of assets to be added. The maximum number of assets that can be added in a single request is 1000.
- name: allowExisting
value: boolean
description: >
Optional. When this value is set to `false` and one of the given assets is already an existing member of the group, the operation fails with an `Already Exists` error. When set to `true` this situation is silently ignored by the server. Default value is `false`.
DELETE
examples
- remove_assets
Removes assets from a group.
DELETE FROM google.migrationcenter.groups_assets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND groupsId = '{{ groupsId }}' --required;