Show / Hide Table of Contents

Class FoldersResource.PoliciesResource

The "policies" collection of methods.

Inheritance
object
FoldersResource.PoliciesResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.OrgPolicyAPI.v2
Assembly: Google.Apis.OrgPolicyAPI.v2.dll
Syntax
public class FoldersResource.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 FoldersResource.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: * projects/{project_number} * projects/{project_id} * folders/{folder_id} * organizations/{organization_id}

Returns
Type Description
FoldersResource.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 FoldersResource.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
FoldersResource.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 FoldersResource.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
FoldersResource.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 FoldersResource.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
FoldersResource.PoliciesResource.GetEffectivePolicyRequest

List(string)

Retrieves all of the policies that exist on a particular resource.

Declaration
public virtual FoldersResource.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: * projects/{project_number} * projects/{project_id} * folders/{folder_id} * organizations/{organization_id}

Returns
Type Description
FoldersResource.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 FoldersResource.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 constraint_name is the name of the constraint which this policy configures: * projects/{project_number}/policies/{constraint_name} * folders/{folder_id}/policies/{constraint_name} * organizations/{organization_id}/policies/{constraint_name} For example, projects/123/policies/compute.disableSerialPortAccess. Note: projects/{project_id}/policies/{constraint_name} is also an acceptable name for API requests, but responses will return the name using the equivalent project number.

Returns
Type Description
FoldersResource.PoliciesResource.PatchRequest
In this article
Back to top Generated by DocFX