Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KmsManagementClient

This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.

Hierarchy

  • KmsManagementClient

Constructors

constructor

  • new KmsManagementClient(params: common.AuthParams, clientConfiguration?: common.ClientConfiguration): KmsManagementClient

Properties

Protected _bodyDuplexMode

_bodyDuplexMode: any = undefined

Protected _circuitBreaker

_circuitBreaker: typeof Breaker | null = null

Protected _clientConfiguration

_clientConfiguration: ClientConfiguration

Protected _defaultHeaders

_defaultHeaders: any

Protected _endpoint

_endpoint: string = ""

Protected _httpClient

_httpClient: HttpClient

Protected _httpOptions

_httpOptions: any = undefined

Protected _realmSpecificEndpointTemplateEnabled

_realmSpecificEndpointTemplateEnabled: boolean | undefined = undefined

Protected _waiters

targetService

targetService: string = "KmsManagement"

Static Protected endpointServiceName

endpointServiceName: string = ""

Static Protected serviceEndpointTemplate

serviceEndpointTemplate: string = "https://kms.{region}.{secondLevelDomain}"

Accessors

endpoint

  • get endpoint(): string
  • set endpoint(endpoint: string): void

logger

useRealmSpecificEndpointTemplate

  • set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled: boolean): void
  • Determines whether realm specific endpoint should be used or not. Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"

    Parameters

    • realmSpecificEndpointTemplateEnabled: boolean

      flag to enable the use of realm specific endpoint template

    Returns void

Methods

backupKey

  • Backs 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use BackupKey API.

    Parameters

    Returns Promise<BackupKeyResponse>

    BackupKeyResponse

cancelKeyDeletion

  • Cancels 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CancelKeyDeletion API.

    Parameters

    Returns Promise<CancelKeyDeletionResponse>

    CancelKeyDeletionResponse

cancelKeyVersionDeletion

  • Cancels 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CancelKeyVersionDeletion API.

    Parameters

    Returns Promise<CancelKeyVersionDeletionResponse>

    CancelKeyVersionDeletionResponse

changeKeyCompartment

  • Moves 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ChangeKeyCompartment API.

    Parameters

    Returns Promise<ChangeKeyCompartmentResponse>

    ChangeKeyCompartmentResponse

close

  • close(): void

createKey

  • Creates 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CreateKey API.

    Parameters

    Returns Promise<CreateKeyResponse>

    CreateKeyResponse

createKeyVersion

  • Generates a new KeyVersion resource that provides new cryptographic material for a master encryption key. The key must be in an ENABLED state 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CreateKeyVersion API.

    Parameters

    Returns Promise<CreateKeyVersionResponse>

    CreateKeyVersionResponse

createWaiters

disableKey

  • Disables 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DisableKey API.

    Parameters

    Returns Promise<DisableKeyResponse>

    DisableKeyResponse

enableKey

  • Enables 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use EnableKey API.

    Parameters

    Returns Promise<EnableKeyResponse>

    EnableKeyResponse

getKey

  • Gets 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetKey API.

    Parameters

    Returns Promise<GetKeyResponse>

    GetKeyResponse

getKeyVersion

  • Gets 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetKeyVersion API.

    Parameters

    Returns Promise<GetKeyVersionResponse>

    GetKeyVersionResponse

getReplicationStatus

  • When 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetReplicationStatus API.

    Parameters

    Returns Promise<GetReplicationStatusResponse>

    GetReplicationStatusResponse

getWaiters

getWrappingKey

  • Gets 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetWrappingKey API.

    Parameters

    Returns Promise<GetWrappingKeyResponse>

    GetWrappingKeyResponse

importKey

  • Imports 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ImportKey API.

    Parameters

    Returns Promise<ImportKeyResponse>

    ImportKeyResponse

importKeyVersion

  • Imports 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ImportKeyVersion API.

    Parameters

    Returns Promise<ImportKeyVersionResponse>

    ImportKeyVersionResponse

