Class KeyReleasePolicy

java.lang.Object
com.azure.security.keyvault.keys.models.KeyReleasePolicy

public final class KeyReleasePolicy extends Object
A model that represents the policy rules under which the key can be exported.
  • Constructor Details

    • KeyReleasePolicy

      public KeyReleasePolicy(BinaryData encodedPolicy)
      Creates an instance of KeyReleasePolicy.
      Parameters:
      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.
  • Method Details

    • getEncodedPolicy

      public BinaryData 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

      public String getContentType()
      Get the content type and version of key release policy.
      Returns:
      The content type and version of key release policy.
    • setContentType

      public KeyReleasePolicy setContentType(String contentType)
      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

      public Boolean 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

      public KeyReleasePolicy setImmutable(Boolean immutable)
      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.