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
Name | Description |
opts |
ClientOptions
|
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Value
auth
Property Value
Type | Description |
gax.GoogleAuth | |
descriptors
descriptors: Descriptors;
Property Value
Type | Description |
Descriptors | |
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
Property Value
Type | Description |
{
[name: string]: Function;
} | |
orgPolicyStub
orgPolicyStub?: Promise<{
[name: string]: Function;
}>;
Property Value
Type | Description |
Promise<{
[name: string]: Function;
}> | |
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
Property Value
Type | Description |
{
[name: string]: gax.PathTemplate;
} | |
port
static get port(): number;
The port for this API service.
Property Value
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
Property Value
servicePath
static get servicePath(): string;
The DNS address for this API service.
Property Value
warn
warn: (code: string, message: string, warnType?: string) => void;
Property Value
Type | Description |
(code: string, message: string, warnType?: string) => void | |
Methods
close()
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.orgpolicy.v2.ICreatePolicyRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orgpolicy.v2.IDeletePolicyRequest | null | undefined, {} | null | undefined>
|
Returns
folderConstraintPath(folder, constraint)
folderConstraintPath(folder: string, constraint: string): string;
Return a fully-qualified folderConstraint resource name string.
Parameters
Name | Description |
folder |
string
|
constraint |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
folderPolicyPath(folder, policy)
folderPolicyPath(folder: string, policy: string): string;
Return a fully-qualified folderPolicy resource name string.
Parameters
Name | Description |
folder |
string
|
policy |
string
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.orgpolicy.v2.IGetEffectivePolicyRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.orgpolicy.v2.IGetPolicyRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
getProjectId()
getProjectId(): Promise<string>;
Returns
Type | Description |
Promise<string> | |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns
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
Type | Description |
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
Name | Description |
request |
protos.google.cloud.orgpolicy.v2.IListConstraintsRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.orgpolicy.v2.IListConstraintsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.orgpolicy.v2.IListConstraintsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.orgpolicy.v2.IListPoliciesRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.orgpolicy.v2.IListPoliciesRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.orgpolicy.v2.IListPoliciesRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
folderConstraintName |
string
A fully-qualified path representing folder_constraint resource.
|
Returns
Type | Description |
string | number | {string} A string representing the constraint.
|
matchConstraintFromOrganizationConstraintName(organizationConstraintName)
matchConstraintFromOrganizationConstraintName(organizationConstraintName: string): string | number;
Parse the constraint from OrganizationConstraint resource.
Parameter
Name | Description |
organizationConstraintName |
string
A fully-qualified path representing organization_constraint resource.
|
Returns
Type | Description |
string | number | {string} A string representing the constraint.
|
matchConstraintFromProjectConstraintName(projectConstraintName)
matchConstraintFromProjectConstraintName(projectConstraintName: string): string | number;
Parse the constraint from ProjectConstraint resource.
Parameter
Name | Description |
projectConstraintName |
string
A fully-qualified path representing project_constraint resource.
|
Returns
Type | Description |
string | number | {string} A string representing the constraint.
|
matchFolderFromFolderConstraintName(folderConstraintName)
matchFolderFromFolderConstraintName(folderConstraintName: string): string | number;
Parse the folder from FolderConstraint resource.
Parameter
Name | Description |
folderConstraintName |
string
A fully-qualified path representing folder_constraint resource.
|
Returns
Type | Description |
string | number | {string} A string representing the folder.
|
matchFolderFromFolderPolicyName(folderPolicyName)
matchFolderFromFolderPolicyName(folderPolicyName: string): string | number;
Parse the folder from FolderPolicy resource.
Parameter
Name | Description |
folderPolicyName |
string
A fully-qualified path representing folder_policy resource.
|
Returns
Type | Description |
string | number | {string} A string representing the folder.
|
matchOrganizationFromOrganizationConstraintName(organizationConstraintName)
matchOrganizationFromOrganizationConstraintName(organizationConstraintName: string): string | number;
Parse the organization from OrganizationConstraint resource.
Parameter
Name | Description |
organizationConstraintName |
string
A fully-qualified path representing organization_constraint resource.
|
Returns
Type | Description |
string | number | {string} A string representing the organization.
|
matchOrganizationFromOrganizationPolicyName(organizationPolicyName)
matchOrganizationFromOrganizationPolicyName(organizationPolicyName: string): string | number;
Parse the organization from OrganizationPolicy resource.
Parameter
Name | Description |
organizationPolicyName |
string
A fully-qualified path representing organization_policy resource.
|
Returns
Type | Description |
string | number | {string} A string representing the organization.
|
matchPolicyFromFolderPolicyName(folderPolicyName)
matchPolicyFromFolderPolicyName(folderPolicyName: string): string | number;
Parse the policy from FolderPolicy resource.
Parameter
Name | Description |
folderPolicyName |
string
A fully-qualified path representing folder_policy resource.
|
Returns
Type | Description |
string | number | {string} A string representing the policy.
|
matchPolicyFromOrganizationPolicyName(organizationPolicyName)
matchPolicyFromOrganizationPolicyName(organizationPolicyName: string): string | number;
Parse the policy from OrganizationPolicy resource.
Parameter
Name | Description |
organizationPolicyName |
string
A fully-qualified path representing organization_policy resource.
|
Returns
Type | Description |
string | number | {string} A string representing the policy.
|
matchPolicyFromProjectPolicyName(projectPolicyName)
matchPolicyFromProjectPolicyName(projectPolicyName: string): string | number;
Parse the policy from ProjectPolicy resource.
Parameter
Name | Description |
projectPolicyName |
string
A fully-qualified path representing project_policy resource.
|
Returns
Type | Description |
string | number | {string} A string representing the policy.
|
matchProjectFromProjectConstraintName(projectConstraintName)
matchProjectFromProjectConstraintName(projectConstraintName: string): string | number;
Parse the project from ProjectConstraint resource.
Parameter
Name | Description |
projectConstraintName |
string
A fully-qualified path representing project_constraint resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project.
|
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;
Parse the project from Project resource.
Parameter
Name | Description |
projectName |
string
A fully-qualified path representing Project resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project.
|
matchProjectFromProjectPolicyName(projectPolicyName)
matchProjectFromProjectPolicyName(projectPolicyName: string): string | number;
Parse the project from ProjectPolicy resource.
Parameter
Name | Description |
projectPolicyName |
string
A fully-qualified path representing project_policy resource.
|
Returns
Type | Description |
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
Name | Description |
organization |
string
|
constraint |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
organizationPolicyPath(organization, policy)
organizationPolicyPath(organization: string, policy: string): string;
Return a fully-qualified organizationPolicy resource name string.
Parameters
Name | Description |
organization |
string
|
policy |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
projectConstraintPath(project, constraint)
projectConstraintPath(project: string, constraint: string): string;
Return a fully-qualified projectConstraint resource name string.
Parameters
Name | Description |
project |
string
|
constraint |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
projectPath(project)
projectPath(project: string): string;
Return a fully-qualified project resource name string.
Parameter
Name | Description |
project |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
projectPolicyPath(project, policy)
projectPolicyPath(project: string, policy: string): string;
Return a fully-qualified projectPolicy resource name string.
Parameters
Name | Description |
project |
string
|
policy |
string
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.orgpolicy.v2.IUpdatePolicyRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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