Class CertificateAuthorityServiceClient
- java.lang.Object
-
- com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient
-
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource
,AutoCloseable
@BetaApi @Generated("by gapic-generator-java") public class CertificateAuthorityServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
Service Description: [Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] 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:
- 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.
- 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.
- 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.newHttpJsonBuilder().build(); CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create(certificateAuthorityServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
-
Nested Class Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
CertificateAuthorityServiceClient(CertificateAuthorityServiceSettings settings)
Constructs an instance of CertificateAuthorityServiceClient, using the given settings.protected
CertificateAuthorityServiceClient(CertificateAuthorityServiceStub stub)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
activateCertificateAuthorityAsync(ActivateCertificateAuthorityRequest request)
Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
activateCertificateAuthorityAsync(CertificateAuthorityName name)
Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
activateCertificateAuthorityAsync(String name)
Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].com.google.api.gax.rpc.UnaryCallable<ActivateCertificateAuthorityRequest,com.google.longrunning.Operation>
activateCertificateAuthorityCallable()
Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].com.google.api.gax.rpc.OperationCallable<ActivateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>
activateCertificateAuthorityOperationCallable()
Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].boolean
awaitTermination(long duration, TimeUnit unit)
void
close()
static CertificateAuthorityServiceClient
create()
Constructs an instance of CertificateAuthorityServiceClient with default settings.static CertificateAuthorityServiceClient
create(CertificateAuthorityServiceSettings settings)
Constructs an instance of CertificateAuthorityServiceClient, using the given settings.static CertificateAuthorityServiceClient
create(CertificateAuthorityServiceStub stub)
Constructs an instance of CertificateAuthorityServiceClient, using the given stub for making calls.Certificate
createCertificate(CertificateAuthorityName parent, Certificate certificate, String certificateId)
Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].Certificate
createCertificate(CreateCertificateRequest request)
Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].Certificate
createCertificate(String parent, Certificate certificate, String certificateId)
Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
createCertificateAuthorityAsync(CreateCertificateAuthorityRequest request)
Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
createCertificateAuthorityAsync(LocationName parent, CertificateAuthority certificateAuthority, String certificateAuthorityId)
Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
createCertificateAuthorityAsync(String parent, CertificateAuthority certificateAuthority, String certificateAuthorityId)
Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.com.google.api.gax.rpc.UnaryCallable<CreateCertificateAuthorityRequest,com.google.longrunning.Operation>
createCertificateAuthorityCallable()
Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.com.google.api.gax.rpc.OperationCallable<CreateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>
createCertificateAuthorityOperationCallable()
Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.com.google.api.gax.rpc.UnaryCallable<CreateCertificateRequest,Certificate>
createCertificateCallable()
Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
disableCertificateAuthorityAsync(CertificateAuthorityName name)
Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
disableCertificateAuthorityAsync(DisableCertificateAuthorityRequest request)
Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
disableCertificateAuthorityAsync(String name)
Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.rpc.UnaryCallable<DisableCertificateAuthorityRequest,com.google.longrunning.Operation>
disableCertificateAuthorityCallable()
Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.rpc.OperationCallable<DisableCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>
disableCertificateAuthorityOperationCallable()
Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
enableCertificateAuthorityAsync(CertificateAuthorityName name)
Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
enableCertificateAuthorityAsync(EnableCertificateAuthorityRequest request)
Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
enableCertificateAuthorityAsync(String name)
Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.rpc.UnaryCallable<EnableCertificateAuthorityRequest,com.google.longrunning.Operation>
enableCertificateAuthorityCallable()
Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.rpc.OperationCallable<EnableCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>
enableCertificateAuthorityOperationCallable()
Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].FetchCertificateAuthorityCsrResponse
fetchCertificateAuthorityCsr(CertificateAuthorityName name)
Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].FetchCertificateAuthorityCsrResponse
fetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest request)
Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].FetchCertificateAuthorityCsrResponse
fetchCertificateAuthorityCsr(String name)
Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].com.google.api.gax.rpc.UnaryCallable<FetchCertificateAuthorityCsrRequest,FetchCertificateAuthorityCsrResponse>
fetchCertificateAuthorityCsrCallable()
Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].Certificate
getCertificate(CertificateName name)
Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].Certificate
getCertificate(GetCertificateRequest request)
Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].Certificate
getCertificate(String name)
Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].CertificateAuthority
getCertificateAuthority(CertificateAuthorityName name)
Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].CertificateAuthority
getCertificateAuthority(GetCertificateAuthorityRequest request)
Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].CertificateAuthority
getCertificateAuthority(String name)
Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.rpc.UnaryCallable<GetCertificateAuthorityRequest,CertificateAuthority>
getCertificateAuthorityCallable()
Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.rpc.UnaryCallable<GetCertificateRequest,Certificate>
getCertificateCallable()
Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].CertificateRevocationList
getCertificateRevocationList(CertificateRevocationListName name)
Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].CertificateRevocationList
getCertificateRevocationList(GetCertificateRevocationListRequest request)
Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].CertificateRevocationList
getCertificateRevocationList(String name)
Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].com.google.api.gax.rpc.UnaryCallable<GetCertificateRevocationListRequest,CertificateRevocationList>
getCertificateRevocationListCallable()
Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].com.google.api.gax.httpjson.longrunning.OperationsClient
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.com.google.longrunning.OperationsClient
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.ReusableConfig
getReusableConfig(GetReusableConfigRequest request)
Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].ReusableConfig
getReusableConfig(ReusableConfigName name)
Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].ReusableConfig
getReusableConfig(String name)
Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].com.google.api.gax.rpc.UnaryCallable<GetReusableConfigRequest,ReusableConfig>
getReusableConfigCallable()
Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].CertificateAuthorityServiceSettings
getSettings()
CertificateAuthorityServiceStub
getStub()
boolean
isShutdown()
boolean
isTerminated()
CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse
listCertificateAuthorities(ListCertificateAuthoritiesRequest request)
Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse
listCertificateAuthorities(LocationName parent)
Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse
listCertificateAuthorities(String parent)
Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.rpc.UnaryCallable<ListCertificateAuthoritiesRequest,ListCertificateAuthoritiesResponse>
listCertificateAuthoritiesCallable()
Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.rpc.UnaryCallable<ListCertificateAuthoritiesRequest,CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse>
listCertificateAuthoritiesPagedCallable()
Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse
listCertificateRevocationLists(CertificateAuthorityName parent)
Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse
listCertificateRevocationLists(ListCertificateRevocationListsRequest request)
Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse
listCertificateRevocationLists(String parent)
Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].com.google.api.gax.rpc.UnaryCallable<ListCertificateRevocationListsRequest,ListCertificateRevocationListsResponse>
listCertificateRevocationListsCallable()
Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].com.google.api.gax.rpc.UnaryCallable<ListCertificateRevocationListsRequest,CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse>
listCertificateRevocationListsPagedCallable()
Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].CertificateAuthorityServiceClient.ListCertificatesPagedResponse
listCertificates(CertificateAuthorityName parent)
Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].CertificateAuthorityServiceClient.ListCertificatesPagedResponse
listCertificates(ListCertificatesRequest request)
Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].CertificateAuthorityServiceClient.ListCertificatesPagedResponse
listCertificates(String parent)
Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].com.google.api.gax.rpc.UnaryCallable<ListCertificatesRequest,ListCertificatesResponse>
listCertificatesCallable()
Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].com.google.api.gax.rpc.UnaryCallable<ListCertificatesRequest,CertificateAuthorityServiceClient.ListCertificatesPagedResponse>
listCertificatesPagedCallable()
Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse
listReusableConfigs(ListReusableConfigsRequest request)
Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse
listReusableConfigs(LocationName parent)
Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse
listReusableConfigs(String parent)
Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].com.google.api.gax.rpc.UnaryCallable<ListReusableConfigsRequest,ListReusableConfigsResponse>
listReusableConfigsCallable()
Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].com.google.api.gax.rpc.UnaryCallable<ListReusableConfigsRequest,CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse>
listReusableConfigsPagedCallable()
Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
restoreCertificateAuthorityAsync(CertificateAuthorityName name)
Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
restoreCertificateAuthorityAsync(RestoreCertificateAuthorityRequest request)
Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
restoreCertificateAuthorityAsync(String name)
Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.com.google.api.gax.rpc.UnaryCallable<RestoreCertificateAuthorityRequest,com.google.longrunning.Operation>
restoreCertificateAuthorityCallable()
Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.com.google.api.gax.rpc.OperationCallable<RestoreCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>
restoreCertificateAuthorityOperationCallable()
Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.Certificate
revokeCertificate(CertificateName name)
Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].Certificate
revokeCertificate(RevokeCertificateRequest request)
Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].Certificate
revokeCertificate(String name)
Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].com.google.api.gax.rpc.UnaryCallable<RevokeCertificateRequest,Certificate>
revokeCertificateCallable()
Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
scheduleDeleteCertificateAuthorityAsync(CertificateAuthorityName name)
Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
scheduleDeleteCertificateAuthorityAsync(ScheduleDeleteCertificateAuthorityRequest request)
Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
scheduleDeleteCertificateAuthorityAsync(String name)
Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.com.google.api.gax.rpc.UnaryCallable<ScheduleDeleteCertificateAuthorityRequest,com.google.longrunning.Operation>
scheduleDeleteCertificateAuthorityCallable()
Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.com.google.api.gax.rpc.OperationCallable<ScheduleDeleteCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>
scheduleDeleteCertificateAuthorityOperationCallable()
Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.void
shutdown()
void
shutdownNow()
Certificate
updateCertificate(Certificate certificate, com.google.protobuf.FieldMask updateMask)
Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].Certificate
updateCertificate(UpdateCertificateRequest request)
Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
updateCertificateAuthorityAsync(CertificateAuthority certificateAuthority, com.google.protobuf.FieldMask updateMask)
Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata>
updateCertificateAuthorityAsync(UpdateCertificateAuthorityRequest request)
Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.rpc.UnaryCallable<UpdateCertificateAuthorityRequest,com.google.longrunning.Operation>
updateCertificateAuthorityCallable()
Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.rpc.OperationCallable<UpdateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata>
updateCertificateAuthorityOperationCallable()
Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].com.google.api.gax.rpc.UnaryCallable<UpdateCertificateRequest,Certificate>
updateCertificateCallable()
Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].com.google.api.gax.longrunning.OperationFuture<CertificateRevocationList,OperationMetadata>
updateCertificateRevocationListAsync(CertificateRevocationList certificateRevocationList, com.google.protobuf.FieldMask updateMask)
Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].com.google.api.gax.longrunning.OperationFuture<CertificateRevocationList,OperationMetadata>
updateCertificateRevocationListAsync(UpdateCertificateRevocationListRequest request)
Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].com.google.api.gax.rpc.UnaryCallable<UpdateCertificateRevocationListRequest,com.google.longrunning.Operation>
updateCertificateRevocationListCallable()
Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].com.google.api.gax.rpc.OperationCallable<UpdateCertificateRevocationListRequest,CertificateRevocationList,OperationMetadata>
updateCertificateRevocationListOperationCallable()
Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
-
-
-
Constructor Detail
-
CertificateAuthorityServiceClient
protected CertificateAuthorityServiceClient(CertificateAuthorityServiceSettings settings) throws IOException
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.- Throws:
IOException
-
CertificateAuthorityServiceClient
protected CertificateAuthorityServiceClient(CertificateAuthorityServiceStub stub)
-
-
Method Detail
-
create
public static final CertificateAuthorityServiceClient create() throws IOException
Constructs an instance of CertificateAuthorityServiceClient with default settings.- Throws:
IOException
-
create
public static final CertificateAuthorityServiceClient create(CertificateAuthorityServiceSettings settings) throws IOException
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.- Throws:
IOException
-
create
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).
-
getSettings
public final CertificateAuthorityServiceSettings getSettings()
-
getStub
public CertificateAuthorityServiceStub getStub()
-
getOperationsClient
public final com.google.longrunning.OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
-
getHttpJsonOperationsClient
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
-
createCertificate
public final Certificate createCertificate(CertificateAuthorityName parent, Certificate certificate, String certificateId)
Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.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:
parent
- Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format `projects/*/locations/*/certificateAuthorities/*`.certificate
- Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.certificateId
- 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][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier], but is optional and its value is ignored otherwise.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createCertificate
public final Certificate createCertificate(String parent, Certificate certificate, String certificateId)
Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.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:
parent
- Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format `projects/*/locations/*/certificateAuthorities/*`.certificate
- Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.certificateId
- 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][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier], but is optional and its value is ignored otherwise.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createCertificate
public final Certificate createCertificate(CreateCertificateRequest request)
Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createCertificateCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateCertificateRequest,Certificate> createCertificateCallable()
Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
getCertificate
public final Certificate getCertificate(CertificateName name)
Returns a [Certificate][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
name
- Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getCertificate
public final Certificate getCertificate(String name)
Returns a [Certificate][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
name
- Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getCertificate
public final Certificate getCertificate(GetCertificateRequest request)
Returns a [Certificate][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getCertificateCallable
public final com.google.api.gax.rpc.UnaryCallable<GetCertificateRequest,Certificate> getCertificateCallable()
Returns a [Certificate][google.cloud.security.privateca.v1beta1.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(); }
-
listCertificates
public final CertificateAuthorityServiceClient.ListCertificatesPagedResponse listCertificates(CertificateAuthorityName parent)
Lists [Certificates][google.cloud.security.privateca.v1beta1.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()) { CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); for (Certificate element : certificateAuthorityServiceClient.listCertificates(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the location associated with the [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format `projects/*/locations/*/certificateauthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listCertificates
public final CertificateAuthorityServiceClient.ListCertificatesPagedResponse listCertificates(String parent)
Lists [Certificates][google.cloud.security.privateca.v1beta1.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 parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]") .toString(); for (Certificate element : certificateAuthorityServiceClient.listCertificates(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the location associated with the [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format `projects/*/locations/*/certificateauthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listCertificates
public final CertificateAuthorityServiceClient.ListCertificatesPagedResponse listCertificates(ListCertificatesRequest request)
Lists [Certificates][google.cloud.security.privateca.v1beta1.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()) { 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listCertificatesPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListCertificatesRequest,CertificateAuthorityServiceClient.ListCertificatesPagedResponse> listCertificatesPagedCallable()
Lists [Certificates][google.cloud.security.privateca.v1beta1.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()) { 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); } }
-
listCertificatesCallable
public final com.google.api.gax.rpc.UnaryCallable<ListCertificatesRequest,ListCertificatesResponse> listCertificatesCallable()
Lists [Certificates][google.cloud.security.privateca.v1beta1.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()) { 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; } } }
-
revokeCertificate
public final Certificate revokeCertificate(CertificateName name)
Revoke a [Certificate][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
name
- Required. The resource name for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
revokeCertificate
public final Certificate revokeCertificate(String name)
Revoke a [Certificate][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
name
- Required. The resource name for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
revokeCertificate
public final Certificate revokeCertificate(RevokeCertificateRequest request)
Revoke a [Certificate][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
revokeCertificateCallable
public final com.google.api.gax.rpc.UnaryCallable<RevokeCertificateRequest,Certificate> revokeCertificateCallable()
Revoke a [Certificate][google.cloud.security.privateca.v1beta1.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(); }
-
updateCertificate
public final Certificate updateCertificate(Certificate certificate, com.google.protobuf.FieldMask updateMask)
Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1beta1.Certificate.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:
certificate
- Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.updateMask
- Required. A list of fields to be updated in this request.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateCertificate
public final Certificate updateCertificate(UpdateCertificateRequest request)
Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1beta1.Certificate.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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateCertificateCallable
public final com.google.api.gax.rpc.UnaryCallable<UpdateCertificateRequest,Certificate> updateCertificateCallable()
Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1beta1.Certificate.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(); }
-
activateCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> activateCertificateAuthorityAsync(CertificateAuthorityName name)
Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.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(); }
- Parameters:
name
- Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the format `projects/*/locations/*/certificateAuthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
activateCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> activateCertificateAuthorityAsync(String name)
Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.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(); }
- Parameters:
name
- Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the format `projects/*/locations/*/certificateAuthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
activateCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> activateCertificateAuthorityAsync(ActivateCertificateAuthorityRequest request)
Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
activateCertificateAuthorityOperationCallable
public final com.google.api.gax.rpc.OperationCallable<ActivateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> activateCertificateAuthorityOperationCallable()
Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.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(); }
-
activateCertificateAuthorityCallable
public final com.google.api.gax.rpc.UnaryCallable<ActivateCertificateAuthorityRequest,com.google.longrunning.Operation> activateCertificateAuthorityCallable()
Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.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(); }
-
createCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> createCertificateAuthorityAsync(LocationName parent, CertificateAuthority certificateAuthority, String certificateAuthorityId)
Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.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:
parent
- Required. The resource name of the location associated with the [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format `projects/*/locations/*`.certificateAuthority
- Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.certificateAuthorityId
- Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> createCertificateAuthorityAsync(String parent, CertificateAuthority certificateAuthority, String certificateAuthorityId)
Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.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:
parent
- Required. The resource name of the location associated with the [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format `projects/*/locations/*`.certificateAuthority
- Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.certificateAuthorityId
- Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> createCertificateAuthorityAsync(CreateCertificateAuthorityRequest request)
Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createCertificateAuthorityOperationCallable
public final com.google.api.gax.rpc.OperationCallable<CreateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> createCertificateAuthorityOperationCallable()
Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
createCertificateAuthorityCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateCertificateAuthorityRequest,com.google.longrunning.Operation> createCertificateAuthorityCallable()
Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
disableCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> disableCertificateAuthorityAsync(CertificateAuthorityName name)
Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
name
- Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the format `projects/*/locations/*/certificateAuthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
disableCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> disableCertificateAuthorityAsync(String name)
Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
name
- Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the format `projects/*/locations/*/certificateAuthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
disableCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> disableCertificateAuthorityAsync(DisableCertificateAuthorityRequest request)
Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
disableCertificateAuthorityOperationCallable
public final com.google.api.gax.rpc.OperationCallable<DisableCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> disableCertificateAuthorityOperationCallable()
Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
disableCertificateAuthorityCallable
public final com.google.api.gax.rpc.UnaryCallable<DisableCertificateAuthorityRequest,com.google.longrunning.Operation> disableCertificateAuthorityCallable()
Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
enableCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> enableCertificateAuthorityAsync(CertificateAuthorityName name)
Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
name
- Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the format `projects/*/locations/*/certificateAuthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
enableCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> enableCertificateAuthorityAsync(String name)
Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
name
- Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the format `projects/*/locations/*/certificateAuthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
enableCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> enableCertificateAuthorityAsync(EnableCertificateAuthorityRequest request)
Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
enableCertificateAuthorityOperationCallable
public final com.google.api.gax.rpc.OperationCallable<EnableCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> enableCertificateAuthorityOperationCallable()
Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
enableCertificateAuthorityCallable
public final com.google.api.gax.rpc.UnaryCallable<EnableCertificateAuthorityRequest,com.google.longrunning.Operation> enableCertificateAuthorityCallable()
Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
fetchCertificateAuthorityCsr
public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(CertificateAuthorityName name)
Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.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); }
- Parameters:
name
- Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the format `projects/*/locations/*/certificateAuthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
fetchCertificateAuthorityCsr
public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(String name)
Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.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); }
- Parameters:
name
- Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the format `projects/*/locations/*/certificateAuthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
fetchCertificateAuthorityCsr
public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest request)
Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
fetchCertificateAuthorityCsrCallable
public final com.google.api.gax.rpc.UnaryCallable<FetchCertificateAuthorityCsrRequest,FetchCertificateAuthorityCsrResponse> fetchCertificateAuthorityCsrCallable()
Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.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(); }
-
getCertificateAuthority
public final CertificateAuthority getCertificateAuthority(CertificateAuthorityName name)
Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
name
- Required. The [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to get.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getCertificateAuthority
public final CertificateAuthority getCertificateAuthority(String name)
Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
name
- Required. The [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to get.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getCertificateAuthority
public final CertificateAuthority getCertificateAuthority(GetCertificateAuthorityRequest request)
Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getCertificateAuthorityCallable
public final com.google.api.gax.rpc.UnaryCallable<GetCertificateAuthorityRequest,CertificateAuthority> getCertificateAuthorityCallable()
Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
listCertificateAuthorities
public final CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(LocationName parent)
Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.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()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (CertificateAuthority element : certificateAuthorityServiceClient.listCertificateAuthorities(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the location associated with the [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format `projects/*/locations/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listCertificateAuthorities
public final CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(String parent)
Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.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 = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (CertificateAuthority element : certificateAuthorityServiceClient.listCertificateAuthorities(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the location associated with the [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format `projects/*/locations/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listCertificateAuthorities
public final CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(ListCertificateAuthoritiesRequest request)
Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.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()) { 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listCertificateAuthoritiesPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListCertificateAuthoritiesRequest,CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse> listCertificateAuthoritiesPagedCallable()
Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.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()) { 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); } }
-
listCertificateAuthoritiesCallable
public final com.google.api.gax.rpc.UnaryCallable<ListCertificateAuthoritiesRequest,ListCertificateAuthoritiesResponse> listCertificateAuthoritiesCallable()
Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.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()) { 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; } } }
-
restoreCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> restoreCertificateAuthorityAsync(CertificateAuthorityName name)
Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
name
- Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the format `projects/*/locations/*/certificateAuthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
restoreCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> restoreCertificateAuthorityAsync(String name)
Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
name
- Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the format `projects/*/locations/*/certificateAuthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
restoreCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> restoreCertificateAuthorityAsync(RestoreCertificateAuthorityRequest request)
Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
restoreCertificateAuthorityOperationCallable
public final com.google.api.gax.rpc.OperationCallable<RestoreCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> restoreCertificateAuthorityOperationCallable()
Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
restoreCertificateAuthorityCallable
public final com.google.api.gax.rpc.UnaryCallable<RestoreCertificateAuthorityRequest,com.google.longrunning.Operation> restoreCertificateAuthorityCallable()
Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
scheduleDeleteCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> scheduleDeleteCertificateAuthorityAsync(CertificateAuthorityName name)
Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
name
- Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the format `projects/*/locations/*/certificateAuthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
scheduleDeleteCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> scheduleDeleteCertificateAuthorityAsync(String name)
Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
name
- Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the format `projects/*/locations/*/certificateAuthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
scheduleDeleteCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> scheduleDeleteCertificateAuthorityAsync(ScheduleDeleteCertificateAuthorityRequest request)
Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
scheduleDeleteCertificateAuthorityOperationCallable
public final com.google.api.gax.rpc.OperationCallable<ScheduleDeleteCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> scheduleDeleteCertificateAuthorityOperationCallable()
Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
scheduleDeleteCertificateAuthorityCallable
public final com.google.api.gax.rpc.UnaryCallable<ScheduleDeleteCertificateAuthorityRequest,com.google.longrunning.Operation> scheduleDeleteCertificateAuthorityCallable()
Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
updateCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> updateCertificateAuthorityAsync(CertificateAuthority certificateAuthority, com.google.protobuf.FieldMask updateMask)
Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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:
certificateAuthority
- Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.updateMask
- Required. A list of fields to be updated in this request.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateCertificateAuthorityAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateAuthority,OperationMetadata> updateCertificateAuthorityAsync(UpdateCertificateAuthorityRequest request)
Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateCertificateAuthorityOperationCallable
public final com.google.api.gax.rpc.OperationCallable<UpdateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> updateCertificateAuthorityOperationCallable()
Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
updateCertificateAuthorityCallable
public final com.google.api.gax.rpc.UnaryCallable<UpdateCertificateAuthorityRequest,com.google.longrunning.Operation> updateCertificateAuthorityCallable()
Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.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(); }
-
getCertificateRevocationList
public final CertificateRevocationList getCertificateRevocationList(CertificateRevocationListName name)
Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
name
- Required. The [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getCertificateRevocationList
public final CertificateRevocationList getCertificateRevocationList(String name)
Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
name
- Required. The [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getCertificateRevocationList
public final CertificateRevocationList getCertificateRevocationList(GetCertificateRevocationListRequest request)
Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getCertificateRevocationListCallable
public final com.google.api.gax.rpc.UnaryCallable<GetCertificateRevocationListRequest,CertificateRevocationList> getCertificateRevocationListCallable()
Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.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(); }
-
listCertificateRevocationLists
public final CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse listCertificateRevocationLists(CertificateAuthorityName parent)
Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.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()) { CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); for (CertificateRevocationList element : certificateAuthorityServiceClient.listCertificateRevocationLists(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the location associated with the [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format `projects/*/locations/*/certificateauthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listCertificateRevocationLists
public final CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse listCertificateRevocationLists(String parent)
Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.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 parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]") .toString(); for (CertificateRevocationList element : certificateAuthorityServiceClient.listCertificateRevocationLists(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the location associated with the [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format `projects/*/locations/*/certificateauthorities/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listCertificateRevocationLists
public final CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse listCertificateRevocationLists(ListCertificateRevocationListsRequest request)
Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.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()) { 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listCertificateRevocationListsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListCertificateRevocationListsRequest,CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse> listCertificateRevocationListsPagedCallable()
Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.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()) { 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); } }
-
listCertificateRevocationListsCallable
public final com.google.api.gax.rpc.UnaryCallable<ListCertificateRevocationListsRequest,ListCertificateRevocationListsResponse> listCertificateRevocationListsCallable()
Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.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()) { 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; } } }
-
updateCertificateRevocationListAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateRevocationList,OperationMetadata> updateCertificateRevocationListAsync(CertificateRevocationList certificateRevocationList, com.google.protobuf.FieldMask updateMask)
Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.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:
certificateRevocationList
- Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.updateMask
- Required. A list of fields to be updated in this request.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateCertificateRevocationListAsync
public final com.google.api.gax.longrunning.OperationFuture<CertificateRevocationList,OperationMetadata> updateCertificateRevocationListAsync(UpdateCertificateRevocationListRequest request)
Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateCertificateRevocationListOperationCallable
public final com.google.api.gax.rpc.OperationCallable<UpdateCertificateRevocationListRequest,CertificateRevocationList,OperationMetadata> updateCertificateRevocationListOperationCallable()
Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.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(); }
-
updateCertificateRevocationListCallable
public final com.google.api.gax.rpc.UnaryCallable<UpdateCertificateRevocationListRequest,com.google.longrunning.Operation> updateCertificateRevocationListCallable()
Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.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(); }
-
getReusableConfig
public final ReusableConfig getReusableConfig(ReusableConfigName name)
Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
name
- Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getReusableConfig
public final ReusableConfig getReusableConfig(String name)
Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
name
- Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getReusableConfig
public final ReusableConfig getReusableConfig(GetReusableConfigRequest request)
Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getReusableConfigCallable
public final com.google.api.gax.rpc.UnaryCallable<GetReusableConfigRequest,ReusableConfig> getReusableConfigCallable()
Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.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(); }
-
listReusableConfigs
public final CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse listReusableConfigs(LocationName parent)
Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.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()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (ReusableConfig element : certificateAuthorityServiceClient.listReusableConfigs(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the location associated with the [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format `projects/*/locations/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listReusableConfigs
public final CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse listReusableConfigs(String parent)
Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.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 parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (ReusableConfig element : certificateAuthorityServiceClient.listReusableConfigs(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the location associated with the [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format `projects/*/locations/*`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listReusableConfigs
public final CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse listReusableConfigs(ListReusableConfigsRequest request)
Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.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()) { 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listReusableConfigsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListReusableConfigsRequest,CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse> listReusableConfigsPagedCallable()
Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.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()) { 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); } }
-
listReusableConfigsCallable
public final com.google.api.gax.rpc.UnaryCallable<ListReusableConfigsRequest,ListReusableConfigsResponse> listReusableConfigsCallable()
Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.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()) { 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; } } }
-
close
public final void close()
- Specified by:
close
in interfaceAutoCloseable
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfacecom.google.api.gax.core.BackgroundResource
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdown
in interfacecom.google.api.gax.core.BackgroundResource
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfacecom.google.api.gax.core.BackgroundResource
-
shutdownNow
public void shutdownNow()
- Specified by:
shutdownNow
in interfacecom.google.api.gax.core.BackgroundResource
-
awaitTermination
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
- Specified by:
awaitTermination
in interfacecom.google.api.gax.core.BackgroundResource
- Throws:
InterruptedException
-
-