Reference documentation and code samples for the App Hub V1 API class Google::Cloud::AppHub::V1::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.
(::String) — Identifier. The resource name of a ServiceProjectAttachment. Format:
"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."
#name=
defname=(value)->::String
Parameter
value (::String) — Identifier. The resource name of a ServiceProjectAttachment. Format:
"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."
Returns
(::String) — Identifier. The resource name of a ServiceProjectAttachment. Format:
"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."
#service_project
defservice_project()->::String
Returns
(::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.
#service_project=
defservice_project=(value)->::String
Parameter
value (::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.
Returns
(::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.
[[["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,["# App Hub V1 API - Class Google::Cloud::AppHub::V1::ServiceProjectAttachment (v1.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.0 (latest)](/ruby/docs/reference/google-cloud-app_hub-v1/latest/Google-Cloud-AppHub-V1-ServiceProjectAttachment)\n- [1.1.1](/ruby/docs/reference/google-cloud-app_hub-v1/1.1.1/Google-Cloud-AppHub-V1-ServiceProjectAttachment)\n- [1.0.0](/ruby/docs/reference/google-cloud-app_hub-v1/1.0.0/Google-Cloud-AppHub-V1-ServiceProjectAttachment)\n- [0.3.0](/ruby/docs/reference/google-cloud-app_hub-v1/0.3.0/Google-Cloud-AppHub-V1-ServiceProjectAttachment)\n- [0.2.0](/ruby/docs/reference/google-cloud-app_hub-v1/0.2.0/Google-Cloud-AppHub-V1-ServiceProjectAttachment)\n- [0.1.1](/ruby/docs/reference/google-cloud-app_hub-v1/0.1.1/Google-Cloud-AppHub-V1-ServiceProjectAttachment) \nReference documentation and code samples for the App Hub V1 API class Google::Cloud::AppHub::V1::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\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #create_time\n\n def create_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. Create time.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Identifier. The resource name of a ServiceProjectAttachment. Format: `\"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.\"`\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Identifier. The resource name of a ServiceProjectAttachment. Format: `\"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.\"` \n**Returns**\n\n- (::String) --- Identifier. The resource name of a ServiceProjectAttachment. Format: `\"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.\"`\n\n### #service_project\n\n def service_project() -\u003e ::String\n\n**Returns**\n\n- (::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.\n\n### #service_project=\n\n def service_project=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::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. \n**Returns**\n\n- (::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.\n\n### #state\n\n def state() -\u003e ::Google::Cloud::AppHub::V1::ServiceProjectAttachment::State\n\n**Returns**\n\n- ([::Google::Cloud::AppHub::V1::ServiceProjectAttachment::State](./Google-Cloud-AppHub-V1-ServiceProjectAttachment-State)) --- Output only. ServiceProjectAttachment state.\n\n### #uid\n\n def uid() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. A globally unique identifier (in UUID4 format) for the `ServiceProjectAttachment`."]]