Class KmsManagementAsyncClient
- java.lang.Object
-
- com.oracle.bmc.http.internal.BaseAsyncClient
-
- com.oracle.bmc.keymanagement.KmsManagementAsyncClient
-
- All Implemented Interfaces:
KmsManagementAsync,AutoCloseable
@Generated(value="OracleSDKGenerator", comments="API Version: release") public class KmsManagementAsyncClient extends BaseAsyncClient implements KmsManagementAsyncAsync client implementation for KmsManagement service.
There are two ways to use async client: 1. Use AsyncHandler: using AsyncHandler, if the response to the call is anInputStream, like getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, because the stream will be closed right after the AsyncHandler is invoked.
2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler is used, it is still safe to use the Future to determine whether or not the request was completed via Future.isDone/isCancelled.
Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java
-
-
Field Summary
Fields Modifier and Type Field Description StringclientCommonLibraryVersionCompatible SDK version, provided by the codegen.Optional<String>minimumClientCommonLibraryVersionFromClientMinimum compatible SDK version, maybe provided by the codegen.static ServiceSERVICEService instance for KmsManagement.
-
Constructor Summary
Constructors Constructor Description KmsManagementAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)Deprecated.Use thebuilderinstead.KmsManagementAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)Deprecated.Use thebuilderinstead.KmsManagementAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)Deprecated.Use thebuilderinstead.KmsManagementAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)Deprecated.Use thebuilderinstead.KmsManagementAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)Deprecated.Use thebuilderinstead.KmsManagementAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)Deprecated.Use thebuilderinstead.KmsManagementAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)Deprecated.Use thebuilderinstead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Future<BackupKeyResponse>backupKey(BackupKeyRequest request, AsyncHandler<BackupKeyRequest,BackupKeyResponse> handler)Backs up an encrypted file that contains all key versions and metadata of the specified key so that you can restore the key later.static KmsManagementAsyncClientBuilderbuilder()Create a builder for this client.Future<CancelKeyDeletionResponse>cancelKeyDeletion(CancelKeyDeletionRequest request, AsyncHandler<CancelKeyDeletionRequest,CancelKeyDeletionResponse> handler)Cancels the scheduled deletion of the specified key.Future<CancelKeyVersionDeletionResponse>cancelKeyVersionDeletion(CancelKeyVersionDeletionRequest request, AsyncHandler<CancelKeyVersionDeletionRequest,CancelKeyVersionDeletionResponse> handler)Cancels the scheduled deletion of the specified key version.Future<ChangeKeyCompartmentResponse>changeKeyCompartment(ChangeKeyCompartmentRequest request, AsyncHandler<ChangeKeyCompartmentRequest,ChangeKeyCompartmentResponse> handler)Moves a key into a different compartment within the same tenancy.protected <REQ extends BmcRequest<?>,RESP extends BmcResponse,RESP_BUILDER extends BmcResponse.Builder<RESP>>
ClientCall<REQ,RESP,RESP_BUILDER>clientCall(REQ request, Supplier<RESP_BUILDER> responseBuilder)voidclose()Future<CreateKeyResponse>createKey(CreateKeyRequest request, AsyncHandler<CreateKeyRequest,CreateKeyResponse> handler)Creates a new master encryption key.Future<CreateKeyVersionResponse>createKeyVersion(CreateKeyVersionRequest request, AsyncHandler<CreateKeyVersionRequest,CreateKeyVersionResponse> handler)Generates a new KeyVersion resource that provides new cryptographic material for a master encryption key.Future<DisableKeyResponse>disableKey(DisableKeyRequest request, AsyncHandler<DisableKeyRequest,DisableKeyResponse> handler)Disables a master encryption key so it can no longer be used for encryption, decryption, or generating new data encryption keys.voidenableDualStackEndpoints(boolean enableDualStackEndpoints)This method should be used to enable or disable the use of dual-stack endpoints.Future<EnableKeyResponse>enableKey(EnableKeyRequest request, AsyncHandler<EnableKeyRequest,EnableKeyResponse> handler)Enables a master encryption key so it can be used for encryption, decryption, or generating new data encryption keys.StringgetClientCommonLibraryVersion()protected ClientConfiguratorgetDefaultConfigurator()StringgetEndpoint()Get the endpoint of the client.Future<GetKeyResponse>getKey(GetKeyRequest request, AsyncHandler<GetKeyRequest,GetKeyResponse> handler)Gets information about the specified master encryption key.Future<GetKeyVersionResponse>getKeyVersion(GetKeyVersionRequest request, AsyncHandler<GetKeyVersionRequest,GetKeyVersionResponse> handler)Gets information about the specified key version.Optional<String>getMinimumClientCommonLibraryVersionFromClient()Map<String,Boolean>getOptionsMap()Return an immutable snapshot representing the current options set for this client.Future<GetReplicationStatusResponse>getReplicationStatus(GetReplicationStatusRequest request, AsyncHandler<GetReplicationStatusRequest,GetReplicationStatusResponse> handler)When a vault has a replica, each operation on the vault or its resources, such as keys, is replicated and has an associated replicationId.StringgetResolvedEndpoint(Map<String,Object> requiredParametersMap)Returns the endpoint after filling in the current options, as determined byBaseClient.getOptionsMap(), and then filling in the required parameters in requiredParametersMap into the placeholders in the endpoint.Future<GetWrappingKeyResponse>getWrappingKey(GetWrappingKeyRequest request, AsyncHandler<GetWrappingKeyRequest,GetWrappingKeyResponse> handler)Gets details about the public RSA wrapping key associated with the vault in the endpoint.Future<ImportKeyResponse>importKey(ImportKeyRequest request, AsyncHandler<ImportKeyRequest,ImportKeyResponse> handler)Imports AES and RSA keys to create a new key.Future<ImportKeyVersionResponse>importKeyVersion(ImportKeyVersionRequest request, AsyncHandler<ImportKeyVersionRequest,ImportKeyVersionResponse> handler)Imports AES key material to create a new key version and then rotate the key to begin using the new key version.Future<ListKeysResponse>listKeys(ListKeysRequest request, AsyncHandler<ListKeysRequest,ListKeysResponse> handler)Lists the master encryption keys in the specified vault and compartment.Future<ListKeyVersionsResponse>listKeyVersions(ListKeyVersionsRequest request, AsyncHandler<ListKeyVersionsRequest,ListKeyVersionsResponse> handler)Lists all KeyVersion resources for the specified master encryption key.voidrefreshClient()Rebuild the backingHttpClient.Future<RestoreKeyFromFileResponse>restoreKeyFromFile(RestoreKeyFromFileRequest request, AsyncHandler<RestoreKeyFromFileRequest,RestoreKeyFromFileResponse> handler)Restores the specified key to the specified vault, based on information in the backup file provided.Future<RestoreKeyFromObjectStoreResponse>restoreKeyFromObjectStore(RestoreKeyFromObjectStoreRequest request, AsyncHandler<RestoreKeyFromObjectStoreRequest,RestoreKeyFromObjectStoreResponse> handler)Restores the specified key to the specified vault from an Oracle Cloud Infrastructure Object Storage location.Future<ScheduleKeyDeletionResponse>scheduleKeyDeletion(ScheduleKeyDeletionRequest request, AsyncHandler<ScheduleKeyDeletionRequest,ScheduleKeyDeletionResponse> handler)Schedules the deletion of the specified key.Future<ScheduleKeyVersionDeletionResponse>scheduleKeyVersionDeletion(ScheduleKeyVersionDeletionRequest request, AsyncHandler<ScheduleKeyVersionDeletionRequest,ScheduleKeyVersionDeletionResponse> handler)Schedules the deletion of the specified key version.voidsetEndpoint(String endpoint)protected voidsetRegion(Region region)protected voidsetRegion(String regionId)Future<UpdateKeyResponse>updateKey(UpdateKeyRequest request, AsyncHandler<UpdateKeyRequest,UpdateKeyResponse> handler)Updates the properties of a master encryption key.voiduseRealmSpecificEndpointTemplate(boolean useOfRealmSpecificEndpointTemplateEnabled)This method should be used to enable or disable the use of realm-specific endpoint template.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.AutoCloseable
close
-
Methods inherited from interface com.oracle.bmc.keymanagement.KmsManagementAsync
getEndpoint, refreshClient, setEndpoint
-
-
-
-
Constructor Detail
-
KmsManagementAsyncClient
@Deprecated public KmsManagementAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Deprecated.Use thebuilderinstead.Create a new client instance.- Parameters:
authenticationDetailsProvider- The authentication details (seeBuilder#build)
-
KmsManagementAsyncClient
@Deprecated public KmsManagementAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)
Deprecated.Use thebuilderinstead.Create a new client instance.- Parameters:
authenticationDetailsProvider- The authentication details (seeBuilder#build)configuration-Builder#configuration
-
KmsManagementAsyncClient
@Deprecated public KmsManagementAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)
Deprecated.Use thebuilderinstead.Create a new client instance.- Parameters:
authenticationDetailsProvider- The authentication details (seeBuilder#build)configuration-Builder#configurationclientConfigurator-Builder#clientConfigurator
-
KmsManagementAsyncClient
@Deprecated public KmsManagementAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)
Deprecated.Use thebuilderinstead.Create a new client instance.- Parameters:
authenticationDetailsProvider- The authentication details (seeBuilder#build)configuration-Builder#configurationclientConfigurator-Builder#clientConfiguratordefaultRequestSignerFactory-Builder#requestSignerFactory
-
KmsManagementAsyncClient
@Deprecated public KmsManagementAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)
Deprecated.Use thebuilderinstead.Create a new client instance.- Parameters:
authenticationDetailsProvider- The authentication details (seeBuilder#build)configuration-Builder#configurationclientConfigurator-Builder#clientConfiguratordefaultRequestSignerFactory-Builder#requestSignerFactoryadditionalClientConfigurators-Builder#additionalClientConfigurators
-
KmsManagementAsyncClient
@Deprecated public KmsManagementAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilderinstead.Create a new client instance.- Parameters:
authenticationDetailsProvider- The authentication details (seeBuilder#build)configuration-Builder#configurationclientConfigurator-Builder#clientConfiguratordefaultRequestSignerFactory-Builder#requestSignerFactoryadditionalClientConfigurators-Builder#additionalClientConfiguratorsendpoint-Builder#endpoint
-
KmsManagementAsyncClient
@Deprecated public KmsManagementAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilderinstead.Create a new client instance.- Parameters:
authenticationDetailsProvider- The authentication details (seeBuilder#build)configuration-Builder#configurationclientConfigurator-Builder#clientConfiguratordefaultRequestSignerFactory-Builder#requestSignerFactoryadditionalClientConfigurators-Builder#additionalClientConfiguratorsendpoint-Builder#endpointsigningStrategyRequestSignerFactories-Builder#signingStrategyRequestSignerFactories
-
-
Method Detail
-
builder
public static KmsManagementAsyncClientBuilder builder()
Create a builder for this client.- Returns:
- builder
-
backupKey
public Future<BackupKeyResponse> backupKey(BackupKeyRequest request, AsyncHandler<BackupKeyRequest,BackupKeyResponse> handler)
Description copied from interface:KmsManagementAsyncBacks up an encrypted file that contains all key versions and metadata of the specified key so that you can restore the key later.The file also contains the metadata of the vault that the key belonged to.
- Specified by:
backupKeyin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
cancelKeyDeletion
public Future<CancelKeyDeletionResponse> cancelKeyDeletion(CancelKeyDeletionRequest request, AsyncHandler<CancelKeyDeletionRequest,CancelKeyDeletionResponse> handler)
Description copied from interface:KmsManagementAsyncCancels the scheduled deletion of the specified key.Canceling a scheduled deletion restores the key’s lifecycle state to what it was before its scheduled deletion.
As a provisioning operation, this call is subject to a Key Management limit that applies to the total number of requests across all provisioning write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of provisioning write operations exceeds 10 requests per second for a given tenancy.
- Specified by:
cancelKeyDeletionin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
cancelKeyVersionDeletion
public Future<CancelKeyVersionDeletionResponse> cancelKeyVersionDeletion(CancelKeyVersionDeletionRequest request, AsyncHandler<CancelKeyVersionDeletionRequest,CancelKeyVersionDeletionResponse> handler)
Description copied from interface:KmsManagementAsyncCancels the scheduled deletion of the specified key version.Canceling a scheduled deletion restores the key version to its lifecycle state from before its scheduled deletion.
As a provisioning operation, this call is subject to a Key Management limit that applies to the total number of requests across all provisioning write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of provisioning write operations exceeds 10 requests per second for a given tenancy.
- Specified by:
cancelKeyVersionDeletionin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
changeKeyCompartment
public Future<ChangeKeyCompartmentResponse> changeKeyCompartment(ChangeKeyCompartmentRequest request, AsyncHandler<ChangeKeyCompartmentRequest,ChangeKeyCompartmentResponse> handler)
Description copied from interface:KmsManagementAsyncMoves a key into a different compartment within the same tenancy.For information about moving resources between compartments, see Moving Resources to a Different Compartment.
When provided, if-match is checked against the ETag values of the key.
As a provisioning operation, this call is subject to a Key Management limit that applies to the total number of requests across all provisioning write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of provisioning write operations exceeds 10 requests per second for a given tenancy.
- Specified by:
changeKeyCompartmentin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
createKey
public Future<CreateKeyResponse> createKey(CreateKeyRequest request, AsyncHandler<CreateKeyRequest,CreateKeyResponse> handler)
Description copied from interface:KmsManagementAsyncCreates a new master encryption key.As a management operation, this call is subject to a Key Management limit that applies to the total number of requests across all management write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of management write operations exceeds 10 requests per second for a given tenancy.
- Specified by:
createKeyin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
createKeyVersion
public Future<CreateKeyVersionResponse> createKeyVersion(CreateKeyVersionRequest request, AsyncHandler<CreateKeyVersionRequest,CreateKeyVersionResponse> handler)
Description copied from interface:KmsManagementAsyncGenerates a new KeyVersion resource that provides new cryptographic material for a master encryption key.The key must be in an
ENABLEDstate to be rotated.As a management operation, this call is subject to a Key Management limit that applies to the total number of requests across all management write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of management write operations exceeds 10 requests per second for a given tenancy.
- Specified by:
createKeyVersionin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
disableKey
public Future<DisableKeyResponse> disableKey(DisableKeyRequest request, AsyncHandler<DisableKeyRequest,DisableKeyResponse> handler)
Description copied from interface:KmsManagementAsyncDisables a master encryption key so it can no longer be used for encryption, decryption, or generating new data encryption keys.As a management operation, this call is subject to a Key Management limit that applies to the total number of requests across all management write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of management write operations exceeds 10 requests per second for a given tenancy.
- Specified by:
disableKeyin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
enableKey
public Future<EnableKeyResponse> enableKey(EnableKeyRequest request, AsyncHandler<EnableKeyRequest,EnableKeyResponse> handler)
Description copied from interface:KmsManagementAsyncEnables a master encryption key so it can be used for encryption, decryption, or generating new data encryption keys.As a management operation, this call is subject to a Key Management limit that applies to the total number of requests across all management write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of management write operations exceeds 10 requests per second for a given tenancy.
- Specified by:
enableKeyin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
getKey
public Future<GetKeyResponse> getKey(GetKeyRequest request, AsyncHandler<GetKeyRequest,GetKeyResponse> handler)
Description copied from interface:KmsManagementAsyncGets information about the specified master encryption key.As a management operation, this call is subject to a Key Management limit that applies to the total number of requests across all management read operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of management read operations exceeds 10 requests per second for a given tenancy.
- Specified by:
getKeyin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
getKeyVersion
public Future<GetKeyVersionResponse> getKeyVersion(GetKeyVersionRequest request, AsyncHandler<GetKeyVersionRequest,GetKeyVersionResponse> handler)
Description copied from interface:KmsManagementAsyncGets information about the specified key version.As a management operation, this call is subject to a Key Management limit that applies to the total number of requests across all management read operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of management read operations exceeds 10 requests per second for a given tenancy.
- Specified by:
getKeyVersionin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
getReplicationStatus
public Future<GetReplicationStatusResponse> getReplicationStatus(GetReplicationStatusRequest request, AsyncHandler<GetReplicationStatusRequest,GetReplicationStatusResponse> handler)
Description copied from interface:KmsManagementAsyncWhen a vault has a replica, each operation on the vault or its resources, such as keys, is replicated and has an associated replicationId.Replication status provides details about whether the operation associated with the given replicationId has been successfully applied across replicas.
- Specified by:
getReplicationStatusin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
getWrappingKey
public Future<GetWrappingKeyResponse> getWrappingKey(GetWrappingKeyRequest request, AsyncHandler<GetWrappingKeyRequest,GetWrappingKeyResponse> handler)
Description copied from interface:KmsManagementAsyncGets details about the public RSA wrapping key associated with the vault in the endpoint.Each vault has an RSA key-pair that wraps and unwraps AES key material for import into Key Management.
- Specified by:
getWrappingKeyin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
importKey
public Future<ImportKeyResponse> importKey(ImportKeyRequest request, AsyncHandler<ImportKeyRequest,ImportKeyResponse> handler)
Description copied from interface:KmsManagementAsyncImports AES and RSA keys to create a new key.The key material must be base64-encoded and wrapped by the vault’s public RSA wrapping key before you can import it. Key Management supports both RSA and AES keys. The AES keys are symmetric keys of length 128 bits (16 bytes), 192 bits (24 bytes), or 256 bits (32 bytes), and the RSA keys are asymmetric keys of length 2048 bits (256 bytes), 3072 bits (384 bytes), and 4096 bits (512 bytes). Furthermore, the key length must match what you specify at the time of import. When importing an asymmetric key, only private key must be wrapped in PKCS8 format while the corresponding public key is generated internally by KMS.
- Specified by:
importKeyin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
importKeyVersion
public Future<ImportKeyVersionResponse> importKeyVersion(ImportKeyVersionRequest request, AsyncHandler<ImportKeyVersionRequest,ImportKeyVersionResponse> handler)
Description copied from interface:KmsManagementAsyncImports AES key material to create a new key version and then rotate the key to begin using the new key version.The key material must be base64-encoded and wrapped by the vault’s public RSA wrapping key before you can import it. Key Management supports AES symmetric keys that are exactly 16, 24, or 32 bytes. Furthermore, the key length must match the length of the specified key and what you specify as the length at the time of import. When importing an asymmetric key, only the private key must be wrapped in PKCS8 format while the corresponding public key is generated internally by KMS.
- Specified by:
importKeyVersionin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
listKeyVersions
public Future<ListKeyVersionsResponse> listKeyVersions(ListKeyVersionsRequest request, AsyncHandler<ListKeyVersionsRequest,ListKeyVersionsResponse> handler)
Description copied from interface:KmsManagementAsyncLists all KeyVersion resources for the specified master encryption key.As a management operation, this call is subject to a Key Management limit that applies to the total number of requests across all management read operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of management read operations exceeds 10 requests per second for a given tenancy.
- Specified by:
listKeyVersionsin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
listKeys
public Future<ListKeysResponse> listKeys(ListKeysRequest request, AsyncHandler<ListKeysRequest,ListKeysResponse> handler)
Description copied from interface:KmsManagementAsyncLists the master encryption keys in the specified vault and compartment.As a management operation, this call is subject to a Key Management limit that applies to the total number of requests across all management read operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of management read operations exceeds 10 requests per second for a given tenancy.
- Specified by:
listKeysin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
restoreKeyFromFile
public Future<RestoreKeyFromFileResponse> restoreKeyFromFile(RestoreKeyFromFileRequest request, AsyncHandler<RestoreKeyFromFileRequest,RestoreKeyFromFileResponse> handler)
Description copied from interface:KmsManagementAsyncRestores the specified key to the specified vault, based on information in the backup file provided.If the vault doesn’t exist, the operation returns a response with a 404 HTTP status error code. You need to first restore the vault associated with the key.
- Specified by:
restoreKeyFromFilein interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
restoreKeyFromObjectStore
public Future<RestoreKeyFromObjectStoreResponse> restoreKeyFromObjectStore(RestoreKeyFromObjectStoreRequest request, AsyncHandler<RestoreKeyFromObjectStoreRequest,RestoreKeyFromObjectStoreResponse> handler)
Description copied from interface:KmsManagementAsyncRestores the specified key to the specified vault from an Oracle Cloud Infrastructure Object Storage location.If the vault doesn’t exist, the operation returns a response with a 404 HTTP status error code. You need to first restore the vault associated with the key.
- Specified by:
restoreKeyFromObjectStorein interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
scheduleKeyDeletion
public Future<ScheduleKeyDeletionResponse> scheduleKeyDeletion(ScheduleKeyDeletionRequest request, AsyncHandler<ScheduleKeyDeletionRequest,ScheduleKeyDeletionResponse> handler)
Description copied from interface:KmsManagementAsyncSchedules the deletion of the specified key.This sets the lifecycle state of the key to
PENDING_DELETIONand then deletes it after the specified retention period ends.As a provisioning operation, this call is subject to a Key Management limit that applies to the total number of requests across all provisioning write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of provisioning write operations exceeds 10 requests per second for a given tenancy.
- Specified by:
scheduleKeyDeletionin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
scheduleKeyVersionDeletion
public Future<ScheduleKeyVersionDeletionResponse> scheduleKeyVersionDeletion(ScheduleKeyVersionDeletionRequest request, AsyncHandler<ScheduleKeyVersionDeletionRequest,ScheduleKeyVersionDeletionResponse> handler)
Description copied from interface:KmsManagementAsyncSchedules the deletion of the specified key version.This sets the lifecycle state of the key version to
PENDING_DELETIONand then deletes it after the specified retention period ends.As a provisioning operation, this call is subject to a Key Management limit that applies to the total number of requests across all provisioning write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of provisioning write operations exceeds 10 requests per second for a given tenancy.
- Specified by:
scheduleKeyVersionDeletionin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
updateKey
public Future<UpdateKeyResponse> updateKey(UpdateKeyRequest request, AsyncHandler<UpdateKeyRequest,UpdateKeyResponse> handler)
Description copied from interface:KmsManagementAsyncUpdates the properties of a master encryption key.Specifically, you can update the
displayName,freeformTags, anddefinedTagsproperties. Furthermore, the key must be in anENABLEDorCREATINGstate to be updated.As a management operation, this call is subject to a Key Management limit that applies to the total number of requests across all management write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of management write operations exceeds 10 requests per second for a given tenancy.
- Specified by:
updateKeyin interfaceKmsManagementAsync- Parameters:
request- The request object containing the details to sendhandler- The request handler to invoke upon completion, may be null.- Returns:
- A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
-
getDefaultConfigurator
protected ClientConfigurator getDefaultConfigurator()
-
enableDualStackEndpoints
public void enableDualStackEndpoints(boolean enableDualStackEndpoints)
This method should be used to enable or disable the use of dual-stack endpoints.The default value is false i.e. dual-stack endpoints are disabled by default.
- Parameters:
enableDualStackEndpoints- This flag can be set to true or false to enable or disable the use of dual-stack endpoints respectively
-
getOptionsMap
public Map<String,Boolean> getOptionsMap()
Return an immutable snapshot representing the current options set for this client.- Returns:
- immutable snapshot representing the current options set for this client
-
getResolvedEndpoint
public String getResolvedEndpoint(Map<String,Object> requiredParametersMap)
Returns the endpoint after filling in the current options, as determined byBaseClient.getOptionsMap(), and then filling in the required parameters in requiredParametersMap into the placeholders in the endpoint.- Parameters:
requiredParametersMap- the map from required parameter name to their values- Returns:
- resolved endpoint, with all options and placeholders filled in
-
useRealmSpecificEndpointTemplate
public void useRealmSpecificEndpointTemplate(boolean useOfRealmSpecificEndpointTemplateEnabled)
This method should be used to enable or disable the use of realm-specific endpoint template.The default value is null. To enable the use of endpoint template defined for the realm in use, set the flag to true To disable the use of endpoint template defined for the realm in use, set the flag to false
- Parameters:
useOfRealmSpecificEndpointTemplateEnabled- This flag can be set to true or false to enable or disable the use of realm-specific endpoint template respectively
-
setEndpoint
public final void setEndpoint(String endpoint)
-
getEndpoint
public final String getEndpoint()
Get the endpoint of the client.Note that the endpoint may be parameterized and contain placeholders and options. The region subdomain and realm domain will have been properly replaced already if the endpoint was selected using a
Region.Examples of endpoints this may return:
- Unparameterized endpoints
https://identity.us-phoenix-1.oci.oraclecloud.com https://identity.us-ashburn-1.oci.oraclecloud.com https://test-namespace.objectstorage.us-ashburn-1.oci.customer-oci.com - Parameterized endpoints with placeholders
https://{namespaceName+Dot}objectstorage.us-phoenix-1.oci.customer-oci.com https://{namespaceName+Dot}objectstorage.us-ashburn-1.oci.customer-oci.com - Parameterized endpoints with options
https://{dualStack?ds.:}identity.us-phoenix-1.oci.oraclecloud.com https://{dualStack?ds.:}identity.us-ashburn-1.oci.oraclecloud.com - Parameterized endpoints with placeholders and options
https://{namespaceName+Dot}{dualStack?ds.:}objectstorage.us-phoenix-1.oci.customer-oci.com https://{namespaceName+Dot}{dualStack?ds.:}objectstorage.us-ashburn-1.oci.customer-oci.com
To get the actual endpoint for a parameterized request, you can use
BaseClient.getResolvedEndpoint(Map)orParameterizedEndpointUtil.getEndpointWithPopulatedServiceParameters(String, Map, Map).- Returns:
- the endpoint being used by the client
- Unparameterized endpoints
-
refreshClient
public final void refreshClient()
Rebuild the backingHttpClient.This will call
ClientConfigurators again, and can be used to e.g. refresh the SSL certificate.
-
setRegion
protected void setRegion(Region region)
-
setRegion
protected void setRegion(String regionId)
-
close
public final void close()
- Specified by:
closein interfaceAutoCloseable
-
getClientCommonLibraryVersion
public String getClientCommonLibraryVersion()
-
getMinimumClientCommonLibraryVersionFromClient
public Optional<String> getMinimumClientCommonLibraryVersionFromClient()
-
clientCall
protected <REQ extends BmcRequest<?>,RESP extends BmcResponse,RESP_BUILDER extends BmcResponse.Builder<RESP>> ClientCall<REQ,RESP,RESP_BUILDER> clientCall(REQ request, Supplier<RESP_BUILDER> responseBuilder)
-
-