@Generated(value="by gapic-generator") @BetaApi public class SslPolicyClient 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 (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
Operation response = sslPolicyClient.deleteSslPolicy(sslPolicy);
}
Note: close() needs to be called on the sslPolicyClient 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 SslPolicySettings to create(). For example:
To customize credentials:
SslPolicySettings sslPolicySettings =
SslPolicySettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
SslPolicyClient sslPolicyClient =
SslPolicyClient.create(sslPolicySettings);
To customize the endpoint:
SslPolicySettings sslPolicySettings =
SslPolicySettings.newBuilder().setEndpoint(myEndpoint).build();
SslPolicyClient sslPolicyClient =
SslPolicyClient.create(sslPolicySettings);
Modifier and Type | Class and Description |
---|---|
static class |
SslPolicyClient.ListSslPoliciesFixedSizeCollection |
static class |
SslPolicyClient.ListSslPoliciesPage |
static class |
SslPolicyClient.ListSslPoliciesPagedResponse |
Modifier | Constructor and Description |
---|---|
protected |
SslPolicyClient(SslPolicySettings settings)
Constructs an instance of SslPolicyClient, using the given settings.
|
protected |
SslPolicyClient(SslPolicyStub stub) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static SslPolicyClient |
create()
Constructs an instance of SslPolicyClient with default settings.
|
static SslPolicyClient |
create(SslPolicySettings settings)
Constructs an instance of SslPolicyClient, using the given settings.
|
static SslPolicyClient |
create(SslPolicyStub stub)
Constructs an instance of SslPolicyClient, using the given stub for making calls.
|
Operation |
deleteSslPolicy(DeleteSslPolicyHttpRequest request)
Deletes the specified SSL policy.
|
Operation |
deleteSslPolicy(ProjectGlobalSslPolicyName sslPolicy)
Deletes the specified SSL policy.
|
Operation |
deleteSslPolicy(String sslPolicy)
Deletes the specified SSL policy.
|
com.google.api.gax.rpc.UnaryCallable<DeleteSslPolicyHttpRequest,Operation> |
deleteSslPolicyCallable()
Deletes the specified SSL policy.
|
SslPolicySettings |
getSettings() |
SslPolicy |
getSslPolicy(GetSslPolicyHttpRequest request)
Lists all of the ordered rules present in a single specified policy.
|
SslPolicy |
getSslPolicy(ProjectGlobalSslPolicyName sslPolicy)
Lists all of the ordered rules present in a single specified policy.
|
SslPolicy |
getSslPolicy(String sslPolicy)
Lists all of the ordered rules present in a single specified policy.
|
com.google.api.gax.rpc.UnaryCallable<GetSslPolicyHttpRequest,SslPolicy> |
getSslPolicyCallable()
Lists all of the ordered rules present in a single specified policy.
|
SslPolicyStub |
getStub() |
Operation |
insertSslPolicy(InsertSslPolicyHttpRequest request)
Returns the specified SSL policy resource.
|
Operation |
insertSslPolicy(ProjectName project,
SslPolicy sslPolicyResource)
Returns the specified SSL policy resource.
|
Operation |
insertSslPolicy(String project,
SslPolicy sslPolicyResource)
Returns the specified SSL policy resource.
|
com.google.api.gax.rpc.UnaryCallable<InsertSslPolicyHttpRequest,Operation> |
insertSslPolicyCallable()
Returns the specified SSL policy resource.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
SslPoliciesListAvailableFeaturesResponse |
listAvailableFeaturesSslPolicies(ListAvailableFeaturesSslPoliciesHttpRequest request)
Lists all features that can be specified in the SSL policy when using custom profile.
|
SslPoliciesListAvailableFeaturesResponse |
listAvailableFeaturesSslPolicies(ProjectName project)
Lists all features that can be specified in the SSL policy when using custom profile.
|
SslPoliciesListAvailableFeaturesResponse |
listAvailableFeaturesSslPolicies(String project)
Lists all features that can be specified in the SSL policy when using custom profile.
|
com.google.api.gax.rpc.UnaryCallable<ListAvailableFeaturesSslPoliciesHttpRequest,SslPoliciesListAvailableFeaturesResponse> |
listAvailableFeaturesSslPoliciesCallable()
Lists all features that can be specified in the SSL policy when using custom profile.
|
SslPolicyClient.ListSslPoliciesPagedResponse |
listSslPolicies(ListSslPoliciesHttpRequest request)
Lists all the SSL policies that have been configured for the specified project.
|
SslPolicyClient.ListSslPoliciesPagedResponse |
listSslPolicies(ProjectName project)
Lists all the SSL policies that have been configured for the specified project.
|
SslPolicyClient.ListSslPoliciesPagedResponse |
listSslPolicies(String project)
Lists all the SSL policies that have been configured for the specified project.
|
com.google.api.gax.rpc.UnaryCallable<ListSslPoliciesHttpRequest,SslPoliciesList> |
listSslPoliciesCallable()
Lists all the SSL policies that have been configured for the specified project.
|
com.google.api.gax.rpc.UnaryCallable<ListSslPoliciesHttpRequest,SslPolicyClient.ListSslPoliciesPagedResponse> |
listSslPoliciesPagedCallable()
Lists all the SSL policies that have been configured for the specified project.
|
Operation |
patchSslPolicy(PatchSslPolicyHttpRequest request)
Patches the specified SSL policy with the data included in the request.
|
Operation |
patchSslPolicy(ProjectGlobalSslPolicyName sslPolicy,
SslPolicy sslPolicyResource,
List<String> fieldMask)
Patches the specified SSL policy with the data included in the request.
|
Operation |
patchSslPolicy(String sslPolicy,
SslPolicy sslPolicyResource,
List<String> fieldMask)
Patches the specified SSL policy with the data included in the request.
|
com.google.api.gax.rpc.UnaryCallable<PatchSslPolicyHttpRequest,Operation> |
patchSslPolicyCallable()
Patches the specified SSL policy with the data included in the request.
|
void |
shutdown() |
void |
shutdownNow() |
protected SslPolicyClient(SslPolicySettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") protected SslPolicyClient(SslPolicyStub stub)
public static final SslPolicyClient create() throws IOException
IOException
public static final SslPolicyClient create(SslPolicySettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public static final SslPolicyClient create(SslPolicyStub stub)
public final SslPolicySettings getSettings()
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public SslPolicyStub getStub()
@BetaApi public final Operation deleteSslPolicy(ProjectGlobalSslPolicyName sslPolicy)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
Operation response = sslPolicyClient.deleteSslPolicy(sslPolicy);
}
sslPolicy
- Name of the SSL policy to delete. The name must be 1-63 characters long, and
comply with RFC1035.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation deleteSslPolicy(String sslPolicy)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
Operation response = sslPolicyClient.deleteSslPolicy(sslPolicy.toString());
}
sslPolicy
- Name of the SSL policy to delete. The name must be 1-63 characters long, and
comply with RFC1035.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation deleteSslPolicy(DeleteSslPolicyHttpRequest request)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedSslPolicy = ProjectGlobalSslPolicyName.format("[PROJECT]", "[SSL_POLICY]");
DeleteSslPolicyHttpRequest request = DeleteSslPolicyHttpRequest.newBuilder()
.setSslPolicy(formattedSslPolicy)
.build();
Operation response = sslPolicyClient.deleteSslPolicy(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<DeleteSslPolicyHttpRequest,Operation> deleteSslPolicyCallable()
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedSslPolicy = ProjectGlobalSslPolicyName.format("[PROJECT]", "[SSL_POLICY]");
DeleteSslPolicyHttpRequest request = DeleteSslPolicyHttpRequest.newBuilder()
.setSslPolicy(formattedSslPolicy)
.build();
ApiFuture<Operation> future = sslPolicyClient.deleteSslPolicyCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final SslPolicy getSslPolicy(ProjectGlobalSslPolicyName sslPolicy)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
SslPolicy response = sslPolicyClient.getSslPolicy(sslPolicy);
}
sslPolicy
- Name of the SSL policy to update. The name must be 1-63 characters long, and
comply with RFC1035.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final SslPolicy getSslPolicy(String sslPolicy)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
SslPolicy response = sslPolicyClient.getSslPolicy(sslPolicy.toString());
}
sslPolicy
- Name of the SSL policy to update. The name must be 1-63 characters long, and
comply with RFC1035.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final SslPolicy getSslPolicy(GetSslPolicyHttpRequest request)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedSslPolicy = ProjectGlobalSslPolicyName.format("[PROJECT]", "[SSL_POLICY]");
GetSslPolicyHttpRequest request = GetSslPolicyHttpRequest.newBuilder()
.setSslPolicy(formattedSslPolicy)
.build();
SslPolicy response = sslPolicyClient.getSslPolicy(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<GetSslPolicyHttpRequest,SslPolicy> getSslPolicyCallable()
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedSslPolicy = ProjectGlobalSslPolicyName.format("[PROJECT]", "[SSL_POLICY]");
GetSslPolicyHttpRequest request = GetSslPolicyHttpRequest.newBuilder()
.setSslPolicy(formattedSslPolicy)
.build();
ApiFuture<SslPolicy> future = sslPolicyClient.getSslPolicyCallable().futureCall(request);
// Do something
SslPolicy response = future.get();
}
@BetaApi public final Operation insertSslPolicy(ProjectName project, SslPolicy sslPolicyResource)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectName project = ProjectName.of("[PROJECT]");
SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
Operation response = sslPolicyClient.insertSslPolicy(project, sslPolicyResource);
}
project
- Project ID for this request.sslPolicyResource
- Represents a Cloud Armor Security Policy resource.
Only external backend services used by HTTP or HTTPS load balancers can reference a Security Policy. For more information, read read Cloud Armor Security Policy Concepts. (== resource_for beta.sslPolicies ==) (== resource_for v1.sslPolicies ==)
com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation insertSslPolicy(String project, SslPolicy sslPolicyResource)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectName project = ProjectName.of("[PROJECT]");
SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
Operation response = sslPolicyClient.insertSslPolicy(project.toString(), sslPolicyResource);
}
project
- Project ID for this request.sslPolicyResource
- Represents a Cloud Armor Security Policy resource.
Only external backend services used by HTTP or HTTPS load balancers can reference a Security Policy. For more information, read read Cloud Armor Security Policy Concepts. (== resource_for beta.sslPolicies ==) (== resource_for v1.sslPolicies ==)
com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final Operation insertSslPolicy(InsertSslPolicyHttpRequest request)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedProject = ProjectName.format("[PROJECT]");
SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
InsertSslPolicyHttpRequest request = InsertSslPolicyHttpRequest.newBuilder()
.setProject(formattedProject)
.setSslPolicyResource(sslPolicyResource)
.build();
Operation response = sslPolicyClient.insertSslPolicy(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<InsertSslPolicyHttpRequest,Operation> insertSslPolicyCallable()
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedProject = ProjectName.format("[PROJECT]");
SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
InsertSslPolicyHttpRequest request = InsertSslPolicyHttpRequest.newBuilder()
.setProject(formattedProject)
.setSslPolicyResource(sslPolicyResource)
.build();
ApiFuture<Operation> future = sslPolicyClient.insertSslPolicyCallable().futureCall(request);
// Do something
Operation response = future.get();
}
@BetaApi public final SslPolicyClient.ListSslPoliciesPagedResponse listSslPolicies(ProjectName project)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectName project = ProjectName.of("[PROJECT]");
for (SslPolicy element : sslPolicyClient.listSslPolicies(project).iterateAll()) {
// doThingsWith(element);
}
}
project
- Project ID for this request.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final SslPolicyClient.ListSslPoliciesPagedResponse listSslPolicies(String project)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectName project = ProjectName.of("[PROJECT]");
for (SslPolicy element : sslPolicyClient.listSslPolicies(project.toString()).iterateAll()) {
// doThingsWith(element);
}
}
project
- Project ID for this request.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final SslPolicyClient.ListSslPoliciesPagedResponse listSslPolicies(ListSslPoliciesHttpRequest request)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedProject = ProjectName.format("[PROJECT]");
ListSslPoliciesHttpRequest request = ListSslPoliciesHttpRequest.newBuilder()
.setProject(formattedProject)
.build();
for (SslPolicy element : sslPolicyClient.listSslPolicies(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<ListSslPoliciesHttpRequest,SslPolicyClient.ListSslPoliciesPagedResponse> listSslPoliciesPagedCallable()
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedProject = ProjectName.format("[PROJECT]");
ListSslPoliciesHttpRequest request = ListSslPoliciesHttpRequest.newBuilder()
.setProject(formattedProject)
.build();
ApiFuture<ListSslPoliciesPagedResponse> future = sslPolicyClient.listSslPoliciesPagedCallable().futureCall(request);
// Do something
for (SslPolicy element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
@BetaApi public final com.google.api.gax.rpc.UnaryCallable<ListSslPoliciesHttpRequest,SslPoliciesList> listSslPoliciesCallable()
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedProject = ProjectName.format("[PROJECT]");
ListSslPoliciesHttpRequest request = ListSslPoliciesHttpRequest.newBuilder()
.setProject(formattedProject)
.build();
while (true) {
SslPoliciesList response = sslPolicyClient.listSslPoliciesCallable().call(request);
for (SslPolicy element : response.getItemsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
@BetaApi public final SslPoliciesListAvailableFeaturesResponse listAvailableFeaturesSslPolicies(ProjectName project)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectName project = ProjectName.of("[PROJECT]");
SslPoliciesListAvailableFeaturesResponse response = sslPolicyClient.listAvailableFeaturesSslPolicies(project);
}
project
- Project ID for this request.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final SslPoliciesListAvailableFeaturesResponse listAvailableFeaturesSslPolicies(String project)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectName project = ProjectName.of("[PROJECT]");
SslPoliciesListAvailableFeaturesResponse response = sslPolicyClient.listAvailableFeaturesSslPolicies(project.toString());
}
project
- Project ID for this request.com.google.api.gax.rpc.ApiException
- if the remote call fails@BetaApi public final SslPoliciesListAvailableFeaturesResponse listAvailableFeaturesSslPolicies(ListAvailableFeaturesSslPoliciesHttpRequest request)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedProject = ProjectName.format("[PROJECT]");
ListAvailableFeaturesSslPoliciesHttpRequest request = ListAvailableFeaturesSslPoliciesHttpRequest.newBuilder()
.setProject(formattedProject)
.build();
SslPoliciesListAvailableFeaturesResponse response = sslPolicyClient.listAvailableFeaturesSslPolicies(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<ListAvailableFeaturesSslPoliciesHttpRequest,SslPoliciesListAvailableFeaturesResponse> listAvailableFeaturesSslPoliciesCallable()
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedProject = ProjectName.format("[PROJECT]");
ListAvailableFeaturesSslPoliciesHttpRequest request = ListAvailableFeaturesSslPoliciesHttpRequest.newBuilder()
.setProject(formattedProject)
.build();
ApiFuture<SslPoliciesListAvailableFeaturesResponse> future = sslPolicyClient.listAvailableFeaturesSslPoliciesCallable().futureCall(request);
// Do something
SslPoliciesListAvailableFeaturesResponse response = future.get();
}
@BetaApi public final Operation patchSslPolicy(ProjectGlobalSslPolicyName sslPolicy, SslPolicy sslPolicyResource, List<String> fieldMask)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
List<String> fieldMask = new ArrayList<>();
Operation response = sslPolicyClient.patchSslPolicy(sslPolicy, sslPolicyResource, fieldMask);
}
sslPolicy
- Name of the SSL policy to update. The name must be 1-63 characters long, and
comply with RFC1035.sslPolicyResource
- Represents a Cloud Armor Security Policy resource.
Only external backend services used by HTTP or HTTPS load balancers can reference a Security Policy. For more information, read read Cloud Armor Security Policy Concepts. (== resource_for beta.sslPolicies ==) (== resource_for v1.sslPolicies ==)
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 patchSslPolicy(String sslPolicy, SslPolicy sslPolicyResource, List<String> fieldMask)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
List<String> fieldMask = new ArrayList<>();
Operation response = sslPolicyClient.patchSslPolicy(sslPolicy.toString(), sslPolicyResource, fieldMask);
}
sslPolicy
- Name of the SSL policy to update. The name must be 1-63 characters long, and
comply with RFC1035.sslPolicyResource
- Represents a Cloud Armor Security Policy resource.
Only external backend services used by HTTP or HTTPS load balancers can reference a Security Policy. For more information, read read Cloud Armor Security Policy Concepts. (== resource_for beta.sslPolicies ==) (== resource_for v1.sslPolicies ==)
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 patchSslPolicy(PatchSslPolicyHttpRequest request)
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedSslPolicy = ProjectGlobalSslPolicyName.format("[PROJECT]", "[SSL_POLICY]");
SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
List<String> fieldMask = new ArrayList<>();
PatchSslPolicyHttpRequest request = PatchSslPolicyHttpRequest.newBuilder()
.setSslPolicy(formattedSslPolicy)
.setSslPolicyResource(sslPolicyResource)
.addAllFieldMask(fieldMask)
.build();
Operation response = sslPolicyClient.patchSslPolicy(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<PatchSslPolicyHttpRequest,Operation> patchSslPolicyCallable()
Sample code:
try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
String formattedSslPolicy = ProjectGlobalSslPolicyName.format("[PROJECT]", "[SSL_POLICY]");
SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
List<String> fieldMask = new ArrayList<>();
PatchSslPolicyHttpRequest request = PatchSslPolicyHttpRequest.newBuilder()
.setSslPolicy(formattedSslPolicy)
.setSslPolicyResource(sslPolicyResource)
.addAllFieldMask(fieldMask)
.build();
ApiFuture<Operation> future = sslPolicyClient.patchSslPolicyCallable().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.