xref: /aosp_15_r20/external/googleapis/google/cloud/managedidentities/v1/resource.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2019 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//
15
16syntax = "proto3";
17
18package google.cloud.managedidentities.v1;
19
20import "google/api/field_behavior.proto";
21import "google/api/resource.proto";
22import "google/protobuf/timestamp.proto";
23
24option csharp_namespace = "Google.Cloud.ManagedIdentities.V1";
25option go_package = "cloud.google.com/go/managedidentities/apiv1/managedidentitiespb;managedidentitiespb";
26option java_multiple_files = true;
27option java_outer_classname = "ResourceProto";
28option java_package = "com.google.cloud.managedidentities.v1";
29option php_namespace = "Google\\Cloud\\ManagedIdentities\\V1";
30option ruby_package = "Google::Cloud::ManagedIdentities::V1";
31
32// Represents a managed Microsoft Active Directory domain.
33message Domain {
34  option (google.api.resource) = {
35    type: "managedidentities.googleapis.com/Domain"
36    pattern: "projects/{project}/locations/{location}/domains/{domain}"
37  };
38
39  // Represents the different states of a managed domain.
40  enum State {
41    // Not set.
42    STATE_UNSPECIFIED = 0;
43
44    // The domain is being created.
45    CREATING = 1;
46
47    // The domain has been created and is fully usable.
48    READY = 2;
49
50    // The domain's configuration is being updated.
51    UPDATING = 3;
52
53    // The domain is being deleted.
54    DELETING = 4;
55
56    // The domain is being repaired and may be unusable. Details
57    // can be found in the `status_message` field.
58    REPAIRING = 5;
59
60    // The domain is undergoing maintenance.
61    PERFORMING_MAINTENANCE = 6;
62
63    // The domain is not serving requests.
64    UNAVAILABLE = 7;
65  }
66
67  // Required. The unique name of the domain using the form:
68  // `projects/{project_id}/locations/global/domains/{domain_name}`.
69  string name = 1 [(google.api.field_behavior) = REQUIRED];
70
71  // Optional. Resource labels that can contain user-provided metadata.
72  map<string, string> labels = 2 [(google.api.field_behavior) = OPTIONAL];
73
74  // Optional. The full names of the Google Compute Engine
75  // [networks](/compute/docs/networks-and-firewalls#networks) the domain
76  // instance is connected to. Networks can be added using UpdateDomain.
77  // The domain is only available on networks listed in `authorized_networks`.
78  // If CIDR subnets overlap between networks, domain creation will fail.
79  repeated string authorized_networks = 3 [(google.api.field_behavior) = OPTIONAL];
80
81  // Required. The CIDR range of internal addresses that are reserved for this
82  // domain. Reserved networks must be /24 or larger. Ranges must be
83  // unique and non-overlapping with existing subnets in
84  // [Domain].[authorized_networks].
85  string reserved_ip_range = 4 [(google.api.field_behavior) = REQUIRED];
86
87  // Required. Locations where domain needs to be provisioned.
88  // [regions][compute/docs/regions-zones/]
89  // e.g. us-west1 or us-east4
90  // Service supports up to 4 locations at once. Each location will use a /26
91  // block.
92  repeated string locations = 5 [(google.api.field_behavior) = REQUIRED];
93
94  // Optional. The name of delegated administrator account used to perform
95  // Active Directory operations. If not specified, `setupadmin` will be used.
96  string admin = 6 [(google.api.field_behavior) = OPTIONAL];
97
98  // Output only. The fully-qualified domain name of the exposed domain used by
99  // clients to connect to the service. Similar to what would be chosen for an
100  // Active Directory set up on an internal network.
101  string fqdn = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
102
103  // Output only. The time the instance was created.
104  google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
105
106  // Output only. The last update time.
107  google.protobuf.Timestamp update_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
108
109  // Output only. The current state of this domain.
110  State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
111
112  // Output only. Additional information about the current status of this
113  // domain, if available.
114  string status_message = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
115
116  // Output only. The current trusts associated with the domain.
117  repeated Trust trusts = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
118}
119
120// Represents a relationship between two domains. This allows a controller in
121// one domain to authenticate a user in another domain.
122message Trust {
123  // Represents the different states of a domain trust.
124  enum State {
125    // Not set.
126    STATE_UNSPECIFIED = 0;
127
128    // The domain trust is being created.
129    CREATING = 1;
130
131    // The domain trust is being updated.
132    UPDATING = 2;
133
134    // The domain trust is being deleted.
135    DELETING = 3;
136
137    // The domain trust is connected.
138    CONNECTED = 4;
139
140    // The domain trust is disconnected.
141    DISCONNECTED = 5;
142  }
143
144  // Represents the different inter-forest trust types.
145  enum TrustType {
146    // Not set.
147    TRUST_TYPE_UNSPECIFIED = 0;
148
149    // The forest trust.
150    FOREST = 1;
151
152    // The external domain trust.
153    EXTERNAL = 2;
154  }
155
156  // Represents the direction of trust.
157  // See
158  // [System.DirectoryServices.ActiveDirectory.TrustDirection](https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.activedirectory.trustdirection?view=netframework-4.7.2)
159  // for more information.
160  enum TrustDirection {
161    // Not set.
162    TRUST_DIRECTION_UNSPECIFIED = 0;
163
164    // The inbound direction represents the trusting side.
165    INBOUND = 1;
166
167    // The outboud direction represents the trusted side.
168    OUTBOUND = 2;
169
170    // The bidirectional direction represents the trusted / trusting side.
171    BIDIRECTIONAL = 3;
172  }
173
174  // Required. The fully qualified target domain name which will be in trust with the
175  // current domain.
176  string target_domain_name = 1 [(google.api.field_behavior) = REQUIRED];
177
178  // Required. The type of trust represented by the trust resource.
179  TrustType trust_type = 2 [(google.api.field_behavior) = REQUIRED];
180
181  // Required. The trust direction, which decides if the current domain is trusted,
182  // trusting, or both.
183  TrustDirection trust_direction = 3 [(google.api.field_behavior) = REQUIRED];
184
185  // Optional. The trust authentication type, which decides whether the trusted side has
186  // forest/domain wide access or selective access to an approved set of
187  // resources.
188  bool selective_authentication = 4 [(google.api.field_behavior) = OPTIONAL];
189
190  // Required. The target DNS server IP addresses which can resolve the remote domain
191  // involved in the trust.
192  repeated string target_dns_ip_addresses = 5 [(google.api.field_behavior) = REQUIRED];
193
194  // Required. The trust secret used for the handshake with the target domain. This will
195  // not be stored.
196  string trust_handshake_secret = 6 [(google.api.field_behavior) = REQUIRED];
197
198  // Output only. The time the instance was created.
199  google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
200
201  // Output only. The last update time.
202  google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
203
204  // Output only. The current state of the trust.
205  State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
206
207  // Output only. Additional information about the current state of the trust, if available.
208  string state_description = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
209
210  // Output only. The last heartbeat time when the trust was known to be connected.
211  google.protobuf.Timestamp last_trust_heartbeat_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
212}
213