Class v2.OrgPolicyClient (1.0.7)

An interface for managing organization policies.

The Cloud Org Policy service provides a simple mechanism for organizations to restrict the allowed configurations across their entire Cloud Resource hierarchy.

You can use a policy to configure restrictions in Cloud resources. For example, you can enforce a policy that restricts which Google Cloud Platform APIs can be activated in a certain part of your resource hierarchy, or prevents serial port access to VM instances in a particular folder.

Policies are inherited down through the resource hierarchy. A policy applied to a parent resource automatically applies to all its child resources unless overridden with a policy lower in the hierarchy.

A constraint defines an aspect of a resource's configuration that can be controlled by an organization's policy administrator. Policies are a collection of constraints that defines their allowable configuration on a particular resource and its child resources. v2

Package

@google-cloud/org-policy!

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of OrgPolicyClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

Property Value
TypeDescription
string

auth

auth: gax.GoogleAuth;
Property Value
TypeDescription
gax.GoogleAuth

descriptors

descriptors: Descriptors;
Property Value
TypeDescription
Descriptors

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };
Property Value
TypeDescription
{ [name: string]: Function; }

orgPolicyStub

orgPolicyStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
TypeDescription
Promise<{ [name: string]: Function; }>

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };
Property Value
TypeDescription
{ [name: string]: gax.PathTemplate; }

port

static get port(): number;

The port for this API service.

Property Value
TypeDescription
number

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

Property Value
TypeDescription
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
TypeDescription
string

warn

warn: (code: string, message: string, warnType?: string) => void;
Property Value
TypeDescription
(code: string, message: string, warnType?: string) => void

Methods

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createPolicy(request, options)

createPolicy(request?: protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orgpolicy.v2.IPolicy,
        protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest | undefined,
        {} | undefined
    ]>;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest
options CallOptions
Returns
TypeDescription
Promise<[ protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest | undefined, {} | undefined ]>

createPolicy(request, options, callback)

