Skip to main content

service_project_attachments

Creates, updates, deletes, gets or lists a service_project_attachments resource.

Overview

Nameservice_project_attachments
TypeResource
Idgoogle.apphub.service_project_attachments

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of a ServiceProjectAttachment. Format: "projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."
createTimestring (google-datetime)Output only. Create time.
serviceProjectstringRequired. 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.
statestringOutput only. ServiceProjectAttachment state.
uidstringOutput only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, serviceProjectAttachmentsIdGets a service project attachment.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists service projects attached to the host project.
createinsertprojectsId, locationsIdserviceProjectAttachmentId, requestIdAttaches a service project to the host project.
deletedeleteprojectsId, locationsId, serviceProjectAttachmentsIdrequestIdDeletes 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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
serviceProjectAttachmentsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
serviceProjectAttachmentIdstring

SELECT examples

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;

INSERT examples

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
;

DELETE examples

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 }}';