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

NameDatatypeDescription
namestringIdentifier. The resource name of a ServiceProjectAttachment. Format: "projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."
createTimestringOutput 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

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, serviceProjectAttachmentsIdGets a service project attachment.
listSELECTlocationsId, projectsIdLists service projects attached to the host project.
createINSERTlocationsId, projectsIdAttaches a service project to the host project.
deleteDELETElocationsId, projectsId, serviceProjectAttachmentsIdDeletes a service project attachment.

SELECT examples

Lists service projects attached to the host project.

SELECT
name,
createTime,
serviceProject,
state,
uid
FROM google.apphub.service_project_attachments
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new service_project_attachments resource.

/*+ create */
INSERT INTO google.apphub.service_project_attachments (
locationsId,
projectsId,
name,
serviceProject
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ serviceProject }}'
;

DELETE example

Deletes the specified service_project_attachments resource.

/*+ delete */
DELETE FROM google.apphub.service_project_attachments
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND serviceProjectAttachmentsId = '{{ serviceProjectAttachmentsId }}';