Class MirroringClient
- 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 (MirroringClient mirroringClient = MirroringClient.create()) {
MirroringEndpointGroupName name =
MirroringEndpointGroupName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP]");
MirroringEndpointGroup response = mirroringClient.getMirroringEndpointGroup(name);
}
Note: close() needs to be called on the MirroringClient 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 |
|---|---|---|
ListMirroringEndpointGroups |
Lists endpoint groups in a given project and location. See https://google.aip.dev/132. |
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.
|
GetMirroringEndpointGroup |
Gets a specific endpoint group. See https://google.aip.dev/131. |
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.
|
CreateMirroringEndpointGroup |
Creates an endpoint group in a given project and location. See https://google.aip.dev/133. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateMirroringEndpointGroup |
Updates an endpoint group. See https://google.aip.dev/134. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMirroringEndpointGroup |
Deletes an endpoint group. See https://google.aip.dev/135. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMirroringEndpointGroupAssociations |
Lists associations in a given project and location. See https://google.aip.dev/132. |
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.
|
GetMirroringEndpointGroupAssociation |
Gets a specific association. See https://google.aip.dev/131. |
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.
|
CreateMirroringEndpointGroupAssociation |
Creates an association in a given project and location. See https://google.aip.dev/133. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateMirroringEndpointGroupAssociation |
Updates an association. See https://google.aip.dev/134. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMirroringEndpointGroupAssociation |
Deletes an association. See https://google.aip.dev/135. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMirroringDeploymentGroups |
Lists deployment groups in a given project and location. See https://google.aip.dev/132. |
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.
|
GetMirroringDeploymentGroup |
Gets a specific deployment group. See https://google.aip.dev/131. |
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.
|
CreateMirroringDeploymentGroup |
Creates a deployment group in a given project and location. See https://google.aip.dev/133. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateMirroringDeploymentGroup |
Updates a deployment group. See https://google.aip.dev/134. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMirroringDeploymentGroup |
Deletes a deployment group. See https://google.aip.dev/135. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMirroringDeployments |
Lists deployments in a given project and location. See https://google.aip.dev/132. |
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.
|
GetMirroringDeployment |
Gets a specific deployment. See https://google.aip.dev/131. |
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.
|
CreateMirroringDeployment |
Creates a deployment in a given project and location. See https://google.aip.dev/133. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateMirroringDeployment |
Updates a deployment. See https://google.aip.dev/134. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMirroringDeployment |
Deletes a deployment. See https://google.aip.dev/135. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
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. This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field: * **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version. |
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.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
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.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
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.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
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 MirroringSettings 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
MirroringSettings mirroringSettings =
MirroringSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
MirroringClient mirroringClient = MirroringClient.create(mirroringSettings);
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
MirroringSettings mirroringSettings =
MirroringSettings.newBuilder().setEndpoint(myEndpoint).build();
MirroringClient mirroringClient = MirroringClient.create(mirroringSettings);
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 classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMirroringClient(MirroringSettings settings) Constructs an instance of MirroringClient, using the given settings.protectedMirroringClient(MirroringStub stub) -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final MirroringClientcreate()Constructs an instance of MirroringClient with default settings.static final MirroringClientcreate(MirroringSettings settings) Constructs an instance of MirroringClient, using the given settings.static final MirroringClientcreate(MirroringStub stub) Constructs an instance of MirroringClient, using the given stub for making calls.Creates a deployment in a given project and location.createMirroringDeploymentAsync(LocationName parent, MirroringDeployment mirroringDeployment, String mirroringDeploymentId) Creates a deployment in a given project and location.createMirroringDeploymentAsync(String parent, MirroringDeployment mirroringDeployment, String mirroringDeploymentId) Creates a deployment in a given project and location.Creates a deployment in a given project and location.Creates a deployment group in a given project and location.createMirroringDeploymentGroupAsync(LocationName parent, MirroringDeploymentGroup mirroringDeploymentGroup, String mirroringDeploymentGroupId) Creates a deployment group in a given project and location.createMirroringDeploymentGroupAsync(String parent, MirroringDeploymentGroup mirroringDeploymentGroup, String mirroringDeploymentGroupId) Creates a deployment group in a given project and location.Creates a deployment group in a given project and location.final OperationCallable<CreateMirroringDeploymentGroupRequest,MirroringDeploymentGroup, OperationMetadata> Creates a deployment group in a given project and location.Creates a deployment in a given project and location.createMirroringEndpointGroupAssociationAsync(CreateMirroringEndpointGroupAssociationRequest request) Creates an association in a given project and location.createMirroringEndpointGroupAssociationAsync(LocationName parent, MirroringEndpointGroupAssociation mirroringEndpointGroupAssociation, String mirroringEndpointGroupAssociationId) Creates an association in a given project and location.createMirroringEndpointGroupAssociationAsync(String parent, MirroringEndpointGroupAssociation mirroringEndpointGroupAssociation, String mirroringEndpointGroupAssociationId) Creates an association in a given project and location.Creates an association in a given project and location.final OperationCallable<CreateMirroringEndpointGroupAssociationRequest,MirroringEndpointGroupAssociation, OperationMetadata> Creates an association in a given project and location.Creates an endpoint group in a given project and location.createMirroringEndpointGroupAsync(LocationName parent, MirroringEndpointGroup mirroringEndpointGroup, String mirroringEndpointGroupId) Creates an endpoint group in a given project and location.createMirroringEndpointGroupAsync(String parent, MirroringEndpointGroup mirroringEndpointGroup, String mirroringEndpointGroupId) Creates an endpoint group in a given project and location.Creates an endpoint group in a given project and location.final OperationCallable<CreateMirroringEndpointGroupRequest,MirroringEndpointGroup, OperationMetadata> Creates an endpoint group in a given project and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a deployment.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a deployment.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a deployment.Deletes a deployment.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a deployment group.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a deployment group.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a deployment group.Deletes a deployment group.final OperationCallable<DeleteMirroringDeploymentGroupRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a deployment group.final OperationCallable<DeleteMirroringDeploymentRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a deployment.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringEndpointGroupAssociationAsync(DeleteMirroringEndpointGroupAssociationRequest request) Deletes an association.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an association.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an association.Deletes an association.final OperationCallable<DeleteMirroringEndpointGroupAssociationRequest,com.google.protobuf.Empty, OperationMetadata> Deletes an association.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an endpoint group.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an endpoint group.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an endpoint group.Deletes an endpoint group.final OperationCallable<DeleteMirroringEndpointGroupRequest,com.google.protobuf.Empty, OperationMetadata> Deletes an endpoint group.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final MirroringDeploymentGets a specific deployment.final MirroringDeploymentGets a specific deployment.final MirroringDeploymentgetMirroringDeployment(String name) Gets a specific deployment.Gets a specific deployment.final MirroringDeploymentGroupGets a specific deployment group.final MirroringDeploymentGroupGets a specific deployment group.final MirroringDeploymentGroupGets a specific deployment group.Gets a specific deployment group.final MirroringEndpointGroupGets a specific endpoint group.final MirroringEndpointGroupGets a specific endpoint group.final MirroringEndpointGroupGets a specific endpoint group.Gets a specific association.Gets a specific association.Gets a specific association.Gets a specific association.Gets a specific endpoint group.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final MirroringSettingsgetStub()booleanbooleanlistLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists deployment groups in a given project and location.Lists deployment groups in a given project and location.listMirroringDeploymentGroups(String parent) Lists deployment groups in a given project and location.Lists deployment groups in a given project and location.final UnaryCallable<ListMirroringDeploymentGroupsRequest,MirroringClient.ListMirroringDeploymentGroupsPagedResponse> Lists deployment groups in a given project and location.Lists deployments in a given project and location.listMirroringDeployments(LocationName parent) Lists deployments in a given project and location.listMirroringDeployments(String parent) Lists deployments in a given project and location.Lists deployments in a given project and location.final UnaryCallable<ListMirroringDeploymentsRequest,MirroringClient.ListMirroringDeploymentsPagedResponse> Lists deployments in a given project and location.Lists associations in a given project and location.Lists associations in a given project and location.Lists associations in a given project and location.final UnaryCallable<ListMirroringEndpointGroupAssociationsRequest,ListMirroringEndpointGroupAssociationsResponse> Lists associations in a given project and location.final UnaryCallable<ListMirroringEndpointGroupAssociationsRequest,MirroringClient.ListMirroringEndpointGroupAssociationsPagedResponse> Lists associations in a given project and location.Lists endpoint groups in a given project and location.Lists endpoint groups in a given project and location.listMirroringEndpointGroups(String parent) Lists endpoint groups in a given project and location.Lists endpoint groups in a given project and location.final UnaryCallable<ListMirroringEndpointGroupsRequest,MirroringClient.ListMirroringEndpointGroupsPagedResponse> Lists endpoint groups in a given project and location.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.updateMirroringDeploymentAsync(MirroringDeployment mirroringDeployment, com.google.protobuf.FieldMask updateMask) Updates a deployment.Updates a deployment.Updates a deployment.updateMirroringDeploymentGroupAsync(MirroringDeploymentGroup mirroringDeploymentGroup, com.google.protobuf.FieldMask updateMask) Updates a deployment group.Updates a deployment group.Updates a deployment group.final OperationCallable<UpdateMirroringDeploymentGroupRequest,MirroringDeploymentGroup, OperationMetadata> Updates a deployment group.Updates a deployment.updateMirroringEndpointGroupAssociationAsync(MirroringEndpointGroupAssociation mirroringEndpointGroupAssociation, com.google.protobuf.FieldMask updateMask) Updates an association.updateMirroringEndpointGroupAssociationAsync(UpdateMirroringEndpointGroupAssociationRequest request) Updates an association.Updates an association.final OperationCallable<UpdateMirroringEndpointGroupAssociationRequest,MirroringEndpointGroupAssociation, OperationMetadata> Updates an association.updateMirroringEndpointGroupAsync(MirroringEndpointGroup mirroringEndpointGroup, com.google.protobuf.FieldMask updateMask) Updates an endpoint group.Updates an endpoint group.Updates an endpoint group.final OperationCallable<UpdateMirroringEndpointGroupRequest,MirroringEndpointGroup, OperationMetadata> Updates an endpoint group.
-
Constructor Details
-
MirroringClient
Constructs an instance of MirroringClient, 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
-
MirroringClient
-
-
Method Details
-
create
Constructs an instance of MirroringClient with default settings.- Throws:
IOException
-
create
Constructs an instance of MirroringClient, 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
Constructs an instance of MirroringClient, using the given stub for making calls. This is for advanced usage - prefer using create(MirroringSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listMirroringEndpointGroups
public final MirroringClient.ListMirroringEndpointGroupsPagedResponse listMirroringEndpointGroups(LocationName parent) Lists endpoint groups in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (MirroringEndpointGroup element : mirroringClient.listMirroringEndpointGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns this collection of endpoint groups. Example: `projects/123456789/locations/global`. See https://google.aip.dev/132 for more details.- Throws:
ApiException- if the remote call fails
-
listMirroringEndpointGroups
public final MirroringClient.ListMirroringEndpointGroupsPagedResponse listMirroringEndpointGroups(String parent) Lists endpoint groups in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (MirroringEndpointGroup element : mirroringClient.listMirroringEndpointGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns this collection of endpoint groups. Example: `projects/123456789/locations/global`. See https://google.aip.dev/132 for more details.- Throws:
ApiException- if the remote call fails
-
listMirroringEndpointGroups
public final MirroringClient.ListMirroringEndpointGroupsPagedResponse listMirroringEndpointGroups(ListMirroringEndpointGroupsRequest request) Lists endpoint groups in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { ListMirroringEndpointGroupsRequest request = ListMirroringEndpointGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (MirroringEndpointGroup element : mirroringClient.listMirroringEndpointGroups(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
-
listMirroringEndpointGroupsPagedCallable
public final UnaryCallable<ListMirroringEndpointGroupsRequest,MirroringClient.ListMirroringEndpointGroupsPagedResponse> listMirroringEndpointGroupsPagedCallable()Lists endpoint groups in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { ListMirroringEndpointGroupsRequest request = ListMirroringEndpointGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<MirroringEndpointGroup> future = mirroringClient.listMirroringEndpointGroupsPagedCallable().futureCall(request); // Do something. for (MirroringEndpointGroup element : future.get().iterateAll()) { // doThingsWith(element); } } -
listMirroringEndpointGroupsCallable
public final UnaryCallable<ListMirroringEndpointGroupsRequest,ListMirroringEndpointGroupsResponse> listMirroringEndpointGroupsCallable()Lists endpoint groups in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { ListMirroringEndpointGroupsRequest request = ListMirroringEndpointGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListMirroringEndpointGroupsResponse response = mirroringClient.listMirroringEndpointGroupsCallable().call(request); for (MirroringEndpointGroup element : response.getMirroringEndpointGroupsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getMirroringEndpointGroup
Gets a specific endpoint group. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { MirroringEndpointGroupName name = MirroringEndpointGroupName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP]"); MirroringEndpointGroup response = mirroringClient.getMirroringEndpointGroup(name); }- Parameters:
name- Required. The name of the endpoint group to retrieve. Format: projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group}- Throws:
ApiException- if the remote call fails
-
getMirroringEndpointGroup
Gets a specific endpoint group. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { String name = MirroringEndpointGroupName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP]") .toString(); MirroringEndpointGroup response = mirroringClient.getMirroringEndpointGroup(name); }- Parameters:
name- Required. The name of the endpoint group to retrieve. Format: projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group}- Throws:
ApiException- if the remote call fails
-
getMirroringEndpointGroup
public final MirroringEndpointGroup getMirroringEndpointGroup(GetMirroringEndpointGroupRequest request) Gets a specific endpoint group. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { GetMirroringEndpointGroupRequest request = GetMirroringEndpointGroupRequest.newBuilder() .setName( MirroringEndpointGroupName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP]") .toString()) .build(); MirroringEndpointGroup response = mirroringClient.getMirroringEndpointGroup(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getMirroringEndpointGroupCallable
public final UnaryCallable<GetMirroringEndpointGroupRequest,MirroringEndpointGroup> getMirroringEndpointGroupCallable()Gets a specific endpoint group. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { GetMirroringEndpointGroupRequest request = GetMirroringEndpointGroupRequest.newBuilder() .setName( MirroringEndpointGroupName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP]") .toString()) .build(); ApiFuture<MirroringEndpointGroup> future = mirroringClient.getMirroringEndpointGroupCallable().futureCall(request); // Do something. MirroringEndpointGroup response = future.get(); } -
createMirroringEndpointGroupAsync
public final OperationFuture<MirroringEndpointGroup,OperationMetadata> createMirroringEndpointGroupAsync(LocationName parent, MirroringEndpointGroup mirroringEndpointGroup, String mirroringEndpointGroupId) Creates an endpoint group in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); MirroringEndpointGroup mirroringEndpointGroup = MirroringEndpointGroup.newBuilder().build(); String mirroringEndpointGroupId = "mirroringEndpointGroupId436276834"; MirroringEndpointGroup response = mirroringClient .createMirroringEndpointGroupAsync( parent, mirroringEndpointGroup, mirroringEndpointGroupId) .get(); }- Parameters:
parent- Required. The parent resource where this endpoint group will be created. Format: projects/{project}/locations/{location}mirroringEndpointGroup- Required. The endpoint group to create.mirroringEndpointGroupId- Required. The ID to use for the endpoint group, which will become the final component of the endpoint group's resource name.- Throws:
ApiException- if the remote call fails
-
createMirroringEndpointGroupAsync
public final OperationFuture<MirroringEndpointGroup,OperationMetadata> createMirroringEndpointGroupAsync(String parent, MirroringEndpointGroup mirroringEndpointGroup, String mirroringEndpointGroupId) Creates an endpoint group in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); MirroringEndpointGroup mirroringEndpointGroup = MirroringEndpointGroup.newBuilder().build(); String mirroringEndpointGroupId = "mirroringEndpointGroupId436276834"; MirroringEndpointGroup response = mirroringClient .createMirroringEndpointGroupAsync( parent, mirroringEndpointGroup, mirroringEndpointGroupId) .get(); }- Parameters:
parent- Required. The parent resource where this endpoint group will be created. Format: projects/{project}/locations/{location}mirroringEndpointGroup- Required. The endpoint group to create.mirroringEndpointGroupId- Required. The ID to use for the endpoint group, which will become the final component of the endpoint group's resource name.- Throws:
ApiException- if the remote call fails
-
createMirroringEndpointGroupAsync
public final OperationFuture<MirroringEndpointGroup,OperationMetadata> createMirroringEndpointGroupAsync(CreateMirroringEndpointGroupRequest request) Creates an endpoint group in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { CreateMirroringEndpointGroupRequest request = CreateMirroringEndpointGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMirroringEndpointGroupId("mirroringEndpointGroupId436276834") .setMirroringEndpointGroup(MirroringEndpointGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); MirroringEndpointGroup response = mirroringClient.createMirroringEndpointGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createMirroringEndpointGroupOperationCallable
public final OperationCallable<CreateMirroringEndpointGroupRequest,MirroringEndpointGroup, createMirroringEndpointGroupOperationCallable()OperationMetadata> Creates an endpoint group in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { CreateMirroringEndpointGroupRequest request = CreateMirroringEndpointGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMirroringEndpointGroupId("mirroringEndpointGroupId436276834") .setMirroringEndpointGroup(MirroringEndpointGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<MirroringEndpointGroup, OperationMetadata> future = mirroringClient.createMirroringEndpointGroupOperationCallable().futureCall(request); // Do something. MirroringEndpointGroup response = future.get(); } -
createMirroringEndpointGroupCallable
public final UnaryCallable<CreateMirroringEndpointGroupRequest,Operation> createMirroringEndpointGroupCallable()Creates an endpoint group in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { CreateMirroringEndpointGroupRequest request = CreateMirroringEndpointGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMirroringEndpointGroupId("mirroringEndpointGroupId436276834") .setMirroringEndpointGroup(MirroringEndpointGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = mirroringClient.createMirroringEndpointGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateMirroringEndpointGroupAsync
public final OperationFuture<MirroringEndpointGroup,OperationMetadata> updateMirroringEndpointGroupAsync(MirroringEndpointGroup mirroringEndpointGroup, com.google.protobuf.FieldMask updateMask) Updates an endpoint group. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { MirroringEndpointGroup mirroringEndpointGroup = MirroringEndpointGroup.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); MirroringEndpointGroup response = mirroringClient .updateMirroringEndpointGroupAsync(mirroringEndpointGroup, updateMask) .get(); }- Parameters:
mirroringEndpointGroup- Required. The endpoint group to update.updateMask- Optional. The list of fields to update. Fields are specified relative to the endpoint group (e.g. `description`; *not* `mirroring_endpoint_group.description`). See https://google.aip.dev/161 for more details.- Throws:
ApiException- if the remote call fails
-
updateMirroringEndpointGroupAsync
public final OperationFuture<MirroringEndpointGroup,OperationMetadata> updateMirroringEndpointGroupAsync(UpdateMirroringEndpointGroupRequest request) Updates an endpoint group. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { UpdateMirroringEndpointGroupRequest request = UpdateMirroringEndpointGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMirroringEndpointGroup(MirroringEndpointGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); MirroringEndpointGroup response = mirroringClient.updateMirroringEndpointGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateMirroringEndpointGroupOperationCallable
public final OperationCallable<UpdateMirroringEndpointGroupRequest,MirroringEndpointGroup, updateMirroringEndpointGroupOperationCallable()OperationMetadata> Updates an endpoint group. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { UpdateMirroringEndpointGroupRequest request = UpdateMirroringEndpointGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMirroringEndpointGroup(MirroringEndpointGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<MirroringEndpointGroup, OperationMetadata> future = mirroringClient.updateMirroringEndpointGroupOperationCallable().futureCall(request); // Do something. MirroringEndpointGroup response = future.get(); } -
updateMirroringEndpointGroupCallable
public final UnaryCallable<UpdateMirroringEndpointGroupRequest,Operation> updateMirroringEndpointGroupCallable()Updates an endpoint group. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { UpdateMirroringEndpointGroupRequest request = UpdateMirroringEndpointGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMirroringEndpointGroup(MirroringEndpointGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = mirroringClient.updateMirroringEndpointGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteMirroringEndpointGroupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringEndpointGroupAsync(MirroringEndpointGroupName name) Deletes an endpoint group. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { MirroringEndpointGroupName name = MirroringEndpointGroupName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP]"); mirroringClient.deleteMirroringEndpointGroupAsync(name).get(); }- Parameters:
name- Required. The endpoint group to delete.- Throws:
ApiException- if the remote call fails
-
deleteMirroringEndpointGroupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringEndpointGroupAsync(String name) Deletes an endpoint group. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { String name = MirroringEndpointGroupName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP]") .toString(); mirroringClient.deleteMirroringEndpointGroupAsync(name).get(); }- Parameters:
name- Required. The endpoint group to delete.- Throws:
ApiException- if the remote call fails
-
deleteMirroringEndpointGroupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringEndpointGroupAsync(DeleteMirroringEndpointGroupRequest request) Deletes an endpoint group. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { DeleteMirroringEndpointGroupRequest request = DeleteMirroringEndpointGroupRequest.newBuilder() .setName( MirroringEndpointGroupName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP]") .toString()) .setRequestId("requestId693933066") .build(); mirroringClient.deleteMirroringEndpointGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteMirroringEndpointGroupOperationCallable
public final OperationCallable<DeleteMirroringEndpointGroupRequest,com.google.protobuf.Empty, deleteMirroringEndpointGroupOperationCallable()OperationMetadata> Deletes an endpoint group. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { DeleteMirroringEndpointGroupRequest request = DeleteMirroringEndpointGroupRequest.newBuilder() .setName( MirroringEndpointGroupName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP]") .toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = mirroringClient.deleteMirroringEndpointGroupOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteMirroringEndpointGroupCallable
public final UnaryCallable<DeleteMirroringEndpointGroupRequest,Operation> deleteMirroringEndpointGroupCallable()Deletes an endpoint group. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { DeleteMirroringEndpointGroupRequest request = DeleteMirroringEndpointGroupRequest.newBuilder() .setName( MirroringEndpointGroupName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP]") .toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = mirroringClient.deleteMirroringEndpointGroupCallable().futureCall(request); // Do something. future.get(); } -
listMirroringEndpointGroupAssociations
public final MirroringClient.ListMirroringEndpointGroupAssociationsPagedResponse listMirroringEndpointGroupAssociations(LocationName parent) Lists associations in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (MirroringEndpointGroupAssociation element : mirroringClient.listMirroringEndpointGroupAssociations(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns this collection of associations. Example: `projects/123456789/locations/global`. See https://google.aip.dev/132 for more details.- Throws:
ApiException- if the remote call fails
-
listMirroringEndpointGroupAssociations
public final MirroringClient.ListMirroringEndpointGroupAssociationsPagedResponse listMirroringEndpointGroupAssociations(String parent) Lists associations in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (MirroringEndpointGroupAssociation element : mirroringClient.listMirroringEndpointGroupAssociations(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns this collection of associations. Example: `projects/123456789/locations/global`. See https://google.aip.dev/132 for more details.- Throws:
ApiException- if the remote call fails
-
listMirroringEndpointGroupAssociations
public final MirroringClient.ListMirroringEndpointGroupAssociationsPagedResponse listMirroringEndpointGroupAssociations(ListMirroringEndpointGroupAssociationsRequest request) Lists associations in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { ListMirroringEndpointGroupAssociationsRequest request = ListMirroringEndpointGroupAssociationsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (MirroringEndpointGroupAssociation element : mirroringClient.listMirroringEndpointGroupAssociations(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
-
listMirroringEndpointGroupAssociationsPagedCallable
public final UnaryCallable<ListMirroringEndpointGroupAssociationsRequest,MirroringClient.ListMirroringEndpointGroupAssociationsPagedResponse> listMirroringEndpointGroupAssociationsPagedCallable()Lists associations in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { ListMirroringEndpointGroupAssociationsRequest request = ListMirroringEndpointGroupAssociationsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<MirroringEndpointGroupAssociation> future = mirroringClient.listMirroringEndpointGroupAssociationsPagedCallable().futureCall(request); // Do something. for (MirroringEndpointGroupAssociation element : future.get().iterateAll()) { // doThingsWith(element); } } -
listMirroringEndpointGroupAssociationsCallable
public final UnaryCallable<ListMirroringEndpointGroupAssociationsRequest,ListMirroringEndpointGroupAssociationsResponse> listMirroringEndpointGroupAssociationsCallable()Lists associations in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { ListMirroringEndpointGroupAssociationsRequest request = ListMirroringEndpointGroupAssociationsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListMirroringEndpointGroupAssociationsResponse response = mirroringClient.listMirroringEndpointGroupAssociationsCallable().call(request); for (MirroringEndpointGroupAssociation element : response.getMirroringEndpointGroupAssociationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getMirroringEndpointGroupAssociation
public final MirroringEndpointGroupAssociation getMirroringEndpointGroupAssociation(MirroringEndpointGroupAssociationName name) Gets a specific association. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { MirroringEndpointGroupAssociationName name = MirroringEndpointGroupAssociationName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]"); MirroringEndpointGroupAssociation response = mirroringClient.getMirroringEndpointGroupAssociation(name); }- Parameters:
name- Required. The name of the association to retrieve. Format: projects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association}- Throws:
ApiException- if the remote call fails
-
getMirroringEndpointGroupAssociation
Gets a specific association. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { String name = MirroringEndpointGroupAssociationName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]") .toString(); MirroringEndpointGroupAssociation response = mirroringClient.getMirroringEndpointGroupAssociation(name); }- Parameters:
name- Required. The name of the association to retrieve. Format: projects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association}- Throws:
ApiException- if the remote call fails
-
getMirroringEndpointGroupAssociation
public final MirroringEndpointGroupAssociation getMirroringEndpointGroupAssociation(GetMirroringEndpointGroupAssociationRequest request) Gets a specific association. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { GetMirroringEndpointGroupAssociationRequest request = GetMirroringEndpointGroupAssociationRequest.newBuilder() .setName( MirroringEndpointGroupAssociationName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]") .toString()) .build(); MirroringEndpointGroupAssociation response = mirroringClient.getMirroringEndpointGroupAssociation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getMirroringEndpointGroupAssociationCallable
public final UnaryCallable<GetMirroringEndpointGroupAssociationRequest,MirroringEndpointGroupAssociation> getMirroringEndpointGroupAssociationCallable()Gets a specific association. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { GetMirroringEndpointGroupAssociationRequest request = GetMirroringEndpointGroupAssociationRequest.newBuilder() .setName( MirroringEndpointGroupAssociationName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]") .toString()) .build(); ApiFuture<MirroringEndpointGroupAssociation> future = mirroringClient.getMirroringEndpointGroupAssociationCallable().futureCall(request); // Do something. MirroringEndpointGroupAssociation response = future.get(); } -
createMirroringEndpointGroupAssociationAsync
public final OperationFuture<MirroringEndpointGroupAssociation,OperationMetadata> createMirroringEndpointGroupAssociationAsync(LocationName parent, MirroringEndpointGroupAssociation mirroringEndpointGroupAssociation, String mirroringEndpointGroupAssociationId) Creates an association in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); MirroringEndpointGroupAssociation mirroringEndpointGroupAssociation = MirroringEndpointGroupAssociation.newBuilder().build(); String mirroringEndpointGroupAssociationId = "mirroringEndpointGroupAssociationId-1957886507"; MirroringEndpointGroupAssociation response = mirroringClient .createMirroringEndpointGroupAssociationAsync( parent, mirroringEndpointGroupAssociation, mirroringEndpointGroupAssociationId) .get(); }- Parameters:
parent- Required. The parent resource where this association will be created. Format: projects/{project}/locations/{location}mirroringEndpointGroupAssociation- Required. The association to create.mirroringEndpointGroupAssociationId- Optional. The ID to use for the new association, which will become the final component of the endpoint group's resource name. If not provided, the server will generate a unique ID.- Throws:
ApiException- if the remote call fails
-
createMirroringEndpointGroupAssociationAsync
public final OperationFuture<MirroringEndpointGroupAssociation,OperationMetadata> createMirroringEndpointGroupAssociationAsync(String parent, MirroringEndpointGroupAssociation mirroringEndpointGroupAssociation, String mirroringEndpointGroupAssociationId) Creates an association in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); MirroringEndpointGroupAssociation mirroringEndpointGroupAssociation = MirroringEndpointGroupAssociation.newBuilder().build(); String mirroringEndpointGroupAssociationId = "mirroringEndpointGroupAssociationId-1957886507"; MirroringEndpointGroupAssociation response = mirroringClient .createMirroringEndpointGroupAssociationAsync( parent, mirroringEndpointGroupAssociation, mirroringEndpointGroupAssociationId) .get(); }- Parameters:
parent- Required. The parent resource where this association will be created. Format: projects/{project}/locations/{location}mirroringEndpointGroupAssociation- Required. The association to create.mirroringEndpointGroupAssociationId- Optional. The ID to use for the new association, which will become the final component of the endpoint group's resource name. If not provided, the server will generate a unique ID.- Throws:
ApiException- if the remote call fails
-
createMirroringEndpointGroupAssociationAsync
public final OperationFuture<MirroringEndpointGroupAssociation,OperationMetadata> createMirroringEndpointGroupAssociationAsync(CreateMirroringEndpointGroupAssociationRequest request) Creates an association in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { CreateMirroringEndpointGroupAssociationRequest request = CreateMirroringEndpointGroupAssociationRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMirroringEndpointGroupAssociationId( "mirroringEndpointGroupAssociationId-1957886507") .setMirroringEndpointGroupAssociation( MirroringEndpointGroupAssociation.newBuilder().build()) .setRequestId("requestId693933066") .build(); MirroringEndpointGroupAssociation response = mirroringClient.createMirroringEndpointGroupAssociationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createMirroringEndpointGroupAssociationOperationCallable
public final OperationCallable<CreateMirroringEndpointGroupAssociationRequest,MirroringEndpointGroupAssociation, createMirroringEndpointGroupAssociationOperationCallable()OperationMetadata> Creates an association in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { CreateMirroringEndpointGroupAssociationRequest request = CreateMirroringEndpointGroupAssociationRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMirroringEndpointGroupAssociationId( "mirroringEndpointGroupAssociationId-1957886507") .setMirroringEndpointGroupAssociation( MirroringEndpointGroupAssociation.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<MirroringEndpointGroupAssociation, OperationMetadata> future = mirroringClient .createMirroringEndpointGroupAssociationOperationCallable() .futureCall(request); // Do something. MirroringEndpointGroupAssociation response = future.get(); } -
createMirroringEndpointGroupAssociationCallable
public final UnaryCallable<CreateMirroringEndpointGroupAssociationRequest,Operation> createMirroringEndpointGroupAssociationCallable()Creates an association in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { CreateMirroringEndpointGroupAssociationRequest request = CreateMirroringEndpointGroupAssociationRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMirroringEndpointGroupAssociationId( "mirroringEndpointGroupAssociationId-1957886507") .setMirroringEndpointGroupAssociation( MirroringEndpointGroupAssociation.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = mirroringClient.createMirroringEndpointGroupAssociationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateMirroringEndpointGroupAssociationAsync
public final OperationFuture<MirroringEndpointGroupAssociation,OperationMetadata> updateMirroringEndpointGroupAssociationAsync(MirroringEndpointGroupAssociation mirroringEndpointGroupAssociation, com.google.protobuf.FieldMask updateMask) Updates an association. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { MirroringEndpointGroupAssociation mirroringEndpointGroupAssociation = MirroringEndpointGroupAssociation.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); MirroringEndpointGroupAssociation response = mirroringClient .updateMirroringEndpointGroupAssociationAsync( mirroringEndpointGroupAssociation, updateMask) .get(); }- Parameters:
mirroringEndpointGroupAssociation- Required. The association to update.updateMask- Optional. The list of fields to update. Fields are specified relative to the association (e.g. `description`; *not* `mirroring_endpoint_group_association.description`). See https://google.aip.dev/161 for more details.- Throws:
ApiException- if the remote call fails
-
updateMirroringEndpointGroupAssociationAsync
public final OperationFuture<MirroringEndpointGroupAssociation,OperationMetadata> updateMirroringEndpointGroupAssociationAsync(UpdateMirroringEndpointGroupAssociationRequest request) Updates an association. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { UpdateMirroringEndpointGroupAssociationRequest request = UpdateMirroringEndpointGroupAssociationRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMirroringEndpointGroupAssociation( MirroringEndpointGroupAssociation.newBuilder().build()) .setRequestId("requestId693933066") .build(); MirroringEndpointGroupAssociation response = mirroringClient.updateMirroringEndpointGroupAssociationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateMirroringEndpointGroupAssociationOperationCallable
public final OperationCallable<UpdateMirroringEndpointGroupAssociationRequest,MirroringEndpointGroupAssociation, updateMirroringEndpointGroupAssociationOperationCallable()OperationMetadata> Updates an association. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { UpdateMirroringEndpointGroupAssociationRequest request = UpdateMirroringEndpointGroupAssociationRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMirroringEndpointGroupAssociation( MirroringEndpointGroupAssociation.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<MirroringEndpointGroupAssociation, OperationMetadata> future = mirroringClient .updateMirroringEndpointGroupAssociationOperationCallable() .futureCall(request); // Do something. MirroringEndpointGroupAssociation response = future.get(); } -
updateMirroringEndpointGroupAssociationCallable
public final UnaryCallable<UpdateMirroringEndpointGroupAssociationRequest,Operation> updateMirroringEndpointGroupAssociationCallable()Updates an association. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { UpdateMirroringEndpointGroupAssociationRequest request = UpdateMirroringEndpointGroupAssociationRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMirroringEndpointGroupAssociation( MirroringEndpointGroupAssociation.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = mirroringClient.updateMirroringEndpointGroupAssociationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteMirroringEndpointGroupAssociationAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringEndpointGroupAssociationAsync(MirroringEndpointGroupAssociationName name) Deletes an association. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { MirroringEndpointGroupAssociationName name = MirroringEndpointGroupAssociationName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]"); mirroringClient.deleteMirroringEndpointGroupAssociationAsync(name).get(); }- Parameters:
name- Required. The association to delete.- Throws:
ApiException- if the remote call fails
-
deleteMirroringEndpointGroupAssociationAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringEndpointGroupAssociationAsync(String name) Deletes an association. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { String name = MirroringEndpointGroupAssociationName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]") .toString(); mirroringClient.deleteMirroringEndpointGroupAssociationAsync(name).get(); }- Parameters:
name- Required. The association to delete.- Throws:
ApiException- if the remote call fails
-
deleteMirroringEndpointGroupAssociationAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringEndpointGroupAssociationAsync(DeleteMirroringEndpointGroupAssociationRequest request) Deletes an association. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { DeleteMirroringEndpointGroupAssociationRequest request = DeleteMirroringEndpointGroupAssociationRequest.newBuilder() .setName( MirroringEndpointGroupAssociationName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]") .toString()) .setRequestId("requestId693933066") .build(); mirroringClient.deleteMirroringEndpointGroupAssociationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteMirroringEndpointGroupAssociationOperationCallable
public final OperationCallable<DeleteMirroringEndpointGroupAssociationRequest,com.google.protobuf.Empty, deleteMirroringEndpointGroupAssociationOperationCallable()OperationMetadata> Deletes an association. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { DeleteMirroringEndpointGroupAssociationRequest request = DeleteMirroringEndpointGroupAssociationRequest.newBuilder() .setName( MirroringEndpointGroupAssociationName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]") .toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = mirroringClient .deleteMirroringEndpointGroupAssociationOperationCallable() .futureCall(request); // Do something. future.get(); } -
deleteMirroringEndpointGroupAssociationCallable
public final UnaryCallable<DeleteMirroringEndpointGroupAssociationRequest,Operation> deleteMirroringEndpointGroupAssociationCallable()Deletes an association. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { DeleteMirroringEndpointGroupAssociationRequest request = DeleteMirroringEndpointGroupAssociationRequest.newBuilder() .setName( MirroringEndpointGroupAssociationName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]") .toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = mirroringClient.deleteMirroringEndpointGroupAssociationCallable().futureCall(request); // Do something. future.get(); } -
listMirroringDeploymentGroups
public final MirroringClient.ListMirroringDeploymentGroupsPagedResponse listMirroringDeploymentGroups(LocationName parent) Lists deployment groups in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (MirroringDeploymentGroup element : mirroringClient.listMirroringDeploymentGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns this collection of deployment groups. Example: `projects/123456789/locations/global`. See https://google.aip.dev/132 for more details.- Throws:
ApiException- if the remote call fails
-
listMirroringDeploymentGroups
public final MirroringClient.ListMirroringDeploymentGroupsPagedResponse listMirroringDeploymentGroups(String parent) Lists deployment groups in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (MirroringDeploymentGroup element : mirroringClient.listMirroringDeploymentGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns this collection of deployment groups. Example: `projects/123456789/locations/global`. See https://google.aip.dev/132 for more details.- Throws:
ApiException- if the remote call fails
-
listMirroringDeploymentGroups
public final MirroringClient.ListMirroringDeploymentGroupsPagedResponse listMirroringDeploymentGroups(ListMirroringDeploymentGroupsRequest request) Lists deployment groups in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { ListMirroringDeploymentGroupsRequest request = ListMirroringDeploymentGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (MirroringDeploymentGroup element : mirroringClient.listMirroringDeploymentGroups(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
-
listMirroringDeploymentGroupsPagedCallable
public final UnaryCallable<ListMirroringDeploymentGroupsRequest,MirroringClient.ListMirroringDeploymentGroupsPagedResponse> listMirroringDeploymentGroupsPagedCallable()Lists deployment groups in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { ListMirroringDeploymentGroupsRequest request = ListMirroringDeploymentGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<MirroringDeploymentGroup> future = mirroringClient.listMirroringDeploymentGroupsPagedCallable().futureCall(request); // Do something. for (MirroringDeploymentGroup element : future.get().iterateAll()) { // doThingsWith(element); } } -
listMirroringDeploymentGroupsCallable
public final UnaryCallable<ListMirroringDeploymentGroupsRequest,ListMirroringDeploymentGroupsResponse> listMirroringDeploymentGroupsCallable()Lists deployment groups in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { ListMirroringDeploymentGroupsRequest request = ListMirroringDeploymentGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListMirroringDeploymentGroupsResponse response = mirroringClient.listMirroringDeploymentGroupsCallable().call(request); for (MirroringDeploymentGroup element : response.getMirroringDeploymentGroupsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getMirroringDeploymentGroup
public final MirroringDeploymentGroup getMirroringDeploymentGroup(MirroringDeploymentGroupName name) Gets a specific deployment group. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { MirroringDeploymentGroupName name = MirroringDeploymentGroupName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT_GROUP]"); MirroringDeploymentGroup response = mirroringClient.getMirroringDeploymentGroup(name); }- Parameters:
name- Required. The name of the deployment group to retrieve. Format: projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group}- Throws:
ApiException- if the remote call fails
-
getMirroringDeploymentGroup
Gets a specific deployment group. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { String name = MirroringDeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT_GROUP]") .toString(); MirroringDeploymentGroup response = mirroringClient.getMirroringDeploymentGroup(name); }- Parameters:
name- Required. The name of the deployment group to retrieve. Format: projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group}- Throws:
ApiException- if the remote call fails
-
getMirroringDeploymentGroup
public final MirroringDeploymentGroup getMirroringDeploymentGroup(GetMirroringDeploymentGroupRequest request) Gets a specific deployment group. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { GetMirroringDeploymentGroupRequest request = GetMirroringDeploymentGroupRequest.newBuilder() .setName( MirroringDeploymentGroupName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT_GROUP]") .toString()) .build(); MirroringDeploymentGroup response = mirroringClient.getMirroringDeploymentGroup(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getMirroringDeploymentGroupCallable
public final UnaryCallable<GetMirroringDeploymentGroupRequest,MirroringDeploymentGroup> getMirroringDeploymentGroupCallable()Gets a specific deployment group. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { GetMirroringDeploymentGroupRequest request = GetMirroringDeploymentGroupRequest.newBuilder() .setName( MirroringDeploymentGroupName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT_GROUP]") .toString()) .build(); ApiFuture<MirroringDeploymentGroup> future = mirroringClient.getMirroringDeploymentGroupCallable().futureCall(request); // Do something. MirroringDeploymentGroup response = future.get(); } -
createMirroringDeploymentGroupAsync
public final OperationFuture<MirroringDeploymentGroup,OperationMetadata> createMirroringDeploymentGroupAsync(LocationName parent, MirroringDeploymentGroup mirroringDeploymentGroup, String mirroringDeploymentGroupId) Creates a deployment group in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); MirroringDeploymentGroup mirroringDeploymentGroup = MirroringDeploymentGroup.newBuilder().build(); String mirroringDeploymentGroupId = "mirroringDeploymentGroupId-1056718862"; MirroringDeploymentGroup response = mirroringClient .createMirroringDeploymentGroupAsync( parent, mirroringDeploymentGroup, mirroringDeploymentGroupId) .get(); }- Parameters:
parent- Required. The parent resource where this deployment group will be created. Format: projects/{project}/locations/{location}mirroringDeploymentGroup- Required. The deployment group to create.mirroringDeploymentGroupId- Required. The ID to use for the new deployment group, which will become the final component of the deployment group's resource name.- Throws:
ApiException- if the remote call fails
-
createMirroringDeploymentGroupAsync
public final OperationFuture<MirroringDeploymentGroup,OperationMetadata> createMirroringDeploymentGroupAsync(String parent, MirroringDeploymentGroup mirroringDeploymentGroup, String mirroringDeploymentGroupId) Creates a deployment group in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); MirroringDeploymentGroup mirroringDeploymentGroup = MirroringDeploymentGroup.newBuilder().build(); String mirroringDeploymentGroupId = "mirroringDeploymentGroupId-1056718862"; MirroringDeploymentGroup response = mirroringClient .createMirroringDeploymentGroupAsync( parent, mirroringDeploymentGroup, mirroringDeploymentGroupId) .get(); }- Parameters:
parent- Required. The parent resource where this deployment group will be created. Format: projects/{project}/locations/{location}mirroringDeploymentGroup- Required. The deployment group to create.mirroringDeploymentGroupId- Required. The ID to use for the new deployment group, which will become the final component of the deployment group's resource name.- Throws:
ApiException- if the remote call fails
-
createMirroringDeploymentGroupAsync
public final OperationFuture<MirroringDeploymentGroup,OperationMetadata> createMirroringDeploymentGroupAsync(CreateMirroringDeploymentGroupRequest request) Creates a deployment group in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { CreateMirroringDeploymentGroupRequest request = CreateMirroringDeploymentGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMirroringDeploymentGroupId("mirroringDeploymentGroupId-1056718862") .setMirroringDeploymentGroup(MirroringDeploymentGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); MirroringDeploymentGroup response = mirroringClient.createMirroringDeploymentGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createMirroringDeploymentGroupOperationCallable
public final OperationCallable<CreateMirroringDeploymentGroupRequest,MirroringDeploymentGroup, createMirroringDeploymentGroupOperationCallable()OperationMetadata> Creates a deployment group in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { CreateMirroringDeploymentGroupRequest request = CreateMirroringDeploymentGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMirroringDeploymentGroupId("mirroringDeploymentGroupId-1056718862") .setMirroringDeploymentGroup(MirroringDeploymentGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<MirroringDeploymentGroup, OperationMetadata> future = mirroringClient.createMirroringDeploymentGroupOperationCallable().futureCall(request); // Do something. MirroringDeploymentGroup response = future.get(); } -
createMirroringDeploymentGroupCallable
public final UnaryCallable<CreateMirroringDeploymentGroupRequest,Operation> createMirroringDeploymentGroupCallable()Creates a deployment group in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { CreateMirroringDeploymentGroupRequest request = CreateMirroringDeploymentGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMirroringDeploymentGroupId("mirroringDeploymentGroupId-1056718862") .setMirroringDeploymentGroup(MirroringDeploymentGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = mirroringClient.createMirroringDeploymentGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateMirroringDeploymentGroupAsync
public final OperationFuture<MirroringDeploymentGroup,OperationMetadata> updateMirroringDeploymentGroupAsync(MirroringDeploymentGroup mirroringDeploymentGroup, com.google.protobuf.FieldMask updateMask) Updates a deployment group. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { MirroringDeploymentGroup mirroringDeploymentGroup = MirroringDeploymentGroup.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); MirroringDeploymentGroup response = mirroringClient .updateMirroringDeploymentGroupAsync(mirroringDeploymentGroup, updateMask) .get(); }- Parameters:
mirroringDeploymentGroup- Required. The deployment group to update.updateMask- Optional. The list of fields to update. Fields are specified relative to the deployment group (e.g. `description`; *not* `mirroring_deployment_group.description`). See https://google.aip.dev/161 for more details.- Throws:
ApiException- if the remote call fails
-
updateMirroringDeploymentGroupAsync
public final OperationFuture<MirroringDeploymentGroup,OperationMetadata> updateMirroringDeploymentGroupAsync(UpdateMirroringDeploymentGroupRequest request) Updates a deployment group. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { UpdateMirroringDeploymentGroupRequest request = UpdateMirroringDeploymentGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMirroringDeploymentGroup(MirroringDeploymentGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); MirroringDeploymentGroup response = mirroringClient.updateMirroringDeploymentGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateMirroringDeploymentGroupOperationCallable
public final OperationCallable<UpdateMirroringDeploymentGroupRequest,MirroringDeploymentGroup, updateMirroringDeploymentGroupOperationCallable()OperationMetadata> Updates a deployment group. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { UpdateMirroringDeploymentGroupRequest request = UpdateMirroringDeploymentGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMirroringDeploymentGroup(MirroringDeploymentGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<MirroringDeploymentGroup, OperationMetadata> future = mirroringClient.updateMirroringDeploymentGroupOperationCallable().futureCall(request); // Do something. MirroringDeploymentGroup response = future.get(); } -
updateMirroringDeploymentGroupCallable
public final UnaryCallable<UpdateMirroringDeploymentGroupRequest,Operation> updateMirroringDeploymentGroupCallable()Updates a deployment group. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { UpdateMirroringDeploymentGroupRequest request = UpdateMirroringDeploymentGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMirroringDeploymentGroup(MirroringDeploymentGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = mirroringClient.updateMirroringDeploymentGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteMirroringDeploymentGroupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringDeploymentGroupAsync(MirroringDeploymentGroupName name) Deletes a deployment group. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { MirroringDeploymentGroupName name = MirroringDeploymentGroupName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT_GROUP]"); mirroringClient.deleteMirroringDeploymentGroupAsync(name).get(); }- Parameters:
name- Required. The deployment group to delete.- Throws:
ApiException- if the remote call fails
-
deleteMirroringDeploymentGroupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringDeploymentGroupAsync(String name) Deletes a deployment group. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { String name = MirroringDeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT_GROUP]") .toString(); mirroringClient.deleteMirroringDeploymentGroupAsync(name).get(); }- Parameters:
name- Required. The deployment group to delete.- Throws:
ApiException- if the remote call fails
-
deleteMirroringDeploymentGroupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringDeploymentGroupAsync(DeleteMirroringDeploymentGroupRequest request) Deletes a deployment group. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { DeleteMirroringDeploymentGroupRequest request = DeleteMirroringDeploymentGroupRequest.newBuilder() .setName( MirroringDeploymentGroupName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT_GROUP]") .toString()) .setRequestId("requestId693933066") .build(); mirroringClient.deleteMirroringDeploymentGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteMirroringDeploymentGroupOperationCallable
public final OperationCallable<DeleteMirroringDeploymentGroupRequest,com.google.protobuf.Empty, deleteMirroringDeploymentGroupOperationCallable()OperationMetadata> Deletes a deployment group. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { DeleteMirroringDeploymentGroupRequest request = DeleteMirroringDeploymentGroupRequest.newBuilder() .setName( MirroringDeploymentGroupName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT_GROUP]") .toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = mirroringClient.deleteMirroringDeploymentGroupOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteMirroringDeploymentGroupCallable
public final UnaryCallable<DeleteMirroringDeploymentGroupRequest,Operation> deleteMirroringDeploymentGroupCallable()Deletes a deployment group. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { DeleteMirroringDeploymentGroupRequest request = DeleteMirroringDeploymentGroupRequest.newBuilder() .setName( MirroringDeploymentGroupName.of( "[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT_GROUP]") .toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = mirroringClient.deleteMirroringDeploymentGroupCallable().futureCall(request); // Do something. future.get(); } -
listMirroringDeployments
public final MirroringClient.ListMirroringDeploymentsPagedResponse listMirroringDeployments(LocationName parent) Lists deployments in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (MirroringDeployment element : mirroringClient.listMirroringDeployments(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns this collection of deployments. Example: `projects/123456789/locations/us-central1-a`. See https://google.aip.dev/132 for more details.- Throws:
ApiException- if the remote call fails
-
listMirroringDeployments
public final MirroringClient.ListMirroringDeploymentsPagedResponse listMirroringDeployments(String parent) Lists deployments in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (MirroringDeployment element : mirroringClient.listMirroringDeployments(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns this collection of deployments. Example: `projects/123456789/locations/us-central1-a`. See https://google.aip.dev/132 for more details.- Throws:
ApiException- if the remote call fails
-
listMirroringDeployments
public final MirroringClient.ListMirroringDeploymentsPagedResponse listMirroringDeployments(ListMirroringDeploymentsRequest request) Lists deployments in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { ListMirroringDeploymentsRequest request = ListMirroringDeploymentsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (MirroringDeployment element : mirroringClient.listMirroringDeployments(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
-
listMirroringDeploymentsPagedCallable
public final UnaryCallable<ListMirroringDeploymentsRequest,MirroringClient.ListMirroringDeploymentsPagedResponse> listMirroringDeploymentsPagedCallable()Lists deployments in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { ListMirroringDeploymentsRequest request = ListMirroringDeploymentsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<MirroringDeployment> future = mirroringClient.listMirroringDeploymentsPagedCallable().futureCall(request); // Do something. for (MirroringDeployment element : future.get().iterateAll()) { // doThingsWith(element); } } -
listMirroringDeploymentsCallable
public final UnaryCallable<ListMirroringDeploymentsRequest,ListMirroringDeploymentsResponse> listMirroringDeploymentsCallable()Lists deployments in a given project and location. See https://google.aip.dev/132.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 (MirroringClient mirroringClient = MirroringClient.create()) { ListMirroringDeploymentsRequest request = ListMirroringDeploymentsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListMirroringDeploymentsResponse response = mirroringClient.listMirroringDeploymentsCallable().call(request); for (MirroringDeployment element : response.getMirroringDeploymentsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getMirroringDeployment
Gets a specific deployment. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { MirroringDeploymentName name = MirroringDeploymentName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT]"); MirroringDeployment response = mirroringClient.getMirroringDeployment(name); }- Parameters:
name- Required. The name of the deployment to retrieve. Format: projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment}- Throws:
ApiException- if the remote call fails
-
getMirroringDeployment
Gets a specific deployment. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { String name = MirroringDeploymentName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT]") .toString(); MirroringDeployment response = mirroringClient.getMirroringDeployment(name); }- Parameters:
name- Required. The name of the deployment to retrieve. Format: projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment}- Throws:
ApiException- if the remote call fails
-
getMirroringDeployment
Gets a specific deployment. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { GetMirroringDeploymentRequest request = GetMirroringDeploymentRequest.newBuilder() .setName( MirroringDeploymentName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT]") .toString()) .build(); MirroringDeployment response = mirroringClient.getMirroringDeployment(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getMirroringDeploymentCallable
public final UnaryCallable<GetMirroringDeploymentRequest,MirroringDeployment> getMirroringDeploymentCallable()Gets a specific deployment. See https://google.aip.dev/131.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 (MirroringClient mirroringClient = MirroringClient.create()) { GetMirroringDeploymentRequest request = GetMirroringDeploymentRequest.newBuilder() .setName( MirroringDeploymentName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT]") .toString()) .build(); ApiFuture<MirroringDeployment> future = mirroringClient.getMirroringDeploymentCallable().futureCall(request); // Do something. MirroringDeployment response = future.get(); } -
createMirroringDeploymentAsync
public final OperationFuture<MirroringDeployment,OperationMetadata> createMirroringDeploymentAsync(LocationName parent, MirroringDeployment mirroringDeployment, String mirroringDeploymentId) Creates a deployment in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); MirroringDeployment mirroringDeployment = MirroringDeployment.newBuilder().build(); String mirroringDeploymentId = "mirroringDeploymentId-895939037"; MirroringDeployment response = mirroringClient .createMirroringDeploymentAsync(parent, mirroringDeployment, mirroringDeploymentId) .get(); }- Parameters:
parent- Required. The parent resource where this deployment will be created. Format: projects/{project}/locations/{location}mirroringDeployment- Required. The deployment to create.mirroringDeploymentId- Required. The ID to use for the new deployment, which will become the final component of the deployment's resource name.- Throws:
ApiException- if the remote call fails
-
createMirroringDeploymentAsync
public final OperationFuture<MirroringDeployment,OperationMetadata> createMirroringDeploymentAsync(String parent, MirroringDeployment mirroringDeployment, String mirroringDeploymentId) Creates a deployment in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); MirroringDeployment mirroringDeployment = MirroringDeployment.newBuilder().build(); String mirroringDeploymentId = "mirroringDeploymentId-895939037"; MirroringDeployment response = mirroringClient .createMirroringDeploymentAsync(parent, mirroringDeployment, mirroringDeploymentId) .get(); }- Parameters:
parent- Required. The parent resource where this deployment will be created. Format: projects/{project}/locations/{location}mirroringDeployment- Required. The deployment to create.mirroringDeploymentId- Required. The ID to use for the new deployment, which will become the final component of the deployment's resource name.- Throws:
ApiException- if the remote call fails
-
createMirroringDeploymentAsync
public final OperationFuture<MirroringDeployment,OperationMetadata> createMirroringDeploymentAsync(CreateMirroringDeploymentRequest request) Creates a deployment in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { CreateMirroringDeploymentRequest request = CreateMirroringDeploymentRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMirroringDeploymentId("mirroringDeploymentId-895939037") .setMirroringDeployment(MirroringDeployment.newBuilder().build()) .setRequestId("requestId693933066") .build(); MirroringDeployment response = mirroringClient.createMirroringDeploymentAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createMirroringDeploymentOperationCallable
public final OperationCallable<CreateMirroringDeploymentRequest,MirroringDeployment, createMirroringDeploymentOperationCallable()OperationMetadata> Creates a deployment in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { CreateMirroringDeploymentRequest request = CreateMirroringDeploymentRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMirroringDeploymentId("mirroringDeploymentId-895939037") .setMirroringDeployment(MirroringDeployment.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<MirroringDeployment, OperationMetadata> future = mirroringClient.createMirroringDeploymentOperationCallable().futureCall(request); // Do something. MirroringDeployment response = future.get(); } -
createMirroringDeploymentCallable
public final UnaryCallable<CreateMirroringDeploymentRequest,Operation> createMirroringDeploymentCallable()Creates a deployment in a given project and location. See https://google.aip.dev/133.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 (MirroringClient mirroringClient = MirroringClient.create()) { CreateMirroringDeploymentRequest request = CreateMirroringDeploymentRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMirroringDeploymentId("mirroringDeploymentId-895939037") .setMirroringDeployment(MirroringDeployment.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = mirroringClient.createMirroringDeploymentCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateMirroringDeploymentAsync
public final OperationFuture<MirroringDeployment,OperationMetadata> updateMirroringDeploymentAsync(MirroringDeployment mirroringDeployment, com.google.protobuf.FieldMask updateMask) Updates a deployment. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { MirroringDeployment mirroringDeployment = MirroringDeployment.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); MirroringDeployment response = mirroringClient.updateMirroringDeploymentAsync(mirroringDeployment, updateMask).get(); }- Parameters:
mirroringDeployment- Required. The deployment to update.updateMask- Optional. The list of fields to update. Fields are specified relative to the deployment (e.g. `description`; *not* `mirroring_deployment.description`). See https://google.aip.dev/161 for more details.- Throws:
ApiException- if the remote call fails
-
updateMirroringDeploymentAsync
public final OperationFuture<MirroringDeployment,OperationMetadata> updateMirroringDeploymentAsync(UpdateMirroringDeploymentRequest request) Updates a deployment. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { UpdateMirroringDeploymentRequest request = UpdateMirroringDeploymentRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMirroringDeployment(MirroringDeployment.newBuilder().build()) .setRequestId("requestId693933066") .build(); MirroringDeployment response = mirroringClient.updateMirroringDeploymentAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateMirroringDeploymentOperationCallable
public final OperationCallable<UpdateMirroringDeploymentRequest,MirroringDeployment, updateMirroringDeploymentOperationCallable()OperationMetadata> Updates a deployment. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { UpdateMirroringDeploymentRequest request = UpdateMirroringDeploymentRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMirroringDeployment(MirroringDeployment.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<MirroringDeployment, OperationMetadata> future = mirroringClient.updateMirroringDeploymentOperationCallable().futureCall(request); // Do something. MirroringDeployment response = future.get(); } -
updateMirroringDeploymentCallable
public final UnaryCallable<UpdateMirroringDeploymentRequest,Operation> updateMirroringDeploymentCallable()Updates a deployment. See https://google.aip.dev/134.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 (MirroringClient mirroringClient = MirroringClient.create()) { UpdateMirroringDeploymentRequest request = UpdateMirroringDeploymentRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMirroringDeployment(MirroringDeployment.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = mirroringClient.updateMirroringDeploymentCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteMirroringDeploymentAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringDeploymentAsync(MirroringDeploymentName name) Deletes a deployment. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { MirroringDeploymentName name = MirroringDeploymentName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT]"); mirroringClient.deleteMirroringDeploymentAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteMirroringDeploymentAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringDeploymentAsync(String name) Deletes a deployment. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { String name = MirroringDeploymentName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT]") .toString(); mirroringClient.deleteMirroringDeploymentAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteMirroringDeploymentAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMirroringDeploymentAsync(DeleteMirroringDeploymentRequest request) Deletes a deployment. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { DeleteMirroringDeploymentRequest request = DeleteMirroringDeploymentRequest.newBuilder() .setName( MirroringDeploymentName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT]") .toString()) .setRequestId("requestId693933066") .build(); mirroringClient.deleteMirroringDeploymentAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteMirroringDeploymentOperationCallable
public final OperationCallable<DeleteMirroringDeploymentRequest,com.google.protobuf.Empty, deleteMirroringDeploymentOperationCallable()OperationMetadata> Deletes a deployment. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { DeleteMirroringDeploymentRequest request = DeleteMirroringDeploymentRequest.newBuilder() .setName( MirroringDeploymentName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT]") .toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = mirroringClient.deleteMirroringDeploymentOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteMirroringDeploymentCallable
public final UnaryCallable<DeleteMirroringDeploymentRequest,Operation> deleteMirroringDeploymentCallable()Deletes a deployment. See https://google.aip.dev/135.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 (MirroringClient mirroringClient = MirroringClient.create()) { DeleteMirroringDeploymentRequest request = DeleteMirroringDeploymentRequest.newBuilder() .setName( MirroringDeploymentName.of("[PROJECT]", "[LOCATION]", "[MIRRORING_DEPLOYMENT]") .toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = mirroringClient.deleteMirroringDeploymentCallable().futureCall(request); // Do something. future.get(); } -
listLocations
Lists information about the supported locations for this service.This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:
* **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
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 (MirroringClient mirroringClient = MirroringClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : mirroringClient.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,MirroringClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:
* **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
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 (MirroringClient mirroringClient = MirroringClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = mirroringClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:
* **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
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 (MirroringClient mirroringClient = MirroringClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = mirroringClient.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 (MirroringClient mirroringClient = MirroringClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = mirroringClient.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 (MirroringClient mirroringClient = MirroringClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = mirroringClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
setIamPolicy
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
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 (MirroringClient mirroringClient = MirroringClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( AddressGroupName.ofProjectLocationAddressGroupName( "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]") .toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Policy response = mirroringClient.setIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setIamPolicyCallable
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
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 (MirroringClient mirroringClient = MirroringClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( AddressGroupName.ofProjectLocationAddressGroupName( "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]") .toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Policy> future = mirroringClient.setIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
getIamPolicy
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.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 (MirroringClient mirroringClient = MirroringClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( AddressGroupName.ofProjectLocationAddressGroupName( "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]") .toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); Policy response = mirroringClient.getIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIamPolicyCallable
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.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 (MirroringClient mirroringClient = MirroringClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( AddressGroupName.ofProjectLocationAddressGroupName( "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]") .toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); ApiFuture<Policy> future = mirroringClient.getIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
testIamPermissions
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
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 (MirroringClient mirroringClient = MirroringClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( AddressGroupName.ofProjectLocationAddressGroupName( "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]") .toString()) .addAllPermissions(new ArrayList<String>()) .build(); TestIamPermissionsResponse response = mirroringClient.testIamPermissions(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
testIamPermissionsCallable
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
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 (MirroringClient mirroringClient = MirroringClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( AddressGroupName.ofProjectLocationAddressGroupName( "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]") .toString()) .addAllPermissions(new ArrayList<String>()) .build(); ApiFuture<TestIamPermissionsResponse> future = mirroringClient.testIamPermissionsCallable().futureCall(request); // Do something. TestIamPermissionsResponse 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
-