diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 98f19efe2..3f7432a5f 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-java:latest - digest: sha256:b3f8a219abf58ed4a775da5b90934b34f477b74f6f4e5d15781694dcc67b6f41 + digest: sha256:12cbdc4f137152a1a8b83f50ebc1a4098be0d3baff78b46efaec306f7cfafd13 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0195b32f0..65ae6ecdd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [7, 8, 11] + java: [8, 11] steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 diff --git a/README.md b/README.md index a5dee9c01..88ba69a6c 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,11 @@ Java idiomatic client for [Cloud Asset Inventory][product-docs]. - [Product Documentation][product-docs] - [Client Library Documentation][javadocs] + ## Quickstart If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file + ```xml @@ -35,6 +37,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file If you are using Maven without BOM, add this to your dependencies: + ```xml com.google.cloud @@ -45,17 +48,20 @@ If you are using Maven without BOM, add this to your dependencies: ``` If you are using Gradle 5.x or later, add this to your dependencies + ```Groovy implementation platform('com.google.cloud:libraries-bom:20.9.0') compile 'com.google.cloud:google-cloud-asset' ``` If you are using Gradle without BOM, add this to your dependencies + ```Groovy compile 'com.google.cloud:google-cloud-asset:2.6.0' ``` If you are using SBT, add this to your dependencies + ```Scala libraryDependencies += "com.google.cloud" % "google-cloud-asset" % "2.6.0" ``` @@ -64,6 +70,10 @@ libraryDependencies += "com.google.cloud" % "google-cloud-asset" % "2.6.0" See the [Authentication][authentication] section in the base directory's README. +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Cloud Asset Inventory APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Cloud Asset Inventory API calls. + ## Getting Started ### Prerequisites @@ -93,8 +103,7 @@ use this Cloud Asset Inventory Client Library. ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/java-asset/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/java-asset/tree/master/samples) directory. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | @@ -173,6 +182,7 @@ and on [google-cloud-java][g-c-j]. This library follows [Semantic Versioning](http://semver.org/). + ## Contributing @@ -184,6 +194,7 @@ Please note that this project is released with a Contributor Code of Conduct. By this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information. + ## License Apache 2.0 - See [LICENSE][license] for more information. @@ -216,6 +227,9 @@ Java is a registered trademark of Oracle and/or its affiliates. [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-asset.svg [maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-asset&core=gav [authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy [developer-console]: https://console.developers.google.com/ [create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects [cloud-sdk]: https://cloud.google.com/sdk/