listAllKeyVersions

  • NOTE: This function is deprecated in favor of listKeyVersionsRecordIterator function. Creates a new async iterator which will iterate over the models.KeyVersionSummary objects contained in responses from the listKeyVersions operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<KeyVersionSummary>

listAllKeyVersionsResponses

  • NOTE: This function is deprecated in favor of listKeyVersionsResponseIterator function. Creates a new async iterator which will iterate over the responses received from the listKeyVersions operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<ListKeyVersionsResponse>

listAllKeys

  • NOTE: This function is deprecated in favor of listKeysRecordIterator function. Creates a new async iterator which will iterate over the models.KeySummary objects contained in responses from the listKeys operation. This iterator will fetch more data from the server as needed.

    Parameters

    • request: ListKeysRequest

      a request which can be sent to the service operation

    Returns AsyncIterableIterator<KeySummary>

listAllKeysResponses

  • NOTE: This function is deprecated in favor of listKeysResponseIterator function. Creates a new async iterator which will iterate over the responses received from the listKeys operation. This iterator will fetch more data from the server as needed.

    Parameters

    • request: ListKeysRequest

      a request which can be sent to the service operation

    Returns AsyncIterableIterator<ListKeysResponse>

listKeyVersions

  • Lists 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListKeyVersions API.

    Parameters

    Returns Promise<ListKeyVersionsResponse>

    ListKeyVersionsResponse

listKeyVersionsRecordIterator

  • Creates a new async iterator which will iterate over the models.KeyVersionSummary objects contained in responses from the listKeyVersions operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<KeyVersionSummary>

listKeyVersionsResponseIterator

listKeys

  • Lists 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListKeys API.

    Parameters

    Returns Promise<ListKeysResponse>

    ListKeysResponse

listKeysRecordIterator

  • Creates a new async iterator which will iterate over the models.KeySummary objects contained in responses from the listKeys operation. This iterator will fetch more data from the server as needed.

    Parameters

    • request: ListKeysRequest

      a request which can be sent to the service operation

    Returns AsyncIterableIterator<KeySummary>

listKeysResponseIterator

  • Creates a new async iterator which will iterate over the responses received from the listKeys operation. This iterator will fetch more data from the server as needed.

    Parameters

    • request: ListKeysRequest

      a request which can be sent to the service operation

    Returns AsyncIterableIterator<ListKeysResponse>

restoreKeyFromFile

  • Restores 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use RestoreKeyFromFile API.

    Parameters

    Returns Promise<RestoreKeyFromFileResponse>

    RestoreKeyFromFileResponse

restoreKeyFromObjectStore

  • Restores 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use RestoreKeyFromObjectStore API.

    Parameters

    Returns Promise<RestoreKeyFromObjectStoreResponse>

    RestoreKeyFromObjectStoreResponse

scheduleKeyDeletion

  • Schedules the deletion of the specified key. This sets the lifecycle state of the key to PENDING_DELETION and 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ScheduleKeyDeletion API.

    Parameters

    Returns Promise<ScheduleKeyDeletionResponse>

    ScheduleKeyDeletionResponse

scheduleKeyVersionDeletion

  • Schedules the deletion of the specified key version. This sets the lifecycle state of the key version to PENDING_DELETION and 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ScheduleKeyVersionDeletion API.

    Parameters

    Returns Promise<ScheduleKeyVersionDeletionResponse>

    ScheduleKeyVersionDeletionResponse

shutdownCircuitBreaker

  • shutdownCircuitBreaker(): void

updateKey

  • Updates the properties of a master encryption key. Specifically, you can update the displayName, freeformTags, and definedTags properties. Furthermore, the key must be in an ENABLED or CREATING state 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use UpdateKey API.

    Parameters

    Returns Promise<UpdateKeyResponse>

    UpdateKeyResponse