Class v3.PrincipalAccessBoundaryPoliciesClient (2.2.0)

Manages Identity and Access Management (IAM) principal access boundary policies. v3

Package

@google-cloud/iam

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of PrincipalAccessBoundaryPoliciesClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new PrincipalAccessBoundaryPoliciesClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

locationsClient

locationsClient: LocationsClient;

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

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

port

static get port(): number;

The port for this API service.

principalAccessBoundaryPoliciesStub

principalAccessBoundaryPoliciesStub?: Promise<{
        [name: string]: Function;
    }>;

scopes

static get scopes(): string[];

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

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

warn

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

Methods

cancelOperation(request, optionsOrCallback, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.

Parameters
Name Description
request CancelOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

checkCreatePrincipalAccessBoundaryPolicyProgress(name)

checkCreatePrincipalAccessBoundaryPolicyProgress(name: string): Promise<LROperation<protos.google.iam.v3.PrincipalAccessBoundaryPolicy, protos.google.iam.v3.OperationMetadata>>;

Check the status of the long running operation returned by createPrincipalAccessBoundaryPolicy().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.iam.v3.PrincipalAccessBoundaryPolicy, protos.google.iam.v3.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource where this principal access boundary policy
   *  will be created. Only organizations are supported.
   *  Format:
   *    `organizations/{organization_id}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID to use for the principal access boundary policy, which
   *  will become the final component of the principal access boundary policy's
   *  resource name.
   *  This value must start with a lowercase letter followed by up to 62
   *  lowercase letters, numbers, hyphens, or dots. Pattern,
   *  /[a-z][a-z0-9-\.]{2,62}/.
   */
  // const principalAccessBoundaryPolicyId = 'abc123'
  /**
   *  Required. The principal access boundary policy to create.
   */
  // const principalAccessBoundaryPolicy = {}
  /**
   *  Optional. If set, validate the request and preview the creation, but do not
   *  actually post it.
   */
  // const validateOnly = true

  // Imports the Iam library
  const {PrincipalAccessBoundaryPoliciesClient} = require('@google-cloud/iam').v3;

  // Instantiates a client
  const iamClient = new PrincipalAccessBoundaryPoliciesClient();

  async function callCreatePrincipalAccessBoundaryPolicy() {
    // Construct request
    const request = {
      parent,
      principalAccessBoundaryPolicyId,
      principalAccessBoundaryPolicy,
    };

    // Run request
    const [operation] = await iamClient.createPrincipalAccessBoundaryPolicy(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreatePrincipalAccessBoundaryPolicy();

checkDeletePrincipalAccessBoundaryPolicyProgress(name)

checkDeletePrincipalAccessBoundaryPolicyProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.iam.v3.OperationMetadata>>;

Check the status of the long running operation returned by deletePrincipalAccessBoundaryPolicy().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.iam.v3.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the principal access boundary policy to delete.
   *  Format:
   *    `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
   */
  // const name = 'abc123'
  /**
   *  Optional. The etag of the principal access boundary policy.
   *  If this is provided, it must match the server's etag.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set, validate the request and preview the deletion, but do not
   *  actually post it.
   */
  // const validateOnly = true
  /**
   *  Optional. If set to true, the request will force the deletion of the policy
   *  even if the policy is referenced in policy bindings.
   */
  // const force = true

  // Imports the Iam library
  const {PrincipalAccessBoundaryPoliciesClient} = require('@google-cloud/iam').v3;

  // Instantiates a client
  const iamClient = new PrincipalAccessBoundaryPoliciesClient();

  async function callDeletePrincipalAccessBoundaryPolicy() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await iamClient.deletePrincipalAccessBoundaryPolicy(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeletePrincipalAccessBoundaryPolicy();

checkUpdatePrincipalAccessBoundaryPolicyProgress(name)

checkUpdatePrincipalAccessBoundaryPolicyProgress(name: string): Promise<LROperation<protos.google.iam.v3.PrincipalAccessBoundaryPolicy, protos.google.iam.v3.OperationMetadata>>;

Check the status of the long running operation returned by updatePrincipalAccessBoundaryPolicy().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.iam.v3.PrincipalAccessBoundaryPolicy, protos.google.iam.v3.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The principal access boundary policy to update.
   *  The principal access boundary policy's `name` field is used to identify the
   *  policy to update.
   */
  // const principalAccessBoundaryPolicy = {}
  /**
   *  Optional. If set, validate the request and preview the update, but do not
   *  actually post it.
   */
  // const validateOnly = true
  /**
   *  Optional. The list of fields to update
   */
  // const updateMask = {}

  // Imports the Iam library
  const {PrincipalAccessBoundaryPoliciesClient} = require('@google-cloud/iam').v3;

  // Instantiates a client
  const iamClient = new PrincipalAccessBoundaryPoliciesClient();

  async function callUpdatePrincipalAccessBoundaryPolicy() {
    // Construct request
    const request = {
      principalAccessBoundaryPolicy,
    };

    // Run request
    const [operation] = await iamClient.updatePrincipalAccessBoundaryPolicy(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdatePrincipalAccessBoundaryPolicy();

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
Type Description
Promise<void>

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

createPrincipalAccessBoundaryPolicy(request, options)

createPrincipalAccessBoundaryPolicy(request?: protos.google.iam.v3.ICreatePrincipalAccessBoundaryPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a principal access boundary policy, and returns a long running operation.

Parameters
Name Description
request ICreatePrincipalAccessBoundaryPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource where this principal access boundary policy
   *  will be created. Only organizations are supported.
   *  Format:
   *    `organizations/{organization_id}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID to use for the principal access boundary policy, which
   *  will become the final component of the principal access boundary policy's
   *  resource name.
   *  This value must start with a lowercase letter followed by up to 62
   *  lowercase letters, numbers, hyphens, or dots. Pattern,
   *  /[a-z][a-z0-9-\.]{2,62}/.
   */
  // const principalAccessBoundaryPolicyId = 'abc123'
  /**
   *  Required. The principal access boundary policy to create.
   */
  // const principalAccessBoundaryPolicy = {}
  /**
   *  Optional. If set, validate the request and preview the creation, but do not
   *  actually post it.
   */
  // const validateOnly = true

  // Imports the Iam library
  const {PrincipalAccessBoundaryPoliciesClient} = require('@google-cloud/iam').v3;

  // Instantiates a client
  const iamClient = new PrincipalAccessBoundaryPoliciesClient();

  async function callCreatePrincipalAccessBoundaryPolicy() {
    // Construct request
    const request = {
      parent,
      principalAccessBoundaryPolicyId,
      principalAccessBoundaryPolicy,
    };

    // Run request
    const [operation] = await iamClient.createPrincipalAccessBoundaryPolicy(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreatePrincipalAccessBoundaryPolicy();

createPrincipalAccessBoundaryPolicy(request, options, callback)

createPrincipalAccessBoundaryPolicy(request: protos.google.iam.v3.ICreatePrincipalAccessBoundaryPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePrincipalAccessBoundaryPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createPrincipalAccessBoundaryPolicy(request, callback)

createPrincipalAccessBoundaryPolicy(request: protos.google.iam.v3.ICreatePrincipalAccessBoundaryPolicyRequest, callback: Callback<LROperation<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePrincipalAccessBoundaryPolicyRequest
callback Callback<LROperation<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteOperation(request, optionsOrCallback, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request DeleteOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

deletePrincipalAccessBoundaryPolicy(request, options)

deletePrincipalAccessBoundaryPolicy(request?: protos.google.iam.v3.IDeletePrincipalAccessBoundaryPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.iam.v3.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a principal access boundary policy.

Parameters
Name Description
request IDeletePrincipalAccessBoundaryPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the principal access boundary policy to delete.
   *  Format:
   *    `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
   */
  // const name = 'abc123'
  /**
   *  Optional. The etag of the principal access boundary policy.
   *  If this is provided, it must match the server's etag.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set, validate the request and preview the deletion, but do not
   *  actually post it.
   */
  // const validateOnly = true
  /**
   *  Optional. If set to true, the request will force the deletion of the policy
   *  even if the policy is referenced in policy bindings.
   */
  // const force = true

  // Imports the Iam library
  const {PrincipalAccessBoundaryPoliciesClient} = require('@google-cloud/iam').v3;

  // Instantiates a client
  const iamClient = new PrincipalAccessBoundaryPoliciesClient();

  async function callDeletePrincipalAccessBoundaryPolicy() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await iamClient.deletePrincipalAccessBoundaryPolicy(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeletePrincipalAccessBoundaryPolicy();

deletePrincipalAccessBoundaryPolicy(request, options, callback)

deletePrincipalAccessBoundaryPolicy(request: protos.google.iam.v3.IDeletePrincipalAccessBoundaryPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeletePrincipalAccessBoundaryPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deletePrincipalAccessBoundaryPolicy(request, callback)

deletePrincipalAccessBoundaryPolicy(request: protos.google.iam.v3.IDeletePrincipalAccessBoundaryPolicyRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeletePrincipalAccessBoundaryPolicyRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

folderLocationPolicyBindingPath(folder, location, policyBinding)

folderLocationPolicyBindingPath(folder: string, location: string, policyBinding: string): string;

Return a fully-qualified folderLocationPolicyBinding resource name string.

Parameters
Name Description
folder string
location string
policyBinding string
Returns
Type Description
string

{string} Resource name string.

getLocation(request, options, callback)

getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;

Gets information about a location.

Parameters
Name Description
request LocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

options CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. See CallOptions for more details.

callback Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
Type Description
Promise<google.cloud.location.ILocation>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

const [response] = await client.getLocation(request);

getOperation(request, optionsOrCallback, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
Name Description
request GetOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

getPrincipalAccessBoundaryPolicy(request, options)

getPrincipalAccessBoundaryPolicy(request?: protos.google.iam.v3.IGetPrincipalAccessBoundaryPolicyRequest, options?: CallOptions): Promise<[
        protos.google.iam.v3.IPrincipalAccessBoundaryPolicy,
        protos.google.iam.v3.IGetPrincipalAccessBoundaryPolicyRequest | undefined,
        {} | undefined
    ]>;

Gets a principal access boundary policy.

Parameters
Name Description
request IGetPrincipalAccessBoundaryPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IGetPrincipalAccessBoundaryPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing PrincipalAccessBoundaryPolicy. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the principal access boundary policy to retrieve.
   *  Format:
   *    `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
   */
  // const name = 'abc123'

  // Imports the Iam library
  const {PrincipalAccessBoundaryPoliciesClient} = require('@google-cloud/iam').v3;

  // Instantiates a client
  const iamClient = new PrincipalAccessBoundaryPoliciesClient();

  async function callGetPrincipalAccessBoundaryPolicy() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await iamClient.getPrincipalAccessBoundaryPolicy(request);
    console.log(response);
  }

  callGetPrincipalAccessBoundaryPolicy();

getPrincipalAccessBoundaryPolicy(request, options, callback)

getPrincipalAccessBoundaryPolicy(request: protos.google.iam.v3.IGetPrincipalAccessBoundaryPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IGetPrincipalAccessBoundaryPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPrincipalAccessBoundaryPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IGetPrincipalAccessBoundaryPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getPrincipalAccessBoundaryPolicy(request, callback)

getPrincipalAccessBoundaryPolicy(request: protos.google.iam.v3.IGetPrincipalAccessBoundaryPolicyRequest, callback: Callback<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IGetPrincipalAccessBoundaryPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPrincipalAccessBoundaryPolicyRequest
callback Callback<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IGetPrincipalAccessBoundaryPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

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
Type Description
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
Type Description
Promise<{ [name: string]: Function; }>

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

listLocationsAsync(request, options)

listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;

Lists information about the supported locations for this service. Returns an iterable object.

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

Parameters
Name Description
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<google.cloud.location.ILocation>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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 for more details and examples.

Example

const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
  // process response
}

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
Name Description
request ListOperationsRequest

The request object that will be sent.

options CallOptions

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns
Type Description
AsyncIterable<protos.google.longrunning.IOperation>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

listPrincipalAccessBoundaryPolicies(request, options)

listPrincipalAccessBoundaryPolicies(request?: protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesRequest, options?: CallOptions): Promise<[
        protos.google.iam.v3.IPrincipalAccessBoundaryPolicy[],
        protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesRequest | null,
        protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesResponse
    ]>;

Lists principal access boundary policies.

Parameters
Name Description
request IListPrincipalAccessBoundaryPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.iam.v3.IPrincipalAccessBoundaryPolicy[], protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesRequest | null, protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of PrincipalAccessBoundaryPolicy. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPrincipalAccessBoundaryPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPrincipalAccessBoundaryPolicies(request, options, callback)

listPrincipalAccessBoundaryPolicies(request: protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesRequest, protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesResponse | null | undefined, protos.google.iam.v3.IPrincipalAccessBoundaryPolicy>): void;
Parameters
Name Description
request IListPrincipalAccessBoundaryPoliciesRequest
options CallOptions
callback PaginationCallback<protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesRequest, protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesResponse | null | undefined, protos.google.iam.v3.IPrincipalAccessBoundaryPolicy>
Returns
Type Description
void

listPrincipalAccessBoundaryPolicies(request, callback)

listPrincipalAccessBoundaryPolicies(request: protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesRequest, callback: PaginationCallback<protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesRequest, protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesResponse | null | undefined, protos.google.iam.v3.IPrincipalAccessBoundaryPolicy>): void;
Parameters
Name Description
request IListPrincipalAccessBoundaryPoliciesRequest
callback PaginationCallback<protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesRequest, protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesResponse | null | undefined, protos.google.iam.v3.IPrincipalAccessBoundaryPolicy>
Returns
Type Description
void

listPrincipalAccessBoundaryPoliciesAsync(request, options)

listPrincipalAccessBoundaryPoliciesAsync(request?: protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy>;

Equivalent to listPrincipalAccessBoundaryPolicies, but returns an iterable object.

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

Parameters
Name Description
request IListPrincipalAccessBoundaryPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing PrincipalAccessBoundaryPolicy. 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource, which owns the collection of principal
   *  access boundary policies.
   *  Format:
   *    `organizations/{organization_id}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of principal access boundary policies to
   *  return. The service may return fewer than this value.
   *  If unspecified, at most 50 principal access boundary policies will be
   *  returned. The maximum value is 1000; values above 1000 will be coerced to
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A page token, received from a previous
   *  `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
   *  subsequent page.
   *  When paginating, all other parameters provided to
   *  `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
   *  page token.
   */
  // const pageToken = 'abc123'

  // Imports the Iam library
  const {PrincipalAccessBoundaryPoliciesClient} = require('@google-cloud/iam').v3;

  // Instantiates a client
  const iamClient = new PrincipalAccessBoundaryPoliciesClient();

  async function callListPrincipalAccessBoundaryPolicies() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = iamClient.listPrincipalAccessBoundaryPoliciesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPrincipalAccessBoundaryPolicies();

listPrincipalAccessBoundaryPoliciesStream(request, options)

listPrincipalAccessBoundaryPoliciesStream(request?: protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesRequest, options?: CallOptions): Transform;

Equivalent to listPrincipalAccessBoundaryPolicies, but returns a NodeJS Stream object.

Parameters
Name Description
request IListPrincipalAccessBoundaryPoliciesRequest

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 PrincipalAccessBoundaryPolicy 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 listPrincipalAccessBoundaryPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchFolderFromFolderLocationPolicyBindingName(folderLocationPolicyBindingName)

matchFolderFromFolderLocationPolicyBindingName(folderLocationPolicyBindingName: string): string | number;

Parse the folder from FolderLocationPolicyBinding resource.

Parameter
Name Description
folderLocationPolicyBindingName string

A fully-qualified path representing folder_location_policy_binding resource.

Returns
Type Description
string | number

{string} A string representing the folder.

matchLocationFromFolderLocationPolicyBindingName(folderLocationPolicyBindingName)

matchLocationFromFolderLocationPolicyBindingName(folderLocationPolicyBindingName: string): string | number;

Parse the location from FolderLocationPolicyBinding resource.

Parameter
Name Description
folderLocationPolicyBindingName string

A fully-qualified path representing folder_location_policy_binding resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromOrganizationLocationName(organizationLocationName)

matchLocationFromOrganizationLocationName(organizationLocationName: string): string | number;

Parse the location from OrganizationLocation resource.

Parameter
Name Description
organizationLocationName string

A fully-qualified path representing OrganizationLocation resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromOrganizationLocationPolicyBindingName(organizationLocationPolicyBindingName)

matchLocationFromOrganizationLocationPolicyBindingName(organizationLocationPolicyBindingName: string): string | number;

Parse the location from OrganizationLocationPolicyBinding resource.

Parameter
Name Description
organizationLocationPolicyBindingName string

A fully-qualified path representing organization_location_policy_binding resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromPrincipalAccessBoundaryPolicyName(principalAccessBoundaryPolicyName)

matchLocationFromPrincipalAccessBoundaryPolicyName(principalAccessBoundaryPolicyName: string): string | number;

Parse the location from PrincipalAccessBoundaryPolicy resource.

Parameter
Name Description
principalAccessBoundaryPolicyName string

A fully-qualified path representing PrincipalAccessBoundaryPolicy resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromProjectLocationPolicyBindingName(projectLocationPolicyBindingName)

matchLocationFromProjectLocationPolicyBindingName(projectLocationPolicyBindingName: string): string | number;

Parse the location from ProjectLocationPolicyBinding resource.

Parameter
Name Description
projectLocationPolicyBindingName string

A fully-qualified path representing project_location_policy_binding resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchOrganizationFromOrganizationLocationName(organizationLocationName)

matchOrganizationFromOrganizationLocationName(organizationLocationName: string): string | number;

Parse the organization from OrganizationLocation resource.

Parameter
Name Description
organizationLocationName string

A fully-qualified path representing OrganizationLocation resource.

Returns
Type Description
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationLocationPolicyBindingName(organizationLocationPolicyBindingName)

matchOrganizationFromOrganizationLocationPolicyBindingName(organizationLocationPolicyBindingName: string): string | number;

Parse the organization from OrganizationLocationPolicyBinding resource.

Parameter
Name Description
organizationLocationPolicyBindingName string

A fully-qualified path representing organization_location_policy_binding resource.

Returns
Type Description
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationName(organizationName)

matchOrganizationFromOrganizationName(organizationName: string): string | number;

Parse the organization from Organization resource.

Parameter
Name Description
organizationName string

A fully-qualified path representing Organization resource.

Returns
Type Description
string | number

{string} A string representing the organization.

matchOrganizationFromPrincipalAccessBoundaryPolicyName(principalAccessBoundaryPolicyName)

matchOrganizationFromPrincipalAccessBoundaryPolicyName(principalAccessBoundaryPolicyName: string): string | number;

Parse the organization from PrincipalAccessBoundaryPolicy resource.

Parameter
Name Description
principalAccessBoundaryPolicyName string

A fully-qualified path representing PrincipalAccessBoundaryPolicy resource.

Returns
Type Description
string | number

{string} A string representing the organization.

matchPolicyBindingFromFolderLocationPolicyBindingName(folderLocationPolicyBindingName)

matchPolicyBindingFromFolderLocationPolicyBindingName(folderLocationPolicyBindingName: string): string | number;

Parse the policy_binding from FolderLocationPolicyBinding resource.

Parameter
Name Description
folderLocationPolicyBindingName string

A fully-qualified path representing folder_location_policy_binding resource.

Returns
Type Description
string | number

{string} A string representing the policy_binding.

matchPolicyBindingFromOrganizationLocationPolicyBindingName(organizationLocationPolicyBindingName)

matchPolicyBindingFromOrganizationLocationPolicyBindingName(organizationLocationPolicyBindingName: string): string | number;

Parse the policy_binding from OrganizationLocationPolicyBinding resource.

Parameter
Name Description
organizationLocationPolicyBindingName string

A fully-qualified path representing organization_location_policy_binding resource.

Returns
Type Description
string | number

{string} A string representing the policy_binding.

matchPolicyBindingFromProjectLocationPolicyBindingName(projectLocationPolicyBindingName)

matchPolicyBindingFromProjectLocationPolicyBindingName(projectLocationPolicyBindingName: string): string | number;

Parse the policy_binding from ProjectLocationPolicyBinding resource.

Parameter
Name Description
projectLocationPolicyBindingName string

A fully-qualified path representing project_location_policy_binding resource.

Returns
Type Description
string | number

{string} A string representing the policy_binding.

matchPrincipalAccessBoundaryPolicyFromPrincipalAccessBoundaryPolicyName(principalAccessBoundaryPolicyName)

matchPrincipalAccessBoundaryPolicyFromPrincipalAccessBoundaryPolicyName(principalAccessBoundaryPolicyName: string): string | number;

Parse the principal_access_boundary_policy from PrincipalAccessBoundaryPolicy resource.

Parameter
Name Description
principalAccessBoundaryPolicyName string

A fully-qualified path representing PrincipalAccessBoundaryPolicy resource.

Returns
Type Description
string | number

{string} A string representing the principal_access_boundary_policy.

matchProjectFromProjectLocationPolicyBindingName(projectLocationPolicyBindingName)

matchProjectFromProjectLocationPolicyBindingName(projectLocationPolicyBindingName: string): string | number;

Parse the project from ProjectLocationPolicyBinding resource.

Parameter
Name Description
projectLocationPolicyBindingName string

A fully-qualified path representing project_location_policy_binding resource.

Returns
Type Description
string | number

{string} A string representing the project.

organizationLocationPath(organization, location)

organizationLocationPath(organization: string, location: string): string;

Return a fully-qualified organizationLocation resource name string.

Parameters
Name Description
organization string
location string
Returns
Type Description
string

{string} Resource name string.

organizationLocationPolicyBindingPath(organization, location, policyBinding)

organizationLocationPolicyBindingPath(organization: string, location: string, policyBinding: string): string;

Return a fully-qualified organizationLocationPolicyBinding resource name string.

Parameters
Name Description
organization string
location string
policyBinding string
Returns
Type Description
string

{string} Resource name string.

organizationPath(organization)

organizationPath(organization: string): string;

Return a fully-qualified organization resource name string.

Parameter
Name Description
organization string
Returns
Type Description
string

{string} Resource name string.

principalAccessBoundaryPolicyPath(organization, location, principalAccessBoundaryPolicy)

principalAccessBoundaryPolicyPath(organization: string, location: string, principalAccessBoundaryPolicy: string): string;

Return a fully-qualified principalAccessBoundaryPolicy resource name string.

Parameters
Name Description
organization string
location string
principalAccessBoundaryPolicy string
Returns
Type Description
string

{string} Resource name string.

projectLocationPolicyBindingPath(project, location, policyBinding)

projectLocationPolicyBindingPath(project: string, location: string, policyBinding: string): string;

Return a fully-qualified projectLocationPolicyBinding resource name string.

Parameters
Name Description
project string
location string
policyBinding string
Returns
Type Description
string

{string} Resource name string.

searchPrincipalAccessBoundaryPolicyBindings(request, options)

searchPrincipalAccessBoundaryPolicyBindings(request?: protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsRequest, options?: CallOptions): Promise<[
        protos.google.iam.v3.IPolicyBinding[],
        protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsRequest | null,
        protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsResponse
    ]>;

Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings permission on that policy.

Parameters
Name Description
request ISearchPrincipalAccessBoundaryPolicyBindingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.iam.v3.IPolicyBinding[], protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsRequest | null, protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using searchPrincipalAccessBoundaryPolicyBindingsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

searchPrincipalAccessBoundaryPolicyBindings(request, options, callback)

searchPrincipalAccessBoundaryPolicyBindings(request: protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsRequest, options: CallOptions, callback: PaginationCallback<protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsRequest, protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsResponse | null | undefined, protos.google.iam.v3.IPolicyBinding>): void;
Parameters
Name Description
request ISearchPrincipalAccessBoundaryPolicyBindingsRequest
options CallOptions
callback PaginationCallback<protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsRequest, protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsResponse | null | undefined, protos.google.iam.v3.IPolicyBinding>
Returns
Type Description
void

searchPrincipalAccessBoundaryPolicyBindings(request, callback)

searchPrincipalAccessBoundaryPolicyBindings(request: protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsRequest, callback: PaginationCallback<protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsRequest, protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsResponse | null | undefined, protos.google.iam.v3.IPolicyBinding>): void;
Parameters
Name Description
request ISearchPrincipalAccessBoundaryPolicyBindingsRequest
callback PaginationCallback<protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsRequest, protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsResponse | null | undefined, protos.google.iam.v3.IPolicyBinding>
Returns
Type Description
void

searchPrincipalAccessBoundaryPolicyBindingsAsync(request, options)

searchPrincipalAccessBoundaryPolicyBindingsAsync(request?: protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsRequest, options?: CallOptions): AsyncIterable<protos.google.iam.v3.IPolicyBinding>;

Equivalent to searchPrincipalAccessBoundaryPolicyBindings, but returns an iterable object.

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

Parameters
Name Description
request ISearchPrincipalAccessBoundaryPolicyBindingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.iam.v3.IPolicyBinding>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the principal access boundary policy.
   *  Format:
   *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
   */
  // const name = 'abc123'
  /**
   *  Optional. The maximum number of policy bindings to return. The service may
   *  return fewer than this value.
   *  If unspecified, at most 50 policy bindings will be returned.
   *  The maximum value is 1000; values above 1000 will be coerced to 1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A page token, received from a previous
   *  `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
   *  retrieve the subsequent page.
   *  When paginating, all other parameters provided to
   *  `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
   *  that provided the page token.
   */
  // const pageToken = 'abc123'

  // Imports the Iam library
  const {PrincipalAccessBoundaryPoliciesClient} = require('@google-cloud/iam').v3;

  // Instantiates a client
  const iamClient = new PrincipalAccessBoundaryPoliciesClient();

  async function callSearchPrincipalAccessBoundaryPolicyBindings() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const iterable = iamClient.searchPrincipalAccessBoundaryPolicyBindingsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callSearchPrincipalAccessBoundaryPolicyBindings();

searchPrincipalAccessBoundaryPolicyBindingsStream(request, options)

searchPrincipalAccessBoundaryPolicyBindingsStream(request?: protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsRequest, options?: CallOptions): Transform;

Equivalent to searchPrincipalAccessBoundaryPolicyBindings, but returns a NodeJS Stream object.

Parameters
Name Description
request ISearchPrincipalAccessBoundaryPolicyBindingsRequest

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 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 searchPrincipalAccessBoundaryPolicyBindingsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

updatePrincipalAccessBoundaryPolicy(request, options)

updatePrincipalAccessBoundaryPolicy(request?: protos.google.iam.v3.IUpdatePrincipalAccessBoundaryPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates a principal access boundary policy.

Parameters
Name Description
request IUpdatePrincipalAccessBoundaryPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The principal access boundary policy to update.
   *  The principal access boundary policy's `name` field is used to identify the
   *  policy to update.
   */
  // const principalAccessBoundaryPolicy = {}
  /**
   *  Optional. If set, validate the request and preview the update, but do not
   *  actually post it.
   */
  // const validateOnly = true
  /**
   *  Optional. The list of fields to update
   */
  // const updateMask = {}

  // Imports the Iam library
  const {PrincipalAccessBoundaryPoliciesClient} = require('@google-cloud/iam').v3;

  // Instantiates a client
  const iamClient = new PrincipalAccessBoundaryPoliciesClient();

  async function callUpdatePrincipalAccessBoundaryPolicy() {
    // Construct request
    const request = {
      principalAccessBoundaryPolicy,
    };

    // Run request
    const [operation] = await iamClient.updatePrincipalAccessBoundaryPolicy(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdatePrincipalAccessBoundaryPolicy();

updatePrincipalAccessBoundaryPolicy(request, options, callback)

updatePrincipalAccessBoundaryPolicy(request: protos.google.iam.v3.IUpdatePrincipalAccessBoundaryPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdatePrincipalAccessBoundaryPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updatePrincipalAccessBoundaryPolicy(request, callback)

updatePrincipalAccessBoundaryPolicy(request: protos.google.iam.v3.IUpdatePrincipalAccessBoundaryPolicyRequest, callback: Callback<LROperation<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdatePrincipalAccessBoundaryPolicyRequest
callback Callback<LROperation<protos.google.iam.v3.IPrincipalAccessBoundaryPolicy, protos.google.iam.v3.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void