Class v1.AccessContextManagerClient (1.0.0)

API for setting [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] for Google Cloud Projects. Each organization has one [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] containing the [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter]. This [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] is applicable to all resources in the organization. AccessPolicies v1

Package

@google-cloud/access-context-manager

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of AccessContextManagerClient.

Parameter
NameDescription
opts ClientOptions

Properties

accessContextManagerStub

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

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

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

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

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

port

static get port(): number;

The port for this API service.

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.

warn

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

Methods

accessLevelPath(accessPolicy, accessLevel)

accessLevelPath(accessPolicy: string, accessLevel: string): string;

Return a fully-qualified accessLevel resource name string.

Parameters
NameDescription
accessPolicy string
accessLevel string
Returns
TypeDescription
string

{string} Resource name string.

accessPolicyPath(accessPolicy)

accessPolicyPath(accessPolicy: string): string;

Return a fully-qualified accessPolicy resource name string.

Parameter
NameDescription
accessPolicy string
Returns
TypeDescription
string

{string} Resource name string.

checkCommitServicePerimetersProgress(name)

checkCommitServicePerimetersProgress(name: string): Promise<LROperation<protos.google.identity.accesscontextmanager.v1.CommitServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.identity.accesscontextmanager.v1.CommitServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the parent Access Policy 
   *  google.identity.accesscontextmanager.v1.AccessPolicy  which owns all
   *  Service Perimeters 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  in scope for
   *  the commit operation.
   *  Format: `accessPolicies/{policy_id}`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The etag for the version of the Access Policy 
   *  google.identity.accesscontextmanager.v1alpha.AccessPolicy  that this
   *  commit operation is to be performed on. If, at the time of commit, the
   *  etag for the Access Policy stored in Access Context Manager is different
   *  from the specified etag, then the commit operation will not be performed
   *  and the call will fail. This field is not required. If etag is not
   *  provided, the operation will be performed as if a valid etag is provided.
   */
  // const etag = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callCommitServicePerimeters();

checkCreateAccessLevelProgress(name)

