Reference documentation and code samples for the Google Cloud App Hub V1 Client class ServiceProjectAttachment.
ServiceProjectAttachment represents an attachment from a service project to a
host project. Service projects contain the underlying cloud
infrastructure resources, and expose these resources to the host project
through a ServiceProjectAttachment. With the attachments, the host project
can provide an aggregated view of resources across all service projects.
Generated from protobuf messagegoogle.cloud.apphub.v1.ServiceProjectAttachment
Namespace
Google \ Cloud \ AppHub \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."
↳ service_project
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.
Output only. A globally unique identifier (in UUID4 format) for theServiceProjectAttachment.
↳ state
int
Output only. ServiceProjectAttachment state.
getName
Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."
Returns
Type
Description
string
setName
Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getServiceProject
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.
Returns
Type
Description
string
setServiceProject
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud App Hub V1 Client - Class ServiceProjectAttachment (0.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.3.1 (latest)](/php/docs/reference/cloud-apphub/latest/V1.ServiceProjectAttachment)\n- [0.3.0](/php/docs/reference/cloud-apphub/0.3.0/V1.ServiceProjectAttachment)\n- [0.2.0](/php/docs/reference/cloud-apphub/0.2.0/V1.ServiceProjectAttachment)\n- [0.1.6](/php/docs/reference/cloud-apphub/0.1.6/V1.ServiceProjectAttachment) \nReference documentation and code samples for the Google Cloud App Hub V1 Client class ServiceProjectAttachment.\n\nServiceProjectAttachment represents an attachment from a service project to a\nhost project. Service projects contain the underlying cloud\ninfrastructure resources, and expose these resources to the host project\nthrough a ServiceProjectAttachment. With the attachments, the host project\ncan provide an aggregated view of resources across all service projects.\n\nGenerated from protobuf message `google.cloud.apphub.v1.ServiceProjectAttachment`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ AppHub \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nIdentifier. The resource name of a ServiceProjectAttachment. Format:\n`\"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.\"`\n\n### setName\n\nIdentifier. The resource name of a ServiceProjectAttachment. Format:\n`\"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.\"`\n\n### getServiceProject\n\nRequired. Immutable. Service project name in the format: `\"projects/abc\"`\nor `\"projects/123\"`. As input, project name with either project id or\nnumber are accepted. As output, this field will contain project number.\n\n### setServiceProject\n\nRequired. Immutable. Service project name in the format: `\"projects/abc\"`\nor `\"projects/123\"`. As input, project name with either project id or\nnumber are accepted. As output, this field will contain project number.\n\n### getCreateTime\n\nOutput only. Create time.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. Create time.\n\n### getUid\n\nOutput only. A globally unique identifier (in UUID4 format) for the\n`ServiceProjectAttachment`.\n\n### setUid\n\nOutput only. A globally unique identifier (in UUID4 format) for the\n`ServiceProjectAttachment`.\n\n### getState\n\nOutput only. ServiceProjectAttachment state.\n\n### setState\n\nOutput only. ServiceProjectAttachment state."]]