@Generated(value="by gapic-generator-java")
See: Description
The interfaces provided are listed below, along with usage samples.
======================= FoldersClient =======================
Service Description: Manages Cloud Platform folder resources. Folders can be used to organize the resources under an organization and to control the policies applied to groups of resources.
Sample for FoldersClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FoldersClient foldersClient = FoldersClient.create()) {
FolderName name = FolderName.of("[FOLDER]");
Folder response = foldersClient.getFolder(name);
}
======================= OrganizationsClient =======================
Service Description: Allows users to manage their organization resources.
Sample for OrganizationsClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
OrganizationName name = OrganizationName.of("[ORGANIZATION]");
Organization response = organizationsClient.getOrganization(name);
}
======================= ProjectsClient =======================
Service Description: Manages Google Cloud Projects.
Sample for ProjectsClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ProjectsClient projectsClient = ProjectsClient.create()) {
ProjectName name = ProjectName.of("[PROJECT]");
Project response = projectsClient.getProject(name);
}
======================= TagBindingsClient =======================
Service Description: Allow users to create and manage TagBindings between TagValues and different Google Cloud resources throughout the GCP resource hierarchy.
Sample for TagBindingsClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
ResourceName parent = FolderName.of("[FOLDER]");
for (TagBinding element : tagBindingsClient.listTagBindings(parent).iterateAll()) {
// doThingsWith(element);
}
}
======================= TagHoldsClient =======================
Service Description: Allow users to create and manage TagHolds for TagValues. TagHolds represent the use of a Tag Value that is not captured by TagBindings but should still block TagValue deletion (such as a reference in a policy condition). This service provides isolated failure domains by cloud location so that TagHolds can be managed in the same location as their usage.
Sample for TagHoldsClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
TagValueName parent = TagValueName.of("[TAG_VALUE]");
TagHold tagHold = TagHold.newBuilder().build();
TagHold response = tagHoldsClient.createTagHoldAsync(parent, tagHold).get();
}
======================= TagKeysClient =======================
Service Description: Allow users to create and manage tag keys.
Sample for TagKeysClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TagKeysClient tagKeysClient = TagKeysClient.create()) {
TagKeyName name = TagKeyName.of("[TAG_KEY]");
TagKey response = tagKeysClient.getTagKey(name);
}
======================= TagValuesClient =======================
Service Description: Allow users to create and manage tag values.
Sample for TagValuesClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TagValuesClient tagValuesClient = TagValuesClient.create()) {
TagValueName name = TagValueName.of("[TAG_VALUE]");
TagValue response = tagValuesClient.getTagValue(name);
}
Copyright © 2024 Google LLC. All rights reserved.