This page shows you how to create an access level for Access Context Manager using the 'gcloud' command line tool.
Before you begin
- Install and initialize the Cloud SDK.
Update and install
gcloud components update &&
gcloud components install alpha
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.
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]
You should see:
Create request issued Waiting for operation [accessPolicies/[POLICY_ID]/create/1521580097614100] to complete...done. Created.
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.
- Read Access Context Manager Overview to learn the basics concepts of Access Context Manager.