Class Key.Builder
- java.lang.Object
-
- com.oracle.bmc.keymanagement.model.Key.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Key.Builder
autoKeyRotationDetails(AutoKeyRotationDetails autoKeyRotationDetails)
Key
build()
Key.Builder
compartmentId(String compartmentId)
The OCID of the compartment that contains this master encryption key.Key.Builder
copy(Key model)
Key.Builder
currentKeyVersion(String currentKeyVersion)
The OCID of the key version used in cryptographic operations.Key.Builder
definedTags(Map<String,Map<String,Object>> definedTags)
Defined tags for this resource.Key.Builder
displayName(String displayName)
A user-friendly name for the key.Key.Builder
externalKeyReferenceDetails(ExternalKeyReferenceDetails externalKeyReferenceDetails)
Key.Builder
freeformTags(Map<String,String> freeformTags)
Free-form tags for this resource.Key.Builder
id(String id)
The OCID of the key.Key.Builder
isAutoRotationEnabled(Boolean isAutoRotationEnabled)
A parameter specifying whether the auto key rotation is enabled or not.Key.Builder
isPrimary(Boolean isPrimary)
A Boolean value that indicates whether the Key belongs to primary Vault or replica vault.Key.Builder
keyShape(KeyShape keyShape)
Key.Builder
lifecycleState(Key.LifecycleState lifecycleState)
The key’s current lifecycle state.Key.Builder
protectionMode(Key.ProtectionMode protectionMode)
The key’s protection mode indicates how the key persists and where cryptographic operations that use the key are performed.Key.Builder
replicaDetails(KeyReplicaDetails replicaDetails)
Key.Builder
restoredFromKeyId(String restoredFromKeyId)
The OCID of the key from which this key was restored.Key.Builder
timeCreated(Date timeCreated)
The date and time the key was created, expressed in RFC 3339 timestamp format.Key.Builder
timeOfDeletion(Date timeOfDeletion)
An optional property indicating when to delete the key, expressed in RFC 3339 timestamp format.Key.Builder
vaultId(String vaultId)
The OCID of the vault that contains this key.
-
-
-
Method Detail
-
compartmentId
public Key.Builder compartmentId(String compartmentId)
The OCID of the compartment that contains this master encryption key.- Parameters:
compartmentId
- the value to set- Returns:
- this builder
-
currentKeyVersion
public Key.Builder currentKeyVersion(String currentKeyVersion)
The OCID of the key version used in cryptographic operations.During key rotation, the service might be in a transitional state where this or a newer key version are used intermittently. The currentKeyVersion property is updated when the service is guaranteed to use the new key version for all subsequent encryption operations.
- Parameters:
currentKeyVersion
- the value to set- Returns:
- this builder
-
definedTags
public Key.Builder definedTags(Map<String,Map<String,Object>> definedTags)
Defined tags for this resource.Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {“Operations”: {“CostCenter”: “42”}}
- Parameters:
definedTags
- the value to set- Returns:
- this builder
-
displayName
public Key.Builder displayName(String displayName)
A user-friendly name for the key.It does not have to be unique, and it is changeable. Avoid entering confidential information.
- Parameters:
displayName
- the value to set- Returns:
- this builder
-
freeformTags
public Key.Builder freeformTags(Map<String,String> freeformTags)
Free-form tags for this resource.Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {“Department”: “Finance”}
- Parameters:
freeformTags
- the value to set- Returns:
- this builder
-
id
public Key.Builder id(String id)
The OCID of the key.- Parameters:
id
- the value to set- Returns:
- this builder
-
keyShape
public Key.Builder keyShape(KeyShape keyShape)
-
protectionMode
public Key.Builder protectionMode(Key.ProtectionMode protectionMode)
The key’s protection mode indicates how the key persists and where cryptographic operations that use the key are performed.A protection mode of HSM means that the key persists on a hardware security module (HSM) and all cryptographic operations are performed inside the HSM. A protection mode of SOFTWARE means that the key persists on the server, protected by the vault’s RSA wrapping key which persists on the HSM. All cryptographic operations that use a key with a protection mode of SOFTWARE are performed on the server. By default, a key’s protection mode is set to HSM. You can’t change a key’s protection mode after the key is created or imported. A protection mode of EXTERNAL mean that the key persists on the customer’s external key manager which is hosted externally outside of oracle. Oracle only hold a reference to that key. All cryptographic operations that use a key with a protection mode of EXTERNAL are performed by external key manager.
- Parameters:
protectionMode
- the value to set- Returns:
- this builder
-
lifecycleState
public Key.Builder lifecycleState(Key.LifecycleState lifecycleState)
The key’s current lifecycle state.Example: ENABLED
- Parameters:
lifecycleState
- the value to set- Returns:
- this builder
-
timeCreated
public Key.Builder timeCreated(Date timeCreated)
The date and time the key was created, expressed in RFC 3339 timestamp format.Example: 2018-04-03T21:10:29.600Z
- Parameters:
timeCreated
- the value to set- Returns:
- this builder
-
timeOfDeletion
public Key.Builder timeOfDeletion(Date timeOfDeletion)
An optional property indicating when to delete the key, expressed in RFC 3339 timestamp format.Example: 2019-04-03T21:10:29.600Z
- Parameters:
timeOfDeletion
- the value to set- Returns:
- this builder
-
vaultId
public Key.Builder vaultId(String vaultId)
The OCID of the vault that contains this key.- Parameters:
vaultId
- the value to set- Returns:
- this builder
-
restoredFromKeyId
public Key.Builder restoredFromKeyId(String restoredFromKeyId)
The OCID of the key from which this key was restored.- Parameters:
restoredFromKeyId
- the value to set- Returns:
- this builder
-
replicaDetails
public Key.Builder replicaDetails(KeyReplicaDetails replicaDetails)
-
isPrimary
public Key.Builder isPrimary(Boolean isPrimary)
A Boolean value that indicates whether the Key belongs to primary Vault or replica vault.- Parameters:
isPrimary
- the value to set- Returns:
- this builder
-
isAutoRotationEnabled
public Key.Builder isAutoRotationEnabled(Boolean isAutoRotationEnabled)
A parameter specifying whether the auto key rotation is enabled or not.- Parameters:
isAutoRotationEnabled
- the value to set- Returns:
- this builder
-
autoKeyRotationDetails
public Key.Builder autoKeyRotationDetails(AutoKeyRotationDetails autoKeyRotationDetails)
-
externalKeyReferenceDetails
public Key.Builder externalKeyReferenceDetails(ExternalKeyReferenceDetails externalKeyReferenceDetails)
-
build
public Key build()
-
copy
public Key.Builder copy(Key model)
-
-