You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Note: This client is a work-in-progress, and may occasionally
19
20
> make backwards-incompatible changes.
@@ -190,7 +191,7 @@ Google Cloud Resource Manager
190
191
191
192
#### Preview
192
193
193
-
Here is a code snippet showing a simple usage example from within Compute/App Engine. Note that you must [supply credentials](#authentication) if running this snippet elsewhere.
194
+
Here is a code snippet showing a simple usage example. Note that you must supply Google SDK credentialsforthis service, not other forms of authentication listedin the [Authentication section](#authentication).
Copy file name to clipboardExpand all lines: gcloud-java-resourcemanager/README.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Example Application
27
27
Authentication
28
28
--------------
29
29
30
-
See the [Authentication](https://github.com/GoogleCloudPlatform/gcloud-java#authentication) section in the base directory's README.
30
+
Unlike other `gcloud-java` service libraries, `gcloud-java-resourcemanager` only accepts Google Cloud SDK credentials at this time. If you are having trouble authenticating, it may be that you have other types of credentials that override your Google Cloud SDK credentials. See more about Google Cloud SDK credentials and credential precedence in the global README's [Authentication section](https://github.com/GoogleCloudPlatform/gcloud-java#authentication).
> Note: Other `gcloud-java` service libraries allow you to authenticate using alternative methods. However, `gcloud-java-resourcemanager` only accepts Google Cloud SDK credentials at this time. If you are having trouble authenticating, it may be that you have other types of credentials that override your Google Cloud SDK credentials. See more about credential precedence in the [Authentication section](https://github.com/GoogleCloudPlatform/gcloud-java#authentication).
71
-
72
70
#### Creating a project
73
71
All you need to create a project is a globally unique project ID. You can also optionally attach a non-unique name and labels to your project. Read more about naming guidelines for project IDs, names, and labels [here](https://cloud.google.com/resource-manager/reference/rest/v1beta1/projects). To create a project, add the following imports at the top of your file:
Note that the values of the project you pass in to `replace` overwrite the server's values for non-read-only fields (`projectName` and `labels`). For example, if you create a project with `projectName` "some-project-name", and then call replace using a `ProjectInfo` object that didn't set the `projectName`, then the server unsets the project's name. The server ignores any changes to the read-only fields `projectNumber`, `lifecycleState`, and `createTime`. The `projectId` cannot change.
109
+
Note that the values of the project you pass in to `replace` overwrite the server's values for non-read-only fields, namely `projectName` and `labels`. For example, if you create a project with `projectName` "some-project-name" and subsequently call replace using a `ProjectInfo` object that didn't set the `projectName`, then the server will unset the project's name. The server ignores any attempted changes to the read-only fields `projectNumber`, `lifecycleState`, and `createTime`. The `projectId` cannot change.
112
110
113
111
#### Listing all projects
114
112
Suppose that we want list of all projects for which we have read permissions. Add the following import:
Copy file name to clipboardExpand all lines: gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/testing/LocalResourceManagerHelper.java
Copy file name to clipboardExpand all lines: gcloud-java-resourcemanager/src/test/java/com/google/gcloud/resourcemanager/LocalResourceManagerHelperTest.java
0 commit comments