blob: 18aa84d277a7337ea06ea28b0c5dd5db1ac27a0c [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="serviceconsumermanagement_v1.html">Service Consumer Management API</a> . <a href="serviceconsumermanagement_v1.services.html">services</a> . <a href="serviceconsumermanagement_v1.services.tenancyUnits.html">tenancyUnits</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addProject">addProject(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Add a new tenant project to the tenancy unit.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#applyProjectConfig">applyProjectConfig(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Apply a configuration to an existing tenant project.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#attachProject">attachProject(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Attach an existing project to the tenancy unit as a new tenant</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Creates a tenancy unit with no tenant resources.</p>
89<p class="toc_element">
90 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
91<p class="firstline">Delete a tenancy unit. Before you delete the tenancy unit, there should be</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#deleteProject">deleteProject(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Deletes the specified project resource identified by a tenant resource tag.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None, filter=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Find the tenancy unit for a managed service and service consumer.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#removeProject">removeProject(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Removes the specified project resource identified by a tenant resource tag.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#undeleteProject">undeleteProject(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Attempts to undelete a previously deleted tenant project. The project must</p>
107<h3>Method Details</h3>
108<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 <code class="details" id="addProject">addProject(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 <pre>Add a new tenant project to the tenancy unit.
111There can be a maximum of 512 tenant projects in a tenancy unit.
112If there are previously failed `AddTenantProject` calls, you might need to
113call `RemoveTenantProject` first to resolve them before you can make
114another call to `AddTenantProject` with the same tag.
Dan O'Mearadd494642020-05-01 07:42:23 -0700115Operation&lt;response: Empty&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700116
117Args:
118 parent: string, Name of the tenancy unit.
119Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121 The object takes the form of:
122
123{ # Request to add a newly created and configured tenant project to a tenancy
124 # unit.
125 "projectConfig": { # This structure defines a tenant project to be added to the specified tenancy # Configuration of the new tenant project to be added to tenancy unit
126 # resources.
127 # unit and its initial configuration and properties. A project lien is created
128 # for the tenant project to prevent the tenant project from being deleted
129 # accidentally. The lien is deleted as part of tenant project removal.
130 "billingConfig": { # Describes the billing configuration for a new tenant project. # Billing account properties. The billing account must be specified.
131 "billingAccount": "A String", # Name of the billing account.
132 # For example `billingAccounts/012345-567890-ABCDEF`.
133 },
134 "labels": { # Labels that are applied to this project.
135 "a_key": "A String",
136 },
137 "serviceAccountConfig": { # Describes the service account configuration for the tenant project. # Configuration for the IAM service account on the tenant project.
138 "tenantProjectRoles": [ # Roles for the associated service account for the tenant project.
139 "A String",
140 ],
141 "accountId": "A String", # ID of the IAM service account to be created in tenant project.
142 # The email format of the service account is
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 # "&lt;account-id&gt;@&lt;tenant-project-id&gt;.iam.gserviceaccount.com".
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 # This account ID must be unique within tenant project and service
145 # producers have to guarantee it. The ID must be 6-30 characters long, and
146 # match the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])`.
147 },
148 "services": [ # Google Cloud API names of services that are activated on this project
149 # during provisioning. If any of these services can't be activated,
150 # the request fails.
151 # For example: 'compute.googleapis.com','cloudfunctions.googleapis.com'
152 "A String",
153 ],
154 "folder": "A String", # Folder where project in this tenancy unit must be located
155 # This folder must have been previously created with the required
156 # permissions for the caller to create and configure a project in it.
157 # Valid folder resource names have the format `folders/{folder_number}`
158 # (for example, `folders/123456`).
159 "tenantProjectPolicy": { # Describes policy settings that need to be applied to a newly # Describes ownership and policies for the new tenant project. Required.
160 # created tenant project.
161 "policyBindings": [ # Policy bindings to be applied to the tenant project, in addition to the
162 # 'roles/owner' role granted to the Service Consumer Management service
163 # account.
164 # At least one binding must have the role `roles/owner`. Among the list of
165 # members for `roles/owner`, at least one of them must be either the `user`
166 # or `group` type.
167 { # Translates to IAM Policy bindings (without auditing at this level)
168 "role": "A String", # Role. (https://cloud.google.com/iam/docs/understanding-roles)
169 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
170 "members": [ # Uses the same format as in IAM policy.
171 # `member` must include both a prefix and ID. For example, `user:{emailId}`,
172 # `serviceAccount:{emailId}`, `group:{emailId}`.
173 "A String",
174 ],
175 },
176 ],
177 },
178 },
179 "tag": "A String", # Tag of the added project. Must be less than 128 characters. Required.
180 }
181
182 x__xgafv: string, V1 error format.
183 Allowed values
184 1 - v1 error format
185 2 - v2 error format
186
187Returns:
188 An object of the form:
189
190 { # This resource represents a long-running operation that is the result of a
191 # network API call.
192 "metadata": { # Service-specific metadata associated with the operation. It typically
193 # contains progress information and common metadata such as create time.
194 # Some services might not provide such metadata. Any method that returns a
195 # long-running operation should document the metadata type, if any.
196 "a_key": "", # Properties of the object. Contains field @type with type URL.
197 },
198 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
199 # different programming environments, including REST APIs and RPC APIs. It is
200 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
201 # three pieces of data: error code, error message, and error details.
202 #
203 # You can find out more about this error model and how to work with it in the
204 # [API Design Guide](https://cloud.google.com/apis/design/errors).
205 "message": "A String", # A developer-facing error message, which should be in English. Any
206 # user-facing error message should be localized and sent in the
207 # google.rpc.Status.details field, or localized by the client.
208 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
209 "details": [ # A list of messages that carry the error details. There is a common set of
210 # message types for APIs to use.
211 {
212 "a_key": "", # Properties of the object. Contains field @type with type URL.
213 },
214 ],
215 },
216 "done": True or False, # If the value is `false`, it means the operation is still in progress.
217 # If `true`, the operation is completed, and either `error` or `response` is
218 # available.
219 "response": { # The normal response of the operation in case of success. If the original
220 # method returns no data on success, such as `Delete`, the response is
221 # `google.protobuf.Empty`. If the original method is standard
222 # `Get`/`Create`/`Update`, the response should be the resource. For other
223 # methods, the response should have the type `XxxResponse`, where `Xxx`
224 # is the original method name. For example, if the original method name
225 # is `TakeSnapshot()`, the inferred response type is
226 # `TakeSnapshotResponse`.
227 "a_key": "", # Properties of the object. Contains field @type with type URL.
228 },
229 "name": "A String", # The server-assigned name, which is only unique within the same service that
230 # originally returns it. If you use the default HTTP mapping, the
231 # `name` should be a resource name ending with `operations/{unique_id}`.
232 }</pre>
233</div>
234
235<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700236 <code class="details" id="applyProjectConfig">applyProjectConfig(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700237 <pre>Apply a configuration to an existing tenant project.
238This project must exist in an active state and have the original owner
239account. The caller must have permission to add a project to the given
240tenancy unit. The configuration is applied, but any existing settings on
241the project aren't modified.
242Specified policy bindings are applied. Existing bindings aren't modified.
243Specified services are activated. No service is deactivated.
244If specified, new billing configuration is applied.
245Omit a billing configuration to keep the existing one.
246A service account in the project is created if previously non existed.
247Specified labels will be appended to tenant project, note that the value of
248existing label key will be updated if the same label key is requested.
249The specified folder is ignored, as moving a tenant project to a different
250folder isn't supported.
251The operation fails if any of the steps fail, but no rollback of already
252applied configuration changes is attempted.
Dan O'Mearadd494642020-05-01 07:42:23 -0700253Operation&lt;response: Empty&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254
255Args:
256 name: string, Name of the tenancy unit.
257Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700258 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 The object takes the form of:
260
261{ # Request to apply configuration to an existing tenant project.
262 "projectConfig": { # This structure defines a tenant project to be added to the specified tenancy # Configuration that should be applied to the existing tenant project.
263 # unit and its initial configuration and properties. A project lien is created
264 # for the tenant project to prevent the tenant project from being deleted
265 # accidentally. The lien is deleted as part of tenant project removal.
266 "billingConfig": { # Describes the billing configuration for a new tenant project. # Billing account properties. The billing account must be specified.
267 "billingAccount": "A String", # Name of the billing account.
268 # For example `billingAccounts/012345-567890-ABCDEF`.
269 },
270 "labels": { # Labels that are applied to this project.
271 "a_key": "A String",
272 },
273 "serviceAccountConfig": { # Describes the service account configuration for the tenant project. # Configuration for the IAM service account on the tenant project.
274 "tenantProjectRoles": [ # Roles for the associated service account for the tenant project.
275 "A String",
276 ],
277 "accountId": "A String", # ID of the IAM service account to be created in tenant project.
278 # The email format of the service account is
Dan O'Mearadd494642020-05-01 07:42:23 -0700279 # "&lt;account-id&gt;@&lt;tenant-project-id&gt;.iam.gserviceaccount.com".
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 # This account ID must be unique within tenant project and service
281 # producers have to guarantee it. The ID must be 6-30 characters long, and
282 # match the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])`.
283 },
284 "services": [ # Google Cloud API names of services that are activated on this project
285 # during provisioning. If any of these services can't be activated,
286 # the request fails.
287 # For example: 'compute.googleapis.com','cloudfunctions.googleapis.com'
288 "A String",
289 ],
290 "folder": "A String", # Folder where project in this tenancy unit must be located
291 # This folder must have been previously created with the required
292 # permissions for the caller to create and configure a project in it.
293 # Valid folder resource names have the format `folders/{folder_number}`
294 # (for example, `folders/123456`).
295 "tenantProjectPolicy": { # Describes policy settings that need to be applied to a newly # Describes ownership and policies for the new tenant project. Required.
296 # created tenant project.
297 "policyBindings": [ # Policy bindings to be applied to the tenant project, in addition to the
298 # 'roles/owner' role granted to the Service Consumer Management service
299 # account.
300 # At least one binding must have the role `roles/owner`. Among the list of
301 # members for `roles/owner`, at least one of them must be either the `user`
302 # or `group` type.
303 { # Translates to IAM Policy bindings (without auditing at this level)
304 "role": "A String", # Role. (https://cloud.google.com/iam/docs/understanding-roles)
305 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
306 "members": [ # Uses the same format as in IAM policy.
307 # `member` must include both a prefix and ID. For example, `user:{emailId}`,
308 # `serviceAccount:{emailId}`, `group:{emailId}`.
309 "A String",
310 ],
311 },
312 ],
313 },
314 },
315 "tag": "A String", # Tag of the project. Must be less than 128 characters. Required.
316 }
317
318 x__xgafv: string, V1 error format.
319 Allowed values
320 1 - v1 error format
321 2 - v2 error format
322
323Returns:
324 An object of the form:
325
326 { # This resource represents a long-running operation that is the result of a
327 # network API call.
328 "metadata": { # Service-specific metadata associated with the operation. It typically
329 # contains progress information and common metadata such as create time.
330 # Some services might not provide such metadata. Any method that returns a
331 # long-running operation should document the metadata type, if any.
332 "a_key": "", # Properties of the object. Contains field @type with type URL.
333 },
334 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
335 # different programming environments, including REST APIs and RPC APIs. It is
336 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
337 # three pieces of data: error code, error message, and error details.
338 #
339 # You can find out more about this error model and how to work with it in the
340 # [API Design Guide](https://cloud.google.com/apis/design/errors).
341 "message": "A String", # A developer-facing error message, which should be in English. Any
342 # user-facing error message should be localized and sent in the
343 # google.rpc.Status.details field, or localized by the client.
344 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
345 "details": [ # A list of messages that carry the error details. There is a common set of
346 # message types for APIs to use.
347 {
348 "a_key": "", # Properties of the object. Contains field @type with type URL.
349 },
350 ],
351 },
352 "done": True or False, # If the value is `false`, it means the operation is still in progress.
353 # If `true`, the operation is completed, and either `error` or `response` is
354 # available.
355 "response": { # The normal response of the operation in case of success. If the original
356 # method returns no data on success, such as `Delete`, the response is
357 # `google.protobuf.Empty`. If the original method is standard
358 # `Get`/`Create`/`Update`, the response should be the resource. For other
359 # methods, the response should have the type `XxxResponse`, where `Xxx`
360 # is the original method name. For example, if the original method name
361 # is `TakeSnapshot()`, the inferred response type is
362 # `TakeSnapshotResponse`.
363 "a_key": "", # Properties of the object. Contains field @type with type URL.
364 },
365 "name": "A String", # The server-assigned name, which is only unique within the same service that
366 # originally returns it. If you use the default HTTP mapping, the
367 # `name` should be a resource name ending with `operations/{unique_id}`.
368 }</pre>
369</div>
370
371<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700372 <code class="details" id="attachProject">attachProject(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700373 <pre>Attach an existing project to the tenancy unit as a new tenant
374resource. The project could either be the tenant project reserved by
375calling `AddTenantProject` under a tenancy unit of a service producer's
376project of a managed service, or from a separate project.
377The caller is checked against a set of permissions as if calling
378`AddTenantProject` on the same service consumer.
379To trigger the attachment, the targeted tenant project must be in a
380folder. Make sure the ServiceConsumerManagement service account is
381the owner of that project. These two requirements are already met
382if the project is reserved by calling `AddTenantProject`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700383Operation&lt;response: Empty&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700384
385Args:
386 name: string, Name of the tenancy unit that the project will be attached to.
387Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700388 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700389 The object takes the form of:
390
391{ # Request to attach an existing project to the tenancy unit as a new tenant
392 # resource.
393 "reservedResource": "A String", # When attaching a reserved project already in tenancy units, this is the
394 # tag of a tenant resource under the tenancy unit for the managed service's
395 # service producer project. The reserved tenant resource must be in an
396 # active state.
397 "externalResource": "A String", # When attaching an external project, this is in the format of
398 # `projects/{project_number}`.
399 "tag": "A String", # Tag of the tenant resource after attachment.
400 # Must be less than 128 characters. Required.
401 }
402
403 x__xgafv: string, V1 error format.
404 Allowed values
405 1 - v1 error format
406 2 - v2 error format
407
408Returns:
409 An object of the form:
410
411 { # This resource represents a long-running operation that is the result of a
412 # network API call.
413 "metadata": { # Service-specific metadata associated with the operation. It typically
414 # contains progress information and common metadata such as create time.
415 # Some services might not provide such metadata. Any method that returns a
416 # long-running operation should document the metadata type, if any.
417 "a_key": "", # Properties of the object. Contains field @type with type URL.
418 },
419 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
420 # different programming environments, including REST APIs and RPC APIs. It is
421 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
422 # three pieces of data: error code, error message, and error details.
423 #
424 # You can find out more about this error model and how to work with it in the
425 # [API Design Guide](https://cloud.google.com/apis/design/errors).
426 "message": "A String", # A developer-facing error message, which should be in English. Any
427 # user-facing error message should be localized and sent in the
428 # google.rpc.Status.details field, or localized by the client.
429 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
430 "details": [ # A list of messages that carry the error details. There is a common set of
431 # message types for APIs to use.
432 {
433 "a_key": "", # Properties of the object. Contains field @type with type URL.
434 },
435 ],
436 },
437 "done": True or False, # If the value is `false`, it means the operation is still in progress.
438 # If `true`, the operation is completed, and either `error` or `response` is
439 # available.
440 "response": { # The normal response of the operation in case of success. If the original
441 # method returns no data on success, such as `Delete`, the response is
442 # `google.protobuf.Empty`. If the original method is standard
443 # `Get`/`Create`/`Update`, the response should be the resource. For other
444 # methods, the response should have the type `XxxResponse`, where `Xxx`
445 # is the original method name. For example, if the original method name
446 # is `TakeSnapshot()`, the inferred response type is
447 # `TakeSnapshotResponse`.
448 "a_key": "", # Properties of the object. Contains field @type with type URL.
449 },
450 "name": "A String", # The server-assigned name, which is only unique within the same service that
451 # originally returns it. If you use the default HTTP mapping, the
452 # `name` should be a resource name ending with `operations/{unique_id}`.
453 }</pre>
454</div>
455
456<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700457 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700458 <pre>Creates a tenancy unit with no tenant resources.
Dan O'Mearadd494642020-05-01 07:42:23 -0700459If tenancy unit already exists, it will be returned,
460however, in this case, returned TenancyUnit does not have tenant_resources
461field set and ListTenancyUnit has to be used to get a complete
462TenancyUnit with all fields populated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700463
464Args:
465 parent: string, services/{service}/{collection id}/{resource id}
466{collection id} is the cloud resource collection type representing the
467service consumer, for example 'projects', or 'organizations'.
468{resource id} is the consumer numeric id, such as project number: '123456'.
469{service} the name of a managed service, such as 'service.googleapis.com'.
470Enables service binding using the new tenancy unit. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700471 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700472 The object takes the form of:
473
474{ # Request to create a tenancy unit for a service consumer of a managed service.
475 "tenancyUnitId": "A String", # Optional service producer-provided identifier of the tenancy unit.
476 # Must be no longer than 40 characters and preferably URI friendly.
477 # If it isn't provided, a UID for the tenancy unit is automatically
478 # generated. The identifier must be unique across a managed service.
479 # If the tenancy unit already exists for the managed service and service
480 # consumer pair, calling `CreateTenancyUnit` returns the existing tenancy
481 # unit if the provided identifier is identical or empty, otherwise the call
482 # fails.
483 }
484
485 x__xgafv: string, V1 error format.
486 Allowed values
487 1 - v1 error format
488 2 - v2 error format
489
490Returns:
491 An object of the form:
492
493 { # Representation of a tenancy unit.
494 "tenantResources": [ # Resources constituting the tenancy unit.
495 # There can be at most 512 tenant resources in a tenancy unit.
496 { # Resource constituting the TenancyUnit.
497 "status": "A String", # Status of tenant resource.
498 "tag": "A String", # Unique per single tenancy unit.
499 "resource": "A String", # @OutputOnly Identifier of the tenant resource.
500 # For cloud projects, it is in the form 'projects/{number}'.
501 # For example 'projects/123456'.
502 },
503 ],
504 "consumer": "A String", # @OutputOnly Cloud resource name of the consumer of this service.
505 # For example 'projects/123456'.
506 "createTime": "A String", # @OutputOnly The time this tenancy unit was created.
507 "service": "A String", # Output only. Google Cloud API name of the managed service owning this
508 # tenancy unit.
509 # For example 'serviceconsumermanagement.googleapis.com'.
510 "name": "A String", # Globally unique identifier of this tenancy unit
511 # "services/{service}/{collection id}/{resource id}/tenancyUnits/{unit}"
512 }</pre>
513</div>
514
515<div class="method">
516 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
517 <pre>Delete a tenancy unit. Before you delete the tenancy unit, there should be
518no tenant resources in it that aren't in a DELETED state.
Dan O'Mearadd494642020-05-01 07:42:23 -0700519Operation&lt;response: Empty&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700520
521Args:
522 name: string, Name of the tenancy unit to be deleted. (required)
523 x__xgafv: string, V1 error format.
524 Allowed values
525 1 - v1 error format
526 2 - v2 error format
527
528Returns:
529 An object of the form:
530
531 { # This resource represents a long-running operation that is the result of a
532 # network API call.
533 "metadata": { # Service-specific metadata associated with the operation. It typically
534 # contains progress information and common metadata such as create time.
535 # Some services might not provide such metadata. Any method that returns a
536 # long-running operation should document the metadata type, if any.
537 "a_key": "", # Properties of the object. Contains field @type with type URL.
538 },
539 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
540 # different programming environments, including REST APIs and RPC APIs. It is
541 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
542 # three pieces of data: error code, error message, and error details.
543 #
544 # You can find out more about this error model and how to work with it in the
545 # [API Design Guide](https://cloud.google.com/apis/design/errors).
546 "message": "A String", # A developer-facing error message, which should be in English. Any
547 # user-facing error message should be localized and sent in the
548 # google.rpc.Status.details field, or localized by the client.
549 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
550 "details": [ # A list of messages that carry the error details. There is a common set of
551 # message types for APIs to use.
552 {
553 "a_key": "", # Properties of the object. Contains field @type with type URL.
554 },
555 ],
556 },
557 "done": True or False, # If the value is `false`, it means the operation is still in progress.
558 # If `true`, the operation is completed, and either `error` or `response` is
559 # available.
560 "response": { # The normal response of the operation in case of success. If the original
561 # method returns no data on success, such as `Delete`, the response is
562 # `google.protobuf.Empty`. If the original method is standard
563 # `Get`/`Create`/`Update`, the response should be the resource. For other
564 # methods, the response should have the type `XxxResponse`, where `Xxx`
565 # is the original method name. For example, if the original method name
566 # is `TakeSnapshot()`, the inferred response type is
567 # `TakeSnapshotResponse`.
568 "a_key": "", # Properties of the object. Contains field @type with type URL.
569 },
570 "name": "A String", # The server-assigned name, which is only unique within the same service that
571 # originally returns it. If you use the default HTTP mapping, the
572 # `name` should be a resource name ending with `operations/{unique_id}`.
573 }</pre>
574</div>
575
576<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700577 <code class="details" id="deleteProject">deleteProject(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700578 <pre>Deletes the specified project resource identified by a tenant resource tag.
579The mothod removes a project lien with a 'TenantManager' origin if that was
580added. It will then attempt to delete the project. If that operation fails,
581this method also fails.
582After the project has been deleted, the tenant resource state is set to
583DELETED. To permanently remove resource metadata, call the
584`RemoveTenantProject` method.
585New resources with the same tag can't be added if there are existing
586resources in a DELETED state.
Dan O'Mearadd494642020-05-01 07:42:23 -0700587Operation&lt;response: Empty&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700588
589Args:
590 name: string, Name of the tenancy unit.
591Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700592 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593 The object takes the form of:
594
595{ # Request message to delete tenant project resource from the tenancy unit.
596 "tag": "A String", # Tag of the resource within the tenancy unit.
597 }
598
599 x__xgafv: string, V1 error format.
600 Allowed values
601 1 - v1 error format
602 2 - v2 error format
603
604Returns:
605 An object of the form:
606
607 { # This resource represents a long-running operation that is the result of a
608 # network API call.
609 "metadata": { # Service-specific metadata associated with the operation. It typically
610 # contains progress information and common metadata such as create time.
611 # Some services might not provide such metadata. Any method that returns a
612 # long-running operation should document the metadata type, if any.
613 "a_key": "", # Properties of the object. Contains field @type with type URL.
614 },
615 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
616 # different programming environments, including REST APIs and RPC APIs. It is
617 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
618 # three pieces of data: error code, error message, and error details.
619 #
620 # You can find out more about this error model and how to work with it in the
621 # [API Design Guide](https://cloud.google.com/apis/design/errors).
622 "message": "A String", # A developer-facing error message, which should be in English. Any
623 # user-facing error message should be localized and sent in the
624 # google.rpc.Status.details field, or localized by the client.
625 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
626 "details": [ # A list of messages that carry the error details. There is a common set of
627 # message types for APIs to use.
628 {
629 "a_key": "", # Properties of the object. Contains field @type with type URL.
630 },
631 ],
632 },
633 "done": True or False, # If the value is `false`, it means the operation is still in progress.
634 # If `true`, the operation is completed, and either `error` or `response` is
635 # available.
636 "response": { # The normal response of the operation in case of success. If the original
637 # method returns no data on success, such as `Delete`, the response is
638 # `google.protobuf.Empty`. If the original method is standard
639 # `Get`/`Create`/`Update`, the response should be the resource. For other
640 # methods, the response should have the type `XxxResponse`, where `Xxx`
641 # is the original method name. For example, if the original method name
642 # is `TakeSnapshot()`, the inferred response type is
643 # `TakeSnapshotResponse`.
644 "a_key": "", # Properties of the object. Contains field @type with type URL.
645 },
646 "name": "A String", # The server-assigned name, which is only unique within the same service that
647 # originally returns it. If you use the default HTTP mapping, the
648 # `name` should be a resource name ending with `operations/{unique_id}`.
649 }</pre>
650</div>
651
652<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700653 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None, filter=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700654 <pre>Find the tenancy unit for a managed service and service consumer.
655This method shouldn't be used in a service producer's runtime path, for
656example to find the tenant project number when creating VMs. Service
657producers must persist the tenant project's information after the project
658is created.
659
660Args:
661 parent: string, Managed service and service consumer. Required.
662services/{service}/{collection id}/{resource id}
663{collection id} is the cloud resource collection type representing the
664service consumer, for example 'projects', or 'organizations'.
665{resource id} is the consumer numeric id, such as project number: '123456'.
666{service} the name of a service, such as 'service.googleapis.com'. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700667 pageSize: integer, The maximum number of results returned by this request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700668 pageToken: string, The continuation token, which is used to page through large result sets.
669To get the next page of results, set this parameter to the value of
670`nextPageToken` from the previous response.
671 x__xgafv: string, V1 error format.
672 Allowed values
673 1 - v1 error format
674 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700675 filter: string, Filter expression over tenancy resources field. Optional.
676
677Returns:
678 An object of the form:
679
680 { # Response for the list request.
681 "nextPageToken": "A String", # Pagination token for large results.
682 "tenancyUnits": [ # Tenancy units matching the request.
683 { # Representation of a tenancy unit.
684 "tenantResources": [ # Resources constituting the tenancy unit.
685 # There can be at most 512 tenant resources in a tenancy unit.
686 { # Resource constituting the TenancyUnit.
687 "status": "A String", # Status of tenant resource.
688 "tag": "A String", # Unique per single tenancy unit.
689 "resource": "A String", # @OutputOnly Identifier of the tenant resource.
690 # For cloud projects, it is in the form 'projects/{number}'.
691 # For example 'projects/123456'.
692 },
693 ],
694 "consumer": "A String", # @OutputOnly Cloud resource name of the consumer of this service.
695 # For example 'projects/123456'.
696 "createTime": "A String", # @OutputOnly The time this tenancy unit was created.
697 "service": "A String", # Output only. Google Cloud API name of the managed service owning this
698 # tenancy unit.
699 # For example 'serviceconsumermanagement.googleapis.com'.
700 "name": "A String", # Globally unique identifier of this tenancy unit
701 # "services/{service}/{collection id}/{resource id}/tenancyUnits/{unit}"
702 },
703 ],
704 }</pre>
705</div>
706
707<div class="method">
708 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
709 <pre>Retrieves the next page of results.
710
711Args:
712 previous_request: The request for the previous page. (required)
713 previous_response: The response from the request for the previous page. (required)
714
715Returns:
716 A request object that you can call 'execute()' on to request the next
717 page. Returns None if there are no more items in the collection.
718 </pre>
719</div>
720
721<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700722 <code class="details" id="removeProject">removeProject(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700723 <pre>Removes the specified project resource identified by a tenant resource tag.
724The method removes the project lien with 'TenantManager' origin if that
725was added. It then attempts to delete the project. If that operation
726fails, this method also fails.
727Calls to remove already removed or non-existent tenant project succeed.
728After the project has been deleted, or if was already in a DELETED state,
729resource metadata is permanently removed from the tenancy unit.
Dan O'Mearadd494642020-05-01 07:42:23 -0700730Operation&lt;response: Empty&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700731
732Args:
733 name: string, Name of the tenancy unit.
734Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700735 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700736 The object takes the form of:
737
738{ # Request message to remove a tenant project resource from the tenancy unit.
739 "tag": "A String", # Tag of the resource within the tenancy unit.
740 }
741
742 x__xgafv: string, V1 error format.
743 Allowed values
744 1 - v1 error format
745 2 - v2 error format
746
747Returns:
748 An object of the form:
749
750 { # This resource represents a long-running operation that is the result of a
751 # network API call.
752 "metadata": { # Service-specific metadata associated with the operation. It typically
753 # contains progress information and common metadata such as create time.
754 # Some services might not provide such metadata. Any method that returns a
755 # long-running operation should document the metadata type, if any.
756 "a_key": "", # Properties of the object. Contains field @type with type URL.
757 },
758 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
759 # different programming environments, including REST APIs and RPC APIs. It is
760 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
761 # three pieces of data: error code, error message, and error details.
762 #
763 # You can find out more about this error model and how to work with it in the
764 # [API Design Guide](https://cloud.google.com/apis/design/errors).
765 "message": "A String", # A developer-facing error message, which should be in English. Any
766 # user-facing error message should be localized and sent in the
767 # google.rpc.Status.details field, or localized by the client.
768 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
769 "details": [ # A list of messages that carry the error details. There is a common set of
770 # message types for APIs to use.
771 {
772 "a_key": "", # Properties of the object. Contains field @type with type URL.
773 },
774 ],
775 },
776 "done": True or False, # If the value is `false`, it means the operation is still in progress.
777 # If `true`, the operation is completed, and either `error` or `response` is
778 # available.
779 "response": { # The normal response of the operation in case of success. If the original
780 # method returns no data on success, such as `Delete`, the response is
781 # `google.protobuf.Empty`. If the original method is standard
782 # `Get`/`Create`/`Update`, the response should be the resource. For other
783 # methods, the response should have the type `XxxResponse`, where `Xxx`
784 # is the original method name. For example, if the original method name
785 # is `TakeSnapshot()`, the inferred response type is
786 # `TakeSnapshotResponse`.
787 "a_key": "", # Properties of the object. Contains field @type with type URL.
788 },
789 "name": "A String", # The server-assigned name, which is only unique within the same service that
790 # originally returns it. If you use the default HTTP mapping, the
791 # `name` should be a resource name ending with `operations/{unique_id}`.
792 }</pre>
793</div>
794
795<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700796 <code class="details" id="undeleteProject">undeleteProject(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700797 <pre>Attempts to undelete a previously deleted tenant project. The project must
798be in a DELETED state.
799There are no guarantees that an undeleted project will be in
800a fully restored and functional state. Call the `ApplyTenantProjectConfig`
801method to update its configuration and then validate all managed service
802resources.
Dan O'Mearadd494642020-05-01 07:42:23 -0700803Operation&lt;response: Empty&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700804
805Args:
806 name: string, Name of the tenancy unit.
807Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700808 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700809 The object takes the form of:
810
811{ # Request message to undelete tenant project resource previously deleted from
812 # the tenancy unit.
813 "tag": "A String", # Tag of the resource within the tenancy unit.
814 }
815
816 x__xgafv: string, V1 error format.
817 Allowed values
818 1 - v1 error format
819 2 - v2 error format
820
821Returns:
822 An object of the form:
823
824 { # This resource represents a long-running operation that is the result of a
825 # network API call.
826 "metadata": { # Service-specific metadata associated with the operation. It typically
827 # contains progress information and common metadata such as create time.
828 # Some services might not provide such metadata. Any method that returns a
829 # long-running operation should document the metadata type, if any.
830 "a_key": "", # Properties of the object. Contains field @type with type URL.
831 },
832 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
833 # different programming environments, including REST APIs and RPC APIs. It is
834 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
835 # three pieces of data: error code, error message, and error details.
836 #
837 # You can find out more about this error model and how to work with it in the
838 # [API Design Guide](https://cloud.google.com/apis/design/errors).
839 "message": "A String", # A developer-facing error message, which should be in English. Any
840 # user-facing error message should be localized and sent in the
841 # google.rpc.Status.details field, or localized by the client.
842 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
843 "details": [ # A list of messages that carry the error details. There is a common set of
844 # message types for APIs to use.
845 {
846 "a_key": "", # Properties of the object. Contains field @type with type URL.
847 },
848 ],
849 },
850 "done": True or False, # If the value is `false`, it means the operation is still in progress.
851 # If `true`, the operation is completed, and either `error` or `response` is
852 # available.
853 "response": { # The normal response of the operation in case of success. If the original
854 # method returns no data on success, such as `Delete`, the response is
855 # `google.protobuf.Empty`. If the original method is standard
856 # `Get`/`Create`/`Update`, the response should be the resource. For other
857 # methods, the response should have the type `XxxResponse`, where `Xxx`
858 # is the original method name. For example, if the original method name
859 # is `TakeSnapshot()`, the inferred response type is
860 # `TakeSnapshotResponse`.
861 "a_key": "", # Properties of the object. Contains field @type with type URL.
862 },
863 "name": "A String", # The server-assigned name, which is only unique within the same service that
864 # originally returns it. If you use the default HTTP mapping, the
865 # `name` should be a resource name ending with `operations/{unique_id}`.
866 }</pre>
867</div>
868
869</body></html>