- 1.54.0 (latest)
- 1.53.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.36.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.6
- 1.4.0
- 1.3.2
- 1.2.12
A client for Cloud Resource Manager - Centrally manage all your projects, IAM, and resource containers.
Here's a simple usage example for using google-cloud from App/Compute Engine. This example creates a project if it does not exist. For the complete source code see GetOrCreateProject.java.
ResourceManager resourceManager = ResourceManagerOptions.getDefaultInstance().getService();
String projectId = "my-globally-unique-project-id"; // Change to a unique project ID.
Project project = resourceManager.get(projectId);
if (project == null) {
project = resourceManager.create(ProjectInfo.builder(projectId).build());
}
System.out.println("Got project " + project.getProjectId() + " from the server.");
This second example shows how to update a project if it exists and list all projects the user has permission to view. For the complete source code see UpdateAndListProjects.java.
ResourceManager resourceManager = ResourceManagerOptions.getDefaultInstance().getService();
Project project = resourceManager.get("some-project-id"); // Use an existing project's ID
if (project != null) {
Project newProject = project.toBuilder()
.addLabel("launch-status", "in-development")
.build()
.replace();
System.out.println("Updated the labels of project " + newProject.getProjectId()
+ " to be " + newProject.getLabels());
}
Iterator<Project> projectIterator = resourceManager.list().iterateAll();
System.out.println("Projects I can view:");
while (projectIterator.hasNext()) {
System.out.println(projectIterator.next().getProjectId());
}
Remember that you must authenticate using the Google Cloud SDK. See more about providing credentials here. See Also: Google Cloud Resource Manager
Classes
ConstraintInfo (deprecated)
Deprecated. v3 GAPIC client of ResourceManager is now available
A Google Cloud Resource Manager constraint metadata object. See Also: Constraint
OrgPolicyInfo (deprecated)
Deprecated. v3 GAPIC client of ResourceManager is now available
A Google Cloud Resource Manager organization policy metadata object.
Defines a Cloud Organization Policy which specifies constraints for configurations of Cloud Platform resources.
Project (deprecated)
Deprecated. v3 GAPIC client of ResourceManager is now available
A Google Cloud Resource Manager project object.
A Project is a high-level Google Cloud Platform entity. It is a container for ACLs, APIs,
AppEngine Apps, VMs, and other Google Cloud Platform resources. This class' member variables are
immutable. Methods that change or update the underlying Project information return a new Project
instance. Project
adds a layer of service-related functionality over ProjectInfo.
Project.Builder
Builder for Project
.
ProjectInfo (deprecated)
Deprecated. v3 GAPIC client of ResourceManager is now available
A Google Cloud Resource Manager project metadata object. A Project is a high-level Google Cloud Platform entity. It is a container for ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud Platform resources.
ProjectInfo.Builder
Builder for ProjectInfo
.
ProjectInfo.ResourceId
ProjectInfo.State
The project lifecycle states.
ResourceManager.ListOption
Class for specifying project list options.
ResourceManager.ProjectGetOption
Class for specifying project get options.
ResourceManager.ProjectListOption
Class for specifying project list options.
ResourceManagerOptions (deprecated)
Deprecated. v3 GAPIC client of ResourceManager is now available
ResourceManagerOptions.Builder
ResourceManagerOptions.DefaultResourceManagerFactory
ResourceManagerOptions.DefaultResourceManagerRpcFactory
Interfaces
ResourceManager (deprecated)
Deprecated. v3 GAPIC client of ResourceManager is now available
An interface for Google Cloud Resource Manager. See Also: Google Cloud Resource Manager
ResourceManagerFactory (deprecated)
Deprecated. v3 GAPIC client of ResourceManager is now available
An interface for ResourceManager factories.
Enums
ResourceManager.ProjectField
The fields of a project.
These values can be used to specify the fields to include in a partial response when calling ResourceManager#get or ResourceManager#list. Project ID is always returned, even if not specified.
Exceptions
ResourceManagerException (deprecated)
Deprecated. v3 GAPIC client of ResourceManager is now available
Resource Manager service exception. See Also: Google Cloud Resource Manager error codes