xref: /aosp_15_r20/external/googleapis/google/cloud/apphub/v1/service_project_attachment.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.apphub.v1;
18
19import "google/api/field_behavior.proto";
20import "google/api/field_info.proto";
21import "google/api/resource.proto";
22import "google/protobuf/timestamp.proto";
23
24option csharp_namespace = "Google.Cloud.AppHub.V1";
25option go_package = "cloud.google.com/go/apphub/apiv1/apphubpb;apphubpb";
26option java_multiple_files = true;
27option java_outer_classname = "ServiceProjectAttachmentProto";
28option java_package = "com.google.cloud.apphub.v1";
29option php_namespace = "Google\\Cloud\\AppHub\\V1";
30option ruby_package = "Google::Cloud::AppHub::V1";
31
32// ServiceProjectAttachment represents an attachment from a service project to a
33// host project. Service projects contain the underlying cloud
34// infrastructure resources, and expose these resources to the host project
35// through a ServiceProjectAttachment. With the attachments, the host project
36// can provide an aggregated view of resources across all service projects.
37message ServiceProjectAttachment {
38  option (google.api.resource) = {
39    type: "apphub.googleapis.com/ServiceProjectAttachment"
40    pattern: "projects/{project}/locations/{location}/serviceProjectAttachments/{service_project_attachment}"
41    plural: "serviceProjectAttachments"
42    singular: "serviceProjectAttachment"
43  };
44
45  // ServiceProjectAttachment state.
46  enum State {
47    // Unspecified state.
48    STATE_UNSPECIFIED = 0;
49
50    // The ServiceProjectAttachment is being created.
51    CREATING = 1;
52
53    // The ServiceProjectAttachment is ready.
54    // This means Services and Workloads under the corresponding
55    // ServiceProjectAttachment is ready for registration.
56    ACTIVE = 2;
57
58    // The ServiceProjectAttachment is being deleted.
59    DELETING = 3;
60  }
61
62  // Identifier. The resource name of a ServiceProjectAttachment. Format:
63  // "projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."
64  string name = 1 [(google.api.field_behavior) = IDENTIFIER];
65
66  // Required. Immutable. Service project name in the format: "projects/abc" or
67  // "projects/123". As input, project name with either project id or number are
68  // accepted. As output, this field will contain project number.
69  string service_project = 2 [
70    (google.api.field_behavior) = REQUIRED,
71    (google.api.field_behavior) = IMMUTABLE,
72    (google.api.resource_reference) = {
73      type: "cloudresourcemanager.googleapis.com/Project"
74    }
75  ];
76
77  // Output only. Create time.
78  google.protobuf.Timestamp create_time = 3
79      [(google.api.field_behavior) = OUTPUT_ONLY];
80
81  // Output only. A globally unique identifier (in UUID4 format) for the
82  // `ServiceProjectAttachment`.
83  string uid = 4 [
84    (google.api.field_info).format = UUID4,
85    (google.api.field_behavior) = OUTPUT_ONLY
86  ];
87
88  // Output only. ServiceProjectAttachment state.
89  State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
90}
91