Show / Hide Table of Contents

Class OrganizationsResource.CustomConstraintsResource

The "customConstraints" collection of methods.

Inheritance
object
OrganizationsResource.CustomConstraintsResource
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 OrganizationsResource.CustomConstraintsResource

Constructors

CustomConstraintsResource(IClientService)

Constructs a new resource.

Declaration
public CustomConstraintsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Create(GoogleCloudOrgpolicyV2CustomConstraint, string)

Creates a custom constraint. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the organization does not exist. Returns a google.rpc.Status with google.rpc.Code.ALREADY_EXISTS if the constraint already exists on the given organization.

Declaration
public virtual OrganizationsResource.CustomConstraintsResource.CreateRequest Create(GoogleCloudOrgpolicyV2CustomConstraint body, string parent)
Parameters
Type Name Description
GoogleCloudOrgpolicyV2CustomConstraint body

The body of the request.

string parent

Required. Must be in the following form: * organizations/{organization_id}

Returns
Type Description
OrganizationsResource.CustomConstraintsResource.CreateRequest

Delete(string)

Deletes a custom constraint. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint does not exist.

Declaration
public virtual OrganizationsResource.CustomConstraintsResource.DeleteRequest Delete(string name)
Parameters
Type Name Description
string name

Required. Name of the custom constraint to delete. See the custom constraint entry for naming rules.

Returns
Type Description
OrganizationsResource.CustomConstraintsResource.DeleteRequest

Get(string)

Gets a custom constraint. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the custom constraint does not exist.

Declaration
public virtual OrganizationsResource.CustomConstraintsResource.GetRequest Get(string name)
Parameters
Type Name Description
string name

Required. Resource name of the custom constraint. See the custom constraint entry for naming requirements.

Returns
Type Description
OrganizationsResource.CustomConstraintsResource.GetRequest

List(string)

Retrieves all of the custom constraints that exist on a particular organization resource.

Declaration
public virtual OrganizationsResource.CustomConstraintsResource.ListRequest List(string parent)
Parameters
Type Name Description
string parent

Required. The target Google Cloud resource that parents the set of custom constraints that will be returned from this call. Must be in one of the following forms: * organizations/{organization_id}

Returns
Type Description
OrganizationsResource.CustomConstraintsResource.ListRequest

Patch(GoogleCloudOrgpolicyV2CustomConstraint, string)

Updates a custom constraint. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint does not exist. Note: the supplied policy will perform a full overwrite of all fields.

Declaration
public virtual OrganizationsResource.CustomConstraintsResource.PatchRequest Patch(GoogleCloudOrgpolicyV2CustomConstraint body, string name)
Parameters
Type Name Description
GoogleCloudOrgpolicyV2CustomConstraint body

The body of the request.

string name

Immutable. Name of the constraint. This is unique within the organization. Format of the name should be

  • organizations/{organization_id}/customConstraints/{custom_constraint_id} Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms The max length is 70 characters and the minimum length is 1. Note that the prefix organizations/{organization_id}/customConstraints/ is not counted.
Returns
Type Description
OrganizationsResource.CustomConstraintsResource.PatchRequest
In This Article
Back to top Generated by DocFX