GitHub Repository | Product Reference |
Service Description: This service is used for managing the runtime project attachments.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
RuntimeProjectAttachment runtimeProjectAttachment =
RuntimeProjectAttachment.newBuilder().build();
String runtimeProjectAttachmentId = "runtimeProjectAttachmentId-753213345";
RuntimeProjectAttachment response =
runtimeProjectAttachmentServiceClient.createRuntimeProjectAttachment(
parent, runtimeProjectAttachment, runtimeProjectAttachmentId);
}
Note: close() needs to be called on the RuntimeProjectAttachmentServiceClient 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 |
---|---|---|
CreateRuntimeProjectAttachment |
Attaches a runtime project to the host project. |
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.
|
GetRuntimeProjectAttachment |
Gets a runtime project attachment. |
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.
|
ListRuntimeProjectAttachments |
List runtime projects attached to the host project. |
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.
|
DeleteRuntimeProjectAttachment |
Delete a runtime project attachment in the API Hub. This call will detach the runtime project from the host project. |
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.
|
LookupRuntimeProjectAttachment |
Look up a runtime project attachment. This API can be called in the context of any project. |
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 RuntimeProjectAttachmentServiceSettings 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
RuntimeProjectAttachmentServiceSettings runtimeProjectAttachmentServiceSettings =
RuntimeProjectAttachmentServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create(runtimeProjectAttachmentServiceSettings);
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
RuntimeProjectAttachmentServiceSettings runtimeProjectAttachmentServiceSettings =
RuntimeProjectAttachmentServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create(runtimeProjectAttachmentServiceSettings);
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
RuntimeProjectAttachmentServiceSettings runtimeProjectAttachmentServiceSettings =
RuntimeProjectAttachmentServiceSettings.newHttpJsonBuilder().build();
RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create(runtimeProjectAttachmentServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final RuntimeProjectAttachmentServiceClient create()
Constructs an instance of RuntimeProjectAttachmentServiceClient with default settings.
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachmentServiceClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(RuntimeProjectAttachmentServiceSettings settings)
public static final RuntimeProjectAttachmentServiceClient create(RuntimeProjectAttachmentServiceSettings settings)
Constructs an instance of RuntimeProjectAttachmentServiceClient, 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 |
RuntimeProjectAttachmentServiceSettings |
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachmentServiceClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(RuntimeProjectAttachmentServiceStub stub)
public static final RuntimeProjectAttachmentServiceClient create(RuntimeProjectAttachmentServiceStub stub)
Constructs an instance of RuntimeProjectAttachmentServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(RuntimeProjectAttachmentServiceSettings).
Parameter | |
---|---|
Name | Description |
stub |
RuntimeProjectAttachmentServiceStub |
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachmentServiceClient |
Constructors
RuntimeProjectAttachmentServiceClient(RuntimeProjectAttachmentServiceSettings settings)
protected RuntimeProjectAttachmentServiceClient(RuntimeProjectAttachmentServiceSettings settings)
Constructs an instance of RuntimeProjectAttachmentServiceClient, 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 |
RuntimeProjectAttachmentServiceSettings |
RuntimeProjectAttachmentServiceClient(RuntimeProjectAttachmentServiceStub stub)
protected RuntimeProjectAttachmentServiceClient(RuntimeProjectAttachmentServiceStub stub)
Parameter | |
---|---|
Name | Description |
stub |
RuntimeProjectAttachmentServiceStub |
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()
createRuntimeProjectAttachment(CreateRuntimeProjectAttachmentRequest request)
public final RuntimeProjectAttachment createRuntimeProjectAttachment(CreateRuntimeProjectAttachmentRequest request)
Attaches a runtime project to the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
CreateRuntimeProjectAttachmentRequest request =
CreateRuntimeProjectAttachmentRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setRuntimeProjectAttachmentId("runtimeProjectAttachmentId-753213345")
.setRuntimeProjectAttachment(RuntimeProjectAttachment.newBuilder().build())
.build();
RuntimeProjectAttachment response =
runtimeProjectAttachmentServiceClient.createRuntimeProjectAttachment(request);
}
Parameter | |
---|---|
Name | Description |
request |
CreateRuntimeProjectAttachmentRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachment |
createRuntimeProjectAttachment(LocationName parent, RuntimeProjectAttachment runtimeProjectAttachment, String runtimeProjectAttachmentId)
public final RuntimeProjectAttachment createRuntimeProjectAttachment(LocationName parent, RuntimeProjectAttachment runtimeProjectAttachment, String runtimeProjectAttachmentId)
Attaches a runtime project to the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
RuntimeProjectAttachment runtimeProjectAttachment =
RuntimeProjectAttachment.newBuilder().build();
String runtimeProjectAttachmentId = "runtimeProjectAttachmentId-753213345";
RuntimeProjectAttachment response =
runtimeProjectAttachmentServiceClient.createRuntimeProjectAttachment(
parent, runtimeProjectAttachment, runtimeProjectAttachmentId);
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource for the Runtime Project Attachment. Format:
|
runtimeProjectAttachment |
RuntimeProjectAttachment Required. The Runtime Project Attachment to create. |
runtimeProjectAttachmentId |
String Required. The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field. |
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachment |
createRuntimeProjectAttachment(String parent, RuntimeProjectAttachment runtimeProjectAttachment, String runtimeProjectAttachmentId)
public final RuntimeProjectAttachment createRuntimeProjectAttachment(String parent, RuntimeProjectAttachment runtimeProjectAttachment, String runtimeProjectAttachmentId)
Attaches a runtime project to the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
RuntimeProjectAttachment runtimeProjectAttachment =
RuntimeProjectAttachment.newBuilder().build();
String runtimeProjectAttachmentId = "runtimeProjectAttachmentId-753213345";
RuntimeProjectAttachment response =
runtimeProjectAttachmentServiceClient.createRuntimeProjectAttachment(
parent, runtimeProjectAttachment, runtimeProjectAttachmentId);
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent resource for the Runtime Project Attachment. Format:
|
runtimeProjectAttachment |
RuntimeProjectAttachment Required. The Runtime Project Attachment to create. |
runtimeProjectAttachmentId |
String Required. The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field. |
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachment |
createRuntimeProjectAttachmentCallable()
public final UnaryCallable<CreateRuntimeProjectAttachmentRequest,RuntimeProjectAttachment> createRuntimeProjectAttachmentCallable()
Attaches a runtime project to the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
CreateRuntimeProjectAttachmentRequest request =
CreateRuntimeProjectAttachmentRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setRuntimeProjectAttachmentId("runtimeProjectAttachmentId-753213345")
.setRuntimeProjectAttachment(RuntimeProjectAttachment.newBuilder().build())
.build();
ApiFuture<RuntimeProjectAttachment> future =
runtimeProjectAttachmentServiceClient
.createRuntimeProjectAttachmentCallable()
.futureCall(request);
// Do something.
RuntimeProjectAttachment response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateRuntimeProjectAttachmentRequest,RuntimeProjectAttachment> |
deleteRuntimeProjectAttachment(DeleteRuntimeProjectAttachmentRequest request)
public final void deleteRuntimeProjectAttachment(DeleteRuntimeProjectAttachmentRequest request)
Delete a runtime project attachment in the API Hub. This call will detach the runtime project from the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
DeleteRuntimeProjectAttachmentRequest request =
DeleteRuntimeProjectAttachmentRequest.newBuilder()
.setName(
RuntimeProjectAttachmentName.of(
"[PROJECT]", "[LOCATION]", "[RUNTIME_PROJECT_ATTACHMENT]")
.toString())
.build();
runtimeProjectAttachmentServiceClient.deleteRuntimeProjectAttachment(request);
}
Parameter | |
---|---|
Name | Description |
request |
DeleteRuntimeProjectAttachmentRequest The request object containing all of the parameters for the API call. |
deleteRuntimeProjectAttachment(RuntimeProjectAttachmentName name)
public final void deleteRuntimeProjectAttachment(RuntimeProjectAttachmentName name)
Delete a runtime project attachment in the API Hub. This call will detach the runtime project from the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
RuntimeProjectAttachmentName name =
RuntimeProjectAttachmentName.of(
"[PROJECT]", "[LOCATION]", "[RUNTIME_PROJECT_ATTACHMENT]");
runtimeProjectAttachmentServiceClient.deleteRuntimeProjectAttachment(name);
}
Parameter | |
---|---|
Name | Description |
name |
RuntimeProjectAttachmentName Required. The name of the Runtime Project Attachment to delete. Format:
|
deleteRuntimeProjectAttachment(String name)
public final void deleteRuntimeProjectAttachment(String name)
Delete a runtime project attachment in the API Hub. This call will detach the runtime project from the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
String name =
RuntimeProjectAttachmentName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_PROJECT_ATTACHMENT]")
.toString();
runtimeProjectAttachmentServiceClient.deleteRuntimeProjectAttachment(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The name of the Runtime Project Attachment to delete. Format:
|
deleteRuntimeProjectAttachmentCallable()
public final UnaryCallable<DeleteRuntimeProjectAttachmentRequest,Empty> deleteRuntimeProjectAttachmentCallable()
Delete a runtime project attachment in the API Hub. This call will detach the runtime project from the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
DeleteRuntimeProjectAttachmentRequest request =
DeleteRuntimeProjectAttachmentRequest.newBuilder()
.setName(
RuntimeProjectAttachmentName.of(
"[PROJECT]", "[LOCATION]", "[RUNTIME_PROJECT_ATTACHMENT]")
.toString())
.build();
ApiFuture<Empty> future =
runtimeProjectAttachmentServiceClient
.deleteRuntimeProjectAttachmentCallable()
.futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteRuntimeProjectAttachmentRequest,Empty> |
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = runtimeProjectAttachmentServiceClient.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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
runtimeProjectAttachmentServiceClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getRuntimeProjectAttachment(GetRuntimeProjectAttachmentRequest request)
public final RuntimeProjectAttachment getRuntimeProjectAttachment(GetRuntimeProjectAttachmentRequest request)
Gets a runtime project attachment.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
GetRuntimeProjectAttachmentRequest request =
GetRuntimeProjectAttachmentRequest.newBuilder()
.setName(
RuntimeProjectAttachmentName.of(
"[PROJECT]", "[LOCATION]", "[RUNTIME_PROJECT_ATTACHMENT]")
.toString())
.build();
RuntimeProjectAttachment response =
runtimeProjectAttachmentServiceClient.getRuntimeProjectAttachment(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetRuntimeProjectAttachmentRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachment |
getRuntimeProjectAttachment(RuntimeProjectAttachmentName name)
public final RuntimeProjectAttachment getRuntimeProjectAttachment(RuntimeProjectAttachmentName name)
Gets a runtime project attachment.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
RuntimeProjectAttachmentName name =
RuntimeProjectAttachmentName.of(
"[PROJECT]", "[LOCATION]", "[RUNTIME_PROJECT_ATTACHMENT]");
RuntimeProjectAttachment response =
runtimeProjectAttachmentServiceClient.getRuntimeProjectAttachment(name);
}
Parameter | |
---|---|
Name | Description |
name |
RuntimeProjectAttachmentName Required. The name of the API resource to retrieve. Format:
|
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachment |
getRuntimeProjectAttachment(String name)
public final RuntimeProjectAttachment getRuntimeProjectAttachment(String name)
Gets a runtime project attachment.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
String name =
RuntimeProjectAttachmentName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_PROJECT_ATTACHMENT]")
.toString();
RuntimeProjectAttachment response =
runtimeProjectAttachmentServiceClient.getRuntimeProjectAttachment(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The name of the API resource to retrieve. Format:
|
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachment |
getRuntimeProjectAttachmentCallable()
public final UnaryCallable<GetRuntimeProjectAttachmentRequest,RuntimeProjectAttachment> getRuntimeProjectAttachmentCallable()
Gets a runtime project attachment.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
GetRuntimeProjectAttachmentRequest request =
GetRuntimeProjectAttachmentRequest.newBuilder()
.setName(
RuntimeProjectAttachmentName.of(
"[PROJECT]", "[LOCATION]", "[RUNTIME_PROJECT_ATTACHMENT]")
.toString())
.build();
ApiFuture<RuntimeProjectAttachment> future =
runtimeProjectAttachmentServiceClient
.getRuntimeProjectAttachmentCallable()
.futureCall(request);
// Do something.
RuntimeProjectAttachment response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetRuntimeProjectAttachmentRequest,RuntimeProjectAttachment> |
getSettings()
public final RuntimeProjectAttachmentServiceSettings getSettings()
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachmentServiceSettings |
getStub()
public RuntimeProjectAttachmentServiceStub getStub()
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachmentServiceStub |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
listLocations(ListLocationsRequest request)
public final RuntimeProjectAttachmentServiceClient.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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element :
runtimeProjectAttachmentServiceClient.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 |
RuntimeProjectAttachmentServiceClient.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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
runtimeProjectAttachmentServiceClient.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,RuntimeProjectAttachmentServiceClient.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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
runtimeProjectAttachmentServiceClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
listRuntimeProjectAttachments(ListRuntimeProjectAttachmentsRequest request)
public final RuntimeProjectAttachmentServiceClient.ListRuntimeProjectAttachmentsPagedResponse listRuntimeProjectAttachments(ListRuntimeProjectAttachmentsRequest request)
List runtime projects attached to the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
ListRuntimeProjectAttachmentsRequest request =
ListRuntimeProjectAttachmentsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (RuntimeProjectAttachment element :
runtimeProjectAttachmentServiceClient
.listRuntimeProjectAttachments(request)
.iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListRuntimeProjectAttachmentsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachmentServiceClient.ListRuntimeProjectAttachmentsPagedResponse |
listRuntimeProjectAttachments(LocationName parent)
public final RuntimeProjectAttachmentServiceClient.ListRuntimeProjectAttachmentsPagedResponse listRuntimeProjectAttachments(LocationName parent)
List runtime projects attached to the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (RuntimeProjectAttachment element :
runtimeProjectAttachmentServiceClient
.listRuntimeProjectAttachments(parent)
.iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
LocationName Required. The parent, which owns this collection of runtime project attachments.
Format: |
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachmentServiceClient.ListRuntimeProjectAttachmentsPagedResponse |
listRuntimeProjectAttachments(String parent)
public final RuntimeProjectAttachmentServiceClient.ListRuntimeProjectAttachmentsPagedResponse listRuntimeProjectAttachments(String parent)
List runtime projects attached to the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (RuntimeProjectAttachment element :
runtimeProjectAttachmentServiceClient
.listRuntimeProjectAttachments(parent)
.iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. The parent, which owns this collection of runtime project attachments.
Format: |
Returns | |
---|---|
Type | Description |
RuntimeProjectAttachmentServiceClient.ListRuntimeProjectAttachmentsPagedResponse |
listRuntimeProjectAttachmentsCallable()
public final UnaryCallable<ListRuntimeProjectAttachmentsRequest,ListRuntimeProjectAttachmentsResponse> listRuntimeProjectAttachmentsCallable()
List runtime projects attached to the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
ListRuntimeProjectAttachmentsRequest request =
ListRuntimeProjectAttachmentsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListRuntimeProjectAttachmentsResponse response =
runtimeProjectAttachmentServiceClient
.listRuntimeProjectAttachmentsCallable()
.call(request);
for (RuntimeProjectAttachment element : response.getRuntimeProjectAttachmentsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListRuntimeProjectAttachmentsRequest,ListRuntimeProjectAttachmentsResponse> |
listRuntimeProjectAttachmentsPagedCallable()
public final UnaryCallable<ListRuntimeProjectAttachmentsRequest,RuntimeProjectAttachmentServiceClient.ListRuntimeProjectAttachmentsPagedResponse> listRuntimeProjectAttachmentsPagedCallable()
List runtime projects attached to the host project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
ListRuntimeProjectAttachmentsRequest request =
ListRuntimeProjectAttachmentsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<RuntimeProjectAttachment> future =
runtimeProjectAttachmentServiceClient
.listRuntimeProjectAttachmentsPagedCallable()
.futureCall(request);
// Do something.
for (RuntimeProjectAttachment element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListRuntimeProjectAttachmentsRequest,ListRuntimeProjectAttachmentsPagedResponse> |
lookupRuntimeProjectAttachment(LocationName name)
public final LookupRuntimeProjectAttachmentResponse lookupRuntimeProjectAttachment(LocationName name)
Look up a runtime project attachment. This API can be called in the context of any project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
LocationName name = LocationName.of("[PROJECT]", "[LOCATION]");
LookupRuntimeProjectAttachmentResponse response =
runtimeProjectAttachmentServiceClient.lookupRuntimeProjectAttachment(name);
}
Parameter | |
---|---|
Name | Description |
name |
LocationName Required. Runtime project ID to look up runtime project attachment for. Lookup
happens across all regions. Expected format: |
Returns | |
---|---|
Type | Description |
LookupRuntimeProjectAttachmentResponse |
lookupRuntimeProjectAttachment(LookupRuntimeProjectAttachmentRequest request)
public final LookupRuntimeProjectAttachmentResponse lookupRuntimeProjectAttachment(LookupRuntimeProjectAttachmentRequest request)
Look up a runtime project attachment. This API can be called in the context of any project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
LookupRuntimeProjectAttachmentRequest request =
LookupRuntimeProjectAttachmentRequest.newBuilder()
.setName(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.build();
LookupRuntimeProjectAttachmentResponse response =
runtimeProjectAttachmentServiceClient.lookupRuntimeProjectAttachment(request);
}
Parameter | |
---|---|
Name | Description |
request |
LookupRuntimeProjectAttachmentRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
LookupRuntimeProjectAttachmentResponse |
lookupRuntimeProjectAttachment(String name)
public final LookupRuntimeProjectAttachmentResponse lookupRuntimeProjectAttachment(String name)
Look up a runtime project attachment. This API can be called in the context of any project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
String name = LocationName.of("[PROJECT]", "[LOCATION]").toString();
LookupRuntimeProjectAttachmentResponse response =
runtimeProjectAttachmentServiceClient.lookupRuntimeProjectAttachment(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Runtime project ID to look up runtime project attachment for. Lookup
happens across all regions. Expected format: |
Returns | |
---|---|
Type | Description |
LookupRuntimeProjectAttachmentResponse |
lookupRuntimeProjectAttachmentCallable()
public final UnaryCallable<LookupRuntimeProjectAttachmentRequest,LookupRuntimeProjectAttachmentResponse> lookupRuntimeProjectAttachmentCallable()
Look up a runtime project attachment. This API can be called in the context of any project.
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 (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
LookupRuntimeProjectAttachmentRequest request =
LookupRuntimeProjectAttachmentRequest.newBuilder()
.setName(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.build();
ApiFuture<LookupRuntimeProjectAttachmentResponse> future =
runtimeProjectAttachmentServiceClient
.lookupRuntimeProjectAttachmentCallable()
.futureCall(request);
// Do something.
LookupRuntimeProjectAttachmentResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<LookupRuntimeProjectAttachmentRequest,LookupRuntimeProjectAttachmentResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()