@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api StorageManagementClient
@base https://management.azure.com
@version 2019-04-01
@auth OAuth2
@common_fields {api-version: any # The API version to use for this operation.}
@endpoints 19
@toc providers(1), subscriptions(18)

@group providers
@endpoint GET /providers/Microsoft.Storage/operations
@desc Lists all of the available Storage Rest API operations.
@returns(200) OK. The request has succeeded.

@endgroup

@group subscriptions
@endpoint POST /subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability
@desc Checks that the storage account name is valid and is not already in use.
@required {accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., subscriptionId: any # The ID of the target subscription.}
@returns(200) OK -- Operation to check the storage account name availability was successful.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages
@desc Gets the current usage count and the limit for the resources of the location under the subscription.
@required {subscriptionId: any # The ID of the target subscription., location: any # The location of the Azure Storage resource.}
@returns(200) OK -- current usage count and limit retrieved and returned successfully.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus
@desc Lists the available SKUs supported by Microsoft.Storage for given subscription.
@required {subscriptionId: any # The ID of the target subscription.}
@returns(200) OK -- List of storage SKUs in the given subscription retrieved and returned successfully.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts
@desc Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
@required {subscriptionId: any # The ID of the target subscription.}
@returns(200) OK -- List of storage accounts was retrieved and returned successfully.

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts
@desc Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., subscriptionId: any # The ID of the target subscription.}
@returns(200) OK -- List of storage accounts in the given resource group retrieved and returned successfully.

@endpoint DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}
@desc Deletes a storage account in Microsoft Azure.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., subscriptionId: any # The ID of the target subscription.}
@returns(200) OK -- storage account deleted successfully.
@returns(204) NoContent -- account does not exist in the subscription.

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}
@desc Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., subscriptionId: any # The ID of the target subscription.}
@optional {$expand: any # May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats.}
@returns(200) OK -- properties retrieved successfully for the storage account.

@endpoint PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}
@desc The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., parameters: any # The parameters to provide for the updated account., subscriptionId: any # The ID of the target subscription.}
@returns(200) OK -- storage account properties updated successfully.

@endpoint PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}
@desc Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., parameters: any # The parameters to provide for the created account., subscriptionId: any # The ID of the target subscription.}
@returns(200) OK -- returned when the storage account was already created from a previous request with the same properties specified in the request body.
@returns(202) Accepted -- Create or update request accepted; operation will complete asynchronously.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas
@desc List SAS credentials of a storage account.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., parameters: any # The parameters to provide to list SAS credentials for the storage account., subscriptionId: any # The ID of the target subscription.}
@returns(200) OK -- returned the account SAS created for the storage account requested.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas
@desc List service SAS credentials of a specific resource.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., parameters: any # The parameters to provide to list service SAS credentials., subscriptionId: any # The ID of the target subscription.}
@returns(200) OK -- returned the service SAS created for the storage service requested.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover
@desc Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., subscriptionId: any # The ID of the target subscription.}
@returns(200) OK -- Returned when the storage account failover is completed, and the secondary cluster has become primary.
@returns(202) Accepted -- Failover request accepted; operation will complete asynchronously.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys
@desc Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., subscriptionId: any # The ID of the target subscription.}
@optional {$expand: any # Specifies type of the key to be listed. Possible value is kerb.}
@returns(200) OK -- list of keys retrieved and returned successfully.

@endpoint DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}
@desc Deletes the managementpolicy associated with the specified storage account.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., subscriptionId: any # The ID of the target subscription., managementPolicyName: any # The name of the Storage Account Management Policy. It should always be 'default'}
@returns(200) OK -- Delete the managementpolicy successfully.
@returns(204) No Content -- The managementpolicy does not exist.

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}
@desc Gets the managementpolicy associated with the specified storage account.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., subscriptionId: any # The ID of the target subscription., managementPolicyName: any # The name of the Storage Account Management Policy. It should always be 'default'}
@returns(200) OK -- Get the managementpolicy successfully.

@endpoint PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}
@desc Sets the managementpolicy to the specified storage account.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., subscriptionId: any # The ID of the target subscription., managementPolicyName: any # The name of the Storage Account Management Policy. It should always be 'default', properties: any # The ManagementPolicy set to a storage account.}
@returns(200) OK -- Put managementpolicy successfully.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey
@desc Regenerates one of the access keys or Kerberos keys for the specified storage account.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., regenerateKey: any # Specifies name of the key which should be regenerated -- key1, key2, kerb1, kerb2., subscriptionId: any # The ID of the target subscription.}
@returns(200) OK -- specified key regenerated successfully.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys
@desc Revoke user delegation keys.
@required {resourceGroupName: any # The name of the resource group within the user's subscription. The name is case insensitive., accountName: any # The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only., subscriptionId: any # The ID of the target subscription.}
@returns(200) OK -- revoke user delegation keys succeeded.

@endgroup

@end
