Class RuntimeProjectAttachmentServiceClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of RuntimeProjectAttachmentServiceClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final RuntimeProjectAttachmentServiceClientcreate()Constructs an instance of RuntimeProjectAttachmentServiceClient with default settings.static final RuntimeProjectAttachmentServiceClientConstructs an instance of RuntimeProjectAttachmentServiceClient, using the given settings.static final RuntimeProjectAttachmentServiceClientConstructs an instance of RuntimeProjectAttachmentServiceClient, using the given stub for making calls.final RuntimeProjectAttachmentAttaches a runtime project to the host project.final RuntimeProjectAttachmentcreateRuntimeProjectAttachment(LocationName parent, RuntimeProjectAttachment runtimeProjectAttachment, String runtimeProjectAttachmentId) Attaches a runtime project to the host project.final RuntimeProjectAttachmentcreateRuntimeProjectAttachment(String parent, RuntimeProjectAttachment runtimeProjectAttachment, String runtimeProjectAttachmentId) Attaches a runtime project to the host project.Attaches a runtime project to the host project.final voidDelete a runtime project attachment in the API Hub.final voidDelete a runtime project attachment in the API Hub.final voidDelete a runtime project attachment in the API Hub.final UnaryCallable<DeleteRuntimeProjectAttachmentRequest,com.google.protobuf.Empty> Delete a runtime project attachment in the API Hub.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final RuntimeProjectAttachmentGets a runtime project attachment.final RuntimeProjectAttachmentGets a runtime project attachment.final RuntimeProjectAttachmentGets a runtime project attachment.Gets a runtime project attachment.getStub()booleanbooleanlistLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.final UnaryCallable<ListLocationsRequest,RuntimeProjectAttachmentServiceClient.ListLocationsPagedResponse> Lists information about the supported locations for this service.List runtime projects attached to the host project.List runtime projects attached to the host project.listRuntimeProjectAttachments(String parent) List runtime projects attached to the host project.List runtime projects attached to the host project.final UnaryCallable<ListRuntimeProjectAttachmentsRequest,RuntimeProjectAttachmentServiceClient.ListRuntimeProjectAttachmentsPagedResponse> List runtime projects attached to the host project.Look up a runtime project attachment.Look up a runtime project attachment.Look up a runtime project attachment.Look up a runtime project attachment.voidshutdown()void
-
Constructor Details
-
RuntimeProjectAttachmentServiceClient
protected RuntimeProjectAttachmentServiceClient(RuntimeProjectAttachmentServiceSettings settings) throws IOException 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.- Throws:
IOException
-
RuntimeProjectAttachmentServiceClient
-
-
Method Details
-
create
Constructs an instance of RuntimeProjectAttachmentServiceClient with default settings.- Throws:
IOException
-
create
public static final RuntimeProjectAttachmentServiceClient create(RuntimeProjectAttachmentServiceSettings settings) throws IOException 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.- Throws:
IOException
-
create
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). -
getSettings
-
getStub
-
createRuntimeProjectAttachment
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:
parent- Required. The parent resource for the Runtime Project Attachment. Format: `projects/{project}/locations/{location}`runtimeProjectAttachment- Required. The Runtime Project Attachment to create.runtimeProjectAttachmentId- 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.- Throws:
ApiException- if the remote call fails
-
createRuntimeProjectAttachment
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:
parent- Required. The parent resource for the Runtime Project Attachment. Format: `projects/{project}/locations/{location}`runtimeProjectAttachment- Required. The Runtime Project Attachment to create.runtimeProjectAttachmentId- 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.- Throws:
ApiException- if the remote call fails
-
createRuntimeProjectAttachment
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
getRuntimeProjectAttachment
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); }- Parameters:
name- Required. The name of the API resource to retrieve. Format: `projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}`- Throws:
ApiException- if the remote call fails
-
getRuntimeProjectAttachment
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); }- Parameters:
name- Required. The name of the API resource to retrieve. Format: `projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}`- Throws:
ApiException- if the remote call fails
-
getRuntimeProjectAttachment
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
listRuntimeProjectAttachments
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); } }- Parameters:
parent- Required. The parent, which owns this collection of runtime project attachments. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listRuntimeProjectAttachments
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); } }- Parameters:
parent- Required. The parent, which owns this collection of runtime project attachments. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listRuntimeProjectAttachments
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
deleteRuntimeProjectAttachment
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); }- Parameters:
name- Required. The name of the Runtime Project Attachment to delete. Format: `projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}`- Throws:
ApiException- if the remote call fails
-
deleteRuntimeProjectAttachment
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); }- Parameters:
name- Required. The name of the Runtime Project Attachment to delete. Format: `projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}`- Throws:
ApiException- if the remote call fails
-
deleteRuntimeProjectAttachment
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteRuntimeProjectAttachmentCallable
public final UnaryCallable<DeleteRuntimeProjectAttachmentRequest,com.google.protobuf.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(); } -
lookupRuntimeProjectAttachment
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); }- Parameters:
name- Required. Runtime project ID to look up runtime project attachment for. Lookup happens across all regions. Expected format: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
lookupRuntimeProjectAttachment
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); }- Parameters:
name- Required. Runtime project ID to look up runtime project attachment for. Lookup happens across all regions. Expected format: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
lookupRuntimeProjectAttachment
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
listLocations
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getLocation
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-