Package com.google.cloud.resourcesettings.v1 (1.12.0)

The interfaces provided are listed below, along with usage samples.

ResourceSettingsServiceClient

Service Description: An interface to interact with resource settings and setting values throughout the resource hierarchy.

Services may surface a number of settings for users to control how their resources behave. Values of settings applied on a given Cloud resource are evaluated hierarchically and inherited by all descendants of that resource.

For all requests, returns a google.rpc.Status with google.rpc.Code.PERMISSION_DENIED if the IAM check fails or the parent resource is not in a Cloud Organization. For all requests, returns a google.rpc.Status with google.rpc.Code.INVALID_ARGUMENT if the request is malformed.

Sample for ResourceSettingsServiceClient:


 // 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 (ResourceSettingsServiceClient resourceSettingsServiceClient =
     ResourceSettingsServiceClient.create()) {
   SettingName name =
       SettingName.ofOrganizationSettingNameName("[ORGANIZATION]", "[SETTING_NAME]");
   Setting response = resourceSettingsServiceClient.getSetting(name);
 }
 

Classes

GetSettingRequest

The request for GetSetting.

Protobuf type google.cloud.resourcesettings.v1.GetSettingRequest

GetSettingRequest.Builder

The request for GetSetting.

Protobuf type google.cloud.resourcesettings.v1.GetSettingRequest

ListSettingsRequest

The request for ListSettings.

Protobuf type google.cloud.resourcesettings.v1.ListSettingsRequest

ListSettingsRequest.Builder

The request for ListSettings.

Protobuf type google.cloud.resourcesettings.v1.ListSettingsRequest

ListSettingsResponse

The response from ListSettings.

Protobuf type google.cloud.resourcesettings.v1.ListSettingsResponse

ListSettingsResponse.Builder

The response from ListSettings.

Protobuf type google.cloud.resourcesettings.v1.ListSettingsResponse

ResourceSettingsProto

ResourceSettingsServiceClient

Service Description: An interface to interact with resource settings and setting values throughout the resource hierarchy.

Services may surface a number of settings for users to control how their resources behave. Values of settings applied on a given Cloud resource are evaluated hierarchically and inherited by all descendants of that resource.

For all requests, returns a google.rpc.Status with google.rpc.Code.PERMISSION_DENIED if the IAM check fails or the parent resource is not in a Cloud Organization. For all requests, returns a google.rpc.Status with google.rpc.Code.INVALID_ARGUMENT if the request is malformed.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // 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 (ResourceSettingsServiceClient resourceSettingsServiceClient =
     ResourceSettingsServiceClient.create()) {
   SettingName name =
       SettingName.ofOrganizationSettingNameName("[ORGANIZATION]", "[SETTING_NAME]");
   Setting response = resourceSettingsServiceClient.getSetting(name);
 }
 

Note: close() needs to be called on the ResourceSettingsServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of ResourceSettingsServiceSettings to create(). For example:

To customize credentials:


 // 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
 ResourceSettingsServiceSettings resourceSettingsServiceSettings =
     ResourceSettingsServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 ResourceSettingsServiceClient resourceSettingsServiceClient =
     ResourceSettingsServiceClient.create(resourceSettingsServiceSettings);
 

