Class CertificateAuthorityServiceClient (2.7.0)

public class CertificateAuthorityServiceClient implements BackgroundResource

Service Description: Certificate Authority Service manages private certificate authorities and issued certificates.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateAuthorityName parent =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
   Certificate certificate = Certificate.newBuilder().build();
   String certificateId = "certificateId-644529902";
   Certificate response =
       certificateAuthorityServiceClient.createCertificate(parent, certificate, certificateId);
 }
 

Note: close() needs to be called on the CertificateAuthorityServiceClient 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:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of CertificateAuthorityServiceSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 CertificateAuthorityServiceSettings certificateAuthorityServiceSettings =
     CertificateAuthorityServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create(certificateAuthorityServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 CertificateAuthorityServiceSettings certificateAuthorityServiceSettings =
     CertificateAuthorityServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create(certificateAuthorityServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 CertificateAuthorityServiceSettings certificateAuthorityServiceSettings =
     CertificateAuthorityServiceSettings.newBuilder()
         .setTransportChannelProvider(
             CertificateAuthorityServiceSettings.defaultHttpJsonTransportProviderBuilder()
                 .build())
         .build();
 CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create(certificateAuthorityServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > CertificateAuthorityServiceClient

Implements

BackgroundResource

Static Methods

create()

public static final CertificateAuthorityServiceClient create()

Constructs an instance of CertificateAuthorityServiceClient with default settings.

Returns
TypeDescription
CertificateAuthorityServiceClient
Exceptions
TypeDescription
IOException

create(CertificateAuthorityServiceSettings settings)

public static final CertificateAuthorityServiceClient create(CertificateAuthorityServiceSettings settings)

Constructs an instance of CertificateAuthorityServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
NameDescription
settingsCertificateAuthorityServiceSettings
Returns
TypeDescription
CertificateAuthorityServiceClient
Exceptions
TypeDescription
IOException

create(CertificateAuthorityServiceStub stub)

public static final CertificateAuthorityServiceClient create(CertificateAuthorityServiceStub stub)

Constructs an instance of CertificateAuthorityServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(CertificateAuthorityServiceSettings).

Parameter
NameDescription
stubCertificateAuthorityServiceStub
Returns
TypeDescription
CertificateAuthorityServiceClient

Constructors

CertificateAuthorityServiceClient(CertificateAuthorityServiceSettings settings)

protected CertificateAuthorityServiceClient(CertificateAuthorityServiceSettings settings)

Constructs an instance of CertificateAuthorityServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
NameDescription
settingsCertificateAuthorityServiceSettings

CertificateAuthorityServiceClient(CertificateAuthorityServiceStub stub)

protected CertificateAuthorityServiceClient(CertificateAuthorityServiceStub stub)
Parameter
NameDescription
stubCertificateAuthorityServiceStub

Methods

activateCertificateAuthorityAsync(ActivateCertificateAuthorityRequest request)

public final OperationFuture<CertificateAuthority,OperationMetadata> activateCertificateAuthorityAsync(ActivateCertificateAuthorityRequest request)

Activate a CertificateAuthority that is in state PENDING_ACTIVATION and is of type SUBORDINATE. After the parent Certificate Authority signs a certificate signing request from FetchCertificateAuthorityCsr, this method can complete the activation process.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ActivateCertificateAuthorityRequest request =
       ActivateCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setPemCaCertificate("pemCaCertificate2100567073")
           .setSubordinateConfig(SubordinateConfig.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   CertificateAuthority response =
       certificateAuthorityServiceClient.activateCertificateAuthorityAsync(request).get();
 }
 
Parameter
NameDescription
requestActivateCertificateAuthorityRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

activateCertificateAuthorityAsync(CertificateAuthorityName name)

public final OperationFuture<CertificateAuthority,OperationMetadata> activateCertificateAuthorityAsync(CertificateAuthorityName name)

Activate a CertificateAuthority that is in state PENDING_ACTIVATION and is of type SUBORDINATE. After the parent Certificate Authority signs a certificate signing request from FetchCertificateAuthorityCsr, this method can complete the activation process.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateAuthorityName name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
   CertificateAuthority response =
       certificateAuthorityServiceClient.activateCertificateAuthorityAsync(name).get();
 }
 
Parameter
NameDescription
nameCertificateAuthorityName

Required. The resource name for this CertificateAuthority in the format projects/*/locations/*/certificateAuthorities/*.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

activateCertificateAuthorityAsync(String name)

public final OperationFuture<CertificateAuthority,OperationMetadata> activateCertificateAuthorityAsync(String name)

Activate a CertificateAuthority that is in state PENDING_ACTIVATION and is of type SUBORDINATE. After the parent Certificate Authority signs a certificate signing request from FetchCertificateAuthorityCsr, this method can complete the activation process.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
           .toString();
   CertificateAuthority response =
       certificateAuthorityServiceClient.activateCertificateAuthorityAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The resource name for this CertificateAuthority in the format projects/*/locations/*/certificateAuthorities/*.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

activateCertificateAuthorityCallable()

public final UnaryCallable<ActivateCertificateAuthorityRequest,Operation> activateCertificateAuthorityCallable()

Activate a CertificateAuthority that is in state PENDING_ACTIVATION and is of type SUBORDINATE. After the parent Certificate Authority signs a certificate signing request from FetchCertificateAuthorityCsr, this method can complete the activation process.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ActivateCertificateAuthorityRequest request =
       ActivateCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setPemCaCertificate("pemCaCertificate2100567073")
           .setSubordinateConfig(SubordinateConfig.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       certificateAuthorityServiceClient
           .activateCertificateAuthorityCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<ActivateCertificateAuthorityRequest,Operation>

activateCertificateAuthorityOperationCallable()

public final OperationCallable<ActivateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> activateCertificateAuthorityOperationCallable()

Activate a CertificateAuthority that is in state PENDING_ACTIVATION and is of type SUBORDINATE. After the parent Certificate Authority signs a certificate signing request from FetchCertificateAuthorityCsr, this method can complete the activation process.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ActivateCertificateAuthorityRequest request =
       ActivateCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setPemCaCertificate("pemCaCertificate2100567073")
           .setSubordinateConfig(SubordinateConfig.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<CertificateAuthority, OperationMetadata> future =
       certificateAuthorityServiceClient
           .activateCertificateAuthorityOperationCallable()
           .futureCall(request);
   // Do something.
   CertificateAuthority response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<ActivateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

close()

public final void close()

createCertificate(CertificateAuthorityName parent, Certificate certificate, String certificateId)

public final Certificate createCertificate(CertificateAuthorityName parent, Certificate certificate, String certificateId)

Create a new Certificate in a given Project, Location from a particular CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateAuthorityName parent =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
   Certificate certificate = Certificate.newBuilder().build();
   String certificateId = "certificateId-644529902";
   Certificate response =
       certificateAuthorityServiceClient.createCertificate(parent, certificate, certificateId);
 }
 
Parameters
NameDescription
parentCertificateAuthorityName

Required. The resource name of the location and CertificateAuthority associated with the Certificate, in the format projects/*/locations/*/certificateAuthorities/*.

certificateCertificate

Required. A Certificate with initial field values.

certificateIdString

Optional. It must be unique within a location and match the regular expression [a-zA-Z0-9_-]{1,63}. This field is required when using a CertificateAuthority in the Enterprise CertificateAuthority.Tier, but is optional and its value is ignored otherwise.

Returns
TypeDescription
Certificate

createCertificate(CreateCertificateRequest request)

public final Certificate createCertificate(CreateCertificateRequest request)

Create a new Certificate in a given Project, Location from a particular CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CreateCertificateRequest request =
       CreateCertificateRequest.newBuilder()
           .setParent(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setCertificateId("certificateId-644529902")
           .setCertificate(Certificate.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Certificate response = certificateAuthorityServiceClient.createCertificate(request);
 }
 
Parameter
NameDescription
requestCreateCertificateRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Certificate

createCertificate(String parent, Certificate certificate, String certificateId)

public final Certificate createCertificate(String parent, Certificate certificate, String certificateId)

Create a new Certificate in a given Project, Location from a particular CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String parent =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
           .toString();
   Certificate certificate = Certificate.newBuilder().build();
   String certificateId = "certificateId-644529902";
   Certificate response =
       certificateAuthorityServiceClient.createCertificate(parent, certificate, certificateId);
 }
 
Parameters
NameDescription
parentString

Required. The resource name of the location and CertificateAuthority associated with the Certificate, in the format projects/*/locations/*/certificateAuthorities/*.

certificateCertificate

Required. A Certificate with initial field values.

certificateIdString

Optional. It must be unique within a location and match the regular expression [a-zA-Z0-9_-]{1,63}. This field is required when using a CertificateAuthority in the Enterprise CertificateAuthority.Tier, but is optional and its value is ignored otherwise.

Returns
TypeDescription
Certificate

createCertificateAuthorityAsync(CreateCertificateAuthorityRequest request)

public final OperationFuture<CertificateAuthority,OperationMetadata> createCertificateAuthorityAsync(CreateCertificateAuthorityRequest request)

Create a new CertificateAuthority in a given Project and Location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CreateCertificateAuthorityRequest request =
       CreateCertificateAuthorityRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setCertificateAuthorityId("certificateAuthorityId-1652580953")
           .setCertificateAuthority(CertificateAuthority.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   CertificateAuthority response =
       certificateAuthorityServiceClient.createCertificateAuthorityAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateCertificateAuthorityRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

createCertificateAuthorityAsync(LocationName parent, CertificateAuthority certificateAuthority, String certificateAuthorityId)

public final OperationFuture<CertificateAuthority,OperationMetadata> createCertificateAuthorityAsync(LocationName parent, CertificateAuthority certificateAuthority, String certificateAuthorityId)

Create a new CertificateAuthority in a given Project and Location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
   String certificateAuthorityId = "certificateAuthorityId-1652580953";
   CertificateAuthority response =
       certificateAuthorityServiceClient
           .createCertificateAuthorityAsync(parent, certificateAuthority, certificateAuthorityId)
           .get();
 }
 
Parameters
NameDescription
parentLocationName

Required. The resource name of the location associated with the CertificateAuthorities, in the format projects/*/locations/*.

certificateAuthorityCertificateAuthority

Required. A CertificateAuthority with initial field values.

certificateAuthorityIdString

Required. It must be unique within a location and match the regular expression [a-zA-Z0-9_-]{1,63}

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

createCertificateAuthorityAsync(String parent, CertificateAuthority certificateAuthority, String certificateAuthorityId)

public final OperationFuture<CertificateAuthority,OperationMetadata> createCertificateAuthorityAsync(String parent, CertificateAuthority certificateAuthority, String certificateAuthorityId)

Create a new CertificateAuthority in a given Project and Location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
   String certificateAuthorityId = "certificateAuthorityId-1652580953";
   CertificateAuthority response =
       certificateAuthorityServiceClient
           .createCertificateAuthorityAsync(parent, certificateAuthority, certificateAuthorityId)
           .get();
 }
 
Parameters
NameDescription
parentString

Required. The resource name of the location associated with the CertificateAuthorities, in the format projects/*/locations/*.

certificateAuthorityCertificateAuthority

Required. A CertificateAuthority with initial field values.

certificateAuthorityIdString

Required. It must be unique within a location and match the regular expression [a-zA-Z0-9_-]{1,63}

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

createCertificateAuthorityCallable()

public final UnaryCallable<CreateCertificateAuthorityRequest,Operation> createCertificateAuthorityCallable()

Create a new CertificateAuthority in a given Project and Location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CreateCertificateAuthorityRequest request =
       CreateCertificateAuthorityRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setCertificateAuthorityId("certificateAuthorityId-1652580953")
           .setCertificateAuthority(CertificateAuthority.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       certificateAuthorityServiceClient
           .createCertificateAuthorityCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateCertificateAuthorityRequest,Operation>

createCertificateAuthorityOperationCallable()

public final OperationCallable<CreateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> createCertificateAuthorityOperationCallable()

Create a new CertificateAuthority in a given Project and Location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CreateCertificateAuthorityRequest request =
       CreateCertificateAuthorityRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setCertificateAuthorityId("certificateAuthorityId-1652580953")
           .setCertificateAuthority(CertificateAuthority.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<CertificateAuthority, OperationMetadata> future =
       certificateAuthorityServiceClient
           .createCertificateAuthorityOperationCallable()
           .futureCall(request);
   // Do something.
   CertificateAuthority response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>

createCertificateCallable()

public final UnaryCallable<CreateCertificateRequest,Certificate> createCertificateCallable()

Create a new Certificate in a given Project, Location from a particular CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CreateCertificateRequest request =
       CreateCertificateRequest.newBuilder()
           .setParent(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setCertificateId("certificateId-644529902")
           .setCertificate(Certificate.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Certificate> future =
       certificateAuthorityServiceClient.createCertificateCallable().futureCall(request);
   // Do something.
   Certificate response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateCertificateRequest,Certificate>

disableCertificateAuthorityAsync(CertificateAuthorityName name)

public final OperationFuture<CertificateAuthority,OperationMetadata> disableCertificateAuthorityAsync(CertificateAuthorityName name)

Disable a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateAuthorityName name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
   CertificateAuthority response =
       certificateAuthorityServiceClient.disableCertificateAuthorityAsync(name).get();
 }
 
Parameter
NameDescription
nameCertificateAuthorityName

Required. The resource name for this CertificateAuthority in the format projects/*/locations/*/certificateAuthorities/*.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

disableCertificateAuthorityAsync(DisableCertificateAuthorityRequest request)

public final OperationFuture<CertificateAuthority,OperationMetadata> disableCertificateAuthorityAsync(DisableCertificateAuthorityRequest request)

Disable a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   DisableCertificateAuthorityRequest request =
       DisableCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   CertificateAuthority response =
       certificateAuthorityServiceClient.disableCertificateAuthorityAsync(request).get();
 }
 
Parameter
NameDescription
requestDisableCertificateAuthorityRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

disableCertificateAuthorityAsync(String name)

public final OperationFuture<CertificateAuthority,OperationMetadata> disableCertificateAuthorityAsync(String name)

Disable a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
           .toString();
   CertificateAuthority response =
       certificateAuthorityServiceClient.disableCertificateAuthorityAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The resource name for this CertificateAuthority in the format projects/*/locations/*/certificateAuthorities/*.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

disableCertificateAuthorityCallable()

public final UnaryCallable<DisableCertificateAuthorityRequest,Operation> disableCertificateAuthorityCallable()

Disable a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   DisableCertificateAuthorityRequest request =
       DisableCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       certificateAuthorityServiceClient
           .disableCertificateAuthorityCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DisableCertificateAuthorityRequest,Operation>

disableCertificateAuthorityOperationCallable()

public final OperationCallable<DisableCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> disableCertificateAuthorityOperationCallable()

Disable a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   DisableCertificateAuthorityRequest request =
       DisableCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<CertificateAuthority, OperationMetadata> future =
       certificateAuthorityServiceClient
           .disableCertificateAuthorityOperationCallable()
           .futureCall(request);
   // Do something.
   CertificateAuthority response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<DisableCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>

enableCertificateAuthorityAsync(CertificateAuthorityName name)

public final OperationFuture<CertificateAuthority,OperationMetadata> enableCertificateAuthorityAsync(CertificateAuthorityName name)

Enable a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateAuthorityName name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
   CertificateAuthority response =
       certificateAuthorityServiceClient.enableCertificateAuthorityAsync(name).get();
 }
 
Parameter
NameDescription
nameCertificateAuthorityName

Required. The resource name for this CertificateAuthority in the format projects/*/locations/*/certificateAuthorities/*.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

enableCertificateAuthorityAsync(EnableCertificateAuthorityRequest request)

public final OperationFuture<CertificateAuthority,OperationMetadata> enableCertificateAuthorityAsync(EnableCertificateAuthorityRequest request)

Enable a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   EnableCertificateAuthorityRequest request =
       EnableCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   CertificateAuthority response =
       certificateAuthorityServiceClient.enableCertificateAuthorityAsync(request).get();
 }
 
Parameter
NameDescription
requestEnableCertificateAuthorityRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

enableCertificateAuthorityAsync(String name)

public final OperationFuture<CertificateAuthority,OperationMetadata> enableCertificateAuthorityAsync(String name)

Enable a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
           .toString();
   CertificateAuthority response =
       certificateAuthorityServiceClient.enableCertificateAuthorityAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The resource name for this CertificateAuthority in the format projects/*/locations/*/certificateAuthorities/*.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

enableCertificateAuthorityCallable()

public final UnaryCallable<EnableCertificateAuthorityRequest,Operation> enableCertificateAuthorityCallable()

Enable a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   EnableCertificateAuthorityRequest request =
       EnableCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       certificateAuthorityServiceClient
           .enableCertificateAuthorityCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<EnableCertificateAuthorityRequest,Operation>

enableCertificateAuthorityOperationCallable()

public final OperationCallable<EnableCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> enableCertificateAuthorityOperationCallable()

Enable a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   EnableCertificateAuthorityRequest request =
       EnableCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<CertificateAuthority, OperationMetadata> future =
       certificateAuthorityServiceClient
           .enableCertificateAuthorityOperationCallable()
           .futureCall(request);
   // Do something.
   CertificateAuthority response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<EnableCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>

fetchCertificateAuthorityCsr(CertificateAuthorityName name)

public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(CertificateAuthorityName name)

Fetch a certificate signing request (CSR) from a CertificateAuthority that is in state PENDING_ACTIVATION and is of type SUBORDINATE. The CSR must then be signed by the desired parent Certificate Authority, which could be another CertificateAuthority resource, or could be an on-prem certificate authority. See also ActivateCertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateAuthorityName name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
   FetchCertificateAuthorityCsrResponse response =
       certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(name);
 }
 
Parameter
NameDescription
nameCertificateAuthorityName

Required. The resource name for this CertificateAuthority in the format projects/*/locations/*/certificateAuthorities/*.

Returns
TypeDescription
FetchCertificateAuthorityCsrResponse

fetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest request)

public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest request)

Fetch a certificate signing request (CSR) from a CertificateAuthority that is in state PENDING_ACTIVATION and is of type SUBORDINATE. The CSR must then be signed by the desired parent Certificate Authority, which could be another CertificateAuthority resource, or could be an on-prem certificate authority. See also ActivateCertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   FetchCertificateAuthorityCsrRequest request =
       FetchCertificateAuthorityCsrRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .build();
   FetchCertificateAuthorityCsrResponse response =
       certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(request);
 }
 
Parameter
NameDescription
requestFetchCertificateAuthorityCsrRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
FetchCertificateAuthorityCsrResponse

fetchCertificateAuthorityCsr(String name)

public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(String name)

Fetch a certificate signing request (CSR) from a CertificateAuthority that is in state PENDING_ACTIVATION and is of type SUBORDINATE. The CSR must then be signed by the desired parent Certificate Authority, which could be another CertificateAuthority resource, or could be an on-prem certificate authority. See also ActivateCertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
           .toString();
   FetchCertificateAuthorityCsrResponse response =
       certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(name);
 }
 
Parameter
NameDescription
nameString

Required. The resource name for this CertificateAuthority in the format projects/*/locations/*/certificateAuthorities/*.

Returns
TypeDescription
FetchCertificateAuthorityCsrResponse

fetchCertificateAuthorityCsrCallable()

public final UnaryCallable<FetchCertificateAuthorityCsrRequest,FetchCertificateAuthorityCsrResponse> fetchCertificateAuthorityCsrCallable()

Fetch a certificate signing request (CSR) from a CertificateAuthority that is in state PENDING_ACTIVATION and is of type SUBORDINATE. The CSR must then be signed by the desired parent Certificate Authority, which could be another CertificateAuthority resource, or could be an on-prem certificate authority. See also ActivateCertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   FetchCertificateAuthorityCsrRequest request =
       FetchCertificateAuthorityCsrRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .build();
   ApiFuture<FetchCertificateAuthorityCsrResponse> future =
       certificateAuthorityServiceClient
           .fetchCertificateAuthorityCsrCallable()
           .futureCall(request);
   // Do something.
   FetchCertificateAuthorityCsrResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<FetchCertificateAuthorityCsrRequest,FetchCertificateAuthorityCsrResponse>

getCertificate(CertificateName name)

public final Certificate getCertificate(CertificateName name)

Returns a Certificate.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateName name =
       CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
   Certificate response = certificateAuthorityServiceClient.getCertificate(name);
 }
 
Parameter
NameDescription
nameCertificateName

Required. The name of the Certificate to get.

Returns
TypeDescription
Certificate

getCertificate(GetCertificateRequest request)

public final Certificate getCertificate(GetCertificateRequest request)

Returns a Certificate.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   GetCertificateRequest request =
       GetCertificateRequest.newBuilder()
           .setName(
               CertificateName.of(
                       "[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]")
                   .toString())
           .build();
   Certificate response = certificateAuthorityServiceClient.getCertificate(request);
 }
 
Parameter
NameDescription
requestGetCertificateRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Certificate

getCertificate(String name)

public final Certificate getCertificate(String name)

Returns a Certificate.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String name =
       CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]")
           .toString();
   Certificate response = certificateAuthorityServiceClient.getCertificate(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the Certificate to get.

Returns
TypeDescription
Certificate

getCertificateAuthority(CertificateAuthorityName name)

public final CertificateAuthority getCertificateAuthority(CertificateAuthorityName name)

Returns a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateAuthorityName name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
   CertificateAuthority response =
       certificateAuthorityServiceClient.getCertificateAuthority(name);
 }
 
Parameter
NameDescription
nameCertificateAuthorityName

Required. The name of the CertificateAuthority to get.

Returns
TypeDescription
CertificateAuthority

getCertificateAuthority(GetCertificateAuthorityRequest request)

public final CertificateAuthority getCertificateAuthority(GetCertificateAuthorityRequest request)

Returns a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   GetCertificateAuthorityRequest request =
       GetCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .build();
   CertificateAuthority response =
       certificateAuthorityServiceClient.getCertificateAuthority(request);
 }
 
Parameter
NameDescription
requestGetCertificateAuthorityRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
CertificateAuthority

getCertificateAuthority(String name)

public final CertificateAuthority getCertificateAuthority(String name)

Returns a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
           .toString();
   CertificateAuthority response =
       certificateAuthorityServiceClient.getCertificateAuthority(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the CertificateAuthority to get.

Returns
TypeDescription
CertificateAuthority

getCertificateAuthorityCallable()

public final UnaryCallable<GetCertificateAuthorityRequest,CertificateAuthority> getCertificateAuthorityCallable()

Returns a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   GetCertificateAuthorityRequest request =
       GetCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .build();
   ApiFuture<CertificateAuthority> future =
       certificateAuthorityServiceClient.getCertificateAuthorityCallable().futureCall(request);
   // Do something.
   CertificateAuthority response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetCertificateAuthorityRequest,CertificateAuthority>

getCertificateCallable()

public final UnaryCallable<GetCertificateRequest,Certificate> getCertificateCallable()

Returns a Certificate.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   GetCertificateRequest request =
       GetCertificateRequest.newBuilder()
           .setName(
               CertificateName.of(
                       "[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]")
                   .toString())
           .build();
   ApiFuture<Certificate> future =
       certificateAuthorityServiceClient.getCertificateCallable().futureCall(request);
   // Do something.
   Certificate response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetCertificateRequest,Certificate>

getCertificateRevocationList(CertificateRevocationListName name)

public final CertificateRevocationList getCertificateRevocationList(CertificateRevocationListName name)

Returns a CertificateRevocationList.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateRevocationListName name =
       CertificateRevocationListName.of(
           "[PROJECT]",
           "[LOCATION]",
           "[CERTIFICATE_AUTHORITY]",
           "[CERTIFICATE_REVOCATION_LIST]");
   CertificateRevocationList response =
       certificateAuthorityServiceClient.getCertificateRevocationList(name);
 }
 
Parameter
NameDescription
nameCertificateRevocationListName

Required. The name of the CertificateRevocationList to get.

Returns
TypeDescription
CertificateRevocationList

getCertificateRevocationList(GetCertificateRevocationListRequest request)

public final CertificateRevocationList getCertificateRevocationList(GetCertificateRevocationListRequest request)

Returns a CertificateRevocationList.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   GetCertificateRevocationListRequest request =
       GetCertificateRevocationListRequest.newBuilder()
           .setName(
               CertificateRevocationListName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[CERTIFICATE_AUTHORITY]",
                       "[CERTIFICATE_REVOCATION_LIST]")
                   .toString())
           .build();
   CertificateRevocationList response =
       certificateAuthorityServiceClient.getCertificateRevocationList(request);
 }
 
Parameter
NameDescription
requestGetCertificateRevocationListRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
CertificateRevocationList

getCertificateRevocationList(String name)

public final CertificateRevocationList getCertificateRevocationList(String name)

Returns a CertificateRevocationList.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String name =
       CertificateRevocationListName.of(
               "[PROJECT]",
               "[LOCATION]",
               "[CERTIFICATE_AUTHORITY]",
               "[CERTIFICATE_REVOCATION_LIST]")
           .toString();
   CertificateRevocationList response =
       certificateAuthorityServiceClient.getCertificateRevocationList(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the CertificateRevocationList to get.

Returns
TypeDescription
CertificateRevocationList

getCertificateRevocationListCallable()

public final UnaryCallable<GetCertificateRevocationListRequest,CertificateRevocationList> getCertificateRevocationListCallable()

Returns a CertificateRevocationList.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   GetCertificateRevocationListRequest request =
       GetCertificateRevocationListRequest.newBuilder()
           .setName(
               CertificateRevocationListName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[CERTIFICATE_AUTHORITY]",
                       "[CERTIFICATE_REVOCATION_LIST]")
                   .toString())
           .build();
   ApiFuture<CertificateRevocationList> future =
       certificateAuthorityServiceClient
           .getCertificateRevocationListCallable()
           .futureCall(request);
   // Do something.
   CertificateRevocationList response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetCertificateRevocationListRequest,CertificateRevocationList>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
TypeDescription
OperationsClient

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
TypeDescription
OperationsClient

getReusableConfig(GetReusableConfigRequest request)

public final ReusableConfig getReusableConfig(GetReusableConfigRequest request)

Returns a ReusableConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   GetReusableConfigRequest request =
       GetReusableConfigRequest.newBuilder()
           .setName(
               ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]").toString())
           .build();
   ReusableConfig response = certificateAuthorityServiceClient.getReusableConfig(request);
 }
 
Parameter
NameDescription
requestGetReusableConfigRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
ReusableConfig

getReusableConfig(ReusableConfigName name)

public final ReusableConfig getReusableConfig(ReusableConfigName name)

Returns a ReusableConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ReusableConfigName name =
       ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
   ReusableConfig response = certificateAuthorityServiceClient.getReusableConfig(name);
 }
 
Parameter
NameDescription
nameReusableConfigName

Required. The name of the [ReusableConfigs][] to get.

Returns
TypeDescription
ReusableConfig

getReusableConfig(String name)

public final ReusableConfig getReusableConfig(String name)

Returns a ReusableConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String name =
       ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]").toString();
   ReusableConfig response = certificateAuthorityServiceClient.getReusableConfig(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the [ReusableConfigs][] to get.

Returns
TypeDescription
ReusableConfig

getReusableConfigCallable()

public final UnaryCallable<GetReusableConfigRequest,ReusableConfig> getReusableConfigCallable()

Returns a ReusableConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   GetReusableConfigRequest request =
       GetReusableConfigRequest.newBuilder()
           .setName(
               ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]").toString())
           .build();
   ApiFuture<ReusableConfig> future =
       certificateAuthorityServiceClient.getReusableConfigCallable().futureCall(request);
   // Do something.
   ReusableConfig response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetReusableConfigRequest,ReusableConfig>

getSettings()

public final CertificateAuthorityServiceSettings getSettings()
Returns
TypeDescription
CertificateAuthorityServiceSettings

getStub()

public CertificateAuthorityServiceStub getStub()
Returns
TypeDescription
CertificateAuthorityServiceStub

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

listCertificateAuthorities(ListCertificateAuthoritiesRequest request)

public final CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(ListCertificateAuthoritiesRequest request)

Lists CertificateAuthorities.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ListCertificateAuthoritiesRequest request =
       ListCertificateAuthoritiesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (CertificateAuthority element :
       certificateAuthorityServiceClient.listCertificateAuthorities(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListCertificateAuthoritiesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse

listCertificateAuthorities(LocationName parent)

public final CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(LocationName parent)

Lists CertificateAuthorities.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (CertificateAuthority element :
       certificateAuthorityServiceClient.listCertificateAuthorities(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The resource name of the location associated with the CertificateAuthorities, in the format projects/*/locations/*.

Returns
TypeDescription
CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse

listCertificateAuthorities(String parent)

public final CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(String parent)

Lists CertificateAuthorities.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (CertificateAuthority element :
       certificateAuthorityServiceClient.listCertificateAuthorities(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The resource name of the location associated with the CertificateAuthorities, in the format projects/*/locations/*.

Returns
TypeDescription
CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse

listCertificateAuthoritiesCallable()

public final UnaryCallable<ListCertificateAuthoritiesRequest,ListCertificateAuthoritiesResponse> listCertificateAuthoritiesCallable()

Lists CertificateAuthorities.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ListCertificateAuthoritiesRequest request =
       ListCertificateAuthoritiesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListCertificateAuthoritiesResponse response =
         certificateAuthorityServiceClient.listCertificateAuthoritiesCallable().call(request);
     for (CertificateAuthority element : response.getCertificateAuthoritiesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListCertificateAuthoritiesRequest,ListCertificateAuthoritiesResponse>

listCertificateAuthoritiesPagedCallable()

public final UnaryCallable<ListCertificateAuthoritiesRequest,CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse> listCertificateAuthoritiesPagedCallable()

Lists CertificateAuthorities.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ListCertificateAuthoritiesRequest request =
       ListCertificateAuthoritiesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<CertificateAuthority> future =
       certificateAuthorityServiceClient
           .listCertificateAuthoritiesPagedCallable()
           .futureCall(request);
   // Do something.
   for (CertificateAuthority element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListCertificateAuthoritiesRequest,ListCertificateAuthoritiesPagedResponse>

listCertificateRevocationLists(CertificateAuthorityName parent)

public final CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse listCertificateRevocationLists(CertificateAuthorityName parent)

Lists CertificateRevocationLists.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateAuthorityName parent =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
   for (CertificateRevocationList element :
       certificateAuthorityServiceClient.listCertificateRevocationLists(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentCertificateAuthorityName

Required. The resource name of the location associated with the CertificateRevocationLists, in the format projects/*/locations/*/certificateauthorities/*.

Returns
TypeDescription
CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse

listCertificateRevocationLists(ListCertificateRevocationListsRequest request)

public final CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse listCertificateRevocationLists(ListCertificateRevocationListsRequest request)

Lists CertificateRevocationLists.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ListCertificateRevocationListsRequest request =
       ListCertificateRevocationListsRequest.newBuilder()
           .setParent(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (CertificateRevocationList element :
       certificateAuthorityServiceClient.listCertificateRevocationLists(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListCertificateRevocationListsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse

listCertificateRevocationLists(String parent)

public final CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse listCertificateRevocationLists(String parent)

Lists CertificateRevocationLists.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String parent =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
           .toString();
   for (CertificateRevocationList element :
       certificateAuthorityServiceClient.listCertificateRevocationLists(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The resource name of the location associated with the CertificateRevocationLists, in the format projects/*/locations/*/certificateauthorities/*.

Returns
TypeDescription
CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse

listCertificateRevocationListsCallable()

public final UnaryCallable<ListCertificateRevocationListsRequest,ListCertificateRevocationListsResponse> listCertificateRevocationListsCallable()

Lists CertificateRevocationLists.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ListCertificateRevocationListsRequest request =
       ListCertificateRevocationListsRequest.newBuilder()
           .setParent(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListCertificateRevocationListsResponse response =
         certificateAuthorityServiceClient
             .listCertificateRevocationListsCallable()
             .call(request);
     for (CertificateRevocationList element : response.getCertificateRevocationListsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListCertificateRevocationListsRequest,ListCertificateRevocationListsResponse>

listCertificateRevocationListsPagedCallable()

public final UnaryCallable<ListCertificateRevocationListsRequest,CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse> listCertificateRevocationListsPagedCallable()

Lists CertificateRevocationLists.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ListCertificateRevocationListsRequest request =
       ListCertificateRevocationListsRequest.newBuilder()
           .setParent(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<CertificateRevocationList> future =
       certificateAuthorityServiceClient
           .listCertificateRevocationListsPagedCallable()
           .futureCall(request);
   // Do something.
   for (CertificateRevocationList element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListCertificateRevocationListsRequest,ListCertificateRevocationListsPagedResponse>

listCertificates(CertificateAuthorityName parent)

public final CertificateAuthorityServiceClient.ListCertificatesPagedResponse listCertificates(CertificateAuthorityName parent)

Lists Certificates.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateAuthorityName parent =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
   for (Certificate element :
       certificateAuthorityServiceClient.listCertificates(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentCertificateAuthorityName

Required. The resource name of the location associated with the Certificates, in the format projects/*/locations/*/certificateauthorities/*.

Returns
TypeDescription
CertificateAuthorityServiceClient.ListCertificatesPagedResponse

listCertificates(ListCertificatesRequest request)

public final CertificateAuthorityServiceClient.ListCertificatesPagedResponse listCertificates(ListCertificatesRequest request)

Lists Certificates.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ListCertificatesRequest request =
       ListCertificatesRequest.newBuilder()
           .setParent(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (Certificate element :
       certificateAuthorityServiceClient.listCertificates(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListCertificatesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
CertificateAuthorityServiceClient.ListCertificatesPagedResponse

listCertificates(String parent)

public final CertificateAuthorityServiceClient.ListCertificatesPagedResponse listCertificates(String parent)

Lists Certificates.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String parent =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
           .toString();
   for (Certificate element :
       certificateAuthorityServiceClient.listCertificates(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The resource name of the location associated with the Certificates, in the format projects/*/locations/*/certificateauthorities/*.

Returns
TypeDescription
CertificateAuthorityServiceClient.ListCertificatesPagedResponse

listCertificatesCallable()

public final UnaryCallable<ListCertificatesRequest,ListCertificatesResponse> listCertificatesCallable()

Lists Certificates.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ListCertificatesRequest request =
       ListCertificatesRequest.newBuilder()
           .setParent(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListCertificatesResponse response =
         certificateAuthorityServiceClient.listCertificatesCallable().call(request);
     for (Certificate element : response.getCertificatesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListCertificatesRequest,ListCertificatesResponse>

listCertificatesPagedCallable()

public final UnaryCallable<ListCertificatesRequest,CertificateAuthorityServiceClient.ListCertificatesPagedResponse> listCertificatesPagedCallable()

Lists Certificates.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ListCertificatesRequest request =
       ListCertificatesRequest.newBuilder()
           .setParent(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<Certificate> future =
       certificateAuthorityServiceClient.listCertificatesPagedCallable().futureCall(request);
   // Do something.
   for (Certificate element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListCertificatesRequest,ListCertificatesPagedResponse>

listReusableConfigs(ListReusableConfigsRequest request)

public final CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse listReusableConfigs(ListReusableConfigsRequest request)

Lists ReusableConfigs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ListReusableConfigsRequest request =
       ListReusableConfigsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (ReusableConfig element :
       certificateAuthorityServiceClient.listReusableConfigs(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListReusableConfigsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse

listReusableConfigs(LocationName parent)

public final CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse listReusableConfigs(LocationName parent)

Lists ReusableConfigs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (ReusableConfig element :
       certificateAuthorityServiceClient.listReusableConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The resource name of the location associated with the ReusableConfigs, in the format projects/*/locations/*.

Returns
TypeDescription
CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse

listReusableConfigs(String parent)

public final CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse listReusableConfigs(String parent)

Lists ReusableConfigs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (ReusableConfig element :
       certificateAuthorityServiceClient.listReusableConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The resource name of the location associated with the ReusableConfigs, in the format projects/*/locations/*.

Returns
TypeDescription
CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse

listReusableConfigsCallable()

public final UnaryCallable<ListReusableConfigsRequest,ListReusableConfigsResponse> listReusableConfigsCallable()

Lists ReusableConfigs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ListReusableConfigsRequest request =
       ListReusableConfigsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListReusableConfigsResponse response =
         certificateAuthorityServiceClient.listReusableConfigsCallable().call(request);
     for (ReusableConfig element : response.getReusableConfigsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListReusableConfigsRequest,ListReusableConfigsResponse>

listReusableConfigsPagedCallable()

public final UnaryCallable<ListReusableConfigsRequest,CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse> listReusableConfigsPagedCallable()

Lists ReusableConfigs.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ListReusableConfigsRequest request =
       ListReusableConfigsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<ReusableConfig> future =
       certificateAuthorityServiceClient.listReusableConfigsPagedCallable().futureCall(request);
   // Do something.
   for (ReusableConfig element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListReusableConfigsRequest,ListReusableConfigsPagedResponse>

restoreCertificateAuthorityAsync(CertificateAuthorityName name)

public final OperationFuture<CertificateAuthority,OperationMetadata> restoreCertificateAuthorityAsync(CertificateAuthorityName name)

Restore a CertificateAuthority that is scheduled for deletion.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateAuthorityName name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
   CertificateAuthority response =
       certificateAuthorityServiceClient.restoreCertificateAuthorityAsync(name).get();
 }
 
Parameter
NameDescription
nameCertificateAuthorityName

Required. The resource name for this CertificateAuthority in the format projects/*/locations/*/certificateAuthorities/*.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

restoreCertificateAuthorityAsync(RestoreCertificateAuthorityRequest request)

public final OperationFuture<CertificateAuthority,OperationMetadata> restoreCertificateAuthorityAsync(RestoreCertificateAuthorityRequest request)

Restore a CertificateAuthority that is scheduled for deletion.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   RestoreCertificateAuthorityRequest request =
       RestoreCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   CertificateAuthority response =
       certificateAuthorityServiceClient.restoreCertificateAuthorityAsync(request).get();
 }
 
Parameter
NameDescription
requestRestoreCertificateAuthorityRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

restoreCertificateAuthorityAsync(String name)

public final OperationFuture<CertificateAuthority,OperationMetadata> restoreCertificateAuthorityAsync(String name)

Restore a CertificateAuthority that is scheduled for deletion.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
           .toString();
   CertificateAuthority response =
       certificateAuthorityServiceClient.restoreCertificateAuthorityAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The resource name for this CertificateAuthority in the format projects/*/locations/*/certificateAuthorities/*.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

restoreCertificateAuthorityCallable()

public final UnaryCallable<RestoreCertificateAuthorityRequest,Operation> restoreCertificateAuthorityCallable()

Restore a CertificateAuthority that is scheduled for deletion.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   RestoreCertificateAuthorityRequest request =
       RestoreCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       certificateAuthorityServiceClient
           .restoreCertificateAuthorityCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<RestoreCertificateAuthorityRequest,Operation>

restoreCertificateAuthorityOperationCallable()

public final OperationCallable<RestoreCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> restoreCertificateAuthorityOperationCallable()

Restore a CertificateAuthority that is scheduled for deletion.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   RestoreCertificateAuthorityRequest request =
       RestoreCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<CertificateAuthority, OperationMetadata> future =
       certificateAuthorityServiceClient
           .restoreCertificateAuthorityOperationCallable()
           .futureCall(request);
   // Do something.
   CertificateAuthority response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<RestoreCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>

revokeCertificate(CertificateName name)

public final Certificate revokeCertificate(CertificateName name)

Revoke a Certificate.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateName name =
       CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
   Certificate response = certificateAuthorityServiceClient.revokeCertificate(name);
 }
 
Parameter
NameDescription
nameCertificateName

Required. The resource name for this Certificate in the format projects/*/locations/*/certificateAuthorities/*/certificates/*.

Returns
TypeDescription
Certificate

revokeCertificate(RevokeCertificateRequest request)

public final Certificate revokeCertificate(RevokeCertificateRequest request)

Revoke a Certificate.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   RevokeCertificateRequest request =
       RevokeCertificateRequest.newBuilder()
           .setName(
               CertificateName.of(
                       "[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]")
                   .toString())
           .setReason(RevocationReason.forNumber(0))
           .setRequestId("requestId693933066")
           .build();
   Certificate response = certificateAuthorityServiceClient.revokeCertificate(request);
 }
 
Parameter
NameDescription
requestRevokeCertificateRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Certificate

revokeCertificate(String name)

public final Certificate revokeCertificate(String name)

Revoke a Certificate.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String name =
       CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]")
           .toString();
   Certificate response = certificateAuthorityServiceClient.revokeCertificate(name);
 }
 
Parameter
NameDescription
nameString

Required. The resource name for this Certificate in the format projects/*/locations/*/certificateAuthorities/*/certificates/*.

Returns
TypeDescription
Certificate

revokeCertificateCallable()

public final UnaryCallable<RevokeCertificateRequest,Certificate> revokeCertificateCallable()

Revoke a Certificate.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   RevokeCertificateRequest request =
       RevokeCertificateRequest.newBuilder()
           .setName(
               CertificateName.of(
                       "[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]")
                   .toString())
           .setReason(RevocationReason.forNumber(0))
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Certificate> future =
       certificateAuthorityServiceClient.revokeCertificateCallable().futureCall(request);
   // Do something.
   Certificate response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<RevokeCertificateRequest,Certificate>

scheduleDeleteCertificateAuthorityAsync(CertificateAuthorityName name)

public final OperationFuture<CertificateAuthority,OperationMetadata> scheduleDeleteCertificateAuthorityAsync(CertificateAuthorityName name)

Schedule a CertificateAuthority for deletion.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateAuthorityName name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
   CertificateAuthority response =
       certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityAsync(name).get();
 }
 
Parameter
NameDescription
nameCertificateAuthorityName

Required. The resource name for this CertificateAuthority in the format projects/*/locations/*/certificateAuthorities/*.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

scheduleDeleteCertificateAuthorityAsync(ScheduleDeleteCertificateAuthorityRequest request)

public final OperationFuture<CertificateAuthority,OperationMetadata> scheduleDeleteCertificateAuthorityAsync(ScheduleDeleteCertificateAuthorityRequest request)

Schedule a CertificateAuthority for deletion.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ScheduleDeleteCertificateAuthorityRequest request =
       ScheduleDeleteCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   CertificateAuthority response =
       certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityAsync(request).get();
 }
 
Parameter
NameDescription
requestScheduleDeleteCertificateAuthorityRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

scheduleDeleteCertificateAuthorityAsync(String name)

public final OperationFuture<CertificateAuthority,OperationMetadata> scheduleDeleteCertificateAuthorityAsync(String name)

Schedule a CertificateAuthority for deletion.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   String name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
           .toString();
   CertificateAuthority response =
       certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The resource name for this CertificateAuthority in the format projects/*/locations/*/certificateAuthorities/*.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

scheduleDeleteCertificateAuthorityCallable()

public final UnaryCallable<ScheduleDeleteCertificateAuthorityRequest,Operation> scheduleDeleteCertificateAuthorityCallable()

Schedule a CertificateAuthority for deletion.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ScheduleDeleteCertificateAuthorityRequest request =
       ScheduleDeleteCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       certificateAuthorityServiceClient
           .scheduleDeleteCertificateAuthorityCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<ScheduleDeleteCertificateAuthorityRequest,Operation>

scheduleDeleteCertificateAuthorityOperationCallable()

public final OperationCallable<ScheduleDeleteCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> scheduleDeleteCertificateAuthorityOperationCallable()

Schedule a CertificateAuthority for deletion.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   ScheduleDeleteCertificateAuthorityRequest request =
       ScheduleDeleteCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<CertificateAuthority, OperationMetadata> future =
       certificateAuthorityServiceClient
           .scheduleDeleteCertificateAuthorityOperationCallable()
           .futureCall(request);
   // Do something.
   CertificateAuthority response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<ScheduleDeleteCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateCertificate(Certificate certificate, FieldMask updateMask)

public final Certificate updateCertificate(Certificate certificate, FieldMask updateMask)

Update a Certificate. Currently, the only field you can update is the labels field.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   Certificate certificate = Certificate.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Certificate response =
       certificateAuthorityServiceClient.updateCertificate(certificate, updateMask);
 }
 
Parameters
NameDescription
certificateCertificate

Required. Certificate with updated values.

updateMaskFieldMask

Required. A list of fields to be updated in this request.

Returns
TypeDescription
Certificate

updateCertificate(UpdateCertificateRequest request)

public final Certificate updateCertificate(UpdateCertificateRequest request)

Update a Certificate. Currently, the only field you can update is the labels field.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   UpdateCertificateRequest request =
       UpdateCertificateRequest.newBuilder()
           .setCertificate(Certificate.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Certificate response = certificateAuthorityServiceClient.updateCertificate(request);
 }
 
Parameter
NameDescription
requestUpdateCertificateRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Certificate

updateCertificateAuthorityAsync(CertificateAuthority certificateAuthority, FieldMask updateMask)

public final OperationFuture<CertificateAuthority,OperationMetadata> updateCertificateAuthorityAsync(CertificateAuthority certificateAuthority, FieldMask updateMask)

Update a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   CertificateAuthority response =
       certificateAuthorityServiceClient
           .updateCertificateAuthorityAsync(certificateAuthority, updateMask)
           .get();
 }
 
Parameters
NameDescription
certificateAuthorityCertificateAuthority

Required. CertificateAuthority with updated values.

updateMaskFieldMask

Required. A list of fields to be updated in this request.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

updateCertificateAuthorityAsync(UpdateCertificateAuthorityRequest request)

public final OperationFuture<CertificateAuthority,OperationMetadata> updateCertificateAuthorityAsync(UpdateCertificateAuthorityRequest request)

Update a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   UpdateCertificateAuthorityRequest request =
       UpdateCertificateAuthorityRequest.newBuilder()
           .setCertificateAuthority(CertificateAuthority.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   CertificateAuthority response =
       certificateAuthorityServiceClient.updateCertificateAuthorityAsync(request).get();
 }
 
Parameter
NameDescription
requestUpdateCertificateAuthorityRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<CertificateAuthority,OperationMetadata>

updateCertificateAuthorityCallable()

public final UnaryCallable<UpdateCertificateAuthorityRequest,Operation> updateCertificateAuthorityCallable()

Update a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   UpdateCertificateAuthorityRequest request =
       UpdateCertificateAuthorityRequest.newBuilder()
           .setCertificateAuthority(CertificateAuthority.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       certificateAuthorityServiceClient
           .updateCertificateAuthorityCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateCertificateAuthorityRequest,Operation>

updateCertificateAuthorityOperationCallable()

public final OperationCallable<UpdateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> updateCertificateAuthorityOperationCallable()

Update a CertificateAuthority.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   UpdateCertificateAuthorityRequest request =
       UpdateCertificateAuthorityRequest.newBuilder()
           .setCertificateAuthority(CertificateAuthority.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<CertificateAuthority, OperationMetadata> future =
       certificateAuthorityServiceClient
           .updateCertificateAuthorityOperationCallable()
           .futureCall(request);
   // Do something.
   CertificateAuthority response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<UpdateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>

updateCertificateCallable()

public final UnaryCallable<UpdateCertificateRequest,Certificate> updateCertificateCallable()

Update a Certificate. Currently, the only field you can update is the labels field.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   UpdateCertificateRequest request =
       UpdateCertificateRequest.newBuilder()
           .setCertificate(Certificate.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Certificate> future =
       certificateAuthorityServiceClient.updateCertificateCallable().futureCall(request);
   // Do something.
   Certificate response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateCertificateRequest,Certificate>

updateCertificateRevocationListAsync(CertificateRevocationList certificateRevocationList, FieldMask updateMask)

public final OperationFuture<CertificateRevocationList,OperationMetadata> updateCertificateRevocationListAsync(CertificateRevocationList certificateRevocationList, FieldMask updateMask)

Update a CertificateRevocationList.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CertificateRevocationList certificateRevocationList =
       CertificateRevocationList.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   CertificateRevocationList response =
       certificateAuthorityServiceClient
           .updateCertificateRevocationListAsync(certificateRevocationList, updateMask)
           .get();
 }
 
Parameters
NameDescription
certificateRevocationListCertificateRevocationList

Required. CertificateRevocationList with updated values.

updateMaskFieldMask

Required. A list of fields to be updated in this request.

Returns
TypeDescription
OperationFuture<CertificateRevocationList,OperationMetadata>

updateCertificateRevocationListAsync(UpdateCertificateRevocationListRequest request)

public final OperationFuture<CertificateRevocationList,OperationMetadata> updateCertificateRevocationListAsync(UpdateCertificateRevocationListRequest request)

Update a CertificateRevocationList.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   UpdateCertificateRevocationListRequest request =
       UpdateCertificateRevocationListRequest.newBuilder()
           .setCertificateRevocationList(CertificateRevocationList.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   CertificateRevocationList response =
       certificateAuthorityServiceClient.updateCertificateRevocationListAsync(request).get();
 }
 
Parameter
NameDescription
requestUpdateCertificateRevocationListRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<CertificateRevocationList,OperationMetadata>

updateCertificateRevocationListCallable()

public final UnaryCallable<UpdateCertificateRevocationListRequest,Operation> updateCertificateRevocationListCallable()

Update a CertificateRevocationList.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   UpdateCertificateRevocationListRequest request =
       UpdateCertificateRevocationListRequest.newBuilder()
           .setCertificateRevocationList(CertificateRevocationList.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       certificateAuthorityServiceClient
           .updateCertificateRevocationListCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateCertificateRevocationListRequest,Operation>

updateCertificateRevocationListOperationCallable()

public final OperationCallable<UpdateCertificateRevocationListRequest,CertificateRevocationList,OperationMetadata> updateCertificateRevocationListOperationCallable()

Update a CertificateRevocationList.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   UpdateCertificateRevocationListRequest request =
       UpdateCertificateRevocationListRequest.newBuilder()
           .setCertificateRevocationList(CertificateRevocationList.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<CertificateRevocationList, OperationMetadata> future =
       certificateAuthorityServiceClient
           .updateCertificateRevocationListOperationCallable()
           .futureCall(request);
   // Do something.
   CertificateRevocationList response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<UpdateCertificateRevocationListRequest,CertificateRevocationList,OperationMetadata>