KeyReleasePolicy Class
- java.
lang. Object - com.
azure. security. keyvault. keys. models. KeyReleasePolicy
- com.
Implements
public final class KeyReleasePolicy
implements JsonSerializable<KeyReleasePolicy>
A model that represents the policy rules under which the key can be exported.
Constructor Summary
Constructor | Description |
---|---|
KeyReleasePolicy(BinaryData encodedPolicy) |
Creates an instance of KeyReleasePolicy. |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Key |
fromJson(JsonReader jsonReader)
Reads a JSON stream into a KeyReleasePolicy. |
String |
getContentType()
Get the content type and version of key release policy. |
Binary |
getEncodedPolicy()
Get a blob encoding the policy rules under which the key can be released. |
Boolean |
isImmutable()
Get a value indicating if the policy is immutable. |
Key |
setContentType(String contentType)
Set the content type and version of key release policy. |
Key |
setImmutable(Boolean immutable)
Get a value indicating if the policy is immutable. |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
KeyReleasePolicy
public KeyReleasePolicy(BinaryData encodedPolicy)
Creates an instance of KeyReleasePolicy.
Parameters:
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
fromJson
public static KeyReleasePolicy fromJson(JsonReader jsonReader)
Reads a JSON stream into a KeyReleasePolicy.
Parameters:
Returns:
Throws:
getContentType
public String getContentType()
Get the content type and version of key release policy.
Returns:
getEncodedPolicy
public BinaryData getEncodedPolicy()
Get a blob encoding the policy rules under which the key can be released.
Returns:
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.
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:
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:
Returns:
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:
Returns:
toJson
Applies to
Azure SDK for Java