This page shows you how to create an access level for Access Context Manager using the 'gcloud' command line tool.

Before you begin

  1. Install and initialize the Cloud SDK.
  2. Update and install gcloud components:
    gcloud components update &&
    gcloud components install beta

Create a default project

Access Context Manager is an organization-wide feature, which means that it only uses a Google Cloud Platform Project for quota purposes. You need to set a default project, but that project need not be the project that you want to use the access level with. Instead, it should be a container project used for org wide features like Access Context Manager.

  1. In order to start using Access Context Manager, you must create an access policy for your organization. The syntax to create a new access policy is as follows:

    gcloud alpha access-context-manager policies create \
        --organization [ORGANIZATION_ID] --title [POLICY_NAME]

  2. You should see:

    Create request issued
    Waiting for operation [accessPolicies/[POLICY_ID]/create/1521580097614100] to complete...done.

  3. Once this is done, it helps to set the access policy as the default policy that subsequent commands will use:

    gcloud config set access_context_manager/policy [POLICY_ID]

You've just created an access policy and set the policy as the default.

What's next

Was this page helpful? Let us know how we did:

Send feedback about...

Access Context Manager