- 3.56.0 (latest)
- 3.55.0
- 3.54.0
- 3.53.0
- 3.52.0
- 3.50.0
- 3.49.0
- 3.48.0
- 3.47.0
- 3.46.0
- 3.45.0
- 3.44.0
- 3.43.0
- 3.42.0
- 3.41.0
- 3.40.0
- 3.38.0
- 3.37.0
- 3.36.0
- 3.35.0
- 3.34.0
- 3.33.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.28.0
- 3.25.0
- 3.24.0
- 3.23.0
- 3.22.0
- 3.21.0
- 3.20.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.0
- 3.12.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.6
- 3.3.6
- 3.2.10
public class UptimeCheckServiceClient implements BackgroundResource
Service Description: The UptimeCheckService API is used to manage (list, create, delete, edit) Uptime check configurations in the Stackdriver Monitoring product. An Uptime check is a piece of configuration that determines which resources and services to monitor for availability. These configurations can also be configured interactively by navigating to the Cloud Console, selecting the appropriate project, clicking on "Monitoring" on the left-hand side to navigate to Stackdriver, and then clicking on "Uptime".
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 for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
UptimeCheckConfigName name =
UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
"[PROJECT]", "[UPTIME_CHECK_CONFIG]");
UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
}
Note: close() needs to be called on the UptimeCheckServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of UptimeCheckServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
UptimeCheckServiceSettings uptimeCheckServiceSettings =
UptimeCheckServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
UptimeCheckServiceClient uptimeCheckServiceClient =
UptimeCheckServiceClient.create(uptimeCheckServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
UptimeCheckServiceSettings uptimeCheckServiceSettings =
UptimeCheckServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
UptimeCheckServiceClient uptimeCheckServiceClient =
UptimeCheckServiceClient.create(uptimeCheckServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final UptimeCheckServiceClient create()
Constructs an instance of UptimeCheckServiceClient with default settings.
Type | Description |
UptimeCheckServiceClient |
Type | Description |
IOException |
create(UptimeCheckServiceSettings settings)
public static final UptimeCheckServiceClient create(UptimeCheckServiceSettings settings)
Constructs an instance of UptimeCheckServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Name | Description |
settings | UptimeCheckServiceSettings |
Type | Description |
UptimeCheckServiceClient |
Type | Description |
IOException |
create(UptimeCheckServiceStub stub)
public static final UptimeCheckServiceClient create(UptimeCheckServiceStub stub)
Constructs an instance of UptimeCheckServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(UptimeCheckServiceSettings).
Name | Description |
stub | UptimeCheckServiceStub |
Type | Description |
UptimeCheckServiceClient |
Constructors
UptimeCheckServiceClient(UptimeCheckServiceSettings settings)
protected UptimeCheckServiceClient(UptimeCheckServiceSettings settings)
Constructs an instance of UptimeCheckServiceClient, 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.
Name | Description |
settings | UptimeCheckServiceSettings |
UptimeCheckServiceClient(UptimeCheckServiceStub stub)
protected UptimeCheckServiceClient(UptimeCheckServiceStub stub)
Name | Description |
stub | UptimeCheckServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
close()
public final void close()
createUptimeCheckConfig(ResourceName parent, UptimeCheckConfig uptimeCheckConfig)
public final UptimeCheckConfig createUptimeCheckConfig(ResourceName parent, UptimeCheckConfig uptimeCheckConfig)
Creates a new Uptime check configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
ResourceName parent = ResourceName.of("[FOLDER]");
UptimeCheckConfig uptimeCheckConfig = UptimeCheckConfig.newBuilder().build();
UptimeCheckConfig response =
uptimeCheckServiceClient.createUptimeCheckConfig(parent, uptimeCheckConfig);
}
Name | Description |
parent | com.google.api.resourcenames.ResourceName Required. The project in which to create the Uptime check. The format is: projects/[PROJECT_ID_OR_NUMBER] |
uptimeCheckConfig | UptimeCheckConfig Required. The new Uptime check configuration. |
Type | Description |
UptimeCheckConfig |
createUptimeCheckConfig(CreateUptimeCheckConfigRequest request)
public final UptimeCheckConfig createUptimeCheckConfig(CreateUptimeCheckConfigRequest request)
Creates a new Uptime check configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
CreateUptimeCheckConfigRequest request =
CreateUptimeCheckConfigRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setUptimeCheckConfig(UptimeCheckConfig.newBuilder().build())
.build();
UptimeCheckConfig response = uptimeCheckServiceClient.createUptimeCheckConfig(request);
}
Name | Description |
request | CreateUptimeCheckConfigRequest The request object containing all of the parameters for the API call. |
Type | Description |
UptimeCheckConfig |
createUptimeCheckConfig(OrganizationName parent, UptimeCheckConfig uptimeCheckConfig)
public final UptimeCheckConfig createUptimeCheckConfig(OrganizationName parent, UptimeCheckConfig uptimeCheckConfig)
Creates a new Uptime check configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
UptimeCheckConfig uptimeCheckConfig = UptimeCheckConfig.newBuilder().build();
UptimeCheckConfig response =
uptimeCheckServiceClient.createUptimeCheckConfig(parent, uptimeCheckConfig);
}
Name | Description |
parent | OrganizationName Required. The project in which to create the Uptime check. The format is: projects/[PROJECT_ID_OR_NUMBER] |
uptimeCheckConfig | UptimeCheckConfig Required. The new Uptime check configuration. |
Type | Description |
UptimeCheckConfig |
createUptimeCheckConfig(ProjectName parent, UptimeCheckConfig uptimeCheckConfig)
public final UptimeCheckConfig createUptimeCheckConfig(ProjectName parent, UptimeCheckConfig uptimeCheckConfig)
Creates a new Uptime check configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
UptimeCheckConfig uptimeCheckConfig = UptimeCheckConfig.newBuilder().build();
UptimeCheckConfig response =
uptimeCheckServiceClient.createUptimeCheckConfig(parent, uptimeCheckConfig);
}
Name | Description |
parent | ProjectName Required. The project in which to create the Uptime check. The format is: projects/[PROJECT_ID_OR_NUMBER] |
uptimeCheckConfig | UptimeCheckConfig Required. The new Uptime check configuration. |
Type | Description |
UptimeCheckConfig |
createUptimeCheckConfig(String parent, UptimeCheckConfig uptimeCheckConfig)
public final UptimeCheckConfig createUptimeCheckConfig(String parent, UptimeCheckConfig uptimeCheckConfig)
Creates a new Uptime check configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
String parent = ProjectName.of("[PROJECT]").toString();
UptimeCheckConfig uptimeCheckConfig = UptimeCheckConfig.newBuilder().build();
UptimeCheckConfig response =
uptimeCheckServiceClient.createUptimeCheckConfig(parent, uptimeCheckConfig);
}
Name | Description |
parent | String Required. The project in which to create the Uptime check. The format is: projects/[PROJECT_ID_OR_NUMBER] |
uptimeCheckConfig | UptimeCheckConfig Required. The new Uptime check configuration. |
Type | Description |
UptimeCheckConfig |
createUptimeCheckConfigCallable()
public final UnaryCallable<CreateUptimeCheckConfigRequest,UptimeCheckConfig> createUptimeCheckConfigCallable()
Creates a new Uptime check configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
CreateUptimeCheckConfigRequest request =
CreateUptimeCheckConfigRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setUptimeCheckConfig(UptimeCheckConfig.newBuilder().build())
.build();
ApiFuture<UptimeCheckConfig> future =
uptimeCheckServiceClient.createUptimeCheckConfigCallable().futureCall(request);
// Do something.
UptimeCheckConfig response = future.get();
}
Type | Description |
UnaryCallable<CreateUptimeCheckConfigRequest,UptimeCheckConfig> |
deleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest request)
public final void deleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest request)
Deletes an Uptime check configuration. Note that this method will fail if the Uptime check configuration is referenced by an alert policy or other dependent configs that would be rendered invalid by the deletion.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
DeleteUptimeCheckConfigRequest request =
DeleteUptimeCheckConfigRequest.newBuilder()
.setName(
UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
"[PROJECT]", "[UPTIME_CHECK_CONFIG]")
.toString())
.build();
uptimeCheckServiceClient.deleteUptimeCheckConfig(request);
}
Name | Description |
request | DeleteUptimeCheckConfigRequest The request object containing all of the parameters for the API call. |
deleteUptimeCheckConfig(UptimeCheckConfigName name)
public final void deleteUptimeCheckConfig(UptimeCheckConfigName name)
Deletes an Uptime check configuration. Note that this method will fail if the Uptime check configuration is referenced by an alert policy or other dependent configs that would be rendered invalid by the deletion.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
UptimeCheckConfigName name =
UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
"[PROJECT]", "[UPTIME_CHECK_CONFIG]");
uptimeCheckServiceClient.deleteUptimeCheckConfig(name);
}
Name | Description |
name | UptimeCheckConfigName Required. The Uptime check configuration to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] |
deleteUptimeCheckConfig(String name)
public final void deleteUptimeCheckConfig(String name)
Deletes an Uptime check configuration. Note that this method will fail if the Uptime check configuration is referenced by an alert policy or other dependent configs that would be rendered invalid by the deletion.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
String name =
UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]")
.toString();
uptimeCheckServiceClient.deleteUptimeCheckConfig(name);
}
Name | Description |
name | String Required. The Uptime check configuration to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] |
deleteUptimeCheckConfigCallable()
public final UnaryCallable<DeleteUptimeCheckConfigRequest,Empty> deleteUptimeCheckConfigCallable()
Deletes an Uptime check configuration. Note that this method will fail if the Uptime check configuration is referenced by an alert policy or other dependent configs that would be rendered invalid by the deletion.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
DeleteUptimeCheckConfigRequest request =
DeleteUptimeCheckConfigRequest.newBuilder()
.setName(
UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
"[PROJECT]", "[UPTIME_CHECK_CONFIG]")
.toString())
.build();
ApiFuture<Empty> future =
uptimeCheckServiceClient.deleteUptimeCheckConfigCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteUptimeCheckConfigRequest,Empty> |
getSettings()
public final UptimeCheckServiceSettings getSettings()
Type | Description |
UptimeCheckServiceSettings |
getStub()
public UptimeCheckServiceStub getStub()
Type | Description |
UptimeCheckServiceStub |
getUptimeCheckConfig(GetUptimeCheckConfigRequest request)
public final UptimeCheckConfig getUptimeCheckConfig(GetUptimeCheckConfigRequest request)
Gets a single Uptime check configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
GetUptimeCheckConfigRequest request =
GetUptimeCheckConfigRequest.newBuilder()
.setName(
UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
"[PROJECT]", "[UPTIME_CHECK_CONFIG]")
.toString())
.build();
UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(request);
}
Name | Description |
request | GetUptimeCheckConfigRequest The request object containing all of the parameters for the API call. |
Type | Description |
UptimeCheckConfig |
getUptimeCheckConfig(UptimeCheckConfigName name)
public final UptimeCheckConfig getUptimeCheckConfig(UptimeCheckConfigName name)
Gets a single Uptime check configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
UptimeCheckConfigName name =
UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
"[PROJECT]", "[UPTIME_CHECK_CONFIG]");
UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
}
Name | Description |
name | UptimeCheckConfigName Required. The Uptime check configuration to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] |
Type | Description |
UptimeCheckConfig |
getUptimeCheckConfig(String name)
public final UptimeCheckConfig getUptimeCheckConfig(String name)
Gets a single Uptime check configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
String name =
UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]")
.toString();
UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
}
Name | Description |
name | String Required. The Uptime check configuration to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] |
Type | Description |
UptimeCheckConfig |
getUptimeCheckConfigCallable()
public final UnaryCallable<GetUptimeCheckConfigRequest,UptimeCheckConfig> getUptimeCheckConfigCallable()
Gets a single Uptime check configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
GetUptimeCheckConfigRequest request =
GetUptimeCheckConfigRequest.newBuilder()
.setName(
UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
"[PROJECT]", "[UPTIME_CHECK_CONFIG]")
.toString())
.build();
ApiFuture<UptimeCheckConfig> future =
uptimeCheckServiceClient.getUptimeCheckConfigCallable().futureCall(request);
// Do something.
UptimeCheckConfig response = future.get();
}
Type | Description |
UnaryCallable<GetUptimeCheckConfigRequest,UptimeCheckConfig> |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listUptimeCheckConfigs(ResourceName parent)
public final UptimeCheckServiceClient.ListUptimeCheckConfigsPagedResponse listUptimeCheckConfigs(ResourceName parent)
Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations).
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
ResourceName parent = ResourceName.of("[FOLDER]");
for (UptimeCheckConfig element :
uptimeCheckServiceClient.listUptimeCheckConfigs(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | com.google.api.resourcenames.ResourceName Required. The project whose Uptime check configurations are listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
Type | Description |
UptimeCheckServiceClient.ListUptimeCheckConfigsPagedResponse |
listUptimeCheckConfigs(ListUptimeCheckConfigsRequest request)
public final UptimeCheckServiceClient.ListUptimeCheckConfigsPagedResponse listUptimeCheckConfigs(ListUptimeCheckConfigsRequest request)
Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations).
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
ListUptimeCheckConfigsRequest request =
ListUptimeCheckConfigsRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (UptimeCheckConfig element :
uptimeCheckServiceClient.listUptimeCheckConfigs(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListUptimeCheckConfigsRequest The request object containing all of the parameters for the API call. |
Type | Description |
UptimeCheckServiceClient.ListUptimeCheckConfigsPagedResponse |
listUptimeCheckConfigs(OrganizationName parent)
public final UptimeCheckServiceClient.ListUptimeCheckConfigsPagedResponse listUptimeCheckConfigs(OrganizationName parent)
Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations).
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
for (UptimeCheckConfig element :
uptimeCheckServiceClient.listUptimeCheckConfigs(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | OrganizationName Required. The project whose Uptime check configurations are listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
Type | Description |
UptimeCheckServiceClient.ListUptimeCheckConfigsPagedResponse |
listUptimeCheckConfigs(ProjectName parent)
public final UptimeCheckServiceClient.ListUptimeCheckConfigsPagedResponse listUptimeCheckConfigs(ProjectName parent)
Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations).
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
for (UptimeCheckConfig element :
uptimeCheckServiceClient.listUptimeCheckConfigs(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | ProjectName Required. The project whose Uptime check configurations are listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
Type | Description |
UptimeCheckServiceClient.ListUptimeCheckConfigsPagedResponse |
listUptimeCheckConfigs(String parent)
public final UptimeCheckServiceClient.ListUptimeCheckConfigsPagedResponse listUptimeCheckConfigs(String parent)
Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations).
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
String parent = ProjectName.of("[PROJECT]").toString();
for (UptimeCheckConfig element :
uptimeCheckServiceClient.listUptimeCheckConfigs(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The project whose Uptime check configurations are listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
Type | Description |
UptimeCheckServiceClient.ListUptimeCheckConfigsPagedResponse |
listUptimeCheckConfigsCallable()
public final UnaryCallable<ListUptimeCheckConfigsRequest,ListUptimeCheckConfigsResponse> listUptimeCheckConfigsCallable()
Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations).
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
ListUptimeCheckConfigsRequest request =
ListUptimeCheckConfigsRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListUptimeCheckConfigsResponse response =
uptimeCheckServiceClient.listUptimeCheckConfigsCallable().call(request);
for (UptimeCheckConfig element : response.getUptimeCheckConfigsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListUptimeCheckConfigsRequest,ListUptimeCheckConfigsResponse> |
listUptimeCheckConfigsPagedCallable()
public final UnaryCallable<ListUptimeCheckConfigsRequest,UptimeCheckServiceClient.ListUptimeCheckConfigsPagedResponse> listUptimeCheckConfigsPagedCallable()
Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations).
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
ListUptimeCheckConfigsRequest request =
ListUptimeCheckConfigsRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<UptimeCheckConfig> future =
uptimeCheckServiceClient.listUptimeCheckConfigsPagedCallable().futureCall(request);
// Do something.
for (UptimeCheckConfig element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListUptimeCheckConfigsRequest,ListUptimeCheckConfigsPagedResponse> |
listUptimeCheckIps(ListUptimeCheckIpsRequest request)
public final UptimeCheckServiceClient.ListUptimeCheckIpsPagedResponse listUptimeCheckIps(ListUptimeCheckIpsRequest request)
Returns the list of IP addresses that checkers run from
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
ListUptimeCheckIpsRequest request =
ListUptimeCheckIpsRequest.newBuilder()
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (UptimeCheckIp element :
uptimeCheckServiceClient.listUptimeCheckIps(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListUptimeCheckIpsRequest The request object containing all of the parameters for the API call. |
Type | Description |
UptimeCheckServiceClient.ListUptimeCheckIpsPagedResponse |
listUptimeCheckIpsCallable()
public final UnaryCallable<ListUptimeCheckIpsRequest,ListUptimeCheckIpsResponse> listUptimeCheckIpsCallable()
Returns the list of IP addresses that checkers run from
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
ListUptimeCheckIpsRequest request =
ListUptimeCheckIpsRequest.newBuilder()
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListUptimeCheckIpsResponse response =
uptimeCheckServiceClient.listUptimeCheckIpsCallable().call(request);
for (UptimeCheckIp element : response.getUptimeCheckIpsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListUptimeCheckIpsRequest,ListUptimeCheckIpsResponse> |
listUptimeCheckIpsPagedCallable()
public final UnaryCallable<ListUptimeCheckIpsRequest,UptimeCheckServiceClient.ListUptimeCheckIpsPagedResponse> listUptimeCheckIpsPagedCallable()
Returns the list of IP addresses that checkers run from
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
ListUptimeCheckIpsRequest request =
ListUptimeCheckIpsRequest.newBuilder()
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<UptimeCheckIp> future =
uptimeCheckServiceClient.listUptimeCheckIpsPagedCallable().futureCall(request);
// Do something.
for (UptimeCheckIp element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListUptimeCheckIpsRequest,ListUptimeCheckIpsPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateUptimeCheckConfig(UpdateUptimeCheckConfigRequest request)
public final UptimeCheckConfig updateUptimeCheckConfig(UpdateUptimeCheckConfigRequest request)
Updates an Uptime check configuration. You can either replace the entire configuration with a
new one or replace only certain fields in the current configuration by specifying the fields to
be updated via updateMask
. Returns the updated configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
UpdateUptimeCheckConfigRequest request =
UpdateUptimeCheckConfigRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setUptimeCheckConfig(UptimeCheckConfig.newBuilder().build())
.build();
UptimeCheckConfig response = uptimeCheckServiceClient.updateUptimeCheckConfig(request);
}
Name | Description |
request | UpdateUptimeCheckConfigRequest The request object containing all of the parameters for the API call. |
Type | Description |
UptimeCheckConfig |
updateUptimeCheckConfig(UptimeCheckConfig uptimeCheckConfig)
public final UptimeCheckConfig updateUptimeCheckConfig(UptimeCheckConfig uptimeCheckConfig)
Updates an Uptime check configuration. You can either replace the entire configuration with a
new one or replace only certain fields in the current configuration by specifying the fields to
be updated via updateMask
. Returns the updated configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
UptimeCheckConfig uptimeCheckConfig = UptimeCheckConfig.newBuilder().build();
UptimeCheckConfig response =
uptimeCheckServiceClient.updateUptimeCheckConfig(uptimeCheckConfig);
}
Name | Description |
uptimeCheckConfig | UptimeCheckConfig Required. If an The following fields can be updated: |
Type | Description |
UptimeCheckConfig |
updateUptimeCheckConfigCallable()
public final UnaryCallable<UpdateUptimeCheckConfigRequest,UptimeCheckConfig> updateUptimeCheckConfigCallable()
Updates an Uptime check configuration. You can either replace the entire configuration with a
new one or replace only certain fields in the current configuration by specifying the fields to
be updated via updateMask
. Returns the updated configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
UpdateUptimeCheckConfigRequest request =
UpdateUptimeCheckConfigRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setUptimeCheckConfig(UptimeCheckConfig.newBuilder().build())
.build();
ApiFuture<UptimeCheckConfig> future =
uptimeCheckServiceClient.updateUptimeCheckConfigCallable().futureCall(request);
// Do something.
UptimeCheckConfig response = future.get();
}
Type | Description |
UnaryCallable<UpdateUptimeCheckConfigRequest,UptimeCheckConfig> |