GitHub Repository | Product Reference |
Service Description: Creates and manages InsightsConfigs.
The InsightsConfig resource is the core configuration object to capture events from your Software Development Lifecycle. It acts as the central hub for managing how Developer connect understands your application, its runtime environments, and the artifacts deployed within them. A user can create an InsightsConfig, list previously-requested InsightsConfigs or get InsightsConfigs by their ID to determine the status of the InsightsConfig.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
InsightsConfigName name =
InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]");
InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(name);
}
Note: close() needs to be called on the InsightsConfigServiceClient 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 |
---|---|---|
ListInsightsConfigs |
Lists InsightsConfigs 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.
|
CreateInsightsConfig |
Creates a new InsightsConfig 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.
|
GetInsightsConfig |
Gets details of a single Insight. |
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.
|
UpdateInsightsConfig |
Updates the parameters of a single InsightsConfig. |
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.
|
DeleteInsightsConfig |
Delete a single Insight. |
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.
|
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 InsightsConfigServiceSettings 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
InsightsConfigServiceSettings insightsConfigServiceSettings =
InsightsConfigServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create(insightsConfigServiceSettings);
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
InsightsConfigServiceSettings insightsConfigServiceSettings =
InsightsConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create(insightsConfigServiceSettings);
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
InsightsConfigServiceSettings insightsConfigServiceSettings =
InsightsConfigServiceSettings.newHttpJsonBuilder().build();
InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create(insightsConfigServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final InsightsConfigServiceClient create()
Constructs an instance of InsightsConfigServiceClient with default settings.
Returns | |
---|---|
Type | Description |
InsightsConfigServiceClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(InsightsConfigServiceSettings settings)
public static final InsightsConfigServiceClient create(InsightsConfigServiceSettings settings)
Constructs an instance of InsightsConfigServiceClient, 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 |
InsightsConfigServiceSettings |
Returns | |
---|---|
Type | Description |
InsightsConfigServiceClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(InsightsConfigServiceStub stub)
public static final InsightsConfigServiceClient create(InsightsConfigServiceStub stub)
Constructs an instance of InsightsConfigServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(InsightsConfigServiceSettings).
Parameter | |
---|---|
Name | Description |
stub |
InsightsConfigServiceStub |
Returns | |
---|---|
Type | Description |
InsightsConfigServiceClient |
Constructors
InsightsConfigServiceClient(InsightsConfigServiceSettings settings)
protected InsightsConfigServiceClient(InsightsConfigServiceSettings settings)
Constructs an instance of InsightsConfigServiceClient, 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 |
InsightsConfigServiceSettings |
InsightsConfigServiceClient(InsightsConfigServiceStub stub)
protected InsightsConfigServiceClient(InsightsConfigServiceStub stub)
Parameter | |
---|---|
Name | Description |
stub |
InsightsConfigServiceStub |
Methods
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()
createInsightsConfigAsync(CreateInsightsConfigRequest request)
public final OperationFuture<InsightsConfig,OperationMetadata> createInsightsConfigAsync(CreateInsightsConfigRequest request)
Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
CreateInsightsConfigRequest request =
CreateInsightsConfigRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setInsightsConfigId("insightsConfigId774395128")
.setInsightsConfig(InsightsConfig.newBuilder().build())
.setValidateOnly(true)
.build();
InsightsConfig response =
insightsConfigServiceClient.createInsightsConfigAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateInsightsConfigRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<InsightsConfig,OperationMetadata> |
createInsightsConfigAsync(LocationName parent, InsightsConfig insightsConfig, String insightsConfigId)
public final OperationFuture<InsightsConfig,OperationMetadata> createInsightsConfigAsync(LocationName parent, InsightsConfig insightsConfig, String insightsConfigId)
Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
InsightsConfig insightsConfig = InsightsConfig.newBuilder().build();
String insightsConfigId = "insightsConfigId774395128";
InsightsConfig response =
insightsConfigServiceClient
.createInsightsConfigAsync(parent, insightsConfig, insightsConfigId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. Value for parent. |
insightsConfig |
InsightsConfig Required. The resource being created. |
insightsConfigId |
String Required. ID of the requesting InsightsConfig. |
Returns | |
---|---|
Type | Description |
OperationFuture<InsightsConfig,OperationMetadata> |
createInsightsConfigAsync(String parent, InsightsConfig insightsConfig, String insightsConfigId)
public final OperationFuture<InsightsConfig,OperationMetadata> createInsightsConfigAsync(String parent, InsightsConfig insightsConfig, String insightsConfigId)
Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
InsightsConfig insightsConfig = InsightsConfig.newBuilder().build();
String insightsConfigId = "insightsConfigId774395128";
InsightsConfig response =
insightsConfigServiceClient
.createInsightsConfigAsync(parent, insightsConfig, insightsConfigId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. Value for parent. |
insightsConfig |
InsightsConfig Required. The resource being created. |
insightsConfigId |
String Required. ID of the requesting InsightsConfig. |
Returns | |
---|---|
Type | Description |
OperationFuture<InsightsConfig,OperationMetadata> |
createInsightsConfigCallable()
public final UnaryCallable<CreateInsightsConfigRequest,Operation> createInsightsConfigCallable()
Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
CreateInsightsConfigRequest request =
CreateInsightsConfigRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setInsightsConfigId("insightsConfigId774395128")
.setInsightsConfig(InsightsConfig.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
insightsConfigServiceClient.createInsightsConfigCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateInsightsConfigRequest,Operation> |
createInsightsConfigOperationCallable()
public final OperationCallable<CreateInsightsConfigRequest,InsightsConfig,OperationMetadata> createInsightsConfigOperationCallable()
Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
CreateInsightsConfigRequest request =
CreateInsightsConfigRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setInsightsConfigId("insightsConfigId774395128")
.setInsightsConfig(InsightsConfig.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<InsightsConfig, OperationMetadata> future =
insightsConfigServiceClient.createInsightsConfigOperationCallable().futureCall(request);
// Do something.
InsightsConfig response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateInsightsConfigRequest,InsightsConfig,OperationMetadata> |
deleteInsightsConfigAsync(DeleteInsightsConfigRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteInsightsConfigAsync(DeleteInsightsConfigRequest request)
Delete a single Insight.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
DeleteInsightsConfigRequest request =
DeleteInsightsConfigRequest.newBuilder()
.setName(
InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.setEtag("etag3123477")
.build();
insightsConfigServiceClient.deleteInsightsConfigAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteInsightsConfigRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteInsightsConfigAsync(InsightsConfigName name)
public final OperationFuture<Empty,OperationMetadata> deleteInsightsConfigAsync(InsightsConfigName name)
Delete a single Insight.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
InsightsConfigName name =
InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]");
insightsConfigServiceClient.deleteInsightsConfigAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
InsightsConfigName Required. Value for parent. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteInsightsConfigAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteInsightsConfigAsync(String name)
Delete a single Insight.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
String name =
InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString();
insightsConfigServiceClient.deleteInsightsConfigAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Value for parent. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteInsightsConfigCallable()
public final UnaryCallable<DeleteInsightsConfigRequest,Operation> deleteInsightsConfigCallable()
Delete a single Insight.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
DeleteInsightsConfigRequest request =
DeleteInsightsConfigRequest.newBuilder()
.setName(
InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
insightsConfigServiceClient.deleteInsightsConfigCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteInsightsConfigRequest,Operation> |
deleteInsightsConfigOperationCallable()
public final OperationCallable<DeleteInsightsConfigRequest,Empty,OperationMetadata> deleteInsightsConfigOperationCallable()
Delete a single Insight.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
DeleteInsightsConfigRequest request =
DeleteInsightsConfigRequest.newBuilder()
.setName(
InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
insightsConfigServiceClient.deleteInsightsConfigOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteInsightsConfigRequest,Empty,OperationMetadata> |
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 |
getInsightsConfig(GetInsightsConfigRequest request)
public final InsightsConfig getInsightsConfig(GetInsightsConfigRequest request)
Gets details of a single Insight.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
GetInsightsConfigRequest request =
GetInsightsConfigRequest.newBuilder()
.setName(
InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
.build();
InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetInsightsConfigRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
InsightsConfig |
getInsightsConfig(InsightsConfigName name)
public final InsightsConfig getInsightsConfig(InsightsConfigName name)
Gets details of a single Insight.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
InsightsConfigName name =
InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]");
InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(name);
}
Parameter | |
---|---|
Name | Description |
name |
InsightsConfigName Required. Name of the resource. |
Returns | |
---|---|
Type | Description |
InsightsConfig |
getInsightsConfig(String name)
public final InsightsConfig getInsightsConfig(String name)
Gets details of a single Insight.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
String name =
InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString();
InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the resource. |
Returns | |
---|---|
Type | Description |
InsightsConfig |
getInsightsConfigCallable()
public final UnaryCallable<GetInsightsConfigRequest,InsightsConfig> getInsightsConfigCallable()
Gets details of a single Insight.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
GetInsightsConfigRequest request =
GetInsightsConfigRequest.newBuilder()
.setName(
InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
.build();
ApiFuture<InsightsConfig> future =
insightsConfigServiceClient.getInsightsConfigCallable().futureCall(request);
// Do something.
InsightsConfig response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetInsightsConfigRequest,InsightsConfig> |
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = insightsConfigServiceClient.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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
insightsConfigServiceClient.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 |
getSettings()
public final InsightsConfigServiceSettings getSettings()
Returns | |
---|---|
Type | Description |
InsightsConfigServiceSettings |
getStub()
public InsightsConfigServiceStub getStub()
Returns | |
---|---|
Type | Description |
InsightsConfigServiceStub |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
listInsightsConfigs(ListInsightsConfigsRequest request)
public final InsightsConfigServiceClient.ListInsightsConfigsPagedResponse listInsightsConfigs(ListInsightsConfigsRequest request)
Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
ListInsightsConfigsRequest request =
ListInsightsConfigsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (InsightsConfig element :
insightsConfigServiceClient.listInsightsConfigs(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListInsightsConfigsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
InsightsConfigServiceClient.ListInsightsConfigsPagedResponse |
listInsightsConfigs(LocationName parent)
public final InsightsConfigServiceClient.ListInsightsConfigsPagedResponse listInsightsConfigs(LocationName parent)
Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (InsightsConfig element :
insightsConfigServiceClient.listInsightsConfigs(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
LocationName Required. Parent value for ListInsightsConfigsRequest. |
Returns | |
---|---|
Type | Description |
InsightsConfigServiceClient.ListInsightsConfigsPagedResponse |
listInsightsConfigs(String parent)
public final InsightsConfigServiceClient.ListInsightsConfigsPagedResponse listInsightsConfigs(String parent)
Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (InsightsConfig element :
insightsConfigServiceClient.listInsightsConfigs(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. Parent value for ListInsightsConfigsRequest. |
Returns | |
---|---|
Type | Description |
InsightsConfigServiceClient.ListInsightsConfigsPagedResponse |
listInsightsConfigsCallable()
public final UnaryCallable<ListInsightsConfigsRequest,ListInsightsConfigsResponse> listInsightsConfigsCallable()
Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
ListInsightsConfigsRequest request =
ListInsightsConfigsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListInsightsConfigsResponse response =
insightsConfigServiceClient.listInsightsConfigsCallable().call(request);
for (InsightsConfig element : response.getInsightsConfigsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListInsightsConfigsRequest,ListInsightsConfigsResponse> |
listInsightsConfigsPagedCallable()
public final UnaryCallable<ListInsightsConfigsRequest,InsightsConfigServiceClient.ListInsightsConfigsPagedResponse> listInsightsConfigsPagedCallable()
Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
ListInsightsConfigsRequest request =
ListInsightsConfigsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<InsightsConfig> future =
insightsConfigServiceClient.listInsightsConfigsPagedCallable().futureCall(request);
// Do something.
for (InsightsConfig element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListInsightsConfigsRequest,ListInsightsConfigsPagedResponse> |
listLocations(ListLocationsRequest request)
public final InsightsConfigServiceClient.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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : insightsConfigServiceClient.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 |
InsightsConfigServiceClient.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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
insightsConfigServiceClient.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,InsightsConfigServiceClient.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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
insightsConfigServiceClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateInsightsConfigAsync(UpdateInsightsConfigRequest request)
public final OperationFuture<InsightsConfig,OperationMetadata> updateInsightsConfigAsync(UpdateInsightsConfigRequest request)
Updates the parameters of a single InsightsConfig.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
UpdateInsightsConfigRequest request =
UpdateInsightsConfigRequest.newBuilder()
.setInsightsConfig(InsightsConfig.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
InsightsConfig response =
insightsConfigServiceClient.updateInsightsConfigAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
UpdateInsightsConfigRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<InsightsConfig,OperationMetadata> |
updateInsightsConfigCallable()
public final UnaryCallable<UpdateInsightsConfigRequest,Operation> updateInsightsConfigCallable()
Updates the parameters of a single InsightsConfig.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
UpdateInsightsConfigRequest request =
UpdateInsightsConfigRequest.newBuilder()
.setInsightsConfig(InsightsConfig.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
insightsConfigServiceClient.updateInsightsConfigCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateInsightsConfigRequest,Operation> |
updateInsightsConfigOperationCallable()
public final OperationCallable<UpdateInsightsConfigRequest,InsightsConfig,OperationMetadata> updateInsightsConfigOperationCallable()
Updates the parameters of a single InsightsConfig.
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 (InsightsConfigServiceClient insightsConfigServiceClient =
InsightsConfigServiceClient.create()) {
UpdateInsightsConfigRequest request =
UpdateInsightsConfigRequest.newBuilder()
.setInsightsConfig(InsightsConfig.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
OperationFuture<InsightsConfig, OperationMetadata> future =
insightsConfigServiceClient.updateInsightsConfigOperationCallable().futureCall(request);
// Do something.
InsightsConfig response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UpdateInsightsConfigRequest,InsightsConfig,OperationMetadata> |