createPolicy(request: protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest
options CallOptions
callback Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createPolicy(request, callback)

createPolicy(request: protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest, callback: Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest
callback Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deletePolicy(request, options)

deletePolicy(request?: protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest | undefined,
        {} | undefined
    ]>;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest
options CallOptions
Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest | undefined, {} | undefined ]>

deletePolicy(request, options, callback)

deletePolicy(request: protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deletePolicy(request, callback)

deletePolicy(request: protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

folderConstraintPath(folder, constraint)

folderConstraintPath(folder: string, constraint: string): string;

Return a fully-qualified folderConstraint resource name string.

Parameters
NameDescription
folder string
constraint string
Returns
TypeDescription
string

{string} Resource name string.

folderPolicyPath(folder, policy)

folderPolicyPath(folder: string, policy: string): string;

Return a fully-qualified folderPolicy resource name string.

Parameters
NameDescription
folder string
policy string
Returns
TypeDescription
string

{string} Resource name string.

getEffectivePolicy(request, options)

getEffectivePolicy(request?: protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orgpolicy.v2.IPolicy,
        protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest | undefined,
        {} | undefined
    ]>;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest
options CallOptions
Returns
TypeDescription
Promise<[ protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest | undefined, {} | undefined ]>

getEffectivePolicy(request, options, callback)

getEffectivePolicy(request: protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest
options CallOptions
callback Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getEffectivePolicy(request, callback)

getEffectivePolicy(request: protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest, callback: Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest
callback Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getPolicy(request, options)

getPolicy(request?: protos.google.cloud.orgpolicy.v2.IGetPolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orgpolicy.v2.IPolicy,
        protos.google.cloud.orgpolicy.v2.IGetPolicyRequest | undefined,
        {} | undefined
    ]>;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IGetPolicyRequest
options CallOptions
Returns
TypeDescription
Promise<[ protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IGetPolicyRequest | undefined, {} | undefined ]>

getPolicy(request, options, callback)

getPolicy(request: protos.google.cloud.orgpolicy.v2.IGetPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IGetPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IGetPolicyRequest
options CallOptions
callback Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IGetPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getPolicy(request, callback)

getPolicy(request: protos.google.cloud.orgpolicy.v2.IGetPolicyRequest, callback: Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IGetPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IGetPolicyRequest
callback Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IGetPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listConstraints(request, options)

listConstraints(request?: protos.google.cloud.orgpolicy.v2.IListConstraintsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orgpolicy.v2.IConstraint[],
        protos.google.cloud.orgpolicy.v2.IListConstraintsRequest | null,
        protos.google.cloud.orgpolicy.v2.IListConstraintsResponse
    ]>;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IListConstraintsRequest
options CallOptions
Returns
TypeDescription
Promise<[ protos.google.cloud.orgpolicy.v2.IConstraint[], protos.google.cloud.orgpolicy.v2.IListConstraintsRequest | null, protos.google.cloud.orgpolicy.v2.IListConstraintsResponse ]>

listConstraints(request, options, callback)

listConstraints(request: protos.google.cloud.orgpolicy.v2.IListConstraintsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.orgpolicy.v2.IListConstraintsRequest, protos.google.cloud.orgpolicy.v2.IListConstraintsResponse | null | undefined, protos.google.cloud.orgpolicy.v2.IConstraint>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IListConstraintsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.orgpolicy.v2.IListConstraintsRequest, protos.google.cloud.orgpolicy.v2.IListConstraintsResponse | null | undefined, protos.google.cloud.orgpolicy.v2.IConstraint>
Returns
TypeDescription
void

listConstraints(request, callback)

listConstraints(request: protos.google.cloud.orgpolicy.v2.IListConstraintsRequest, callback: PaginationCallback<protos.google.cloud.orgpolicy.v2.IListConstraintsRequest, protos.google.cloud.orgpolicy.v2.IListConstraintsResponse | null | undefined, protos.google.cloud.orgpolicy.v2.IConstraint>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IListConstraintsRequest
callback PaginationCallback<protos.google.cloud.orgpolicy.v2.IListConstraintsRequest, protos.google.cloud.orgpolicy.v2.IListConstraintsResponse | null | undefined, protos.google.cloud.orgpolicy.v2.IConstraint>
Returns
TypeDescription
void

listConstraintsAsync(request, options)

listConstraintsAsync(request?: protos.google.cloud.orgpolicy.v2.IListConstraintsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.orgpolicy.v2.IConstraint>;

Equivalent to listConstraints, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IListConstraintsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.orgpolicy.v2.IConstraint>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Constraint]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listConstraintsStream(request, options)

listConstraintsStream(request?: protos.google.cloud.orgpolicy.v2.IListConstraintsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IListConstraintsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Constraint] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listConstraintsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPolicies(request, options)

listPolicies(request?: protos.google.cloud.orgpolicy.v2.IListPoliciesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orgpolicy.v2.IPolicy[],
        protos.google.cloud.orgpolicy.v2.IListPoliciesRequest | null,
        protos.google.cloud.orgpolicy.v2.IListPoliciesResponse
    ]>;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IListPoliciesRequest
options CallOptions
Returns
TypeDescription
Promise<[ protos.google.cloud.orgpolicy.v2.IPolicy[], protos.google.cloud.orgpolicy.v2.IListPoliciesRequest | null, protos.google.cloud.orgpolicy.v2.IListPoliciesResponse ]>

listPolicies(request, options, callback)

listPolicies(request: protos.google.cloud.orgpolicy.v2.IListPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.orgpolicy.v2.IListPoliciesRequest, protos.google.cloud.orgpolicy.v2.IListPoliciesResponse | null | undefined, protos.google.cloud.orgpolicy.v2.IPolicy>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IListPoliciesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.orgpolicy.v2.IListPoliciesRequest, protos.google.cloud.orgpolicy.v2.IListPoliciesResponse | null | undefined, protos.google.cloud.orgpolicy.v2.IPolicy>
Returns
TypeDescription
void

listPolicies(request, callback)

listPolicies(request: protos.google.cloud.orgpolicy.v2.IListPoliciesRequest, callback: PaginationCallback<protos.google.cloud.orgpolicy.v2.IListPoliciesRequest, protos.google.cloud.orgpolicy.v2.IListPoliciesResponse | null | undefined, protos.google.cloud.orgpolicy.v2.IPolicy>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IListPoliciesRequest
callback PaginationCallback<protos.google.cloud.orgpolicy.v2.IListPoliciesRequest, protos.google.cloud.orgpolicy.v2.IListPoliciesResponse | null | undefined, protos.google.cloud.orgpolicy.v2.IPolicy>
Returns
TypeDescription
void

listPoliciesAsync(request, options)

listPoliciesAsync(request?: protos.google.cloud.orgpolicy.v2.IListPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.orgpolicy.v2.IPolicy>;

Equivalent to listPolicies, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IListPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.orgpolicy.v2.IPolicy>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Policy]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPoliciesStream(request, options)

listPoliciesStream(request?: protos.google.cloud.orgpolicy.v2.IListPoliciesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IListPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Policy] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

matchConstraintFromFolderConstraintName(folderConstraintName)

matchConstraintFromFolderConstraintName(folderConstraintName: string): string | number;

Parse the constraint from FolderConstraint resource.

Parameter
NameDescription
folderConstraintName string

A fully-qualified path representing folder_constraint resource.

Returns
TypeDescription
string | number

{string} A string representing the constraint.

matchConstraintFromOrganizationConstraintName(organizationConstraintName)

matchConstraintFromOrganizationConstraintName(organizationConstraintName: string): string | number;

Parse the constraint from OrganizationConstraint resource.

Parameter
NameDescription
organizationConstraintName string

A fully-qualified path representing organization_constraint resource.

Returns
TypeDescription
string | number

{string} A string representing the constraint.

matchConstraintFromProjectConstraintName(projectConstraintName)

matchConstraintFromProjectConstraintName(projectConstraintName: string): string | number;

Parse the constraint from ProjectConstraint resource.

Parameter
NameDescription
projectConstraintName string

A fully-qualified path representing project_constraint resource.

Returns
TypeDescription
string | number

{string} A string representing the constraint.

matchFolderFromFolderConstraintName(folderConstraintName)

matchFolderFromFolderConstraintName(folderConstraintName: string): string | number;

Parse the folder from FolderConstraint resource.

Parameter
NameDescription
folderConstraintName string

A fully-qualified path representing folder_constraint resource.

Returns
TypeDescription
string | number

{string} A string representing the folder.

matchFolderFromFolderPolicyName(folderPolicyName)

matchFolderFromFolderPolicyName(folderPolicyName: string): string | number;

Parse the folder from FolderPolicy resource.

Parameter
NameDescription
folderPolicyName string

A fully-qualified path representing folder_policy resource.

Returns
TypeDescription
string | number

{string} A string representing the folder.

matchOrganizationFromOrganizationConstraintName(organizationConstraintName)

matchOrganizationFromOrganizationConstraintName(organizationConstraintName: string): string | number;

Parse the organization from OrganizationConstraint resource.

Parameter
NameDescription
organizationConstraintName string

A fully-qualified path representing organization_constraint resource.

Returns
TypeDescription
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationPolicyName(organizationPolicyName)

matchOrganizationFromOrganizationPolicyName(organizationPolicyName: string): string | number;

Parse the organization from OrganizationPolicy resource.

Parameter
NameDescription
organizationPolicyName string

A fully-qualified path representing organization_policy resource.

Returns
TypeDescription
string | number

{string} A string representing the organization.

matchPolicyFromFolderPolicyName(folderPolicyName)

matchPolicyFromFolderPolicyName(folderPolicyName: string): string | number;

Parse the policy from FolderPolicy resource.

Parameter
NameDescription
folderPolicyName string

A fully-qualified path representing folder_policy resource.

Returns
TypeDescription
string | number

{string} A string representing the policy.

matchPolicyFromOrganizationPolicyName(organizationPolicyName)

matchPolicyFromOrganizationPolicyName(organizationPolicyName: string): string | number;

Parse the policy from OrganizationPolicy resource.

Parameter
NameDescription
organizationPolicyName string

A fully-qualified path representing organization_policy resource.

Returns
TypeDescription
string | number

{string} A string representing the policy.

matchPolicyFromProjectPolicyName(projectPolicyName)

matchPolicyFromProjectPolicyName(projectPolicyName: string): string | number;

Parse the policy from ProjectPolicy resource.

Parameter
NameDescription
projectPolicyName string

A fully-qualified path representing project_policy resource.

Returns
TypeDescription
string | number

{string} A string representing the policy.

matchProjectFromProjectConstraintName(projectConstraintName)

matchProjectFromProjectConstraintName(projectConstraintName: string): string | number;

Parse the project from ProjectConstraint resource.

Parameter
NameDescription
projectConstraintName string

A fully-qualified path representing project_constraint resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectPolicyName(projectPolicyName)

matchProjectFromProjectPolicyName(projectPolicyName: string): string | number;

Parse the project from ProjectPolicy resource.

Parameter
NameDescription
projectPolicyName string

A fully-qualified path representing project_policy resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

organizationConstraintPath(organization, constraint)

organizationConstraintPath(organization: string, constraint: string): string;

Return a fully-qualified organizationConstraint resource name string.

Parameters
NameDescription
organization string
constraint string
Returns
TypeDescription
string

{string} Resource name string.

organizationPolicyPath(organization, policy)

organizationPolicyPath(organization: string, policy: string): string;

Return a fully-qualified organizationPolicy resource name string.

Parameters
NameDescription
organization string
policy string
Returns
TypeDescription
string

{string} Resource name string.

projectConstraintPath(project, constraint)

projectConstraintPath(project: string, constraint: string): string;

Return a fully-qualified projectConstraint resource name string.

Parameters
NameDescription
project string
constraint string
Returns
TypeDescription
string

{string} Resource name string.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

projectPolicyPath(project, policy)

projectPolicyPath(project: string, policy: string): string;

Return a fully-qualified projectPolicy resource name string.

Parameters
NameDescription
project string
policy string
Returns
TypeDescription
string

{string} Resource name string.

updatePolicy(request, options)

updatePolicy(request?: protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orgpolicy.v2.IPolicy,
        protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest | undefined,
        {} | undefined
    ]>;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest
options CallOptions
Returns
TypeDescription
Promise<[ protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest | undefined, {} | undefined ]>

updatePolicy(request, options, callback)

updatePolicy(request: protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest
options CallOptions
callback Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updatePolicy(request, callback)

updatePolicy(request: protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest, callback: Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest
callback Callback<protos.google.cloud.orgpolicy.v2.IPolicy, protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void