Class StorageAccountKey

java.lang.Object
com.azure.resourcemanager.storage.models.StorageAccountKey
All Implemented Interfaces:
com.azure.json.JsonSerializable<StorageAccountKey>

public final class StorageAccountKey extends Object implements com.azure.json.JsonSerializable<StorageAccountKey>
An access key for the storage account.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of StorageAccountKey class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the creationTime property: Creation time of the key, in round trip date format.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of StorageAccountKey from the JsonReader.
    Get the keyName property: Name of the key.
    Get the permissions property: Permissions for the key -- read-only or full permissions.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Get the value property: Base 64-encoded value of the key.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • StorageAccountKey

      public StorageAccountKey()
      Creates an instance of StorageAccountKey class.
  • Method Details

    • keyName

      public String keyName()
      Get the keyName property: Name of the key.
      Returns:
      the keyName value.
    • value

      public String value()
      Get the value property: Base 64-encoded value of the key.
      Returns:
      the value value.
    • permissions

      public KeyPermission permissions()
      Get the permissions property: Permissions for the key -- read-only or full permissions.
      Returns:
      the permissions value.
    • creationTime

      public OffsetDateTime creationTime()
      Get the creationTime property: Creation time of the key, in round trip date format.
      Returns:
      the creationTime value.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<StorageAccountKey>
      Throws:
      IOException
    • fromJson

      public static StorageAccountKey fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of StorageAccountKey from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of StorageAccountKey if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the StorageAccountKey.