Security Posture API Description:Security Posture is a comprehensive framework of policy sets that empowers organizations to define, assess early, deploy, and monitor their security measures in a unified way and helps simplify governance and reduces administrative toil.
To ensure that your project uses compatible versions of the libraries
and their component artifacts, importcom.google.cloud:libraries-bomand use
the BOM to specify dependency versions. Be sure to remove any versions that you
set previously. For more information about
BOMs, seeGoogle Cloud Platform Libraries BOM.
Maven
Import the BOM in thedependencyManagementsection of yourpom.xmlfile.
Include specific artifacts you depend on in thedependenciessection, but don't
specify the artifacts' versions in thedependenciessection.
The example below demonstrates how you would import the BOM and include thegoogle-cloud-securitypostureartifact.
BOMs are supported by default in Gradle 5.x or later. Add aplatformdependency oncom.google.cloud:libraries-bomand remove the version from the
dependency declarations in the artifact'sbuild.gradlefile.
The example below demonstrates how you would import the BOM and include thegoogle-cloud-securitypostureartifact.
TheplatformandenforcedPlatformkeywords supply dependency versions
declared in a BOM. TheenforcedPlatformkeyword enforces the dependency
versions declared in the BOM and thus overrides what you specified.
For more details of theplatformandenforcedPlatformkeywords Gradle 5.x or higher, seeGradle: Importing Maven BOMs.
If you're using Gradle 4.6 or later, addenableFeaturePreview('IMPROVED_POM_SUPPORT')to yoursettings.gradlefile. For details, seeGradle 4.6 Release Notes: BOM import.
Versions of Gradle earlier than 4.6 don't support BOMs.
SBT
SBTdoesn't support BOMs. You can find
recommended versions of libraries from a particular BOM version on thedashboardand set the versions manually.
To use the latest version of this library, add this to your dependencies:
For this library, we recommend using API version v1 for new applications.
Each Cloud Java client library may contain multiple packages. Each package containing a version number in its name corresponds to a published version of the service.
We recommend using the latest stable version for new production applications, which can be identified by the largest numeric version that does not contain a suffix.
For example, if a client library has two packages:v1andv2alpha, then the latest stable version isv1.
If you use an unstable release, breaking changes may be introduced when upgrading.
You can read more aboutCloud API versioning strategy here.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["Version 0.1.0keyboard_arrow_down\n\n- [0.38.0 (latest)](/java/docs/reference/google-cloud-securityposture/latest/overview)\n- [0.37.0](/java/docs/reference/google-cloud-securityposture/0.37.0/overview)\n- [0.35.0](/java/docs/reference/google-cloud-securityposture/0.35.0/overview)\n- [0.33.0](/java/docs/reference/google-cloud-securityposture/0.33.0/overview)\n- [0.32.0](/java/docs/reference/google-cloud-securityposture/0.32.0/overview)\n- [0.29.0](/java/docs/reference/google-cloud-securityposture/0.29.0/overview)\n- [0.28.0](/java/docs/reference/google-cloud-securityposture/0.28.0/overview)\n- [0.27.0](/java/docs/reference/google-cloud-securityposture/0.27.0/overview)\n- [0.25.0](/java/docs/reference/google-cloud-securityposture/0.25.0/overview)\n- [0.24.0](/java/docs/reference/google-cloud-securityposture/0.24.0/overview)\n- [0.23.0](/java/docs/reference/google-cloud-securityposture/0.23.0/overview)\n- [0.22.0](/java/docs/reference/google-cloud-securityposture/0.22.0/overview)\n- [0.21.0](/java/docs/reference/google-cloud-securityposture/0.21.0/overview)\n- [0.20.0](/java/docs/reference/google-cloud-securityposture/0.20.0/overview)\n- [0.19.0](/java/docs/reference/google-cloud-securityposture/0.19.0/overview)\n- [0.18.0](/java/docs/reference/google-cloud-securityposture/0.18.0/overview)\n- [0.17.0](/java/docs/reference/google-cloud-securityposture/0.17.0/overview)\n- [0.16.0](/java/docs/reference/google-cloud-securityposture/0.16.0/overview)\n- [0.14.0](/java/docs/reference/google-cloud-securityposture/0.14.0/overview)\n- [0.13.0](/java/docs/reference/google-cloud-securityposture/0.13.0/overview)\n- [0.12.0](/java/docs/reference/google-cloud-securityposture/0.12.0/overview)\n- [0.11.0](/java/docs/reference/google-cloud-securityposture/0.11.0/overview)\n- [0.10.0](/java/docs/reference/google-cloud-securityposture/0.10.0/overview)\n- [0.9.0](/java/docs/reference/google-cloud-securityposture/0.9.0/overview)\n- [0.8.0](/java/docs/reference/google-cloud-securityposture/0.8.0/overview)\n- [0.7.0](/java/docs/reference/google-cloud-securityposture/0.7.0/overview)\n- [0.6.0](/java/docs/reference/google-cloud-securityposture/0.6.0/overview)\n- [0.5.0](/java/docs/reference/google-cloud-securityposture/0.5.0/overview)\n- [0.4.0](/java/docs/reference/google-cloud-securityposture/0.4.0/overview)\n- [0.2.0](/java/docs/reference/google-cloud-securityposture/0.2.0/overview)\n- [0.1.0](/java/docs/reference/google-cloud-securityposture/0.1.0/overview) \n\ngoogle-cloud-securityposture overview (0.1.0)\n\nKey Reference Links\n\n**Security Posture API Description:** Security Posture is a comprehensive framework of policy sets that empowers organizations to define, assess early, deploy, and monitor their security measures in a unified way and helps simplify governance and reduces administrative toil.\n\n|---------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|\n| [Security Posture API Product Reference](https://cloud.google.com/security-command-center/docs/security-posture-overview) | [GitHub Repository (includes samples)](https://github.com/googleapis/java-securityposture) | [Maven artifact](https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securityposture) |\n\nGetting Started\n\nIn order to use this library, you first need to go through the following steps:\n\n- [Install a JDK (Java Development Kit)](https://cloud.google.com/java/docs/setup#install_a_jdk_java_development_kit)\n- [Select or create a Cloud Platform project](https://console.cloud.google.com/project)\n- [Enable billing for your project](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)\n- [Enable the API](https://console.cloud.google.com/apis/library/securityposture.googleapis.com)\n- [Set up authentication](https://cloud.google.com/docs/authentication/client-libraries)\n\nUse the Security Posture API for Java\n\nTo ensure that your project uses compatible versions of the libraries\nand their component artifacts, import `com.google.cloud:libraries-bom` and use\nthe BOM to specify dependency versions. Be sure to remove any versions that you\nset previously. For more information about\nBOMs, see [Google Cloud Platform Libraries BOM](https://cloud.google.com/java/docs/bom).\n\nMaven\n\nImport the BOM in the `dependencyManagement` section of your `pom.xml` file.\nInclude specific artifacts you depend on in the `dependencies` section, but don't\nspecify the artifacts' versions in the `dependencies` section.\n\nThe example below demonstrates how you would import the BOM and include the `google-cloud-securityposture` artifact. \n\n```xml\n\u003cdependencyManagement\u003e\n \u003cdependencies\u003e\n \u003cdependency\u003e\n \u003cgroupId\u003ecom.google.cloud\u003c/groupId\u003e\n \u003cartifactId\u003elibraries-bom\u003c/artifactId\u003e\n \u003cversion\u003e 26.33.0\u003c/version\u003e\n \u003ctype\u003epom\u003c/type\u003e\n \u003cscope\u003eimport\u003c/scope\u003e\n \u003c/dependency\u003e\n \u003c/dependencies\u003e\n\u003c/dependencyManagement\u003e\n\n\u003cdependencies\u003e\n \u003cdependency\u003e\n \u003cgroupId\u003ecom.google.cloud\u003c/groupId\u003e\n \u003cartifactId\u003egoogle-cloud-securityposture\u003c/artifactId\u003e\n \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\nGradle\n\nBOMs are supported by default in Gradle 5.x or later. Add a `platform`\ndependency on `com.google.cloud:libraries-bom` and remove the version from the\ndependency declarations in the artifact's `build.gradle` file.\n\nThe example below demonstrates how you would import the BOM and include the `google-cloud-securityposture` artifact. \n\n```groovy\nimplementation platform('com.google.cloud:libraries-bom: 26.33.0')\nimplementation 'com.google.cloud:google-cloud-securityposture'\n```\n\nThe `platform` and `enforcedPlatform` keywords supply dependency versions\ndeclared in a BOM. The `enforcedPlatform` keyword enforces the dependency\nversions declared in the BOM and thus overrides what you specified.\n\nFor more details of the `platform` and `enforcedPlatform` keywords Gradle 5.x or higher, see\n[Gradle: Importing Maven BOMs](https://docs.gradle.org/current/userguide/platforms.html#sub:bom_import).\n\nIf you're using Gradle 4.6 or later, add\n`enableFeaturePreview('IMPROVED_POM_SUPPORT')` to your `settings.gradle` file. For details, see\n[Gradle 4.6 Release Notes: BOM import](https://docs.gradle.org/4.6/release-notes.html#bom-import).\nVersions of Gradle earlier than 4.6 don't support BOMs.\n\n\nSBT\n\nSBT [doesn't support BOMs](https://github.com/sbt/sbt/issues/4531). You can find\nrecommended versions of libraries from a particular BOM version on the\n[dashboard](https://storage.googleapis.com/cloud-opensource-java-dashboard/com.google.cloud/libraries-bom/index.html)\nand set the versions manually.\nTo use the latest version of this library, add this to your dependencies: \n\n```scala\nlibraryDependencies += \"com.google.cloud\" % \"google-cloud-securityposture\" % \"0.1.0\"\n```\n\nWhich version should I use?\n\nFor this library, we recommend using API version v1 for new applications.\n\nEach Cloud Java client library may contain multiple packages. Each package containing a version number in its name corresponds to a published version of the service.\nWe recommend using the latest stable version for new production applications, which can be identified by the largest numeric version that does not contain a suffix.\nFor example, if a client library has two packages: `v1` and `v2alpha`, then the latest stable version is `v1`.\nIf you use an unstable release, breaking changes may be introduced when upgrading.\nYou can read more about [Cloud API versioning strategy here](https://cloud.google.com/apis/design/versioning)."]]