Class KeyReleasePolicy
java.lang.Object
com.azure.security.keyvault.keys.models.KeyReleasePolicy
A model that represents the policy rules under which the key can be exported.
-
Constructor Summary
ConstructorDescriptionKeyReleasePolicy
(BinaryData encodedPolicy) Creates an instance ofKeyReleasePolicy
. -
Method Summary
Modifier and TypeMethodDescriptionGet the content type and version of key release policy.Get a blob encoding the policy rules under which the key can be released.Get a value indicating if the policy is immutable.setContentType
(String contentType) Set the content type and version of key release policy.setImmutable
(Boolean immutable) Get a value indicating if the policy is immutable.
-
Constructor Details
-
KeyReleasePolicy
Creates an instance ofKeyReleasePolicy
.- Parameters:
encodedPolicy
- The policy rules under which the key can be released. Encoded based on thecontentType
. For more information regarding the release policy grammar for Azure Key Vault, please refer to: - https://aka.ms/policygrammarkeys for Azure Key Vault release policy grammar. - https://aka.ms/policygrammarmhsm for Azure Managed HSM release policy grammar.
-
-
Method Details
-
getEncodedPolicy
Get a blob encoding the policy rules under which the key can be released.- Returns:
- encodedPolicy The policy rules under which the key can be released. Encoded based on the
contentType
. For more information regarding the release policy grammar for Azure Key Vault, please refer to: - https://aka.ms/policygrammarkeys for Azure Key Vault release policy grammar. - https://aka.ms/policygrammarmhsm for Azure Managed HSM release policy grammar.
-
getContentType
Get the content type and version of key release policy.- Returns:
- The content type and version of key release policy.
-
setContentType
Set the content type and version of key release policy.The service default is "application/json; charset=utf-8".
- Parameters:
contentType
- The content type and version of key release policy to set.- Returns:
- The updated
KeyReleasePolicy
object.
-
isImmutable
Get a value indicating if the policy is immutable. Once marked immutable on the service side, this flag cannot be reset and the policy cannot be changed under any circumstances.- Returns:
- If the
KeyReleasePolicy
is immutable.
-
setImmutable
Get a value indicating if the policy is immutable. Defines the mutability state of the policy. Once marked immutable on the service side, this flag cannot be reset and the policy cannot be changed under any circumstances.- Parameters:
immutable
- The immutable value to set.- Returns:
- The updated
KeyReleasePolicy
object.
-