To customize the endpoint:


 // 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
 ResourceSettingsServiceSettings resourceSettingsServiceSettings =
     ResourceSettingsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 ResourceSettingsServiceClient resourceSettingsServiceClient =
     ResourceSettingsServiceClient.create(resourceSettingsServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // 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
 ResourceSettingsServiceSettings resourceSettingsServiceSettings =
     ResourceSettingsServiceSettings.newHttpJsonBuilder().build();
 ResourceSettingsServiceClient resourceSettingsServiceClient =
     ResourceSettingsServiceClient.create(resourceSettingsServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

ResourceSettingsServiceClient.ListSettingsFixedSizeCollection

ResourceSettingsServiceClient.ListSettingsPage

ResourceSettingsServiceClient.ListSettingsPagedResponse

ResourceSettingsServiceGrpc

An interface to interact with resource settings and setting values throughout the resource hierarchy. Services may surface a number of settings for users to control how their resources behave. Values of settings applied on a given Cloud resource are evaluated hierarchically and inherited by all descendants of that resource. For all requests, returns a google.rpc.Status with google.rpc.Code.PERMISSION_DENIED if the IAM check fails or the parent resource is not in a Cloud Organization. For all requests, returns a google.rpc.Status with google.rpc.Code.INVALID_ARGUMENT if the request is malformed.

ResourceSettingsServiceGrpc.ResourceSettingsServiceBlockingStub

An interface to interact with resource settings and setting values throughout the resource hierarchy. Services may surface a number of settings for users to control how their resources behave. Values of settings applied on a given Cloud resource are evaluated hierarchically and inherited by all descendants of that resource. For all requests, returns a google.rpc.Status with google.rpc.Code.PERMISSION_DENIED if the IAM check fails or the parent resource is not in a Cloud Organization. For all requests, returns a google.rpc.Status with google.rpc.Code.INVALID_ARGUMENT if the request is malformed.

ResourceSettingsServiceGrpc.ResourceSettingsServiceFutureStub

An interface to interact with resource settings and setting values throughout the resource hierarchy. Services may surface a number of settings for users to control how their resources behave. Values of settings applied on a given Cloud resource are evaluated hierarchically and inherited by all descendants of that resource. For all requests, returns a google.rpc.Status with google.rpc.Code.PERMISSION_DENIED if the IAM check fails or the parent resource is not in a Cloud Organization. For all requests, returns a google.rpc.Status with google.rpc.Code.INVALID_ARGUMENT if the request is malformed.

ResourceSettingsServiceGrpc.ResourceSettingsServiceImplBase

An interface to interact with resource settings and setting values throughout the resource hierarchy. Services may surface a number of settings for users to control how their resources behave. Values of settings applied on a given Cloud resource are evaluated hierarchically and inherited by all descendants of that resource. For all requests, returns a google.rpc.Status with google.rpc.Code.PERMISSION_DENIED if the IAM check fails or the parent resource is not in a Cloud Organization. For all requests, returns a google.rpc.Status with google.rpc.Code.INVALID_ARGUMENT if the request is malformed.

ResourceSettingsServiceGrpc.ResourceSettingsServiceStub

An interface to interact with resource settings and setting values throughout the resource hierarchy. Services may surface a number of settings for users to control how their resources behave. Values of settings applied on a given Cloud resource are evaluated hierarchically and inherited by all descendants of that resource. For all requests, returns a google.rpc.Status with google.rpc.Code.PERMISSION_DENIED if the IAM check fails or the parent resource is not in a Cloud Organization. For all requests, returns a google.rpc.Status with google.rpc.Code.INVALID_ARGUMENT if the request is malformed.

ResourceSettingsServiceSettings

Settings class to configure an instance of ResourceSettingsServiceClient.

The default instance has everything set to sensible defaults:

  • The default service address (resourcesettings.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of getSetting to 30 seconds:


 // 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
 ResourceSettingsServiceSettings.Builder resourceSettingsServiceSettingsBuilder =
     ResourceSettingsServiceSettings.newBuilder();
 resourceSettingsServiceSettingsBuilder
     .getSettingSettings()
     .setRetrySettings(
         resourceSettingsServiceSettingsBuilder
             .getSettingSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 ResourceSettingsServiceSettings resourceSettingsServiceSettings =
     resourceSettingsServiceSettingsBuilder.build();
 

ResourceSettingsServiceSettings.Builder

Builder for ResourceSettingsServiceSettings.

Setting

The schema for settings.

Protobuf type google.cloud.resourcesettings.v1.Setting

Setting.Builder

The schema for settings.

Protobuf type google.cloud.resourcesettings.v1.Setting

SettingMetadata

Metadata about a setting which is not editable by the end user.

Protobuf type google.cloud.resourcesettings.v1.SettingMetadata

SettingMetadata.Builder

Metadata about a setting which is not editable by the end user.

Protobuf type google.cloud.resourcesettings.v1.SettingMetadata

SettingName

SettingName.Builder

Builder for projects/{project_number}/settings/{setting_name}.

SettingName.FolderSettingNameBuilder

Builder for folders/{folder}/settings/{setting_name}.

SettingName.OrganizationSettingNameBuilder

Builder for organizations/{organization}/settings/{setting_name}.

UpdateSettingRequest

The request for UpdateSetting.

Protobuf type google.cloud.resourcesettings.v1.UpdateSettingRequest

UpdateSettingRequest.Builder

The request for UpdateSetting.

Protobuf type google.cloud.resourcesettings.v1.UpdateSettingRequest

Value

The data in a setting value.

Protobuf type google.cloud.resourcesettings.v1.Value

Value.Builder

The data in a setting value.

Protobuf type google.cloud.resourcesettings.v1.Value

Value.EnumValue

A enum value that can hold any enum type setting values. Each enum type is represented by a number, this representation is stored in the definitions.

Protobuf type google.cloud.resourcesettings.v1.Value.EnumValue

Value.EnumValue.Builder

A enum value that can hold any enum type setting values. Each enum type is represented by a number, this representation is stored in the definitions.

Protobuf type google.cloud.resourcesettings.v1.Value.EnumValue

Value.StringSet

A string set value that can hold a set of strings. The maximum length of each string is 200 characters and there can be a maximum of 50 strings in the string set.

Protobuf type google.cloud.resourcesettings.v1.Value.StringSet

Value.StringSet.Builder

A string set value that can hold a set of strings. The maximum length of each string is 200 characters and there can be a maximum of 50 strings in the string set.

Protobuf type google.cloud.resourcesettings.v1.Value.StringSet

Interfaces

GetSettingRequestOrBuilder

ListSettingsRequestOrBuilder

ListSettingsResponseOrBuilder

SettingMetadataOrBuilder

SettingOrBuilder

UpdateSettingRequestOrBuilder

Value.EnumValueOrBuilder

Value.StringSetOrBuilder

ValueOrBuilder

Enums

SettingMetadata.DataType

The data type for setting values of this setting. See Value for more details on the available data types.

Protobuf enum google.cloud.resourcesettings.v1.SettingMetadata.DataType

SettingView

View options for Settings.

Protobuf enum google.cloud.resourcesettings.v1.SettingView

Value.ValueCase