GitHub Repository | Product Reference |
Service Description: Service describing handlers for resources
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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
Configuration response = licenseManagerClient.getConfiguration(name);
}
Note: close() needs to be called on the LicenseManagerClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
Method | Description | Method Variants |
---|---|---|
ListConfigurations |
Lists Configurations in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetConfiguration |
Gets details of a single Configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateConfiguration |
Creates a new Configuration in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateConfiguration |
Updates the parameters of a single Configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteConfiguration |
Deletes a single Configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListInstances |
Lists Instances in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetInstance |
Gets details of a single Instance. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeactivateConfiguration |
Deactivates the given configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ReactivateConfiguration |
Reactivates the given configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
QueryConfigurationLicenseUsage |
License Usage information for a Configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
AggregateUsage |
Aggregates Usage per Instance for a Configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListProducts |
Lists Products in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetProduct |
Gets details of a single Product. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return 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 LicenseManagerSettings 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
LicenseManagerSettings licenseManagerSettings =
LicenseManagerSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
LicenseManagerClient licenseManagerClient = LicenseManagerClient.create(licenseManagerSettings);
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
LicenseManagerSettings licenseManagerSettings =
LicenseManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
LicenseManagerClient licenseManagerClient = LicenseManagerClient.create(licenseManagerSettings);
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
LicenseManagerSettings licenseManagerSettings =
LicenseManagerSettings.newHttpJsonBuilder().build();
LicenseManagerClient licenseManagerClient = LicenseManagerClient.create(licenseManagerSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final LicenseManagerClient create()
Constructs an instance of LicenseManagerClient with default settings.
Returns | |
---|---|
Type | Description |
LicenseManagerClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(LicenseManagerSettings settings)
public static final LicenseManagerClient create(LicenseManagerSettings settings)
Constructs an instance of LicenseManagerClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Parameter | |
---|---|
Name | Description |
settings |
LicenseManagerSettings |
Returns | |
---|---|
Type | Description |
LicenseManagerClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(LicenseManagerStub stub)
public static final LicenseManagerClient create(LicenseManagerStub stub)
Constructs an instance of LicenseManagerClient, using the given stub for making calls. This is for advanced usage - prefer using create(LicenseManagerSettings).
Parameter | |
---|---|
Name | Description |
stub |
LicenseManagerStub |
Returns | |
---|---|
Type | Description |
LicenseManagerClient |
Constructors
LicenseManagerClient(LicenseManagerSettings settings)
protected LicenseManagerClient(LicenseManagerSettings settings)
Constructs an instance of LicenseManagerClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Parameter | |
---|---|
Name | Description |
settings |
LicenseManagerSettings |
LicenseManagerClient(LicenseManagerStub stub)
protected LicenseManagerClient(LicenseManagerStub stub)
Parameter | |
---|---|
Name | Description |
stub |
LicenseManagerStub |
Methods
aggregateUsage(AggregateUsageRequest request)
public final LicenseManagerClient.AggregateUsagePagedResponse aggregateUsage(AggregateUsageRequest request)
Aggregates Usage per Instance for a Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
AggregateUsageRequest request =
AggregateUsageRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.build();
for (Usage element : licenseManagerClient.aggregateUsage(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
AggregateUsageRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.AggregateUsagePagedResponse |
aggregateUsage(ConfigurationName name, Timestamp startTime, Timestamp endTime)
public final LicenseManagerClient.AggregateUsagePagedResponse aggregateUsage(ConfigurationName name, Timestamp startTime, Timestamp endTime)
Aggregates Usage per Instance for a Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
Timestamp startTime = Timestamp.newBuilder().build();
Timestamp endTime = Timestamp.newBuilder().build();
for (Usage element :
licenseManagerClient.aggregateUsage(name, startTime, endTime).iterateAll()) {
// doThingsWith(element);
}
}
Parameters | |
---|---|
Name | Description |
name |
ConfigurationName Required. Parent value for AggregateUsageRequest |
startTime |
Timestamp Required. Licenses are purchased per month - so usage track needs start time of a month. |
endTime |
Timestamp Required. Usage track is always for a month. This parameter is for the end time of the month. |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.AggregateUsagePagedResponse |
aggregateUsage(String name, Timestamp startTime, Timestamp endTime)
public final LicenseManagerClient.AggregateUsagePagedResponse aggregateUsage(String name, Timestamp startTime, Timestamp endTime)
Aggregates Usage per Instance for a Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
Timestamp startTime = Timestamp.newBuilder().build();
Timestamp endTime = Timestamp.newBuilder().build();
for (Usage element :
licenseManagerClient.aggregateUsage(name, startTime, endTime).iterateAll()) {
// doThingsWith(element);
}
}
Parameters | |
---|---|
Name | Description |
name |
String Required. Parent value for AggregateUsageRequest |
startTime |
Timestamp Required. Licenses are purchased per month - so usage track needs start time of a month. |
endTime |
Timestamp Required. Usage track is always for a month. This parameter is for the end time of the month. |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.AggregateUsagePagedResponse |
aggregateUsageCallable()
public final UnaryCallable<AggregateUsageRequest,AggregateUsageResponse> aggregateUsageCallable()
Aggregates Usage per Instance for a Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
AggregateUsageRequest request =
AggregateUsageRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.build();
while (true) {
AggregateUsageResponse response =
licenseManagerClient.aggregateUsageCallable().call(request);
for (Usage element : response.getUsagesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<AggregateUsageRequest,AggregateUsageResponse> |
aggregateUsagePagedCallable()
public final UnaryCallable<AggregateUsageRequest,LicenseManagerClient.AggregateUsagePagedResponse> aggregateUsagePagedCallable()
Aggregates Usage per Instance for a Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
AggregateUsageRequest request =
AggregateUsageRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.build();
ApiFuture<Usage> future =
licenseManagerClient.aggregateUsagePagedCallable().futureCall(request);
// Do something.
for (Usage element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<AggregateUsageRequest,AggregateUsagePagedResponse> |
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Parameters | |
---|---|
Name | Description |
duration |
long |
unit |
TimeUnit |
Returns | |
---|---|
Type | Description |
boolean |
Exceptions | |
---|---|
Type | Description |
InterruptedException |
close()
public final void close()
createConfigurationAsync(CreateConfigurationRequest request)
public final OperationFuture<Configuration,OperationMetadata> createConfigurationAsync(CreateConfigurationRequest request)
Creates a new Configuration in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
CreateConfigurationRequest request =
CreateConfigurationRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConfigurationId("configurationId1948915889")
.setConfiguration(Configuration.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Configuration response = licenseManagerClient.createConfigurationAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateConfigurationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Configuration,OperationMetadata> |
createConfigurationAsync(LocationName parent, Configuration configuration, String configurationId)
public final OperationFuture<Configuration,OperationMetadata> createConfigurationAsync(LocationName parent, Configuration configuration, String configurationId)
Creates a new Configuration in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Configuration configuration = Configuration.newBuilder().build();
String configurationId = "configurationId1948915889";
Configuration response =
licenseManagerClient
.createConfigurationAsync(parent, configuration, configurationId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. Value for parent. |
configuration |
Configuration Required. The resource being created |
configurationId |
String Required. Id of the requesting object |
Returns | |
---|---|
Type | Description |
OperationFuture<Configuration,OperationMetadata> |
createConfigurationAsync(String parent, Configuration configuration, String configurationId)
public final OperationFuture<Configuration,OperationMetadata> createConfigurationAsync(String parent, Configuration configuration, String configurationId)
Creates a new Configuration in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Configuration configuration = Configuration.newBuilder().build();
String configurationId = "configurationId1948915889";
Configuration response =
licenseManagerClient
.createConfigurationAsync(parent, configuration, configurationId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. Value for parent. |
configuration |
Configuration Required. The resource being created |
configurationId |
String Required. Id of the requesting object |
Returns | |
---|---|
Type | Description |
OperationFuture<Configuration,OperationMetadata> |
createConfigurationCallable()
public final UnaryCallable<CreateConfigurationRequest,Operation> createConfigurationCallable()
Creates a new Configuration in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
CreateConfigurationRequest request =
CreateConfigurationRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConfigurationId("configurationId1948915889")
.setConfiguration(Configuration.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
licenseManagerClient.createConfigurationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateConfigurationRequest,Operation> |
createConfigurationOperationCallable()
public final OperationCallable<CreateConfigurationRequest,Configuration,OperationMetadata> createConfigurationOperationCallable()
Creates a new Configuration in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
CreateConfigurationRequest request =
CreateConfigurationRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConfigurationId("configurationId1948915889")
.setConfiguration(Configuration.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Configuration, OperationMetadata> future =
licenseManagerClient.createConfigurationOperationCallable().futureCall(request);
// Do something.
Configuration response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateConfigurationRequest,Configuration,OperationMetadata> |
deactivateConfigurationAsync(ConfigurationName name)
public final OperationFuture<Configuration,OperationMetadata> deactivateConfigurationAsync(ConfigurationName name)
Deactivates the given configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
Configuration response = licenseManagerClient.deactivateConfigurationAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
ConfigurationName Required. Name of the resource. |
Returns | |
---|---|
Type | Description |
OperationFuture<Configuration,OperationMetadata> |
deactivateConfigurationAsync(DeactivateConfigurationRequest request)
public final OperationFuture<Configuration,OperationMetadata> deactivateConfigurationAsync(DeactivateConfigurationRequest request)
Deactivates the given configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
DeactivateConfigurationRequest request =
DeactivateConfigurationRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setRequestId("requestId693933066")
.build();
Configuration response = licenseManagerClient.deactivateConfigurationAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
DeactivateConfigurationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Configuration,OperationMetadata> |
deactivateConfigurationAsync(String name)
public final OperationFuture<Configuration,OperationMetadata> deactivateConfigurationAsync(String name)
Deactivates the given configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
Configuration response = licenseManagerClient.deactivateConfigurationAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the resource. |
Returns | |
---|---|
Type | Description |
OperationFuture<Configuration,OperationMetadata> |
deactivateConfigurationCallable()
public final UnaryCallable<DeactivateConfigurationRequest,Operation> deactivateConfigurationCallable()
Deactivates the given configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
DeactivateConfigurationRequest request =
DeactivateConfigurationRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
licenseManagerClient.deactivateConfigurationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeactivateConfigurationRequest,Operation> |
deactivateConfigurationOperationCallable()
public final OperationCallable<DeactivateConfigurationRequest,Configuration,OperationMetadata> deactivateConfigurationOperationCallable()
Deactivates the given configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
DeactivateConfigurationRequest request =
DeactivateConfigurationRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Configuration, OperationMetadata> future =
licenseManagerClient.deactivateConfigurationOperationCallable().futureCall(request);
// Do something.
Configuration response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeactivateConfigurationRequest,Configuration,OperationMetadata> |
deleteConfigurationAsync(ConfigurationName name)
public final OperationFuture<Empty,OperationMetadata> deleteConfigurationAsync(ConfigurationName name)
Deletes a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
licenseManagerClient.deleteConfigurationAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
ConfigurationName Required. Name of the resource |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConfigurationAsync(DeleteConfigurationRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteConfigurationAsync(DeleteConfigurationRequest request)
Deletes a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
DeleteConfigurationRequest request =
DeleteConfigurationRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setRequestId("requestId693933066")
.build();
licenseManagerClient.deleteConfigurationAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteConfigurationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConfigurationAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteConfigurationAsync(String name)
Deletes a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
licenseManagerClient.deleteConfigurationAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the resource |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteConfigurationCallable()
public final UnaryCallable<DeleteConfigurationRequest,Operation> deleteConfigurationCallable()
Deletes a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
DeleteConfigurationRequest request =
DeleteConfigurationRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
licenseManagerClient.deleteConfigurationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteConfigurationRequest,Operation> |
deleteConfigurationOperationCallable()
public final OperationCallable<DeleteConfigurationRequest,Empty,OperationMetadata> deleteConfigurationOperationCallable()
Deletes a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
DeleteConfigurationRequest request =
DeleteConfigurationRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
licenseManagerClient.deleteConfigurationOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteConfigurationRequest,Empty,OperationMetadata> |
getConfiguration(ConfigurationName name)
public final Configuration getConfiguration(ConfigurationName name)
Gets details of a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
Configuration response = licenseManagerClient.getConfiguration(name);
}
Parameter | |
---|---|
Name | Description |
name |
ConfigurationName Required. Name of the resource |
Returns | |
---|---|
Type | Description |
Configuration |
getConfiguration(GetConfigurationRequest request)
public final Configuration getConfiguration(GetConfigurationRequest request)
Gets details of a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
GetConfigurationRequest request =
GetConfigurationRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.build();
Configuration response = licenseManagerClient.getConfiguration(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetConfigurationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Configuration |
getConfiguration(String name)
public final Configuration getConfiguration(String name)
Gets details of a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
Configuration response = licenseManagerClient.getConfiguration(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the resource |
Returns | |
---|---|
Type | Description |
Configuration |
getConfigurationCallable()
public final UnaryCallable<GetConfigurationRequest,Configuration> getConfigurationCallable()
Gets details of a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
GetConfigurationRequest request =
GetConfigurationRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.build();
ApiFuture<Configuration> future =
licenseManagerClient.getConfigurationCallable().futureCall(request);
// Do something.
Configuration response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetConfigurationRequest,Configuration> |
getHttpJsonOperationsClient()
public final OperationsClient getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Returns | |
---|---|
Type | Description |
OperationsClient |
getInstance(GetInstanceRequest request)
public final Instance getInstance(GetInstanceRequest request)
Gets details of a single Instance.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
GetInstanceRequest request =
GetInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
Instance response = licenseManagerClient.getInstance(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetInstanceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Instance |
getInstance(InstanceName name)
public final Instance getInstance(InstanceName name)
Gets details of a single Instance.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Instance response = licenseManagerClient.getInstance(name);
}
Parameter | |
---|---|
Name | Description |
name |
InstanceName Required. Name of the resource |
Returns | |
---|---|
Type | Description |
Instance |
getInstance(String name)
public final Instance getInstance(String name)
Gets details of a single Instance.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
Instance response = licenseManagerClient.getInstance(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the resource |
Returns | |
---|---|
Type | Description |
Instance |
getInstanceCallable()
public final UnaryCallable<GetInstanceRequest,Instance> getInstanceCallable()
Gets details of a single Instance.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
GetInstanceRequest request =
GetInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
ApiFuture<Instance> future = licenseManagerClient.getInstanceCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetInstanceRequest,Instance> |
getLocation(GetLocationRequest request)
public final Location getLocation(GetLocationRequest request)
Gets information about a location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = licenseManagerClient.getLocation(request);
}
Parameter | |
---|---|
Name | Description |
request |
com.google.cloud.location.GetLocationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.cloud.location.Location |
getLocationCallable()
public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
Gets information about a location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future = licenseManagerClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getOperationsClient()
public final OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Returns | |
---|---|
Type | Description |
OperationsClient |
getProduct(GetProductRequest request)
public final Product getProduct(GetProductRequest request)
Gets details of a single Product.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
GetProductRequest request =
GetProductRequest.newBuilder()
.setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
.build();
Product response = licenseManagerClient.getProduct(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetProductRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Product |
getProduct(ProductName name)
public final Product getProduct(ProductName name)
Gets details of a single Product.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
Product response = licenseManagerClient.getProduct(name);
}
Parameter | |
---|---|
Name | Description |
name |
ProductName Required. Name of the resource |
Returns | |
---|---|
Type | Description |
Product |
getProduct(String name)
public final Product getProduct(String name)
Gets details of a single Product.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
Product response = licenseManagerClient.getProduct(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the resource |
Returns | |
---|---|
Type | Description |
Product |
getProductCallable()
public final UnaryCallable<GetProductRequest,Product> getProductCallable()
Gets details of a single Product.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
GetProductRequest request =
GetProductRequest.newBuilder()
.setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
.build();
ApiFuture<Product> future = licenseManagerClient.getProductCallable().futureCall(request);
// Do something.
Product response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetProductRequest,Product> |
getSettings()
public final LicenseManagerSettings getSettings()
Returns | |
---|---|
Type | Description |
LicenseManagerSettings |
getStub()
public LicenseManagerStub getStub()
Returns | |
---|---|
Type | Description |
LicenseManagerStub |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
listConfigurations(ListConfigurationsRequest request)
public final LicenseManagerClient.ListConfigurationsPagedResponse listConfigurations(ListConfigurationsRequest request)
Lists Configurations in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ListConfigurationsRequest request =
ListConfigurationsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Configuration element : licenseManagerClient.listConfigurations(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListConfigurationsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.ListConfigurationsPagedResponse |
listConfigurations(LocationName parent)
public final LicenseManagerClient.ListConfigurationsPagedResponse listConfigurations(LocationName parent)
Lists Configurations in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Configuration element : licenseManagerClient.listConfigurations(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
LocationName Required. Parent value for ListConfigurationsRequest |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.ListConfigurationsPagedResponse |
listConfigurations(String parent)
public final LicenseManagerClient.ListConfigurationsPagedResponse listConfigurations(String parent)
Lists Configurations in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Configuration element : licenseManagerClient.listConfigurations(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. Parent value for ListConfigurationsRequest |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.ListConfigurationsPagedResponse |
listConfigurationsCallable()
public final UnaryCallable<ListConfigurationsRequest,ListConfigurationsResponse> listConfigurationsCallable()
Lists Configurations in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ListConfigurationsRequest request =
ListConfigurationsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListConfigurationsResponse response =
licenseManagerClient.listConfigurationsCallable().call(request);
for (Configuration element : response.getConfigurationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListConfigurationsRequest,ListConfigurationsResponse> |
listConfigurationsPagedCallable()
public final UnaryCallable<ListConfigurationsRequest,LicenseManagerClient.ListConfigurationsPagedResponse> listConfigurationsPagedCallable()
Lists Configurations in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ListConfigurationsRequest request =
ListConfigurationsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Configuration> future =
licenseManagerClient.listConfigurationsPagedCallable().futureCall(request);
// Do something.
for (Configuration element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListConfigurationsRequest,ListConfigurationsPagedResponse> |
listInstances(ListInstancesRequest request)
public final LicenseManagerClient.ListInstancesPagedResponse listInstances(ListInstancesRequest request)
Lists Instances in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Instance element : licenseManagerClient.listInstances(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListInstancesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.ListInstancesPagedResponse |
listInstances(LocationName parent)
public final LicenseManagerClient.ListInstancesPagedResponse listInstances(LocationName parent)
Lists Instances in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Instance element : licenseManagerClient.listInstances(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
LocationName Required. Parent value for ListInstancesRequest |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.ListInstancesPagedResponse |
listInstances(String parent)
public final LicenseManagerClient.ListInstancesPagedResponse listInstances(String parent)
Lists Instances in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Instance element : licenseManagerClient.listInstances(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. Parent value for ListInstancesRequest |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.ListInstancesPagedResponse |
listInstancesCallable()
public final UnaryCallable<ListInstancesRequest,ListInstancesResponse> listInstancesCallable()
Lists Instances in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListInstancesResponse response = licenseManagerClient.listInstancesCallable().call(request);
for (Instance element : response.getInstancesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListInstancesRequest,ListInstancesResponse> |
listInstancesPagedCallable()
public final UnaryCallable<ListInstancesRequest,LicenseManagerClient.ListInstancesPagedResponse> listInstancesPagedCallable()
Lists Instances in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Instance> future =
licenseManagerClient.listInstancesPagedCallable().futureCall(request);
// Do something.
for (Instance element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListInstancesRequest,ListInstancesPagedResponse> |
listLocations(ListLocationsRequest request)
public final LicenseManagerClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)
Lists information about the supported locations for this service.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : licenseManagerClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
com.google.cloud.location.ListLocationsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.ListLocationsPagedResponse |
listLocationsCallable()
public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
Lists information about the supported locations for this service.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response = licenseManagerClient.listLocationsCallable().call(request);
for (Location element : response.getLocationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
listLocationsPagedCallable()
public final UnaryCallable<ListLocationsRequest,LicenseManagerClient.ListLocationsPagedResponse> listLocationsPagedCallable()
Lists information about the supported locations for this service.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
licenseManagerClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
listProducts(ListProductsRequest request)
public final LicenseManagerClient.ListProductsPagedResponse listProducts(ListProductsRequest request)
Lists Products in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ListProductsRequest request =
ListProductsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Product element : licenseManagerClient.listProducts(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListProductsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.ListProductsPagedResponse |
listProducts(LocationName parent)
public final LicenseManagerClient.ListProductsPagedResponse listProducts(LocationName parent)
Lists Products in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Product element : licenseManagerClient.listProducts(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
LocationName Required. Parent value for ListProductsRequest |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.ListProductsPagedResponse |
listProducts(String parent)
public final LicenseManagerClient.ListProductsPagedResponse listProducts(String parent)
Lists Products in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Product element : licenseManagerClient.listProducts(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. Parent value for ListProductsRequest |
Returns | |
---|---|
Type | Description |
LicenseManagerClient.ListProductsPagedResponse |
listProductsCallable()
public final UnaryCallable<ListProductsRequest,ListProductsResponse> listProductsCallable()
Lists Products in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ListProductsRequest request =
ListProductsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListProductsResponse response = licenseManagerClient.listProductsCallable().call(request);
for (Product element : response.getProductsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListProductsRequest,ListProductsResponse> |
listProductsPagedCallable()
public final UnaryCallable<ListProductsRequest,LicenseManagerClient.ListProductsPagedResponse> listProductsPagedCallable()
Lists Products in a given project and location.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ListProductsRequest request =
ListProductsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Product> future =
licenseManagerClient.listProductsPagedCallable().futureCall(request);
// Do something.
for (Product element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListProductsRequest,ListProductsPagedResponse> |
queryConfigurationLicenseUsage(ConfigurationName name, Timestamp startTime, Timestamp endTime)
public final QueryConfigurationLicenseUsageResponse queryConfigurationLicenseUsage(ConfigurationName name, Timestamp startTime, Timestamp endTime)
License Usage information for a Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
Timestamp startTime = Timestamp.newBuilder().build();
Timestamp endTime = Timestamp.newBuilder().build();
QueryConfigurationLicenseUsageResponse response =
licenseManagerClient.queryConfigurationLicenseUsage(name, startTime, endTime);
}
Parameters | |
---|---|
Name | Description |
name |
ConfigurationName Required. The resource path of the Configuration. |
startTime |
Timestamp Required. The start time for retrieving the usage. If not specified, we will use the first day of the current billing period. |
endTime |
Timestamp Required. The end time for retrieving the usage. If not specified, we will use the last day of the current billing period. |
Returns | |
---|---|
Type | Description |
QueryConfigurationLicenseUsageResponse |
queryConfigurationLicenseUsage(QueryConfigurationLicenseUsageRequest request)
public final QueryConfigurationLicenseUsageResponse queryConfigurationLicenseUsage(QueryConfigurationLicenseUsageRequest request)
License Usage information for a Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
QueryConfigurationLicenseUsageRequest request =
QueryConfigurationLicenseUsageRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.build();
QueryConfigurationLicenseUsageResponse response =
licenseManagerClient.queryConfigurationLicenseUsage(request);
}
Parameter | |
---|---|
Name | Description |
request |
QueryConfigurationLicenseUsageRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
QueryConfigurationLicenseUsageResponse |
queryConfigurationLicenseUsage(String name, Timestamp startTime, Timestamp endTime)
public final QueryConfigurationLicenseUsageResponse queryConfigurationLicenseUsage(String name, Timestamp startTime, Timestamp endTime)
License Usage information for a Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
Timestamp startTime = Timestamp.newBuilder().build();
Timestamp endTime = Timestamp.newBuilder().build();
QueryConfigurationLicenseUsageResponse response =
licenseManagerClient.queryConfigurationLicenseUsage(name, startTime, endTime);
}
Parameters | |
---|---|
Name | Description |
name |
String Required. The resource path of the Configuration. |
startTime |
Timestamp Required. The start time for retrieving the usage. If not specified, we will use the first day of the current billing period. |
endTime |
Timestamp Required. The end time for retrieving the usage. If not specified, we will use the last day of the current billing period. |
Returns | |
---|---|
Type | Description |
QueryConfigurationLicenseUsageResponse |
queryConfigurationLicenseUsageCallable()
public final UnaryCallable<QueryConfigurationLicenseUsageRequest,QueryConfigurationLicenseUsageResponse> queryConfigurationLicenseUsageCallable()
License Usage information for a Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
QueryConfigurationLicenseUsageRequest request =
QueryConfigurationLicenseUsageRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.build();
ApiFuture<QueryConfigurationLicenseUsageResponse> future =
licenseManagerClient.queryConfigurationLicenseUsageCallable().futureCall(request);
// Do something.
QueryConfigurationLicenseUsageResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<QueryConfigurationLicenseUsageRequest,QueryConfigurationLicenseUsageResponse> |
reactivateConfigurationAsync(ConfigurationName name)
public final OperationFuture<Configuration,OperationMetadata> reactivateConfigurationAsync(ConfigurationName name)
Reactivates the given configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
Configuration response = licenseManagerClient.reactivateConfigurationAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
ConfigurationName Required. Name of the resource. |
Returns | |
---|---|
Type | Description |
OperationFuture<Configuration,OperationMetadata> |
reactivateConfigurationAsync(ReactivateConfigurationRequest request)
public final OperationFuture<Configuration,OperationMetadata> reactivateConfigurationAsync(ReactivateConfigurationRequest request)
Reactivates the given configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ReactivateConfigurationRequest request =
ReactivateConfigurationRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setRequestId("requestId693933066")
.build();
Configuration response = licenseManagerClient.reactivateConfigurationAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
ReactivateConfigurationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Configuration,OperationMetadata> |
reactivateConfigurationAsync(String name)
public final OperationFuture<Configuration,OperationMetadata> reactivateConfigurationAsync(String name)
Reactivates the given configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
Configuration response = licenseManagerClient.reactivateConfigurationAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the resource. |
Returns | |
---|---|
Type | Description |
OperationFuture<Configuration,OperationMetadata> |
reactivateConfigurationCallable()
public final UnaryCallable<ReactivateConfigurationRequest,Operation> reactivateConfigurationCallable()
Reactivates the given configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ReactivateConfigurationRequest request =
ReactivateConfigurationRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
licenseManagerClient.reactivateConfigurationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ReactivateConfigurationRequest,Operation> |
reactivateConfigurationOperationCallable()
public final OperationCallable<ReactivateConfigurationRequest,Configuration,OperationMetadata> reactivateConfigurationOperationCallable()
Reactivates the given configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
ReactivateConfigurationRequest request =
ReactivateConfigurationRequest.newBuilder()
.setName(
ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Configuration, OperationMetadata> future =
licenseManagerClient.reactivateConfigurationOperationCallable().futureCall(request);
// Do something.
Configuration response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<ReactivateConfigurationRequest,Configuration,OperationMetadata> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateConfigurationAsync(Configuration configuration, FieldMask updateMask)
public final OperationFuture<Configuration,OperationMetadata> updateConfigurationAsync(Configuration configuration, FieldMask updateMask)
Updates the parameters of a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
Configuration configuration = Configuration.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Configuration response =
licenseManagerClient.updateConfigurationAsync(configuration, updateMask).get();
}
Parameters | |
---|---|
Name | Description |
configuration |
Configuration Required. The resource being updated |
updateMask |
FieldMask Optional. Field mask is used to specify the fields to be overwritten in the Configuration resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
Returns | |
---|---|
Type | Description |
OperationFuture<Configuration,OperationMetadata> |
updateConfigurationAsync(UpdateConfigurationRequest request)
public final OperationFuture<Configuration,OperationMetadata> updateConfigurationAsync(UpdateConfigurationRequest request)
Updates the parameters of a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
UpdateConfigurationRequest request =
UpdateConfigurationRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setConfiguration(Configuration.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Configuration response = licenseManagerClient.updateConfigurationAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
UpdateConfigurationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Configuration,OperationMetadata> |
updateConfigurationCallable()
public final UnaryCallable<UpdateConfigurationRequest,Operation> updateConfigurationCallable()
Updates the parameters of a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
UpdateConfigurationRequest request =
UpdateConfigurationRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setConfiguration(Configuration.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
licenseManagerClient.updateConfigurationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateConfigurationRequest,Operation> |
updateConfigurationOperationCallable()
public final OperationCallable<UpdateConfigurationRequest,Configuration,OperationMetadata> updateConfigurationOperationCallable()
Updates the parameters of a single Configuration.
Sample code:
// 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
UpdateConfigurationRequest request =
UpdateConfigurationRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setConfiguration(Configuration.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Configuration, OperationMetadata> future =
licenseManagerClient.updateConfigurationOperationCallable().futureCall(request);
// Do something.
Configuration response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UpdateConfigurationRequest,Configuration,OperationMetadata> |