• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /**
18  * A client to Organization Policy API
19  *
20  * <p>The interfaces provided are listed below, along with usage samples.
21  *
22  * <p>======================= OrgPolicyClient =======================
23  *
24  * <p>Service Description: An interface for managing organization policies.
25  *
26  * <p>The Cloud Org Policy service provides a simple mechanism for organizations to restrict the
27  * allowed configurations across their entire Cloud Resource hierarchy.
28  *
29  * <p>You can use a `policy` to configure restrictions in Cloud resources. For example, you can
30  * enforce a `policy` that restricts which Google Cloud Platform APIs can be activated in a certain
31  * part of your resource hierarchy, or prevents serial port access to VM instances in a particular
32  * folder.
33  *
34  * <p>`Policies` are inherited down through the resource hierarchy. A `policy` applied to a parent
35  * resource automatically applies to all its child resources unless overridden with a `policy` lower
36  * in the hierarchy.
37  *
38  * <p>A `constraint` defines an aspect of a resource's configuration that can be controlled by an
39  * organization's policy administrator. `Policies` are a collection of `constraints` that defines
40  * their allowable configuration on a particular resource and its child resources.
41  *
42  * <p>Sample for OrgPolicyClient:
43  *
44  * <pre>{@code
45  * // This snippet has been automatically generated and should be regarded as a code template only.
46  * // It will require modifications to work:
47  * // - It may require correct/in-range values for request initialization.
48  * // - It may require specifying regional endpoints when creating the service client as shown in
49  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
50  * try (OrgPolicyClient orgPolicyClient = OrgPolicyClient.create()) {
51  *   PolicyName name = PolicyName.ofProjectPolicyName("[PROJECT]", "[POLICY]");
52  *   Policy response = orgPolicyClient.getPolicy(name);
53  * }
54  * }</pre>
55  */
56 @Generated("by gapic-generator-java")
57 package com.google.cloud.orgpolicy.v2;
58 
59 import javax.annotation.Generated;
60