@Generated(value="by gapic-generator") @BetaApi public class RegionUrlMapClient extends Object implements com.google.api.gax.core.BackgroundResource
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:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionUrlMapName urlMap = ProjectRegionUrlMapName.of("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
Operation response = regionUrlMapClient.deleteRegionUrlMap(urlMap, requestId);
}
Note: close() needs to be called on the regionUrlMapClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
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 RegionUrlMapSettings to create(). For example:
To customize credentials:
RegionUrlMapSettings regionUrlMapSettings =
RegionUrlMapSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
RegionUrlMapClient regionUrlMapClient =
RegionUrlMapClient.create(regionUrlMapSettings);
To customize the endpoint:
RegionUrlMapSettings regionUrlMapSettings =
RegionUrlMapSettings.newBuilder().setEndpoint(myEndpoint).build();
RegionUrlMapClient regionUrlMapClient =
RegionUrlMapClient.create(regionUrlMapSettings);
Modifier and Type | Class and Description |
---|---|
static class |
RegionUrlMapClient.ListRegionUrlMapsFixedSizeCollection |
static class |
RegionUrlMapClient.ListRegionUrlMapsPage |
static class |
RegionUrlMapClient.ListRegionUrlMapsPagedResponse |
Modifier | Constructor and Description |
---|---|
protected |
RegionUrlMapClient(RegionUrlMapSettings settings)
Constructs an instance of RegionUrlMapClient, using the given settings.
|
protected |
RegionUrlMapClient(RegionUrlMapStub stub) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static RegionUrlMapClient |
create()
Constructs an instance of RegionUrlMapClient with default settings.
|
static RegionUrlMapClient |
create(RegionUrlMapSettings settings)
Constructs an instance of RegionUrlMapClient, using the given settings.
|
static RegionUrlMapClient |
create(RegionUrlMapStub stub)
Constructs an instance of RegionUrlMapClient, using the given stub for making calls.
|
Operation |
deleteRegionUrlMap(DeleteRegionUrlMapHttpRequest request)
Deletes the specified UrlMap resource.
|
Operation |
deleteRegionUrlMap(ProjectRegionUrlMapName urlMap,
String requestId)
Deletes the specified UrlMap resource.
|
Operation |
deleteRegionUrlMap(String urlMap,
String requestId)
Deletes the specified UrlMap resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteRegionUrlMapHttpRequest,Operation> |
deleteRegionUrlMapCallable()
Deletes the specified UrlMap resource.
|
UrlMap |
getRegionUrlMap(GetRegionUrlMapHttpRequest request)
Returns the specified UrlMap resource.
|
UrlMap |
getRegionUrlMap(ProjectRegionUrlMapName urlMap)
Returns the specified UrlMap resource.
|
UrlMap |
getRegionUrlMap(String urlMap)
Returns the specified UrlMap resource.
|
com.google.api.gax.rpc.UnaryCallable<GetRegionUrlMapHttpRequest,UrlMap> |
getRegionUrlMapCallable()
Returns the specified UrlMap resource.
|
RegionUrlMapSettings |
getSettings() |
RegionUrlMapStub |
getStub() |
Operation |
insertRegionUrlMap(InsertRegionUrlMapHttpRequest request)
Creates a UrlMap resource in the specified project using the data included in the request.
|
Operation |
insertRegionUrlMap(String requestId,
ProjectRegionName region,
UrlMap urlMapResource)
Creates a UrlMap resource in the specified project using the data included in the request.
|
Operation |
insertRegionUrlMap(String requestId,
String region,
UrlMap urlMapResource)
Creates a UrlMap resource in the specified project using the data included in the request.
|
com.google.api.gax.rpc.UnaryCallable<InsertRegionUrlMapHttpRequest,Operation> |
insertRegionUrlMapCallable()
Creates a UrlMap resource in the specified project using the data included in the request.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
RegionUrlMapClient.ListRegionUrlMapsPagedResponse |
listRegionUrlMaps(ListRegionUrlMapsHttpRequest request)
Retrieves the list of UrlMap resources available to the specified project in the specified
region.
|
RegionUrlMapClient.ListRegionUrlMapsPagedResponse |
listRegionUrlMaps(ProjectRegionName region)
Retrieves the list of UrlMap resources available to the specified project in the specified
region.
|
RegionUrlMapClient.ListRegionUrlMapsPagedResponse |
listRegionUrlMaps(String region)
Retrieves the list of UrlMap resources available to the specified project in the specified
region.
|
com.google.api.gax.rpc.UnaryCallable<ListRegionUrlMapsHttpRequest,UrlMapList> |
listRegionUrlMapsCallable()
Retrieves the list of UrlMap resources available to the specified project in the specified
region.
|
com.google.api.gax.rpc.UnaryCallable<ListRegionUrlMapsHttpRequest,RegionUrlMapClient.ListRegionUrlMapsPagedResponse> |
listRegionUrlMapsPagedCallable()
Retrieves the list of UrlMap resources available to the specified project in the specified
region.
|
Operation |
patchRegionUrlMap(PatchRegionUrlMapHttpRequest request)
Patches the specified UrlMap resource with the data included in the request.
|
Operation |
patchRegionUrlMap(ProjectRegionUrlMapName urlMap,
String requestId,
UrlMap urlMapResource,
List<String> fieldMask)
Patches the specified UrlMap resource with the data included in the request.
|
Operation |
patchRegionUrlMap(String urlMap,
String requestId,
UrlMap urlMapResource,
List<String> fieldMask)
Patches the specified UrlMap resource with the data included in the request.
|
com.google.api.gax.rpc.UnaryCallable<PatchRegionUrlMapHttpRequest,Operation> |
patchRegionUrlMapCallable()
Patches the specified UrlMap resource with the data included in the request.
|
void |
shutdown() |
void |
shutdownNow() |
Operation |
updateRegionUrlMap(ProjectRegionUrlMapName urlMap,
String requestId,
UrlMap urlMapResource,
List<String> fieldMask)
Updates the specified UrlMap resource with the data included in the request.
|
Operation |
updateRegionUrlMap(String urlMap,
String requestId,
UrlMap urlMapResource,
List<String> fieldMask)
Updates the specified UrlMap resource with the data included in the request.
|
Operation |
updateRegionUrlMap(UpdateRegionUrlMapHttpRequest request)
Updates the specified UrlMap resource with the data included in the request.
|
com.google.api.gax.rpc.UnaryCallable<UpdateRegionUrlMapHttpRequest,Operation> |
updateRegionUrlMapCallable()
Updates the specified UrlMap resource with the data included in the request.
|
UrlMapsValidateResponse |
validateRegionUrlMap(ProjectRegionUrlMapName urlMap,
RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource)
Runs static validation for the UrlMap.
|
UrlMapsValidateResponse |
validateRegionUrlMap(String urlMap,
RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource)
Runs static validation for the UrlMap.
|
UrlMapsValidateResponse |
validateRegionUrlMap(ValidateRegionUrlMapHttpRequest request)
Runs static validation for the UrlMap.
|
com.google.api.gax.rpc.UnaryCallable<ValidateRegionUrlMapHttpRequest,UrlMapsValidateResponse> |
validateRegionUrlMapCallable()
Runs static validation for the UrlMap.
|
protected RegionUrlMapClient(RegionUrlMapSettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") protected RegionUrlMapClient(RegionUrlMapStub stub)
public static final RegionUrlMapClient create() throws IOException
IOException
public static final RegionUrlMapClient create(RegionUrlMapSettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public static final RegionUrlMapClient create(RegionUrlMapStub stub)
public final RegionUrlMapSettings getSettings()
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public RegionUrlMapStub getStub()
@BetaApi public final Operation deleteRegionUrlMap(ProjectRegionUrlMapName urlMap, String requestId)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionUrlMapName urlMap = ProjectRegionUrlMapName.of("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
Operation response = regionUrlMapClient.deleteRegionUrlMap(urlMap, requestId);
}
urlMap
- Name of the UrlMap resource to delete.requestId
- begin_interface: MixerMutationRequestBuilder Request ID to support
idempotency.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation deleteRegionUrlMap(String urlMap, String requestId)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionUrlMapName urlMap = ProjectRegionUrlMapName.of("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
Operation response = regionUrlMapClient.deleteRegionUrlMap(urlMap.toString(), requestId);
}
urlMap
- Name of the UrlMap resource to delete.requestId
- begin_interface: MixerMutationRequestBuilder Request ID to support
idempotency.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation deleteRegionUrlMap(DeleteRegionUrlMapHttpRequest request)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedUrlMap = ProjectRegionUrlMapName.format("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
DeleteRegionUrlMapHttpRequest request = DeleteRegionUrlMapHttpRequest.newBuilder()
.setUrlMap(formattedUrlMap)
.setRequestId(requestId)
.build();
Operation response = regionUrlMapClient.deleteRegionUrlMap(request);
}
request
- The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final com.google.api.gax.rpc.UnaryCallable<DeleteRegionUrlMapHttpRequest,Operation> deleteRegionUrlMapCallable()
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedUrlMap = ProjectRegionUrlMapName.format("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
DeleteRegionUrlMapHttpRequest request = DeleteRegionUrlMapHttpRequest.newBuilder()
.setUrlMap(formattedUrlMap)
.setRequestId(requestId)
.build();
ApiFuture<Operation> future = regionUrlMapClient.deleteRegionUrlMapCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final UrlMap getRegionUrlMap(ProjectRegionUrlMapName urlMap)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionUrlMapName urlMap = ProjectRegionUrlMapName.of("[PROJECT]", "[REGION]", "[URL_MAP]");
UrlMap response = regionUrlMapClient.getRegionUrlMap(urlMap);
}
urlMap
- Name of the UrlMap resource to return.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final UrlMap getRegionUrlMap(String urlMap)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionUrlMapName urlMap = ProjectRegionUrlMapName.of("[PROJECT]", "[REGION]", "[URL_MAP]");
UrlMap response = regionUrlMapClient.getRegionUrlMap(urlMap.toString());
}
urlMap
- Name of the UrlMap resource to return.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final UrlMap getRegionUrlMap(GetRegionUrlMapHttpRequest request)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedUrlMap = ProjectRegionUrlMapName.format("[PROJECT]", "[REGION]", "[URL_MAP]");
GetRegionUrlMapHttpRequest request = GetRegionUrlMapHttpRequest.newBuilder()
.setUrlMap(formattedUrlMap)
.build();
UrlMap response = regionUrlMapClient.getRegionUrlMap(request);
}
request
- The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final com.google.api.gax.rpc.UnaryCallable<GetRegionUrlMapHttpRequest,UrlMap> getRegionUrlMapCallable()
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedUrlMap = ProjectRegionUrlMapName.format("[PROJECT]", "[REGION]", "[URL_MAP]");
GetRegionUrlMapHttpRequest request = GetRegionUrlMapHttpRequest.newBuilder()
.setUrlMap(formattedUrlMap)
.build();
ApiFuture<UrlMap> future = regionUrlMapClient.getRegionUrlMapCallable().futureCall(request);
// Do something
UrlMap response = future.get();
}
@BetaApi public final Operation insertRegionUrlMap(String requestId, ProjectRegionName region, UrlMap urlMapResource)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String requestId = "";
ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
UrlMap urlMapResource = UrlMap.newBuilder().build();
Operation response = regionUrlMapClient.insertRegionUrlMap(requestId, region, urlMapResource);
}
requestId
- begin_interface: MixerMutationRequestBuilder Request ID to support
idempotency.region
- Name of the region scoping this request.urlMapResource
- Represents a URL Map resource.
A URL map resource is a component of certain types of load balancers. This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
To use this resource, the backend service must have a loadBalancingScheme of either EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED For more information, read URL Map Concepts.
com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation insertRegionUrlMap(String requestId, String region, UrlMap urlMapResource)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String requestId = "";
ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
UrlMap urlMapResource = UrlMap.newBuilder().build();
Operation response = regionUrlMapClient.insertRegionUrlMap(requestId, region.toString(), urlMapResource);
}
requestId
- begin_interface: MixerMutationRequestBuilder Request ID to support
idempotency.region
- Name of the region scoping this request.urlMapResource
- Represents a URL Map resource.
A URL map resource is a component of certain types of load balancers. This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
To use this resource, the backend service must have a loadBalancingScheme of either EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED For more information, read URL Map Concepts.
com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation insertRegionUrlMap(InsertRegionUrlMapHttpRequest request)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String requestId = "";
String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
UrlMap urlMapResource = UrlMap.newBuilder().build();
InsertRegionUrlMapHttpRequest request = InsertRegionUrlMapHttpRequest.newBuilder()
.setRequestId(requestId)
.setRegion(formattedRegion)
.setUrlMapResource(urlMapResource)
.build();
Operation response = regionUrlMapClient.insertRegionUrlMap(request);
}
request
- The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final com.google.api.gax.rpc.UnaryCallable<InsertRegionUrlMapHttpRequest,Operation> insertRegionUrlMapCallable()
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String requestId = "";
String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
UrlMap urlMapResource = UrlMap.newBuilder().build();
InsertRegionUrlMapHttpRequest request = InsertRegionUrlMapHttpRequest.newBuilder()
.setRequestId(requestId)
.setRegion(formattedRegion)
.setUrlMapResource(urlMapResource)
.build();
ApiFuture<Operation> future = regionUrlMapClient.insertRegionUrlMapCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final RegionUrlMapClient.ListRegionUrlMapsPagedResponse listRegionUrlMaps(ProjectRegionName region)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
for (UrlMap element : regionUrlMapClient.listRegionUrlMaps(region).iterateAll()) {
// doThingsWith(element);
}
}
region
- Name of the region scoping this request.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final RegionUrlMapClient.ListRegionUrlMapsPagedResponse listRegionUrlMaps(String region)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
for (UrlMap element : regionUrlMapClient.listRegionUrlMaps(region.toString()).iterateAll()) {
// doThingsWith(element);
}
}
region
- Name of the region scoping this request.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final RegionUrlMapClient.ListRegionUrlMapsPagedResponse listRegionUrlMaps(ListRegionUrlMapsHttpRequest request)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
ListRegionUrlMapsHttpRequest request = ListRegionUrlMapsHttpRequest.newBuilder()
.setRegion(formattedRegion)
.build();
for (UrlMap element : regionUrlMapClient.listRegionUrlMaps(request).iterateAll()) {
// doThingsWith(element);
}
}
request
- The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final com.google.api.gax.rpc.UnaryCallable<ListRegionUrlMapsHttpRequest,RegionUrlMapClient.ListRegionUrlMapsPagedResponse> listRegionUrlMapsPagedCallable()
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
ListRegionUrlMapsHttpRequest request = ListRegionUrlMapsHttpRequest.newBuilder()
.setRegion(formattedRegion)
.build();
ApiFuture<ListRegionUrlMapsPagedResponse> future = regionUrlMapClient.listRegionUrlMapsPagedCallable().futureCall(request);
// Do something
for (UrlMap element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
@BetaApi public final com.google.api.gax.rpc.UnaryCallable<ListRegionUrlMapsHttpRequest,UrlMapList> listRegionUrlMapsCallable()
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
ListRegionUrlMapsHttpRequest request = ListRegionUrlMapsHttpRequest.newBuilder()
.setRegion(formattedRegion)
.build();
while (true) {
UrlMapList response = regionUrlMapClient.listRegionUrlMapsCallable().call(request);
for (UrlMap element : response.getItemsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
@BetaApi public final Operation patchRegionUrlMap(ProjectRegionUrlMapName urlMap, String requestId, UrlMap urlMapResource, List<String> fieldMask)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionUrlMapName urlMap = ProjectRegionUrlMapName.of("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
UrlMap urlMapResource = UrlMap.newBuilder().build();
List<String> fieldMask = new ArrayList<>();
Operation response = regionUrlMapClient.patchRegionUrlMap(urlMap, requestId, urlMapResource, fieldMask);
}
urlMap
- Name of the UrlMap resource to patch.requestId
- begin_interface: MixerMutationRequestBuilder Request ID to support
idempotency.urlMapResource
- Represents a URL Map resource.
A URL map resource is a component of certain types of load balancers. This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
To use this resource, the backend service must have a loadBalancingScheme of either EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED For more information, read URL Map Concepts.
fieldMask
- The fields that should be serialized (even if they have empty values). If the
containing message object has a non-null fieldmask, then all the fields in the field mask
(and only those fields in the field mask) will be serialized. If the containing object does
not have a fieldmask, then only non-empty fields will be serialized.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation patchRegionUrlMap(String urlMap, String requestId, UrlMap urlMapResource, List<String> fieldMask)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionUrlMapName urlMap = ProjectRegionUrlMapName.of("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
UrlMap urlMapResource = UrlMap.newBuilder().build();
List<String> fieldMask = new ArrayList<>();
Operation response = regionUrlMapClient.patchRegionUrlMap(urlMap.toString(), requestId, urlMapResource, fieldMask);
}
urlMap
- Name of the UrlMap resource to patch.requestId
- begin_interface: MixerMutationRequestBuilder Request ID to support
idempotency.urlMapResource
- Represents a URL Map resource.
A URL map resource is a component of certain types of load balancers. This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
To use this resource, the backend service must have a loadBalancingScheme of either EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED For more information, read URL Map Concepts.
fieldMask
- The fields that should be serialized (even if they have empty values). If the
containing message object has a non-null fieldmask, then all the fields in the field mask
(and only those fields in the field mask) will be serialized. If the containing object does
not have a fieldmask, then only non-empty fields will be serialized.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation patchRegionUrlMap(PatchRegionUrlMapHttpRequest request)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedUrlMap = ProjectRegionUrlMapName.format("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
UrlMap urlMapResource = UrlMap.newBuilder().build();
List<String> fieldMask = new ArrayList<>();
PatchRegionUrlMapHttpRequest request = PatchRegionUrlMapHttpRequest.newBuilder()
.setUrlMap(formattedUrlMap)
.setRequestId(requestId)
.setUrlMapResource(urlMapResource)
.addAllFieldMask(fieldMask)
.build();
Operation response = regionUrlMapClient.patchRegionUrlMap(request);
}
request
- The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final com.google.api.gax.rpc.UnaryCallable<PatchRegionUrlMapHttpRequest,Operation> patchRegionUrlMapCallable()
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedUrlMap = ProjectRegionUrlMapName.format("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
UrlMap urlMapResource = UrlMap.newBuilder().build();
List<String> fieldMask = new ArrayList<>();
PatchRegionUrlMapHttpRequest request = PatchRegionUrlMapHttpRequest.newBuilder()
.setUrlMap(formattedUrlMap)
.setRequestId(requestId)
.setUrlMapResource(urlMapResource)
.addAllFieldMask(fieldMask)
.build();
ApiFuture<Operation> future = regionUrlMapClient.patchRegionUrlMapCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final Operation updateRegionUrlMap(ProjectRegionUrlMapName urlMap, String requestId, UrlMap urlMapResource, List<String> fieldMask)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionUrlMapName urlMap = ProjectRegionUrlMapName.of("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
UrlMap urlMapResource = UrlMap.newBuilder().build();
List<String> fieldMask = new ArrayList<>();
Operation response = regionUrlMapClient.updateRegionUrlMap(urlMap, requestId, urlMapResource, fieldMask);
}
urlMap
- Name of the UrlMap resource to update.requestId
- begin_interface: MixerMutationRequestBuilder Request ID to support
idempotency.urlMapResource
- Represents a URL Map resource.
A URL map resource is a component of certain types of load balancers. This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
To use this resource, the backend service must have a loadBalancingScheme of either EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED For more information, read URL Map Concepts.
fieldMask
- The fields that should be serialized (even if they have empty values). If the
containing message object has a non-null fieldmask, then all the fields in the field mask
(and only those fields in the field mask) will be serialized. If the containing object does
not have a fieldmask, then only non-empty fields will be serialized.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation updateRegionUrlMap(String urlMap, String requestId, UrlMap urlMapResource, List<String> fieldMask)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionUrlMapName urlMap = ProjectRegionUrlMapName.of("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
UrlMap urlMapResource = UrlMap.newBuilder().build();
List<String> fieldMask = new ArrayList<>();
Operation response = regionUrlMapClient.updateRegionUrlMap(urlMap.toString(), requestId, urlMapResource, fieldMask);
}
urlMap
- Name of the UrlMap resource to update.requestId
- begin_interface: MixerMutationRequestBuilder Request ID to support
idempotency.urlMapResource
- Represents a URL Map resource.
A URL map resource is a component of certain types of load balancers. This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
To use this resource, the backend service must have a loadBalancingScheme of either EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED For more information, read URL Map Concepts.
fieldMask
- The fields that should be serialized (even if they have empty values). If the
containing message object has a non-null fieldmask, then all the fields in the field mask
(and only those fields in the field mask) will be serialized. If the containing object does
not have a fieldmask, then only non-empty fields will be serialized.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation updateRegionUrlMap(UpdateRegionUrlMapHttpRequest request)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedUrlMap = ProjectRegionUrlMapName.format("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
UrlMap urlMapResource = UrlMap.newBuilder().build();
List<String> fieldMask = new ArrayList<>();
UpdateRegionUrlMapHttpRequest request = UpdateRegionUrlMapHttpRequest.newBuilder()
.setUrlMap(formattedUrlMap)
.setRequestId(requestId)
.setUrlMapResource(urlMapResource)
.addAllFieldMask(fieldMask)
.build();
Operation response = regionUrlMapClient.updateRegionUrlMap(request);
}
request
- The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final com.google.api.gax.rpc.UnaryCallable<UpdateRegionUrlMapHttpRequest,Operation> updateRegionUrlMapCallable()
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedUrlMap = ProjectRegionUrlMapName.format("[PROJECT]", "[REGION]", "[URL_MAP]");
String requestId = "";
UrlMap urlMapResource = UrlMap.newBuilder().build();
List<String> fieldMask = new ArrayList<>();
UpdateRegionUrlMapHttpRequest request = UpdateRegionUrlMapHttpRequest.newBuilder()
.setUrlMap(formattedUrlMap)
.setRequestId(requestId)
.setUrlMapResource(urlMapResource)
.addAllFieldMask(fieldMask)
.build();
ApiFuture<Operation> future = regionUrlMapClient.updateRegionUrlMapCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final UrlMapsValidateResponse validateRegionUrlMap(ProjectRegionUrlMapName urlMap, RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionUrlMapName urlMap = ProjectRegionUrlMapName.of("[PROJECT]", "[REGION]", "[URL_MAP]");
RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource = RegionUrlMapsValidateRequest.newBuilder().build();
UrlMapsValidateResponse response = regionUrlMapClient.validateRegionUrlMap(urlMap, regionUrlMapsValidateRequestResource);
}
urlMap
- Name of the UrlMap resource to be validated as.regionUrlMapsValidateRequestResource
- com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final UrlMapsValidateResponse validateRegionUrlMap(String urlMap, RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
ProjectRegionUrlMapName urlMap = ProjectRegionUrlMapName.of("[PROJECT]", "[REGION]", "[URL_MAP]");
RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource = RegionUrlMapsValidateRequest.newBuilder().build();
UrlMapsValidateResponse response = regionUrlMapClient.validateRegionUrlMap(urlMap.toString(), regionUrlMapsValidateRequestResource);
}
urlMap
- Name of the UrlMap resource to be validated as.regionUrlMapsValidateRequestResource
- com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final UrlMapsValidateResponse validateRegionUrlMap(ValidateRegionUrlMapHttpRequest request)
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedUrlMap = ProjectRegionUrlMapName.format("[PROJECT]", "[REGION]", "[URL_MAP]");
RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource = RegionUrlMapsValidateRequest.newBuilder().build();
ValidateRegionUrlMapHttpRequest request = ValidateRegionUrlMapHttpRequest.newBuilder()
.setUrlMap(formattedUrlMap)
.setRegionUrlMapsValidateRequestResource(regionUrlMapsValidateRequestResource)
.build();
UrlMapsValidateResponse response = regionUrlMapClient.validateRegionUrlMap(request);
}
request
- The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final com.google.api.gax.rpc.UnaryCallable<ValidateRegionUrlMapHttpRequest,UrlMapsValidateResponse> validateRegionUrlMapCallable()
Sample code:
try (RegionUrlMapClient regionUrlMapClient = RegionUrlMapClient.create()) {
String formattedUrlMap = ProjectRegionUrlMapName.format("[PROJECT]", "[REGION]", "[URL_MAP]");
RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource = RegionUrlMapsValidateRequest.newBuilder().build();
ValidateRegionUrlMapHttpRequest request = ValidateRegionUrlMapHttpRequest.newBuilder()
.setUrlMap(formattedUrlMap)
.setRegionUrlMapsValidateRequestResource(regionUrlMapsValidateRequestResource)
.build();
ApiFuture<UrlMapsValidateResponse> future = regionUrlMapClient.validateRegionUrlMapCallable().futureCall(request);
// Do something
UrlMapsValidateResponse response = future.get();
}
public final void close()
close
in interface AutoCloseable
public void shutdown()
shutdown
in interface com.google.api.gax.core.BackgroundResource
public boolean isShutdown()
isShutdown
in interface com.google.api.gax.core.BackgroundResource
public boolean isTerminated()
isTerminated
in interface com.google.api.gax.core.BackgroundResource
public void shutdownNow()
shutdownNow
in interface com.google.api.gax.core.BackgroundResource
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
awaitTermination
in interface com.google.api.gax.core.BackgroundResource
InterruptedException
Copyright © 2019 Google LLC. All rights reserved.