service_project_attachments
Creates, updates, deletes, gets or lists a service_project_attachments
resource.
Overview
Name | service_project_attachments |
Type | Resource |
Id | google.apphub.service_project_attachments |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of a ServiceProjectAttachment. Format: "projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}." |
createTime | string (google-datetime) | Output only. Create time. |
serviceProject | string | Required. Immutable. Service project name in the format: "projects/abc" or "projects/123" . As input, project name with either project id or number are accepted. As output, this field will contain project number. |
state | string | Output only. ServiceProjectAttachment state. |
uid | string | Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment . |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of a ServiceProjectAttachment. Format: "projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}." |
createTime | string (google-datetime) | Output only. Create time. |
serviceProject | string | Required. Immutable. Service project name in the format: "projects/abc" or "projects/123" . As input, project name with either project id or number are accepted. As output, this field will contain project number. |
state | string | Output only. ServiceProjectAttachment state. |
uid | string | Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment . |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , serviceProjectAttachmentsId | Gets a service project attachment. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Lists service projects attached to the host project. |
create | insert | projectsId , locationsId | serviceProjectAttachmentId , requestId | Attaches a service project to the host project. |
delete | delete | projectsId , locationsId , serviceProjectAttachmentsId | requestId | Deletes a service project attachment. |
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 | |
projectsId | string | |
serviceProjectAttachmentsId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
serviceProjectAttachmentId | string |
SELECT
examples
- get
- list
Gets a service project attachment.
SELECT
name,
createTime,
serviceProject,
state,
uid
FROM google.apphub.service_project_attachments
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND serviceProjectAttachmentsId = '{{ serviceProjectAttachmentsId }}' -- required;
Lists service projects attached to the host project.
SELECT
name,
createTime,
serviceProject,
state,
uid
FROM google.apphub.service_project_attachments
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Attaches a service project to the host project.
INSERT INTO google.apphub.service_project_attachments (
data__name,
data__serviceProject,
projectsId,
locationsId,
serviceProjectAttachmentId,
requestId
)
SELECT
'{{ name }}',
'{{ serviceProject }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ serviceProjectAttachmentId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: service_project_attachments
props:
- name: projectsId
value: string
description: Required parameter for the service_project_attachments resource.
- name: locationsId
value: string
description: Required parameter for the service_project_attachments resource.
- name: name
value: string
description: >
Identifier. The resource name of a ServiceProjectAttachment. Format: `"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."`
- name: serviceProject
value: string
description: >
Required. Immutable. Service project name in the format: `"projects/abc"` or `"projects/123"`. As input, project name with either project id or number are accepted. As output, this field will contain project number.
- name: serviceProjectAttachmentId
value: string
- name: requestId
value: string
DELETE
examples
- delete
Deletes a service project attachment.
DELETE FROM google.apphub.service_project_attachments
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND serviceProjectAttachmentsId = '{{ serviceProjectAttachmentsId }}' --required
AND requestId = '{{ requestId }}';