@Generated(value="by gapic-generator") @BetaApi public class TargetSslProxyClient extends Object implements 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 (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
Operation response = targetSslProxyClient.deleteTargetSslProxy(targetSslProxy);
}
Note: close() needs to be called on the targetSslProxyClient 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 TargetSslProxySettings to create(). For example:
To customize credentials:
TargetSslProxySettings targetSslProxySettings =
TargetSslProxySettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
TargetSslProxyClient targetSslProxyClient =
TargetSslProxyClient.create(targetSslProxySettings);
To customize the endpoint:
TargetSslProxySettings targetSslProxySettings =
TargetSslProxySettings.newBuilder().setEndpoint(myEndpoint).build();
TargetSslProxyClient targetSslProxyClient =
TargetSslProxyClient.create(targetSslProxySettings);
Modifier and Type | Class and Description |
---|---|
static class |
TargetSslProxyClient.ListTargetSslProxiesFixedSizeCollection |
static class |
TargetSslProxyClient.ListTargetSslProxiesPage |
static class |
TargetSslProxyClient.ListTargetSslProxiesPagedResponse |
Modifier | Constructor and Description |
---|---|
protected |
TargetSslProxyClient(TargetSslProxySettings settings)
Constructs an instance of TargetSslProxyClient, using the given settings.
|
protected |
TargetSslProxyClient(TargetSslProxyStub stub) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static TargetSslProxyClient |
create()
Constructs an instance of TargetSslProxyClient with default settings.
|
static TargetSslProxyClient |
create(TargetSslProxySettings settings)
Constructs an instance of TargetSslProxyClient, using the given settings.
|
static TargetSslProxyClient |
create(TargetSslProxyStub stub)
Constructs an instance of TargetSslProxyClient, using the given stub for making calls.
|
Operation |
deleteTargetSslProxy(DeleteTargetSslProxyHttpRequest request)
Deletes the specified TargetSslProxy resource.
|
Operation |
deleteTargetSslProxy(ProjectGlobalTargetSslProxyName targetSslProxy)
Deletes the specified TargetSslProxy resource.
|
Operation |
deleteTargetSslProxy(String targetSslProxy)
Deletes the specified TargetSslProxy resource.
|
UnaryCallable<DeleteTargetSslProxyHttpRequest,Operation> |
deleteTargetSslProxyCallable()
Deletes the specified TargetSslProxy resource.
|
TargetSslProxySettings |
getSettings() |
TargetSslProxyStub |
getStub() |
TargetSslProxy |
getTargetSslProxy(GetTargetSslProxyHttpRequest request)
Returns the specified TargetSslProxy resource.
|
TargetSslProxy |
getTargetSslProxy(ProjectGlobalTargetSslProxyName targetSslProxy)
Returns the specified TargetSslProxy resource.
|
TargetSslProxy |
getTargetSslProxy(String targetSslProxy)
Returns the specified TargetSslProxy resource.
|
UnaryCallable<GetTargetSslProxyHttpRequest,TargetSslProxy> |
getTargetSslProxyCallable()
Returns the specified TargetSslProxy resource.
|
Operation |
insertTargetSslProxy(InsertTargetSslProxyHttpRequest request)
Creates a TargetSslProxy resource in the specified project using the data included in the
request.
|
Operation |
insertTargetSslProxy(ProjectName project,
TargetSslProxy targetSslProxyResource)
Creates a TargetSslProxy resource in the specified project using the data included in the
request.
|
Operation |
insertTargetSslProxy(String project,
TargetSslProxy targetSslProxyResource)
Creates a TargetSslProxy resource in the specified project using the data included in the
request.
|
UnaryCallable<InsertTargetSslProxyHttpRequest,Operation> |
insertTargetSslProxyCallable()
Creates a TargetSslProxy resource in the specified project using the data included in the
request.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
TargetSslProxyClient.ListTargetSslProxiesPagedResponse |
listTargetSslProxies(ListTargetSslProxiesHttpRequest request)
Retrieves the list of TargetSslProxy resources available to the specified project.
|
TargetSslProxyClient.ListTargetSslProxiesPagedResponse |
listTargetSslProxies(ProjectName project)
Retrieves the list of TargetSslProxy resources available to the specified project.
|
TargetSslProxyClient.ListTargetSslProxiesPagedResponse |
listTargetSslProxies(String project)
Retrieves the list of TargetSslProxy resources available to the specified project.
|
UnaryCallable<ListTargetSslProxiesHttpRequest,TargetSslProxyList> |
listTargetSslProxiesCallable()
Retrieves the list of TargetSslProxy resources available to the specified project.
|
UnaryCallable<ListTargetSslProxiesHttpRequest,TargetSslProxyClient.ListTargetSslProxiesPagedResponse> |
listTargetSslProxiesPagedCallable()
Retrieves the list of TargetSslProxy resources available to the specified project.
|
Operation |
setBackendServiceTargetSslProxy(ProjectGlobalTargetSslProxyName targetSslProxy,
TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource)
Changes the BackendService for TargetSslProxy.
|
Operation |
setBackendServiceTargetSslProxy(SetBackendServiceTargetSslProxyHttpRequest request)
Changes the BackendService for TargetSslProxy.
|
Operation |
setBackendServiceTargetSslProxy(String targetSslProxy,
TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource)
Changes the BackendService for TargetSslProxy.
|
UnaryCallable<SetBackendServiceTargetSslProxyHttpRequest,Operation> |
setBackendServiceTargetSslProxyCallable()
Changes the BackendService for TargetSslProxy.
|
Operation |
setProxyHeaderTargetSslProxy(ProjectGlobalTargetSslProxyName targetSslProxy,
TargetSslProxiesSetProxyHeaderRequest targetSslProxiesSetProxyHeaderRequestResource)
Changes the ProxyHeaderType for TargetSslProxy.
|
Operation |
setProxyHeaderTargetSslProxy(SetProxyHeaderTargetSslProxyHttpRequest request)
Changes the ProxyHeaderType for TargetSslProxy.
|
Operation |
setProxyHeaderTargetSslProxy(String targetSslProxy,
TargetSslProxiesSetProxyHeaderRequest targetSslProxiesSetProxyHeaderRequestResource)
Changes the ProxyHeaderType for TargetSslProxy.
|
UnaryCallable<SetProxyHeaderTargetSslProxyHttpRequest,Operation> |
setProxyHeaderTargetSslProxyCallable()
Changes the ProxyHeaderType for TargetSslProxy.
|
Operation |
setSslCertificatesTargetSslProxy(ProjectGlobalTargetSslProxyName targetSslProxy,
TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource)
Changes SslCertificates for TargetSslProxy.
|
Operation |
setSslCertificatesTargetSslProxy(SetSslCertificatesTargetSslProxyHttpRequest request)
Changes SslCertificates for TargetSslProxy.
|
Operation |
setSslCertificatesTargetSslProxy(String targetSslProxy,
TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource)
Changes SslCertificates for TargetSslProxy.
|
UnaryCallable<SetSslCertificatesTargetSslProxyHttpRequest,Operation> |
setSslCertificatesTargetSslProxyCallable()
Changes SslCertificates for TargetSslProxy.
|
Operation |
setSslPolicyTargetSslProxy(ProjectGlobalTargetSslProxyName targetSslProxy,
SslPolicyReference sslPolicyReferenceResource)
Sets the SSL policy for TargetSslProxy.
|
Operation |
setSslPolicyTargetSslProxy(SetSslPolicyTargetSslProxyHttpRequest request)
Sets the SSL policy for TargetSslProxy.
|
Operation |
setSslPolicyTargetSslProxy(String targetSslProxy,
SslPolicyReference sslPolicyReferenceResource)
Sets the SSL policy for TargetSslProxy.
|
UnaryCallable<SetSslPolicyTargetSslProxyHttpRequest,Operation> |
setSslPolicyTargetSslProxyCallable()
Sets the SSL policy for TargetSslProxy.
|
void |
shutdown() |
void |
shutdownNow() |
protected TargetSslProxyClient(TargetSslProxySettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") protected TargetSslProxyClient(TargetSslProxyStub stub)
public static final TargetSslProxyClient create() throws IOException
IOException
public static final TargetSslProxyClient create(TargetSslProxySettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public static final TargetSslProxyClient create(TargetSslProxyStub stub)
public final TargetSslProxySettings getSettings()
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public TargetSslProxyStub getStub()
@BetaApi public final Operation deleteTargetSslProxy(ProjectGlobalTargetSslProxyName targetSslProxy)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
Operation response = targetSslProxyClient.deleteTargetSslProxy(targetSslProxy);
}
targetSslProxy
- Name of the TargetSslProxy resource to delete.ApiException
- if the remote call fails@BetaApi public final Operation deleteTargetSslProxy(String targetSslProxy)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
Operation response = targetSslProxyClient.deleteTargetSslProxy(targetSslProxy.toString());
}
targetSslProxy
- Name of the TargetSslProxy resource to delete.ApiException
- if the remote call fails@BetaApi public final Operation deleteTargetSslProxy(DeleteTargetSslProxyHttpRequest request)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
DeleteTargetSslProxyHttpRequest request = DeleteTargetSslProxyHttpRequest.newBuilder()
.setTargetSslProxy(formattedTargetSslProxy)
.build();
Operation response = targetSslProxyClient.deleteTargetSslProxy(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi public final UnaryCallable<DeleteTargetSslProxyHttpRequest,Operation> deleteTargetSslProxyCallable()
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
DeleteTargetSslProxyHttpRequest request = DeleteTargetSslProxyHttpRequest.newBuilder()
.setTargetSslProxy(formattedTargetSslProxy)
.build();
ApiFuture<Operation> future = targetSslProxyClient.deleteTargetSslProxyCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final TargetSslProxy getTargetSslProxy(ProjectGlobalTargetSslProxyName targetSslProxy)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxy response = targetSslProxyClient.getTargetSslProxy(targetSslProxy);
}
targetSslProxy
- Name of the TargetSslProxy resource to return.ApiException
- if the remote call fails@BetaApi public final TargetSslProxy getTargetSslProxy(String targetSslProxy)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxy response = targetSslProxyClient.getTargetSslProxy(targetSslProxy.toString());
}
targetSslProxy
- Name of the TargetSslProxy resource to return.ApiException
- if the remote call fails@BetaApi public final TargetSslProxy getTargetSslProxy(GetTargetSslProxyHttpRequest request)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
GetTargetSslProxyHttpRequest request = GetTargetSslProxyHttpRequest.newBuilder()
.setTargetSslProxy(formattedTargetSslProxy)
.build();
TargetSslProxy response = targetSslProxyClient.getTargetSslProxy(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi public final UnaryCallable<GetTargetSslProxyHttpRequest,TargetSslProxy> getTargetSslProxyCallable()
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
GetTargetSslProxyHttpRequest request = GetTargetSslProxyHttpRequest.newBuilder()
.setTargetSslProxy(formattedTargetSslProxy)
.build();
ApiFuture<TargetSslProxy> future = targetSslProxyClient.getTargetSslProxyCallable().futureCall(request);
// Do something
TargetSslProxy response = future.get();
}
@BetaApi public final Operation insertTargetSslProxy(ProjectName project, TargetSslProxy targetSslProxyResource)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectName project = ProjectName.of("[PROJECT]");
TargetSslProxy targetSslProxyResource = TargetSslProxy.newBuilder().build();
Operation response = targetSslProxyClient.insertTargetSslProxy(project, targetSslProxyResource);
}
project
- Project ID for this request.targetSslProxyResource
- A TargetSslProxy resource. This resource defines an SSL proxy.
(== resource_for beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==)ApiException
- if the remote call fails@BetaApi public final Operation insertTargetSslProxy(String project, TargetSslProxy targetSslProxyResource)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectName project = ProjectName.of("[PROJECT]");
TargetSslProxy targetSslProxyResource = TargetSslProxy.newBuilder().build();
Operation response = targetSslProxyClient.insertTargetSslProxy(project.toString(), targetSslProxyResource);
}
project
- Project ID for this request.targetSslProxyResource
- A TargetSslProxy resource. This resource defines an SSL proxy.
(== resource_for beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==)ApiException
- if the remote call fails@BetaApi public final Operation insertTargetSslProxy(InsertTargetSslProxyHttpRequest request)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedProject = ProjectName.format("[PROJECT]");
TargetSslProxy targetSslProxyResource = TargetSslProxy.newBuilder().build();
InsertTargetSslProxyHttpRequest request = InsertTargetSslProxyHttpRequest.newBuilder()
.setProject(formattedProject)
.setTargetSslProxyResource(targetSslProxyResource)
.build();
Operation response = targetSslProxyClient.insertTargetSslProxy(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi public final UnaryCallable<InsertTargetSslProxyHttpRequest,Operation> insertTargetSslProxyCallable()
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedProject = ProjectName.format("[PROJECT]");
TargetSslProxy targetSslProxyResource = TargetSslProxy.newBuilder().build();
InsertTargetSslProxyHttpRequest request = InsertTargetSslProxyHttpRequest.newBuilder()
.setProject(formattedProject)
.setTargetSslProxyResource(targetSslProxyResource)
.build();
ApiFuture<Operation> future = targetSslProxyClient.insertTargetSslProxyCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final TargetSslProxyClient.ListTargetSslProxiesPagedResponse listTargetSslProxies(ProjectName project)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectName project = ProjectName.of("[PROJECT]");
for (TargetSslProxy element : targetSslProxyClient.listTargetSslProxies(project).iterateAll()) {
// doThingsWith(element);
}
}
project
- Project ID for this request.ApiException
- if the remote call fails@BetaApi public final TargetSslProxyClient.ListTargetSslProxiesPagedResponse listTargetSslProxies(String project)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectName project = ProjectName.of("[PROJECT]");
for (TargetSslProxy element : targetSslProxyClient.listTargetSslProxies(project.toString()).iterateAll()) {
// doThingsWith(element);
}
}
project
- Project ID for this request.ApiException
- if the remote call fails@BetaApi public final TargetSslProxyClient.ListTargetSslProxiesPagedResponse listTargetSslProxies(ListTargetSslProxiesHttpRequest request)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedProject = ProjectName.format("[PROJECT]");
ListTargetSslProxiesHttpRequest request = ListTargetSslProxiesHttpRequest.newBuilder()
.setProject(formattedProject)
.build();
for (TargetSslProxy element : targetSslProxyClient.listTargetSslProxies(request).iterateAll()) {
// doThingsWith(element);
}
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi public final UnaryCallable<ListTargetSslProxiesHttpRequest,TargetSslProxyClient.ListTargetSslProxiesPagedResponse> listTargetSslProxiesPagedCallable()
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedProject = ProjectName.format("[PROJECT]");
ListTargetSslProxiesHttpRequest request = ListTargetSslProxiesHttpRequest.newBuilder()
.setProject(formattedProject)
.build();
ApiFuture<ListTargetSslProxiesPagedResponse> future = targetSslProxyClient.listTargetSslProxiesPagedCallable().futureCall(request);
// Do something
for (TargetSslProxy element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
@BetaApi public final UnaryCallable<ListTargetSslProxiesHttpRequest,TargetSslProxyList> listTargetSslProxiesCallable()
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedProject = ProjectName.format("[PROJECT]");
ListTargetSslProxiesHttpRequest request = ListTargetSslProxiesHttpRequest.newBuilder()
.setProject(formattedProject)
.build();
while (true) {
TargetSslProxyList response = targetSslProxyClient.listTargetSslProxiesCallable().call(request);
for (TargetSslProxy 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 setBackendServiceTargetSslProxy(ProjectGlobalTargetSslProxyName targetSslProxy, TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource = TargetSslProxiesSetBackendServiceRequest.newBuilder().build();
Operation response = targetSslProxyClient.setBackendServiceTargetSslProxy(targetSslProxy, targetSslProxiesSetBackendServiceRequestResource);
}
targetSslProxy
- Name of the TargetSslProxy resource whose BackendService resource is to
be set.targetSslProxiesSetBackendServiceRequestResource
- ApiException
- if the remote call fails@BetaApi public final Operation setBackendServiceTargetSslProxy(String targetSslProxy, TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource = TargetSslProxiesSetBackendServiceRequest.newBuilder().build();
Operation response = targetSslProxyClient.setBackendServiceTargetSslProxy(targetSslProxy.toString(), targetSslProxiesSetBackendServiceRequestResource);
}
targetSslProxy
- Name of the TargetSslProxy resource whose BackendService resource is to
be set.targetSslProxiesSetBackendServiceRequestResource
- ApiException
- if the remote call fails@BetaApi public final Operation setBackendServiceTargetSslProxy(SetBackendServiceTargetSslProxyHttpRequest request)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource = TargetSslProxiesSetBackendServiceRequest.newBuilder().build();
SetBackendServiceTargetSslProxyHttpRequest request = SetBackendServiceTargetSslProxyHttpRequest.newBuilder()
.setTargetSslProxy(formattedTargetSslProxy)
.setTargetSslProxiesSetBackendServiceRequestResource(targetSslProxiesSetBackendServiceRequestResource)
.build();
Operation response = targetSslProxyClient.setBackendServiceTargetSslProxy(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi public final UnaryCallable<SetBackendServiceTargetSslProxyHttpRequest,Operation> setBackendServiceTargetSslProxyCallable()
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource = TargetSslProxiesSetBackendServiceRequest.newBuilder().build();
SetBackendServiceTargetSslProxyHttpRequest request = SetBackendServiceTargetSslProxyHttpRequest.newBuilder()
.setTargetSslProxy(formattedTargetSslProxy)
.setTargetSslProxiesSetBackendServiceRequestResource(targetSslProxiesSetBackendServiceRequestResource)
.build();
ApiFuture<Operation> future = targetSslProxyClient.setBackendServiceTargetSslProxyCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final Operation setProxyHeaderTargetSslProxy(ProjectGlobalTargetSslProxyName targetSslProxy, TargetSslProxiesSetProxyHeaderRequest targetSslProxiesSetProxyHeaderRequestResource)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxiesSetProxyHeaderRequest targetSslProxiesSetProxyHeaderRequestResource = TargetSslProxiesSetProxyHeaderRequest.newBuilder().build();
Operation response = targetSslProxyClient.setProxyHeaderTargetSslProxy(targetSslProxy, targetSslProxiesSetProxyHeaderRequestResource);
}
targetSslProxy
- Name of the TargetSslProxy resource whose ProxyHeader is to be set.targetSslProxiesSetProxyHeaderRequestResource
- ApiException
- if the remote call fails@BetaApi public final Operation setProxyHeaderTargetSslProxy(String targetSslProxy, TargetSslProxiesSetProxyHeaderRequest targetSslProxiesSetProxyHeaderRequestResource)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxiesSetProxyHeaderRequest targetSslProxiesSetProxyHeaderRequestResource = TargetSslProxiesSetProxyHeaderRequest.newBuilder().build();
Operation response = targetSslProxyClient.setProxyHeaderTargetSslProxy(targetSslProxy.toString(), targetSslProxiesSetProxyHeaderRequestResource);
}
targetSslProxy
- Name of the TargetSslProxy resource whose ProxyHeader is to be set.targetSslProxiesSetProxyHeaderRequestResource
- ApiException
- if the remote call fails@BetaApi public final Operation setProxyHeaderTargetSslProxy(SetProxyHeaderTargetSslProxyHttpRequest request)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxiesSetProxyHeaderRequest targetSslProxiesSetProxyHeaderRequestResource = TargetSslProxiesSetProxyHeaderRequest.newBuilder().build();
SetProxyHeaderTargetSslProxyHttpRequest request = SetProxyHeaderTargetSslProxyHttpRequest.newBuilder()
.setTargetSslProxy(formattedTargetSslProxy)
.setTargetSslProxiesSetProxyHeaderRequestResource(targetSslProxiesSetProxyHeaderRequestResource)
.build();
Operation response = targetSslProxyClient.setProxyHeaderTargetSslProxy(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi public final UnaryCallable<SetProxyHeaderTargetSslProxyHttpRequest,Operation> setProxyHeaderTargetSslProxyCallable()
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxiesSetProxyHeaderRequest targetSslProxiesSetProxyHeaderRequestResource = TargetSslProxiesSetProxyHeaderRequest.newBuilder().build();
SetProxyHeaderTargetSslProxyHttpRequest request = SetProxyHeaderTargetSslProxyHttpRequest.newBuilder()
.setTargetSslProxy(formattedTargetSslProxy)
.setTargetSslProxiesSetProxyHeaderRequestResource(targetSslProxiesSetProxyHeaderRequestResource)
.build();
ApiFuture<Operation> future = targetSslProxyClient.setProxyHeaderTargetSslProxyCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final Operation setSslCertificatesTargetSslProxy(ProjectGlobalTargetSslProxyName targetSslProxy, TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource = TargetSslProxiesSetSslCertificatesRequest.newBuilder().build();
Operation response = targetSslProxyClient.setSslCertificatesTargetSslProxy(targetSslProxy, targetSslProxiesSetSslCertificatesRequestResource);
}
targetSslProxy
- Name of the TargetSslProxy resource whose SslCertificate resource is to
be set.targetSslProxiesSetSslCertificatesRequestResource
- ApiException
- if the remote call fails@BetaApi public final Operation setSslCertificatesTargetSslProxy(String targetSslProxy, TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource = TargetSslProxiesSetSslCertificatesRequest.newBuilder().build();
Operation response = targetSslProxyClient.setSslCertificatesTargetSslProxy(targetSslProxy.toString(), targetSslProxiesSetSslCertificatesRequestResource);
}
targetSslProxy
- Name of the TargetSslProxy resource whose SslCertificate resource is to
be set.targetSslProxiesSetSslCertificatesRequestResource
- ApiException
- if the remote call fails@BetaApi public final Operation setSslCertificatesTargetSslProxy(SetSslCertificatesTargetSslProxyHttpRequest request)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource = TargetSslProxiesSetSslCertificatesRequest.newBuilder().build();
SetSslCertificatesTargetSslProxyHttpRequest request = SetSslCertificatesTargetSslProxyHttpRequest.newBuilder()
.setTargetSslProxy(formattedTargetSslProxy)
.setTargetSslProxiesSetSslCertificatesRequestResource(targetSslProxiesSetSslCertificatesRequestResource)
.build();
Operation response = targetSslProxyClient.setSslCertificatesTargetSslProxy(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi public final UnaryCallable<SetSslCertificatesTargetSslProxyHttpRequest,Operation> setSslCertificatesTargetSslProxyCallable()
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource = TargetSslProxiesSetSslCertificatesRequest.newBuilder().build();
SetSslCertificatesTargetSslProxyHttpRequest request = SetSslCertificatesTargetSslProxyHttpRequest.newBuilder()
.setTargetSslProxy(formattedTargetSslProxy)
.setTargetSslProxiesSetSslCertificatesRequestResource(targetSslProxiesSetSslCertificatesRequestResource)
.build();
ApiFuture<Operation> future = targetSslProxyClient.setSslCertificatesTargetSslProxyCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final Operation setSslPolicyTargetSslProxy(ProjectGlobalTargetSslProxyName targetSslProxy, SslPolicyReference sslPolicyReferenceResource)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
SslPolicyReference sslPolicyReferenceResource = SslPolicyReference.newBuilder().build();
Operation response = targetSslProxyClient.setSslPolicyTargetSslProxy(targetSslProxy, sslPolicyReferenceResource);
}
targetSslProxy
- Name of the TargetSslProxy resource whose SSL policy is to be set. The
name must be 1-63 characters long, and comply with RFC1035.sslPolicyReferenceResource
- ApiException
- if the remote call fails@BetaApi public final Operation setSslPolicyTargetSslProxy(String targetSslProxy, SslPolicyReference sslPolicyReferenceResource)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
SslPolicyReference sslPolicyReferenceResource = SslPolicyReference.newBuilder().build();
Operation response = targetSslProxyClient.setSslPolicyTargetSslProxy(targetSslProxy.toString(), sslPolicyReferenceResource);
}
targetSslProxy
- Name of the TargetSslProxy resource whose SSL policy is to be set. The
name must be 1-63 characters long, and comply with RFC1035.sslPolicyReferenceResource
- ApiException
- if the remote call fails@BetaApi public final Operation setSslPolicyTargetSslProxy(SetSslPolicyTargetSslProxyHttpRequest request)
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
SslPolicyReference sslPolicyReferenceResource = SslPolicyReference.newBuilder().build();
SetSslPolicyTargetSslProxyHttpRequest request = SetSslPolicyTargetSslProxyHttpRequest.newBuilder()
.setTargetSslProxy(formattedTargetSslProxy)
.setSslPolicyReferenceResource(sslPolicyReferenceResource)
.build();
Operation response = targetSslProxyClient.setSslPolicyTargetSslProxy(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi public final UnaryCallable<SetSslPolicyTargetSslProxyHttpRequest,Operation> setSslPolicyTargetSslProxyCallable()
Sample code:
try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
SslPolicyReference sslPolicyReferenceResource = SslPolicyReference.newBuilder().build();
SetSslPolicyTargetSslProxyHttpRequest request = SetSslPolicyTargetSslProxyHttpRequest.newBuilder()
.setTargetSslProxy(formattedTargetSslProxy)
.setSslPolicyReferenceResource(sslPolicyReferenceResource)
.build();
ApiFuture<Operation> future = targetSslProxyClient.setSslPolicyTargetSslProxyCallable().futureCall(request);
// Do something
Operation response = future.get();
}
public final void close()
close
in interface AutoCloseable
public void shutdown()
shutdown
in interface BackgroundResource
public boolean isShutdown()
isShutdown
in interface BackgroundResource
public boolean isTerminated()
isTerminated
in interface BackgroundResource
public void shutdownNow()
shutdownNow
in interface BackgroundResource
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
awaitTermination
in interface BackgroundResource
InterruptedException
Copyright © 2019 Google LLC. All rights reserved.