Class OrganizationsResource.PoliciesResource
The "policies" collection of methods.
Inherited Members
Namespace: Google.Apis.OrgPolicyAPI.v2
Assembly: Google.Apis.OrgPolicyAPI.v2.dll
Syntax
public class OrganizationsResource.PoliciesResource
Constructors
PoliciesResource(IClientService)
Constructs a new resource.
Declaration
public PoliciesResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
Create(GoogleCloudOrgpolicyV2Policy, string)
Creates a policy. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint does
not exist. Returns a google.rpc.Status with google.rpc.Code.ALREADY_EXISTS if the policy already
exists on the given Google Cloud resource.
Declaration
public virtual OrganizationsResource.PoliciesResource.CreateRequest Create(GoogleCloudOrgpolicyV2Policy body, string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleCloudOrgpolicyV2Policy | body | The body of the request. |
| string | parent | Required. The Google Cloud resource that will parent the new policy. Must be in one of the following
forms: * |
Returns
| Type | Description |
|---|---|
| OrganizationsResource.PoliciesResource.CreateRequest |
Delete(string)
Deletes a policy. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint or
organization policy does not exist.
Declaration
public virtual OrganizationsResource.PoliciesResource.DeleteRequest Delete(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. Name of the policy to delete. See the policy entry for naming rules. |
Returns
| Type | Description |
|---|---|
| OrganizationsResource.PoliciesResource.DeleteRequest |
Get(string)
Gets a policy on a resource. If no policy is set on the resource, NOT_FOUND is returned. The etag
value can be used with UpdatePolicy() to update a policy during read-modify-write.
Declaration
public virtual OrganizationsResource.PoliciesResource.GetRequest Get(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. Resource name of the policy. See Policy for naming requirements. |
Returns
| Type | Description |
|---|---|
| OrganizationsResource.PoliciesResource.GetRequest |
GetEffectivePolicy(string)
Gets the effective policy on a resource. This is the result of merging policies in the resource
hierarchy and evaluating conditions. The returned policy will not have an etag or condition set
because it is an evaluated policy across multiple resources. Subtrees of Resource Manager resource
hierarchy with 'under:' prefix will not be expanded.
Declaration
public virtual OrganizationsResource.PoliciesResource.GetEffectivePolicyRequest GetEffectivePolicy(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The effective policy to compute. See Policy for naming requirements. |
Returns
| Type | Description |
|---|---|
| OrganizationsResource.PoliciesResource.GetEffectivePolicyRequest |
List(string)
Retrieves all of the policies that exist on a particular resource.
Declaration
public virtual OrganizationsResource.PoliciesResource.ListRequest List(string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The target Google Cloud resource that parents the set of constraints and policies that will be
returned from this call. Must be in one of the following forms: * |
Returns
| Type | Description |
|---|---|
| OrganizationsResource.PoliciesResource.ListRequest |
Patch(GoogleCloudOrgpolicyV2Policy, string)
Updates a policy. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint or
the policy do not exist. Returns a google.rpc.Status with google.rpc.Code.ABORTED if the etag
supplied in the request does not match the persisted etag of the policy Note: the supplied policy will
perform a full overwrite of all fields.
Declaration
public virtual OrganizationsResource.PoliciesResource.PatchRequest Patch(GoogleCloudOrgpolicyV2Policy body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleCloudOrgpolicyV2Policy | body | The body of the request. |
| string | name | Immutable. The resource name of the policy. Must be one of the following forms, where |
Returns
| Type | Description |
|---|---|
| OrganizationsResource.PoliciesResource.PatchRequest |