GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java-docs-samples/iam/api-client at main · easycheese/java-docs-samples

Expand file tree

/

api-client

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

api-client

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

README.md

Outline

Cloud Identity & Access Management Samples

Open in Cloud Shell

Google Cloud Identity & Access Management (IAM) lets administrators authorize who can take action on specific resources. These sample applications demonstrate how to interact with Cloud IAM using the Google API Client Library for Java.

Quickstart

The Quickstart does the following:

  • Initializes the Resource Manager service, which manages GCP projects.
  • Reads the IAM policy for your project.
  • Modifies the IAM policy by granting the Log Writer role (roles/logging.logWriter) to your Google Account.
  • Writes the updated IAM policy.
  • Prints all the members in your project that have the Log Writer role (roles/logging.logWriter).
  • Revokes the Log Writer role.

To build and run the Quickstart, install Maven.

To build the project, run the following command:

mvn clean package

To run the Quickstart, ensure that the Resource Manager API is enabled for your project and that you have set up authentication. For details, see the Before you begin section of the IAM client library Quickstart documentation.

Then, replace the projectId and member fields with your project ID and member ID, and run the following command:

mvn exec:java

For more information, see the IAM client library Quickstart documentation.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.