@Generated(value="by gapic-generator") @BetaApi public class RegionTargetHttpsProxyClient 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 (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionTargetHttpsProxyName targetHttpsProxy = ProjectRegionTargetHttpsProxyName.of("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
Operation response = regionTargetHttpsProxyClient.deleteRegionTargetHttpsProxy(targetHttpsProxy);
}
Note: close() needs to be called on the regionTargetHttpsProxyClient 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 RegionTargetHttpsProxySettings to create(). For example:
To customize credentials:
RegionTargetHttpsProxySettings regionTargetHttpsProxySettings =
RegionTargetHttpsProxySettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
RegionTargetHttpsProxyClient regionTargetHttpsProxyClient =
RegionTargetHttpsProxyClient.create(regionTargetHttpsProxySettings);
To customize the endpoint:
RegionTargetHttpsProxySettings regionTargetHttpsProxySettings =
RegionTargetHttpsProxySettings.newBuilder().setEndpoint(myEndpoint).build();
RegionTargetHttpsProxyClient regionTargetHttpsProxyClient =
RegionTargetHttpsProxyClient.create(regionTargetHttpsProxySettings);
Modifier and Type | Class and Description |
---|---|
static class |
RegionTargetHttpsProxyClient.ListRegionTargetHttpsProxiesFixedSizeCollection |
static class |
RegionTargetHttpsProxyClient.ListRegionTargetHttpsProxiesPage |
static class |
RegionTargetHttpsProxyClient.ListRegionTargetHttpsProxiesPagedResponse |
Modifier | Constructor and Description |
---|---|
protected |
RegionTargetHttpsProxyClient(RegionTargetHttpsProxySettings settings)
Constructs an instance of RegionTargetHttpsProxyClient, using the given settings.
|
protected |
RegionTargetHttpsProxyClient(RegionTargetHttpsProxyStub stub) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static RegionTargetHttpsProxyClient |
create()
Constructs an instance of RegionTargetHttpsProxyClient with default settings.
|
static RegionTargetHttpsProxyClient |
create(RegionTargetHttpsProxySettings settings)
Constructs an instance of RegionTargetHttpsProxyClient, using the given settings.
|
static RegionTargetHttpsProxyClient |
create(RegionTargetHttpsProxyStub stub)
Constructs an instance of RegionTargetHttpsProxyClient, using the given stub for making calls.
|
Operation |
deleteRegionTargetHttpsProxy(DeleteRegionTargetHttpsProxyHttpRequest request)
Deletes the specified TargetHttpsProxy resource.
|
Operation |
deleteRegionTargetHttpsProxy(ProjectRegionTargetHttpsProxyName targetHttpsProxy)
Deletes the specified TargetHttpsProxy resource.
|
Operation |
deleteRegionTargetHttpsProxy(String targetHttpsProxy)
Deletes the specified TargetHttpsProxy resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteRegionTargetHttpsProxyHttpRequest,Operation> |
deleteRegionTargetHttpsProxyCallable()
Deletes the specified TargetHttpsProxy resource.
|
TargetHttpsProxy |
getRegionTargetHttpsProxy(GetRegionTargetHttpsProxyHttpRequest request)
Returns the specified TargetHttpsProxy resource in the specified region.
|
TargetHttpsProxy |
getRegionTargetHttpsProxy(ProjectRegionTargetHttpsProxyName targetHttpsProxy)
Returns the specified TargetHttpsProxy resource in the specified region.
|
TargetHttpsProxy |
getRegionTargetHttpsProxy(String targetHttpsProxy)
Returns the specified TargetHttpsProxy resource in the specified region.
|
com.google.api.gax.rpc.UnaryCallable<GetRegionTargetHttpsProxyHttpRequest,TargetHttpsProxy> |
getRegionTargetHttpsProxyCallable()
Returns the specified TargetHttpsProxy resource in the specified region.
|
RegionTargetHttpsProxySettings |
getSettings() |
RegionTargetHttpsProxyStub |
getStub() |
Operation |
insertRegionTargetHttpsProxy(InsertRegionTargetHttpsProxyHttpRequest request)
Creates a TargetHttpsProxy resource in the specified project and region using the data included
in the request.
|
Operation |
insertRegionTargetHttpsProxy(ProjectRegionName region,
TargetHttpsProxy targetHttpsProxyResource)
Creates a TargetHttpsProxy resource in the specified project and region using the data included
in the request.
|
Operation |
insertRegionTargetHttpsProxy(String region,
TargetHttpsProxy targetHttpsProxyResource)
Creates a TargetHttpsProxy resource in the specified project and region using the data included
in the request.
|
com.google.api.gax.rpc.UnaryCallable<InsertRegionTargetHttpsProxyHttpRequest,Operation> |
insertRegionTargetHttpsProxyCallable()
Creates a TargetHttpsProxy resource in the specified project and region using the data included
in the request.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
RegionTargetHttpsProxyClient.ListRegionTargetHttpsProxiesPagedResponse |
listRegionTargetHttpsProxies(ListRegionTargetHttpsProxiesHttpRequest request)
Retrieves the list of TargetHttpsProxy resources available to the specified project in the
specified region.
|
RegionTargetHttpsProxyClient.ListRegionTargetHttpsProxiesPagedResponse |
listRegionTargetHttpsProxies(ProjectRegionName region)
Retrieves the list of TargetHttpsProxy resources available to the specified project in the
specified region.
|
RegionTargetHttpsProxyClient.ListRegionTargetHttpsProxiesPagedResponse |
listRegionTargetHttpsProxies(String region)
Retrieves the list of TargetHttpsProxy resources available to the specified project in the
specified region.
|
com.google.api.gax.rpc.UnaryCallable<ListRegionTargetHttpsProxiesHttpRequest,TargetHttpsProxyList> |
listRegionTargetHttpsProxiesCallable()
Retrieves the list of TargetHttpsProxy resources available to the specified project in the
specified region.
|
com.google.api.gax.rpc.UnaryCallable<ListRegionTargetHttpsProxiesHttpRequest,RegionTargetHttpsProxyClient.ListRegionTargetHttpsProxiesPagedResponse> |
listRegionTargetHttpsProxiesPagedCallable()
Retrieves the list of TargetHttpsProxy resources available to the specified project in the
specified region.
|
Operation |
setSslCertificatesRegionTargetHttpsProxy(ProjectRegionTargetHttpsProxyName targetHttpsProxy,
RegionTargetHttpsProxiesSetSslCertificatesRequest regionTargetHttpsProxiesSetSslCertificatesRequestResource)
Replaces SslCertificates for TargetHttpsProxy.
|
Operation |
setSslCertificatesRegionTargetHttpsProxy(SetSslCertificatesRegionTargetHttpsProxyHttpRequest request)
Replaces SslCertificates for TargetHttpsProxy.
|
Operation |
setSslCertificatesRegionTargetHttpsProxy(String targetHttpsProxy,
RegionTargetHttpsProxiesSetSslCertificatesRequest regionTargetHttpsProxiesSetSslCertificatesRequestResource)
Replaces SslCertificates for TargetHttpsProxy.
|
com.google.api.gax.rpc.UnaryCallable<SetSslCertificatesRegionTargetHttpsProxyHttpRequest,Operation> |
setSslCertificatesRegionTargetHttpsProxyCallable()
Replaces SslCertificates for TargetHttpsProxy.
|
Operation |
setUrlMapRegionTargetHttpsProxy(ProjectRegionTargetHttpsProxyName targetHttpsProxy,
UrlMapReference urlMapReferenceResource)
Changes the URL map for TargetHttpsProxy.
|
Operation |
setUrlMapRegionTargetHttpsProxy(SetUrlMapRegionTargetHttpsProxyHttpRequest request)
Changes the URL map for TargetHttpsProxy.
|
Operation |
setUrlMapRegionTargetHttpsProxy(String targetHttpsProxy,
UrlMapReference urlMapReferenceResource)
Changes the URL map for TargetHttpsProxy.
|
com.google.api.gax.rpc.UnaryCallable<SetUrlMapRegionTargetHttpsProxyHttpRequest,Operation> |
setUrlMapRegionTargetHttpsProxyCallable()
Changes the URL map for TargetHttpsProxy.
|
void |
shutdown() |
void |
shutdownNow() |
protected RegionTargetHttpsProxyClient(RegionTargetHttpsProxySettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") protected RegionTargetHttpsProxyClient(RegionTargetHttpsProxyStub stub)
public static final RegionTargetHttpsProxyClient create() throws IOException
IOException
public static final RegionTargetHttpsProxyClient create(RegionTargetHttpsProxySettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public static final RegionTargetHttpsProxyClient create(RegionTargetHttpsProxyStub stub)
public final RegionTargetHttpsProxySettings getSettings()
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public RegionTargetHttpsProxyStub getStub()
@BetaApi public final Operation deleteRegionTargetHttpsProxy(ProjectRegionTargetHttpsProxyName targetHttpsProxy)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionTargetHttpsProxyName targetHttpsProxy = ProjectRegionTargetHttpsProxyName.of("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
Operation response = regionTargetHttpsProxyClient.deleteRegionTargetHttpsProxy(targetHttpsProxy);
}
targetHttpsProxy
- Name of the TargetHttpsProxy resource to delete.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation deleteRegionTargetHttpsProxy(String targetHttpsProxy)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionTargetHttpsProxyName targetHttpsProxy = ProjectRegionTargetHttpsProxyName.of("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
Operation response = regionTargetHttpsProxyClient.deleteRegionTargetHttpsProxy(targetHttpsProxy.toString());
}
targetHttpsProxy
- Name of the TargetHttpsProxy resource to delete.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation deleteRegionTargetHttpsProxy(DeleteRegionTargetHttpsProxyHttpRequest request)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedTargetHttpsProxy = ProjectRegionTargetHttpsProxyName.format("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
DeleteRegionTargetHttpsProxyHttpRequest request = DeleteRegionTargetHttpsProxyHttpRequest.newBuilder()
.setTargetHttpsProxy(formattedTargetHttpsProxy)
.build();
Operation response = regionTargetHttpsProxyClient.deleteRegionTargetHttpsProxy(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<DeleteRegionTargetHttpsProxyHttpRequest,Operation> deleteRegionTargetHttpsProxyCallable()
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedTargetHttpsProxy = ProjectRegionTargetHttpsProxyName.format("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
DeleteRegionTargetHttpsProxyHttpRequest request = DeleteRegionTargetHttpsProxyHttpRequest.newBuilder()
.setTargetHttpsProxy(formattedTargetHttpsProxy)
.build();
ApiFuture<Operation> future = regionTargetHttpsProxyClient.deleteRegionTargetHttpsProxyCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final TargetHttpsProxy getRegionTargetHttpsProxy(ProjectRegionTargetHttpsProxyName targetHttpsProxy)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionTargetHttpsProxyName targetHttpsProxy = ProjectRegionTargetHttpsProxyName.of("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
TargetHttpsProxy response = regionTargetHttpsProxyClient.getRegionTargetHttpsProxy(targetHttpsProxy);
}
targetHttpsProxy
- Name of the TargetHttpsProxy resource to return.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final TargetHttpsProxy getRegionTargetHttpsProxy(String targetHttpsProxy)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionTargetHttpsProxyName targetHttpsProxy = ProjectRegionTargetHttpsProxyName.of("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
TargetHttpsProxy response = regionTargetHttpsProxyClient.getRegionTargetHttpsProxy(targetHttpsProxy.toString());
}
targetHttpsProxy
- Name of the TargetHttpsProxy resource to return.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final TargetHttpsProxy getRegionTargetHttpsProxy(GetRegionTargetHttpsProxyHttpRequest request)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedTargetHttpsProxy = ProjectRegionTargetHttpsProxyName.format("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
GetRegionTargetHttpsProxyHttpRequest request = GetRegionTargetHttpsProxyHttpRequest.newBuilder()
.setTargetHttpsProxy(formattedTargetHttpsProxy)
.build();
TargetHttpsProxy response = regionTargetHttpsProxyClient.getRegionTargetHttpsProxy(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<GetRegionTargetHttpsProxyHttpRequest,TargetHttpsProxy> getRegionTargetHttpsProxyCallable()
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedTargetHttpsProxy = ProjectRegionTargetHttpsProxyName.format("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
GetRegionTargetHttpsProxyHttpRequest request = GetRegionTargetHttpsProxyHttpRequest.newBuilder()
.setTargetHttpsProxy(formattedTargetHttpsProxy)
.build();
ApiFuture<TargetHttpsProxy> future = regionTargetHttpsProxyClient.getRegionTargetHttpsProxyCallable().futureCall(request);
// Do something
TargetHttpsProxy response = future.get();
}
@BetaApi public final Operation insertRegionTargetHttpsProxy(ProjectRegionName region, TargetHttpsProxy targetHttpsProxyResource)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
TargetHttpsProxy targetHttpsProxyResource = TargetHttpsProxy.newBuilder().build();
Operation response = regionTargetHttpsProxyClient.insertRegionTargetHttpsProxy(region, targetHttpsProxyResource);
}
region
- Name of the region scoping this request.targetHttpsProxyResource
- Represents a Target HTTPS Proxy resource.
A target HTTPS proxy is a component of certain types of load balancers. Global forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies. (== resource_for beta.targetHttpsProxies ==) (== resource_for v1.targetHttpsProxies ==)
com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation insertRegionTargetHttpsProxy(String region, TargetHttpsProxy targetHttpsProxyResource)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
TargetHttpsProxy targetHttpsProxyResource = TargetHttpsProxy.newBuilder().build();
Operation response = regionTargetHttpsProxyClient.insertRegionTargetHttpsProxy(region.toString(), targetHttpsProxyResource);
}
region
- Name of the region scoping this request.targetHttpsProxyResource
- Represents a Target HTTPS Proxy resource.
A target HTTPS proxy is a component of certain types of load balancers. Global forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies. (== resource_for beta.targetHttpsProxies ==) (== resource_for v1.targetHttpsProxies ==)
com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation insertRegionTargetHttpsProxy(InsertRegionTargetHttpsProxyHttpRequest request)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
TargetHttpsProxy targetHttpsProxyResource = TargetHttpsProxy.newBuilder().build();
InsertRegionTargetHttpsProxyHttpRequest request = InsertRegionTargetHttpsProxyHttpRequest.newBuilder()
.setRegion(formattedRegion)
.setTargetHttpsProxyResource(targetHttpsProxyResource)
.build();
Operation response = regionTargetHttpsProxyClient.insertRegionTargetHttpsProxy(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<InsertRegionTargetHttpsProxyHttpRequest,Operation> insertRegionTargetHttpsProxyCallable()
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
TargetHttpsProxy targetHttpsProxyResource = TargetHttpsProxy.newBuilder().build();
InsertRegionTargetHttpsProxyHttpRequest request = InsertRegionTargetHttpsProxyHttpRequest.newBuilder()
.setRegion(formattedRegion)
.setTargetHttpsProxyResource(targetHttpsProxyResource)
.build();
ApiFuture<Operation> future = regionTargetHttpsProxyClient.insertRegionTargetHttpsProxyCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final RegionTargetHttpsProxyClient.ListRegionTargetHttpsProxiesPagedResponse listRegionTargetHttpsProxies(ProjectRegionName region)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
for (TargetHttpsProxy element : regionTargetHttpsProxyClient.listRegionTargetHttpsProxies(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 RegionTargetHttpsProxyClient.ListRegionTargetHttpsProxiesPagedResponse listRegionTargetHttpsProxies(String region)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
for (TargetHttpsProxy element : regionTargetHttpsProxyClient.listRegionTargetHttpsProxies(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 RegionTargetHttpsProxyClient.ListRegionTargetHttpsProxiesPagedResponse listRegionTargetHttpsProxies(ListRegionTargetHttpsProxiesHttpRequest request)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
ListRegionTargetHttpsProxiesHttpRequest request = ListRegionTargetHttpsProxiesHttpRequest.newBuilder()
.setRegion(formattedRegion)
.build();
for (TargetHttpsProxy element : regionTargetHttpsProxyClient.listRegionTargetHttpsProxies(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<ListRegionTargetHttpsProxiesHttpRequest,RegionTargetHttpsProxyClient.ListRegionTargetHttpsProxiesPagedResponse> listRegionTargetHttpsProxiesPagedCallable()
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
ListRegionTargetHttpsProxiesHttpRequest request = ListRegionTargetHttpsProxiesHttpRequest.newBuilder()
.setRegion(formattedRegion)
.build();
ApiFuture<ListRegionTargetHttpsProxiesPagedResponse> future = regionTargetHttpsProxyClient.listRegionTargetHttpsProxiesPagedCallable().futureCall(request);
// Do something
for (TargetHttpsProxy element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
@BetaApi public final com.google.api.gax.rpc.UnaryCallable<ListRegionTargetHttpsProxiesHttpRequest,TargetHttpsProxyList> listRegionTargetHttpsProxiesCallable()
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
ListRegionTargetHttpsProxiesHttpRequest request = ListRegionTargetHttpsProxiesHttpRequest.newBuilder()
.setRegion(formattedRegion)
.build();
while (true) {
TargetHttpsProxyList response = regionTargetHttpsProxyClient.listRegionTargetHttpsProxiesCallable().call(request);
for (TargetHttpsProxy 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 setSslCertificatesRegionTargetHttpsProxy(ProjectRegionTargetHttpsProxyName targetHttpsProxy, RegionTargetHttpsProxiesSetSslCertificatesRequest regionTargetHttpsProxiesSetSslCertificatesRequestResource)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionTargetHttpsProxyName targetHttpsProxy = ProjectRegionTargetHttpsProxyName.of("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
RegionTargetHttpsProxiesSetSslCertificatesRequest regionTargetHttpsProxiesSetSslCertificatesRequestResource = RegionTargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build();
Operation response = regionTargetHttpsProxyClient.setSslCertificatesRegionTargetHttpsProxy(targetHttpsProxy, regionTargetHttpsProxiesSetSslCertificatesRequestResource);
}
targetHttpsProxy
- Name of the TargetHttpsProxy resource to set an SslCertificates
resource for.regionTargetHttpsProxiesSetSslCertificatesRequestResource
- com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation setSslCertificatesRegionTargetHttpsProxy(String targetHttpsProxy, RegionTargetHttpsProxiesSetSslCertificatesRequest regionTargetHttpsProxiesSetSslCertificatesRequestResource)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionTargetHttpsProxyName targetHttpsProxy = ProjectRegionTargetHttpsProxyName.of("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
RegionTargetHttpsProxiesSetSslCertificatesRequest regionTargetHttpsProxiesSetSslCertificatesRequestResource = RegionTargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build();
Operation response = regionTargetHttpsProxyClient.setSslCertificatesRegionTargetHttpsProxy(targetHttpsProxy.toString(), regionTargetHttpsProxiesSetSslCertificatesRequestResource);
}
targetHttpsProxy
- Name of the TargetHttpsProxy resource to set an SslCertificates
resource for.regionTargetHttpsProxiesSetSslCertificatesRequestResource
- com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation setSslCertificatesRegionTargetHttpsProxy(SetSslCertificatesRegionTargetHttpsProxyHttpRequest request)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedTargetHttpsProxy = ProjectRegionTargetHttpsProxyName.format("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
RegionTargetHttpsProxiesSetSslCertificatesRequest regionTargetHttpsProxiesSetSslCertificatesRequestResource = RegionTargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build();
SetSslCertificatesRegionTargetHttpsProxyHttpRequest request = SetSslCertificatesRegionTargetHttpsProxyHttpRequest.newBuilder()
.setTargetHttpsProxy(formattedTargetHttpsProxy)
.setRegionTargetHttpsProxiesSetSslCertificatesRequestResource(regionTargetHttpsProxiesSetSslCertificatesRequestResource)
.build();
Operation response = regionTargetHttpsProxyClient.setSslCertificatesRegionTargetHttpsProxy(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<SetSslCertificatesRegionTargetHttpsProxyHttpRequest,Operation> setSslCertificatesRegionTargetHttpsProxyCallable()
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedTargetHttpsProxy = ProjectRegionTargetHttpsProxyName.format("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
RegionTargetHttpsProxiesSetSslCertificatesRequest regionTargetHttpsProxiesSetSslCertificatesRequestResource = RegionTargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build();
SetSslCertificatesRegionTargetHttpsProxyHttpRequest request = SetSslCertificatesRegionTargetHttpsProxyHttpRequest.newBuilder()
.setTargetHttpsProxy(formattedTargetHttpsProxy)
.setRegionTargetHttpsProxiesSetSslCertificatesRequestResource(regionTargetHttpsProxiesSetSslCertificatesRequestResource)
.build();
ApiFuture<Operation> future = regionTargetHttpsProxyClient.setSslCertificatesRegionTargetHttpsProxyCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final Operation setUrlMapRegionTargetHttpsProxy(ProjectRegionTargetHttpsProxyName targetHttpsProxy, UrlMapReference urlMapReferenceResource)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionTargetHttpsProxyName targetHttpsProxy = ProjectRegionTargetHttpsProxyName.of("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build();
Operation response = regionTargetHttpsProxyClient.setUrlMapRegionTargetHttpsProxy(targetHttpsProxy, urlMapReferenceResource);
}
targetHttpsProxy
- Name of the TargetHttpsProxy to set a URL map for.urlMapReferenceResource
- com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation setUrlMapRegionTargetHttpsProxy(String targetHttpsProxy, UrlMapReference urlMapReferenceResource)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
ProjectRegionTargetHttpsProxyName targetHttpsProxy = ProjectRegionTargetHttpsProxyName.of("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build();
Operation response = regionTargetHttpsProxyClient.setUrlMapRegionTargetHttpsProxy(targetHttpsProxy.toString(), urlMapReferenceResource);
}
targetHttpsProxy
- Name of the TargetHttpsProxy to set a URL map for.urlMapReferenceResource
- com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation setUrlMapRegionTargetHttpsProxy(SetUrlMapRegionTargetHttpsProxyHttpRequest request)
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedTargetHttpsProxy = ProjectRegionTargetHttpsProxyName.format("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build();
SetUrlMapRegionTargetHttpsProxyHttpRequest request = SetUrlMapRegionTargetHttpsProxyHttpRequest.newBuilder()
.setTargetHttpsProxy(formattedTargetHttpsProxy)
.setUrlMapReferenceResource(urlMapReferenceResource)
.build();
Operation response = regionTargetHttpsProxyClient.setUrlMapRegionTargetHttpsProxy(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<SetUrlMapRegionTargetHttpsProxyHttpRequest,Operation> setUrlMapRegionTargetHttpsProxyCallable()
Sample code:
try (RegionTargetHttpsProxyClient regionTargetHttpsProxyClient = RegionTargetHttpsProxyClient.create()) {
String formattedTargetHttpsProxy = ProjectRegionTargetHttpsProxyName.format("[PROJECT]", "[REGION]", "[TARGET_HTTPS_PROXY]");
UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build();
SetUrlMapRegionTargetHttpsProxyHttpRequest request = SetUrlMapRegionTargetHttpsProxyHttpRequest.newBuilder()
.setTargetHttpsProxy(formattedTargetHttpsProxy)
.setUrlMapReferenceResource(urlMapReferenceResource)
.build();
ApiFuture<Operation> future = regionTargetHttpsProxyClient.setUrlMapRegionTargetHttpsProxyCallable().futureCall(request);
// Do something
Operation 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.