checkCreateAccessLevelProgress(name: string): Promise<LROperation<protos.google.identity.accesscontextmanager.v1.AccessLevel, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.identity.accesscontextmanager.v1.AccessLevel, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy which owns this Access
   *  Level google.identity.accesscontextmanager.v1.AccessLevel.
   *  Format: `accessPolicies/{policy_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The Access Level 
   *  google.identity.accesscontextmanager.v1.AccessLevel  to create.
   *  Syntactic correctness of the Access Level 
   *  google.identity.accesscontextmanager.v1.AccessLevel  is a
   *  precondition for creation.
   */
  // const accessLevel = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callCreateAccessLevel();

checkCreateAccessPolicyProgress(name)

checkCreateAccessPolicyProgress(name: string): Promise<LROperation<protos.google.identity.accesscontextmanager.v1.AccessPolicy, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.identity.accesscontextmanager.v1.AccessPolicy, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Output only. Resource name of the `AccessPolicy`. Format:
   *  `accessPolicies/{access_policy}`
   */
  // const name = 'abc123'
  /**
   *  Required. The parent of this `AccessPolicy` in the Cloud Resource
   *  Hierarchy. Currently immutable once created. Format:
   *  `organizations/{organization_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. Human readable title. Does not affect behavior.
   */
  // const title = 'abc123'
  /**
   *  Output only. Time the `AccessPolicy` was created in UTC.
   */
  // const createTime = {}
  /**
   *  Output only. Time the `AccessPolicy` was updated in UTC.
   */
  // const updateTime = {}
  /**
   *  Output only. An opaque identifier for the current version of the
   *  `AccessPolicy`. This will always be a strongly validated etag, meaning that
   *  two Access Polices will be identical if and only if their etags are
   *  identical. Clients should not expect this to be in any specific format.
   */
  // const etag = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

  async function callCreateAccessPolicy() {
    // Construct request
    const request = {
    };

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

  callCreateAccessPolicy();

checkCreateGcpUserAccessBindingProgress(name)

checkCreateGcpUserAccessBindingProgress(name: string): Promise<LROperation<protos.google.identity.accesscontextmanager.v1.GcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.GcpUserAccessBindingOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.identity.accesscontextmanager.v1.GcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.GcpUserAccessBindingOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Example: "organizations/256"
   */
  // const parent = 'abc123'
  /**
   *  Required. GcpUserAccessBinding 
   *  google.identity.accesscontextmanager.v1.GcpUserAccessBinding 
   */
  // const gcpUserAccessBinding = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callCreateGcpUserAccessBinding();

checkCreateServicePerimeterProgress(name)

checkCreateServicePerimeterProgress(name: string): Promise<LROperation<protos.google.identity.accesscontextmanager.v1.ServicePerimeter, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.identity.accesscontextmanager.v1.ServicePerimeter, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy which owns this Service
   *  Perimeter google.identity.accesscontextmanager.v1.ServicePerimeter.
   *  Format: `accessPolicies/{policy_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The Service Perimeter 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  to create.
   *  Syntactic correctness of the Service Perimeter 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  is a
   *  precondition for creation.
   */
  // const servicePerimeter = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callCreateServicePerimeter();

checkDeleteAccessLevelProgress(name)

checkDeleteAccessLevelProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the Access Level 
   *  google.identity.accesscontextmanager.v1.AccessLevel.
   *  Format:
   *  `accessPolicies/{policy_id}/accessLevels/{access_level_id}`
   */
  // const name = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callDeleteAccessLevel();

checkDeleteAccessPolicyProgress(name)

checkDeleteAccessPolicyProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy to delete.
   *  Format `accessPolicies/{policy_id}`
   */
  // const name = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callDeleteAccessPolicy();

checkDeleteGcpUserAccessBindingProgress(name)

checkDeleteGcpUserAccessBindingProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.identity.accesscontextmanager.v1.GcpUserAccessBindingOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.identity.accesscontextmanager.v1.GcpUserAccessBindingOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
   */
  // const name = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callDeleteGcpUserAccessBinding();

checkDeleteServicePerimeterProgress(name)

checkDeleteServicePerimeterProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the Service Perimeter 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter.
   *  Format:
   *  `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}`
   */
  // const name = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callDeleteServicePerimeter();

checkReplaceAccessLevelsProgress(name)

checkReplaceAccessLevelsProgress(name: string): Promise<LROperation<protos.google.identity.accesscontextmanager.v1.ReplaceAccessLevelsResponse, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.identity.accesscontextmanager.v1.ReplaceAccessLevelsResponse, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy which owns these
   *  Access Levels 
   *  google.identity.accesscontextmanager.v1.AccessLevel.
   *  Format: `accessPolicies/{policy_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The desired Access Levels 
   *  google.identity.accesscontextmanager.v1.AccessLevel  that should
   *  replace all existing Access Levels 
   *  google.identity.accesscontextmanager.v1.AccessLevel  in the
   *  Access Policy 
   *  google.identity.accesscontextmanager.v1.AccessPolicy.
   */
  // const accessLevels = 1234
  /**
   *  Optional. The etag for the version of the Access Policy 
   *  google.identity.accesscontextmanager.v1.AccessPolicy  that this
   *  replace operation is to be performed on. If, at the time of replace, the
   *  etag for the Access Policy stored in Access Context Manager is different
   *  from the specified etag, then the replace operation will not be performed
   *  and the call will fail. This field is not required. If etag is not
   *  provided, the operation will be performed as if a valid etag is provided.
   */
  // const etag = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callReplaceAccessLevels();

checkReplaceServicePerimetersProgress(name)

checkReplaceServicePerimetersProgress(name: string): Promise<LROperation<protos.google.identity.accesscontextmanager.v1.ReplaceServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.identity.accesscontextmanager.v1.ReplaceServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy which owns these
   *  Service Perimeters 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter.
   *  Format: `accessPolicies/{policy_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The desired Service Perimeters 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  that should
   *  replace all existing Service Perimeters 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  in the
   *  Access Policy 
   *  google.identity.accesscontextmanager.v1.AccessPolicy.
   */
  // const servicePerimeters = 1234
  /**
   *  Optional. The etag for the version of the Access Policy 
   *  google.identity.accesscontextmanager.v1.AccessPolicy  that this
   *  replace operation is to be performed on. If, at the time of replace, the
   *  etag for the Access Policy stored in Access Context Manager is different
   *  from the specified etag, then the replace operation will not be performed
   *  and the call will fail. This field is not required. If etag is not
   *  provided, the operation will be performed as if a valid etag is provided.
   */
  // const etag = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callReplaceServicePerimeters();

checkUpdateAccessLevelProgress(name)

checkUpdateAccessLevelProgress(name: string): Promise<LROperation<protos.google.identity.accesscontextmanager.v1.AccessLevel, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.identity.accesscontextmanager.v1.AccessLevel, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The updated Access Level 
   *  google.identity.accesscontextmanager.v1.AccessLevel. Syntactic
   *  correctness of the Access Level 
   *  google.identity.accesscontextmanager.v1.AccessLevel  is a
   *  precondition for creation.
   */
  // const accessLevel = {}
  /**
   *  Required. Mask to control which fields get updated. Must be non-empty.
   */
  // const updateMask = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

  async function callUpdateAccessLevel() {
    // Construct request
    const request = {
      accessLevel,
      updateMask,
    };

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

  callUpdateAccessLevel();

checkUpdateAccessPolicyProgress(name)

checkUpdateAccessPolicyProgress(name: string): Promise<LROperation<protos.google.identity.accesscontextmanager.v1.AccessPolicy, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.identity.accesscontextmanager.v1.AccessPolicy, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The updated AccessPolicy.
   */
  // const policy = {}
  /**
   *  Required. Mask to control which fields get updated. Must be non-empty.
   */
  // const updateMask = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

  async function callUpdateAccessPolicy() {
    // Construct request
    const request = {
      policy,
      updateMask,
    };

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

  callUpdateAccessPolicy();

checkUpdateGcpUserAccessBindingProgress(name)

checkUpdateGcpUserAccessBindingProgress(name: string): Promise<LROperation<protos.google.identity.accesscontextmanager.v1.GcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.GcpUserAccessBindingOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.identity.accesscontextmanager.v1.GcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.GcpUserAccessBindingOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. GcpUserAccessBinding 
   *  google.identity.accesscontextmanager.v1.GcpUserAccessBinding 
   */
  // const gcpUserAccessBinding = {}
  /**
   *  Required. Only the fields specified in this mask are updated. Because name and
   *  group_key cannot be changed, update_mask is required and must always be:
   *  update_mask {
   *  paths: "access_levels"
   *  }
   */
  // const updateMask = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

  async function callUpdateGcpUserAccessBinding() {
    // Construct request
    const request = {
      gcpUserAccessBinding,
      updateMask,
    };

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

  callUpdateGcpUserAccessBinding();

checkUpdateServicePerimeterProgress(name)

checkUpdateServicePerimeterProgress(name: string): Promise<LROperation<protos.google.identity.accesscontextmanager.v1.ServicePerimeter, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.identity.accesscontextmanager.v1.ServicePerimeter, protos.google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The updated `ServicePerimeter`. Syntactic correctness of the
   *  `ServicePerimeter` is a precondition for creation.
   */
  // const servicePerimeter = {}
  /**
   *  Required. Mask to control which fields get updated. Must be non-empty.
   */
  // const updateMask = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

  async function callUpdateServicePerimeter() {
    // Construct request
    const request = {
      servicePerimeter,
      updateMask,
    };

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

  callUpdateServicePerimeter();

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.

commitServicePerimeters(request, options)

commitServicePerimeters(request?: protos.google.identity.accesscontextmanager.v1.ICommitServicePerimetersRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.identity.accesscontextmanager.v1.ICommitServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Commit the dry-run spec for all the [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] in an . A commit operation on a Service Perimeter involves copying its spec field to that Service Perimeter's status field. Only [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] with use_explicit_dry_run_spec field set to true are affected by a commit operation. The longrunning operation from this RPC will have a successful status once the dry-run specs for all the [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] have been committed. If a commit fails, it will cause the longrunning operation to return an error response and the entire commit operation will be cancelled. When successful, Operation.response field will contain CommitServicePerimetersResponse. The dry_run and the spec fields will be cleared after a successful commit operation.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.ICommitServicePerimetersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.identity.accesscontextmanager.v1.ICommitServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the parent Access Policy 
   *  google.identity.accesscontextmanager.v1.AccessPolicy  which owns all
   *  Service Perimeters 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  in scope for
   *  the commit operation.
   *  Format: `accessPolicies/{policy_id}`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The etag for the version of the Access Policy 
   *  google.identity.accesscontextmanager.v1alpha.AccessPolicy  that this
   *  commit operation is to be performed on. If, at the time of commit, the
   *  etag for the Access Policy stored in Access Context Manager is different
   *  from the specified etag, then the commit operation will not be performed
   *  and the call will fail. This field is not required. If etag is not
   *  provided, the operation will be performed as if a valid etag is provided.
   */
  // const etag = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callCommitServicePerimeters();

commitServicePerimeters(request, options, callback)

commitServicePerimeters(request: protos.google.identity.accesscontextmanager.v1.ICommitServicePerimetersRequest, options: CallOptions, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.ICommitServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.ICommitServicePerimetersRequest
options CallOptions
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.ICommitServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

commitServicePerimeters(request, callback)

commitServicePerimeters(request: protos.google.identity.accesscontextmanager.v1.ICommitServicePerimetersRequest, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.ICommitServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.ICommitServicePerimetersRequest
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.ICommitServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createAccessLevel(request, options)

createAccessLevel(request?: protos.google.identity.accesscontextmanager.v1.ICreateAccessLevelRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Create an [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel]. The longrunning operation from this RPC will have a successful status once the [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] has propagated to long-lasting storage. [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] containing errors will result in an error response for the first error encountered.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.ICreateAccessLevelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy which owns this Access
   *  Level google.identity.accesscontextmanager.v1.AccessLevel.
   *  Format: `accessPolicies/{policy_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The Access Level 
   *  google.identity.accesscontextmanager.v1.AccessLevel  to create.
   *  Syntactic correctness of the Access Level 
   *  google.identity.accesscontextmanager.v1.AccessLevel  is a
   *  precondition for creation.
   */
  // const accessLevel = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callCreateAccessLevel();

createAccessLevel(request, options, callback)

createAccessLevel(request: protos.google.identity.accesscontextmanager.v1.ICreateAccessLevelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.ICreateAccessLevelRequest
options CallOptions
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createAccessLevel(request, callback)

createAccessLevel(request: protos.google.identity.accesscontextmanager.v1.ICreateAccessLevelRequest, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.ICreateAccessLevelRequest
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createAccessPolicy(request, options)

createAccessPolicy(request?: protos.google.identity.accesscontextmanager.v1.IAccessPolicy, options?: CallOptions): Promise<[
        LROperation<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Create an AccessPolicy. Fails if this organization already has a AccessPolicy. The longrunning Operation will have a successful status once the AccessPolicy has propagated to long-lasting storage. Syntactic and basic semantic errors will be returned in metadata as a BadRequest proto.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IAccessPolicy

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Output only. Resource name of the `AccessPolicy`. Format:
   *  `accessPolicies/{access_policy}`
   */
  // const name = 'abc123'
  /**
   *  Required. The parent of this `AccessPolicy` in the Cloud Resource
   *  Hierarchy. Currently immutable once created. Format:
   *  `organizations/{organization_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. Human readable title. Does not affect behavior.
   */
  // const title = 'abc123'
  /**
   *  Output only. Time the `AccessPolicy` was created in UTC.
   */
  // const createTime = {}
  /**
   *  Output only. Time the `AccessPolicy` was updated in UTC.
   */
  // const updateTime = {}
  /**
   *  Output only. An opaque identifier for the current version of the
   *  `AccessPolicy`. This will always be a strongly validated etag, meaning that
   *  two Access Polices will be identical if and only if their etags are
   *  identical. Clients should not expect this to be in any specific format.
   */
  // const etag = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

  async function callCreateAccessPolicy() {
    // Construct request
    const request = {
    };

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

  callCreateAccessPolicy();

createAccessPolicy(request, options, callback)

createAccessPolicy(request: protos.google.identity.accesscontextmanager.v1.IAccessPolicy, options: CallOptions, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IAccessPolicy
options CallOptions
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createAccessPolicy(request, callback)

createAccessPolicy(request: protos.google.identity.accesscontextmanager.v1.IAccessPolicy, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IAccessPolicy
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createGcpUserAccessBinding(request, options)

createGcpUserAccessBinding(request?: protos.google.identity.accesscontextmanager.v1.ICreateGcpUserAccessBindingRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the client specifies a [name] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], the server will ignore it. Fails if a resource already exists with the same [group_key] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. Completion of this long-running operation does not necessarily signify that the new binding is deployed onto all affected users, which may take more time.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.ICreateGcpUserAccessBindingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Example: "organizations/256"
   */
  // const parent = 'abc123'
  /**
   *  Required. GcpUserAccessBinding 
   *  google.identity.accesscontextmanager.v1.GcpUserAccessBinding 
   */
  // const gcpUserAccessBinding = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callCreateGcpUserAccessBinding();

createGcpUserAccessBinding(request, options, callback)

createGcpUserAccessBinding(request: protos.google.identity.accesscontextmanager.v1.ICreateGcpUserAccessBindingRequest, options: CallOptions, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.ICreateGcpUserAccessBindingRequest
options CallOptions
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createGcpUserAccessBinding(request, callback)

createGcpUserAccessBinding(request: protos.google.identity.accesscontextmanager.v1.ICreateGcpUserAccessBindingRequest, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.ICreateGcpUserAccessBindingRequest
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createServicePerimeter(request, options)

createServicePerimeter(request?: protos.google.identity.accesscontextmanager.v1.ICreateServicePerimeterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Create a [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. The longrunning operation from this RPC will have a successful status once the [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] has propagated to long-lasting storage. [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] containing errors will result in an error response for the first error encountered.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.ICreateServicePerimeterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy which owns this Service
   *  Perimeter google.identity.accesscontextmanager.v1.ServicePerimeter.
   *  Format: `accessPolicies/{policy_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The Service Perimeter 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  to create.
   *  Syntactic correctness of the Service Perimeter 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  is a
   *  precondition for creation.
   */
  // const servicePerimeter = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callCreateServicePerimeter();

createServicePerimeter(request, options, callback)

createServicePerimeter(request: protos.google.identity.accesscontextmanager.v1.ICreateServicePerimeterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.ICreateServicePerimeterRequest
options CallOptions
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createServicePerimeter(request, callback)

createServicePerimeter(request: protos.google.identity.accesscontextmanager.v1.ICreateServicePerimeterRequest, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.ICreateServicePerimeterRequest
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteAccessLevel(request, options)

deleteAccessLevel(request?: protos.google.identity.accesscontextmanager.v1.IDeleteAccessLevelRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Delete an [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] by resource name. The longrunning operation from this RPC will have a successful status once the [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] has been removed from long-lasting storage.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IDeleteAccessLevelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the Access Level 
   *  google.identity.accesscontextmanager.v1.AccessLevel.
   *  Format:
   *  `accessPolicies/{policy_id}/accessLevels/{access_level_id}`
   */
  // const name = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callDeleteAccessLevel();

deleteAccessLevel(request, options, callback)

deleteAccessLevel(request: protos.google.identity.accesscontextmanager.v1.IDeleteAccessLevelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IDeleteAccessLevelRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteAccessLevel(request, callback)

deleteAccessLevel(request: protos.google.identity.accesscontextmanager.v1.IDeleteAccessLevelRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IDeleteAccessLevelRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteAccessPolicy(request, options)

deleteAccessPolicy(request?: protos.google.identity.accesscontextmanager.v1.IDeleteAccessPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Delete an [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] by resource name. The longrunning Operation will have a successful status once the [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] has been removed from long-lasting storage.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IDeleteAccessPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy to delete.
   *  Format `accessPolicies/{policy_id}`
   */
  // const name = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callDeleteAccessPolicy();

deleteAccessPolicy(request, options, callback)

deleteAccessPolicy(request: protos.google.identity.accesscontextmanager.v1.IDeleteAccessPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IDeleteAccessPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteAccessPolicy(request, callback)

deleteAccessPolicy(request: protos.google.identity.accesscontextmanager.v1.IDeleteAccessPolicyRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IDeleteAccessPolicyRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteGcpUserAccessBinding(request, options)

deleteGcpUserAccessBinding(request?: protos.google.identity.accesscontextmanager.v1.IDeleteGcpUserAccessBindingRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. Completion of this long-running operation does not necessarily signify that the binding deletion is deployed onto all affected users, which may take more time.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IDeleteGcpUserAccessBindingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
   */
  // const name = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callDeleteGcpUserAccessBinding();

deleteGcpUserAccessBinding(request, options, callback)

deleteGcpUserAccessBinding(request: protos.google.identity.accesscontextmanager.v1.IDeleteGcpUserAccessBindingRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IDeleteGcpUserAccessBindingRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteGcpUserAccessBinding(request, callback)

deleteGcpUserAccessBinding(request: protos.google.identity.accesscontextmanager.v1.IDeleteGcpUserAccessBindingRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IDeleteGcpUserAccessBindingRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteServicePerimeter(request, options)

deleteServicePerimeter(request?: protos.google.identity.accesscontextmanager.v1.IDeleteServicePerimeterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Delete a [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] by resource name. The longrunning operation from this RPC will have a successful status once the [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] has been removed from long-lasting storage.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IDeleteServicePerimeterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the Service Perimeter 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter.
   *  Format:
   *  `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}`
   */
  // const name = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callDeleteServicePerimeter();

deleteServicePerimeter(request, options, callback)

deleteServicePerimeter(request: protos.google.identity.accesscontextmanager.v1.IDeleteServicePerimeterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IDeleteServicePerimeterRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteServicePerimeter(request, callback)

deleteServicePerimeter(request: protos.google.identity.accesscontextmanager.v1.IDeleteServicePerimeterRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IDeleteServicePerimeterRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

gcpUserAccessBindingPath(organization, gcpUserAccessBinding)

gcpUserAccessBindingPath(organization: string, gcpUserAccessBinding: string): string;

Return a fully-qualified gcpUserAccessBinding resource name string.

Parameters
NameDescription
organization string
gcpUserAccessBinding string
Returns
TypeDescription
string

{string} Resource name string.

getAccessLevel(request, options)

getAccessLevel(request?: protos.google.identity.accesscontextmanager.v1.IGetAccessLevelRequest, options?: CallOptions): Promise<[
        protos.google.identity.accesscontextmanager.v1.IAccessLevel,
        (protos.google.identity.accesscontextmanager.v1.IGetAccessLevelRequest | undefined),
        {} | undefined
    ]>;

Get an [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] by resource name.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IGetAccessLevelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.identity.accesscontextmanager.v1.IAccessLevel, (protos.google.identity.accesscontextmanager.v1.IGetAccessLevelRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [AccessLevel]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the Access Level 
   *  google.identity.accesscontextmanager.v1.AccessLevel.
   *  Format:
   *  `accessPolicies/{policy_id}/accessLevels/{access_level_id}`
   */
  // const name = 'abc123'
  /**
   *  Whether to return `BasicLevels` in the Cloud Common Expression
   *  Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where
   *  Access Levels  google.identity.accesscontextmanager.v1.AccessLevel 
   *  are returned as `BasicLevels` or `CustomLevels` based on how they were
   *  created. If set to CEL, all Access Levels 
   *  google.identity.accesscontextmanager.v1.AccessLevel  are returned as
   *  `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent
   *  `CustomLevels`.
   */
  // const accessLevelFormat = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

    // Run request
    const response = await accesscontextmanagerClient.getAccessLevel(request);
    console.log(response);
  }

  callGetAccessLevel();

getAccessLevel(request, options, callback)

getAccessLevel(request: protos.google.identity.accesscontextmanager.v1.IGetAccessLevelRequest, options: CallOptions, callback: Callback<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IGetAccessLevelRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IGetAccessLevelRequest
options CallOptions
callback Callback<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IGetAccessLevelRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getAccessLevel(request, callback)

getAccessLevel(request: protos.google.identity.accesscontextmanager.v1.IGetAccessLevelRequest, callback: Callback<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IGetAccessLevelRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IGetAccessLevelRequest
callback Callback<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IGetAccessLevelRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getAccessPolicy(request, options)

getAccessPolicy(request?: protos.google.identity.accesscontextmanager.v1.IGetAccessPolicyRequest, options?: CallOptions): Promise<[
        protos.google.identity.accesscontextmanager.v1.IAccessPolicy,
        (protos.google.identity.accesscontextmanager.v1.IGetAccessPolicyRequest | undefined),
        {} | undefined
    ]>;

Get an [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] by name.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IGetAccessPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.identity.accesscontextmanager.v1.IAccessPolicy, (protos.google.identity.accesscontextmanager.v1.IGetAccessPolicyRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [AccessPolicy]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy to get.
   *  Format `accessPolicies/{policy_id}`
   */
  // const name = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

    // Run request
    const response = await accesscontextmanagerClient.getAccessPolicy(request);
    console.log(response);
  }

  callGetAccessPolicy();

getAccessPolicy(request, options, callback)

getAccessPolicy(request: protos.google.identity.accesscontextmanager.v1.IGetAccessPolicyRequest, options: CallOptions, callback: Callback<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IGetAccessPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IGetAccessPolicyRequest
options CallOptions
callback Callback<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IGetAccessPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getAccessPolicy(request, callback)

getAccessPolicy(request: protos.google.identity.accesscontextmanager.v1.IGetAccessPolicyRequest, callback: Callback<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IGetAccessPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IGetAccessPolicyRequest
callback Callback<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IGetAccessPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getGcpUserAccessBinding(request, options)

getGcpUserAccessBinding(request?: protos.google.identity.accesscontextmanager.v1.IGetGcpUserAccessBindingRequest, options?: CallOptions): Promise<[
        protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding,
        (protos.google.identity.accesscontextmanager.v1.IGetGcpUserAccessBindingRequest | undefined),
        {} | undefined
    ]>;

Gets the [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with the given name.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IGetGcpUserAccessBindingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, (protos.google.identity.accesscontextmanager.v1.IGetGcpUserAccessBindingRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [GcpUserAccessBinding]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
   */
  // const name = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

    // Run request
    const response = await accesscontextmanagerClient.getGcpUserAccessBinding(request);
    console.log(response);
  }

  callGetGcpUserAccessBinding();

getGcpUserAccessBinding(request, options, callback)

getGcpUserAccessBinding(request: protos.google.identity.accesscontextmanager.v1.IGetGcpUserAccessBindingRequest, options: CallOptions, callback: Callback<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGetGcpUserAccessBindingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IGetGcpUserAccessBindingRequest
options CallOptions
callback Callback<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGetGcpUserAccessBindingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getGcpUserAccessBinding(request, callback)

getGcpUserAccessBinding(request: protos.google.identity.accesscontextmanager.v1.IGetGcpUserAccessBindingRequest, callback: Callback<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGetGcpUserAccessBindingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IGetGcpUserAccessBindingRequest
callback Callback<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGetGcpUserAccessBindingRequest | 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

getServicePerimeter(request, options)

getServicePerimeter(request?: protos.google.identity.accesscontextmanager.v1.IGetServicePerimeterRequest, options?: CallOptions): Promise<[
        protos.google.identity.accesscontextmanager.v1.IServicePerimeter,
        (protos.google.identity.accesscontextmanager.v1.IGetServicePerimeterRequest | undefined),
        {} | undefined
    ]>;

Get a [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] by resource name.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IGetServicePerimeterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.identity.accesscontextmanager.v1.IServicePerimeter, (protos.google.identity.accesscontextmanager.v1.IGetServicePerimeterRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [ServicePerimeter]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the Service Perimeter 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter.
   *  Format:
   *  `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}`
   */
  // const name = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

    // Run request
    const response = await accesscontextmanagerClient.getServicePerimeter(request);
    console.log(response);
  }

  callGetServicePerimeter();

getServicePerimeter(request, options, callback)

getServicePerimeter(request: protos.google.identity.accesscontextmanager.v1.IGetServicePerimeterRequest, options: CallOptions, callback: Callback<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IGetServicePerimeterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IGetServicePerimeterRequest
options CallOptions
callback Callback<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IGetServicePerimeterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getServicePerimeter(request, callback)

getServicePerimeter(request: protos.google.identity.accesscontextmanager.v1.IGetServicePerimeterRequest, callback: Callback<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IGetServicePerimeterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IGetServicePerimeterRequest
callback Callback<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IGetServicePerimeterRequest | null | undefined, {} | null | 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.

listAccessLevels(request, options)

listAccessLevels(request?: protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest, options?: CallOptions): Promise<[
        protos.google.identity.accesscontextmanager.v1.IAccessLevel[],
        protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest | null,
        protos.google.identity.accesscontextmanager.v1.IListAccessLevelsResponse
    ]>;

List all [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] for an access policy.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.identity.accesscontextmanager.v1.IAccessLevel[], protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest | null, protos.google.identity.accesscontextmanager.v1.IListAccessLevelsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [AccessLevel]. 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 listAccessLevelsAsync() 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.

listAccessLevels(request, options, callback)

listAccessLevels(request: protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest, options: CallOptions, callback: PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest, protos.google.identity.accesscontextmanager.v1.IListAccessLevelsResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IAccessLevel>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest
options CallOptions
callback PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest, protos.google.identity.accesscontextmanager.v1.IListAccessLevelsResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IAccessLevel>
Returns
TypeDescription
void

listAccessLevels(request, callback)

listAccessLevels(request: protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest, callback: PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest, protos.google.identity.accesscontextmanager.v1.IListAccessLevelsResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IAccessLevel>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest
callback PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest, protos.google.identity.accesscontextmanager.v1.IListAccessLevelsResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IAccessLevel>
Returns
TypeDescription
void

listAccessLevelsAsync(request, options)

listAccessLevelsAsync(request?: protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest, options?: CallOptions): AsyncIterable<protos.google.identity.accesscontextmanager.v1.IAccessLevel>;

Equivalent to listAccessLevels, 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.identity.accesscontextmanager.v1.IListAccessLevelsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.identity.accesscontextmanager.v1.IAccessLevel>

{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 [AccessLevel]. 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.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy to list Access Levels 
   *  google.identity.accesscontextmanager.v1.AccessLevel  from.
   *  Format:
   *  `accessPolicies/{policy_id}`
   */
  // const parent = 'abc123'
  /**
   *  Number of Access Levels 
   *  google.identity.accesscontextmanager.v1.AccessLevel  to include in
   *  the list. Default 100.
   */
  // const pageSize = 1234
  /**
   *  Next page token for the next batch of Access Level 
   *  google.identity.accesscontextmanager.v1.AccessLevel  instances.
   *  Defaults to the first page of results.
   */
  // const pageToken = 'abc123'
  /**
   *  Whether to return `BasicLevels` in the Cloud Common Expression language, as
   *  `CustomLevels`, rather than as `BasicLevels`. Defaults to returning
   *  `AccessLevels` in the format they were defined.
   */
  // const accessLevelFormat = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callListAccessLevels();

listAccessLevelsStream(request, options)

listAccessLevelsStream(request?: protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest

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 [AccessLevel] 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 listAccessLevelsAsync() 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.

listAccessPolicies(request, options)

listAccessPolicies(request?: protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest, options?: CallOptions): Promise<[
        protos.google.identity.accesscontextmanager.v1.IAccessPolicy[],
        protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest | null,
        protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesResponse
    ]>;

List all [AccessPolicies] [google.identity.accesscontextmanager.v1.AccessPolicy] under a container.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.identity.accesscontextmanager.v1.IAccessPolicy[], protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest | null, protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [AccessPolicy]. 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 listAccessPoliciesAsync() 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.

listAccessPolicies(request, options, callback)

listAccessPolicies(request: protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest, protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IAccessPolicy>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest
options CallOptions
callback PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest, protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IAccessPolicy>
Returns
TypeDescription
void

listAccessPolicies(request, callback)

listAccessPolicies(request: protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest, callback: PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest, protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IAccessPolicy>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest
callback PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest, protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IAccessPolicy>
Returns
TypeDescription
void

listAccessPoliciesAsync(request, options)

listAccessPoliciesAsync(request?: protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.identity.accesscontextmanager.v1.IAccessPolicy>;

Equivalent to listAccessPolicies, 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.identity.accesscontextmanager.v1.IListAccessPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.identity.accesscontextmanager.v1.IAccessPolicy>

{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 [AccessPolicy]. 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.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the container to list AccessPolicy instances
   *  from.
   *  Format:
   *  `organizations/{org_id}`
   */
  // const parent = 'abc123'
  /**
   *  Number of AccessPolicy instances to include in the list. Default 100.
   */
  // const pageSize = 1234
  /**
   *  Next page token for the next batch of AccessPolicy instances. Defaults to
   *  the first page of results.
   */
  // const pageToken = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callListAccessPolicies();

listAccessPoliciesStream(request, options)

listAccessPoliciesStream(request?: protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest

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 [AccessPolicy] 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 listAccessPoliciesAsync() 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.

listGcpUserAccessBindings(request, options)

listGcpUserAccessBindings(request?: protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest, options?: CallOptions): Promise<[
        protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding[],
        protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest | null,
        protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsResponse
    ]>;

Lists all [GcpUserAccessBindings] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a Google Cloud organization.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding[], protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest | null, protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [GcpUserAccessBinding]. 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 listGcpUserAccessBindingsAsync() 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.

listGcpUserAccessBindings(request, options, callback)

listGcpUserAccessBindings(request: protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest, options: CallOptions, callback: PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest, protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest
options CallOptions
callback PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest, protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding>
Returns
TypeDescription
void

listGcpUserAccessBindings(request, callback)

listGcpUserAccessBindings(request: protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest, callback: PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest, protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest
callback PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest, protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding>
Returns
TypeDescription
void

listGcpUserAccessBindingsAsync(request, options)

listGcpUserAccessBindingsAsync(request?: protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest, options?: CallOptions): AsyncIterable<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding>;

Equivalent to listGcpUserAccessBindings, 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.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding>

{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 [GcpUserAccessBinding]. 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.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Example: "organizations/256"
   */
  // const parent = 'abc123'
  /**
   *  Optional. Maximum number of items to return. The server may return fewer items.
   *  If left blank, the server may return any number of items.
   */
  // const pageSize = 1234
  /**
   *  Optional. If left blank, returns the first page. To enumerate all items, use the
   *  next_page_token 
   *  google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token 
   *  from your previous list operation.
   */
  // const pageToken = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callListGcpUserAccessBindings();

listGcpUserAccessBindingsStream(request, options)

listGcpUserAccessBindingsStream(request?: protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest

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 [GcpUserAccessBinding] 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 listGcpUserAccessBindingsAsync() 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.

listServicePerimeters(request, options)

listServicePerimeters(request?: protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest, options?: CallOptions): Promise<[
        protos.google.identity.accesscontextmanager.v1.IServicePerimeter[],
        protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest | null,
        protos.google.identity.accesscontextmanager.v1.IListServicePerimetersResponse
    ]>;

List all [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] for an access policy.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.identity.accesscontextmanager.v1.IServicePerimeter[], protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest | null, protos.google.identity.accesscontextmanager.v1.IListServicePerimetersResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [ServicePerimeter]. 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 listServicePerimetersAsync() 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.

listServicePerimeters(request, options, callback)

listServicePerimeters(request: protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest, options: CallOptions, callback: PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest, protos.google.identity.accesscontextmanager.v1.IListServicePerimetersResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IServicePerimeter>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest
options CallOptions
callback PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest, protos.google.identity.accesscontextmanager.v1.IListServicePerimetersResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IServicePerimeter>
Returns
TypeDescription
void

listServicePerimeters(request, callback)

listServicePerimeters(request: protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest, callback: PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest, protos.google.identity.accesscontextmanager.v1.IListServicePerimetersResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IServicePerimeter>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest
callback PaginationCallback<protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest, protos.google.identity.accesscontextmanager.v1.IListServicePerimetersResponse | null | undefined, protos.google.identity.accesscontextmanager.v1.IServicePerimeter>
Returns
TypeDescription
void

listServicePerimetersAsync(request, options)

listServicePerimetersAsync(request?: protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest, options?: CallOptions): AsyncIterable<protos.google.identity.accesscontextmanager.v1.IServicePerimeter>;

Equivalent to listServicePerimeters, 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.identity.accesscontextmanager.v1.IListServicePerimetersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.identity.accesscontextmanager.v1.IServicePerimeter>

{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 [ServicePerimeter]. 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.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy to list Service Perimeters 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  from.
   *  Format:
   *  `accessPolicies/{policy_id}`
   */
  // const parent = 'abc123'
  /**
   *  Number of Service Perimeters 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  to include
   *  in the list. Default 100.
   */
  // const pageSize = 1234
  /**
   *  Next page token for the next batch of Service Perimeter 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  instances.
   *  Defaults to the first page of results.
   */
  // const pageToken = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callListServicePerimeters();

listServicePerimetersStream(request, options)

listServicePerimetersStream(request?: protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest

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 [ServicePerimeter] 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 listServicePerimetersAsync() 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.

matchAccessLevelFromAccessLevelName(accessLevelName)

matchAccessLevelFromAccessLevelName(accessLevelName: string): string | number;

Parse the access_level from AccessLevel resource.

Parameter
NameDescription
accessLevelName string

A fully-qualified path representing AccessLevel resource.

Returns
TypeDescription
string | number

{string} A string representing the access_level.

matchAccessPolicyFromAccessLevelName(accessLevelName)

matchAccessPolicyFromAccessLevelName(accessLevelName: string): string | number;

Parse the access_policy from AccessLevel resource.

Parameter
NameDescription
accessLevelName string

A fully-qualified path representing AccessLevel resource.

Returns
TypeDescription
string | number

{string} A string representing the access_policy.

matchAccessPolicyFromAccessPolicyName(accessPolicyName)

matchAccessPolicyFromAccessPolicyName(accessPolicyName: string): string | number;

Parse the access_policy from AccessPolicy resource.

Parameter
NameDescription
accessPolicyName string

A fully-qualified path representing AccessPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the access_policy.

matchAccessPolicyFromServicePerimeterName(servicePerimeterName)

matchAccessPolicyFromServicePerimeterName(servicePerimeterName: string): string | number;

Parse the access_policy from ServicePerimeter resource.

Parameter
NameDescription
servicePerimeterName string

A fully-qualified path representing ServicePerimeter resource.

Returns
TypeDescription
string | number

{string} A string representing the access_policy.

matchGcpUserAccessBindingFromGcpUserAccessBindingName(gcpUserAccessBindingName)

matchGcpUserAccessBindingFromGcpUserAccessBindingName(gcpUserAccessBindingName: string): string | number;

Parse the gcp_user_access_binding from GcpUserAccessBinding resource.

Parameter
NameDescription
gcpUserAccessBindingName string

A fully-qualified path representing GcpUserAccessBinding resource.

Returns
TypeDescription
string | number

{string} A string representing the gcp_user_access_binding.

matchOrganizationFromGcpUserAccessBindingName(gcpUserAccessBindingName)

matchOrganizationFromGcpUserAccessBindingName(gcpUserAccessBindingName: string): string | number;

Parse the organization from GcpUserAccessBinding resource.

Parameter
NameDescription
gcpUserAccessBindingName string

A fully-qualified path representing GcpUserAccessBinding resource.

Returns
TypeDescription
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationName(organizationName)

matchOrganizationFromOrganizationName(organizationName: string): string | number;

Parse the organization from Organization resource.

Parameter
NameDescription
organizationName string

A fully-qualified path representing Organization resource.

Returns
TypeDescription
string | number

{string} A string representing the organization.

matchServicePerimeterFromServicePerimeterName(servicePerimeterName)

matchServicePerimeterFromServicePerimeterName(servicePerimeterName: string): string | number;

Parse the service_perimeter from ServicePerimeter resource.

Parameter
NameDescription
servicePerimeterName string

A fully-qualified path representing ServicePerimeter resource.

Returns
TypeDescription
string | number

{string} A string representing the service_perimeter.

organizationPath(organization)

organizationPath(organization: string): string;

Return a fully-qualified organization resource name string.

Parameter
NameDescription
organization string
Returns
TypeDescription
string

{string} Resource name string.

replaceAccessLevels(request, options)

replaceAccessLevels(request?: protos.google.identity.accesscontextmanager.v1.IReplaceAccessLevelsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.identity.accesscontextmanager.v1.IReplaceAccessLevelsResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Replace all existing [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] in an [Access Policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] provided. This is done atomically. The longrunning operation from this RPC will have a successful status once all replacements have propagated to long-lasting storage. Replacements containing errors will result in an error response for the first error encountered. Replacement will be cancelled on error, existing [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] will not be affected. Operation.response field will contain ReplaceAccessLevelsResponse. Removing [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] will result in error.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IReplaceAccessLevelsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.identity.accesscontextmanager.v1.IReplaceAccessLevelsResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy which owns these
   *  Access Levels 
   *  google.identity.accesscontextmanager.v1.AccessLevel.
   *  Format: `accessPolicies/{policy_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The desired Access Levels 
   *  google.identity.accesscontextmanager.v1.AccessLevel  that should
   *  replace all existing Access Levels 
   *  google.identity.accesscontextmanager.v1.AccessLevel  in the
   *  Access Policy 
   *  google.identity.accesscontextmanager.v1.AccessPolicy.
   */
  // const accessLevels = 1234
  /**
   *  Optional. The etag for the version of the Access Policy 
   *  google.identity.accesscontextmanager.v1.AccessPolicy  that this
   *  replace operation is to be performed on. If, at the time of replace, the
   *  etag for the Access Policy stored in Access Context Manager is different
   *  from the specified etag, then the replace operation will not be performed
   *  and the call will fail. This field is not required. If etag is not
   *  provided, the operation will be performed as if a valid etag is provided.
   */
  // const etag = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callReplaceAccessLevels();

replaceAccessLevels(request, options, callback)

replaceAccessLevels(request: protos.google.identity.accesscontextmanager.v1.IReplaceAccessLevelsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IReplaceAccessLevelsResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IReplaceAccessLevelsRequest
options CallOptions
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IReplaceAccessLevelsResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

replaceAccessLevels(request, callback)

replaceAccessLevels(request: protos.google.identity.accesscontextmanager.v1.IReplaceAccessLevelsRequest, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IReplaceAccessLevelsResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IReplaceAccessLevelsRequest
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IReplaceAccessLevelsResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

replaceServicePerimeters(request, options)

replaceServicePerimeters(request?: protos.google.identity.accesscontextmanager.v1.IReplaceServicePerimetersRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.identity.accesscontextmanager.v1.IReplaceServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Replace all existing [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [Access Policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This is done atomically. The longrunning operation from this RPC will have a successful status once all replacements have propagated to long-lasting storage. Replacements containing errors will result in an error response for the first error encountered. Replacement will be cancelled on error, existing [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] will not be affected. Operation.response field will contain ReplaceServicePerimetersResponse.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IReplaceServicePerimetersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.identity.accesscontextmanager.v1.IReplaceServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name for the access policy which owns these
   *  Service Perimeters 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter.
   *  Format: `accessPolicies/{policy_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The desired Service Perimeters 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  that should
   *  replace all existing Service Perimeters 
   *  google.identity.accesscontextmanager.v1.ServicePerimeter  in the
   *  Access Policy 
   *  google.identity.accesscontextmanager.v1.AccessPolicy.
   */
  // const servicePerimeters = 1234
  /**
   *  Optional. The etag for the version of the Access Policy 
   *  google.identity.accesscontextmanager.v1.AccessPolicy  that this
   *  replace operation is to be performed on. If, at the time of replace, the
   *  etag for the Access Policy stored in Access Context Manager is different
   *  from the specified etag, then the replace operation will not be performed
   *  and the call will fail. This field is not required. If etag is not
   *  provided, the operation will be performed as if a valid etag is provided.
   */
  // const etag = 'abc123'

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

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

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

  callReplaceServicePerimeters();

replaceServicePerimeters(request, options, callback)

replaceServicePerimeters(request: protos.google.identity.accesscontextmanager.v1.IReplaceServicePerimetersRequest, options: CallOptions, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IReplaceServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IReplaceServicePerimetersRequest
options CallOptions
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IReplaceServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

replaceServicePerimeters(request, callback)

replaceServicePerimeters(request: protos.google.identity.accesscontextmanager.v1.IReplaceServicePerimetersRequest, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IReplaceServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IReplaceServicePerimetersRequest
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IReplaceServicePerimetersResponse, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

servicePerimeterPath(accessPolicy, servicePerimeter)

servicePerimeterPath(accessPolicy: string, servicePerimeter: string): string;

Return a fully-qualified servicePerimeter resource name string.

Parameters
NameDescription
accessPolicy string
servicePerimeter string
Returns
TypeDescription
string

{string} Resource name string.

updateAccessLevel(request, options)

updateAccessLevel(request?: protos.google.identity.accesscontextmanager.v1.IUpdateAccessLevelRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update an [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel]. The longrunning operation from this RPC will have a successful status once the changes to the [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] have propagated to long-lasting storage. [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] containing errors will result in an error response for the first error encountered.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IUpdateAccessLevelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The updated Access Level 
   *  google.identity.accesscontextmanager.v1.AccessLevel. Syntactic
   *  correctness of the Access Level 
   *  google.identity.accesscontextmanager.v1.AccessLevel  is a
   *  precondition for creation.
   */
  // const accessLevel = {}
  /**
   *  Required. Mask to control which fields get updated. Must be non-empty.
   */
  // const updateMask = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

  async function callUpdateAccessLevel() {
    // Construct request
    const request = {
      accessLevel,
      updateMask,
    };

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

  callUpdateAccessLevel();

updateAccessLevel(request, options, callback)

updateAccessLevel(request: protos.google.identity.accesscontextmanager.v1.IUpdateAccessLevelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IUpdateAccessLevelRequest
options CallOptions
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateAccessLevel(request, callback)

updateAccessLevel(request: protos.google.identity.accesscontextmanager.v1.IUpdateAccessLevelRequest, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IUpdateAccessLevelRequest
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessLevel, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateAccessPolicy(request, options)

updateAccessPolicy(request?: protos.google.identity.accesscontextmanager.v1.IUpdateAccessPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update an [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy]. The longrunning Operation from this RPC will have a successful status once the changes to the [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] have propagated to long-lasting storage. Syntactic and basic semantic errors will be returned in metadata as a BadRequest proto.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IUpdateAccessPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The updated AccessPolicy.
   */
  // const policy = {}
  /**
   *  Required. Mask to control which fields get updated. Must be non-empty.
   */
  // const updateMask = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

  async function callUpdateAccessPolicy() {
    // Construct request
    const request = {
      policy,
      updateMask,
    };

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

  callUpdateAccessPolicy();

updateAccessPolicy(request, options, callback)

updateAccessPolicy(request: protos.google.identity.accesscontextmanager.v1.IUpdateAccessPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IUpdateAccessPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateAccessPolicy(request, callback)

updateAccessPolicy(request: protos.google.identity.accesscontextmanager.v1.IUpdateAccessPolicyRequest, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IUpdateAccessPolicyRequest
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IAccessPolicy, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateGcpUserAccessBinding(request, options)

updateGcpUserAccessBinding(request?: protos.google.identity.accesscontextmanager.v1.IUpdateGcpUserAccessBindingRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates a [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. Completion of this long-running operation does not necessarily signify that the changed binding is deployed onto all affected users, which may take more time.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IUpdateGcpUserAccessBindingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. GcpUserAccessBinding 
   *  google.identity.accesscontextmanager.v1.GcpUserAccessBinding 
   */
  // const gcpUserAccessBinding = {}
  /**
   *  Required. Only the fields specified in this mask are updated. Because name and
   *  group_key cannot be changed, update_mask is required and must always be:
   *  update_mask {
   *  paths: "access_levels"
   *  }
   */
  // const updateMask = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

  async function callUpdateGcpUserAccessBinding() {
    // Construct request
    const request = {
      gcpUserAccessBinding,
      updateMask,
    };

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

  callUpdateGcpUserAccessBinding();

updateGcpUserAccessBinding(request, options, callback)

updateGcpUserAccessBinding(request: protos.google.identity.accesscontextmanager.v1.IUpdateGcpUserAccessBindingRequest, options: CallOptions, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IUpdateGcpUserAccessBindingRequest
options CallOptions
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateGcpUserAccessBinding(request, callback)

updateGcpUserAccessBinding(request: protos.google.identity.accesscontextmanager.v1.IUpdateGcpUserAccessBindingRequest, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IUpdateGcpUserAccessBindingRequest
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBinding, protos.google.identity.accesscontextmanager.v1.IGcpUserAccessBindingOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateServicePerimeter(request, options)

updateServicePerimeter(request?: protos.google.identity.accesscontextmanager.v1.IUpdateServicePerimeterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update a [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. The longrunning operation from this RPC will have a successful status once the changes to the [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] have propagated to long-lasting storage. [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] containing errors will result in an error response for the first error encountered.

Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IUpdateServicePerimeterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The updated `ServicePerimeter`. Syntactic correctness of the
   *  `ServicePerimeter` is a precondition for creation.
   */
  // const servicePerimeter = {}
  /**
   *  Required. Mask to control which fields get updated. Must be non-empty.
   */
  // const updateMask = {}

  // Imports the Accesscontextmanager library
  const {AccessContextManagerClient} = require('@google-cloud/access-context-manager').v1;

  // Instantiates a client
  const accesscontextmanagerClient = new AccessContextManagerClient();

  async function callUpdateServicePerimeter() {
    // Construct request
    const request = {
      servicePerimeter,
      updateMask,
    };

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

  callUpdateServicePerimeter();

updateServicePerimeter(request, options, callback)

updateServicePerimeter(request: protos.google.identity.accesscontextmanager.v1.IUpdateServicePerimeterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IUpdateServicePerimeterRequest
options CallOptions
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateServicePerimeter(request, callback)

updateServicePerimeter(request: protos.google.identity.accesscontextmanager.v1.IUpdateServicePerimeterRequest, callback: Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.identity.accesscontextmanager.v1.IUpdateServicePerimeterRequest
callback Callback<LROperation<protos.google.identity.accesscontextmanager.v1.IServicePerimeter, protos.google.identity.accesscontextmanager.v1.IAccessContextManagerOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void