@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Storage Cache Mgmt Client
@base https://management.azure.com/
@version 2019-11-01
@auth OAuth2
@common_fields {api-version: any # Client API version.}
@endpoints 17
@toc providers(1), subscriptions(16)

@group providers
@endpoint GET /providers/Microsoft.StorageCache/operations
@desc Lists all of the available Resource Provider operations.
@returns(200) The list of available Resource Provider operations.

@endgroup

@group subscriptions
@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/skus
@desc Get the list of StorageCache.Cache SKUs available to this subscription.
@required {subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.}
@returns(200) A list of SKU descriptors.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/usageModels
@desc Get the list of Cache Usage Models available to this subscription.
@required {subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.}
@returns(200) A list of UsageModel descriptors.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/caches
@desc Returns all Caches the user has access to under a subscription.
@required {subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.}
@returns(200) A list of Cache objects. Note that entity references might replace complete Cache objects, as described in http://docs.oasis-open.org/odata/odata-json-format/v4.01/cs01/odata-json-format-v4.01-cs01.html#sec_EntityReference

@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches
@desc Returns all Caches the user has access to under a resource group.
@required {resourceGroupName: any # Target resource group., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.}
@returns(200) A list of Cache objects. Note that entity references might replace complete Cache objects, as described in http://docs.oasis-open.org/odata/odata-json-format/v4.01/cs01/odata-json-format-v4.01-cs01.html#sec_EntityReference

@endpoint DELETE /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}
@desc Schedules a Cache for deletion.
@required {resourceGroupName: any # Target resource group., cacheName: any # Name of Cache., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.}
@returns(200) Cache deleted.
@returns(202) Started the Cache's transition to Deleted state. Poll the Cache to monitor.
@returns(204) Cache deleted.

@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}
@desc Returns a Cache.
@required {resourceGroupName: any # Target resource group., cacheName: any # Name of Cache., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.}
@returns(200) Returns the Cache object corresponding to cacheName.

@endpoint PUT /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}
@desc Create or update a Cache.
@required {resourceGroupName: any # Target resource group., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call., cacheName: any # Name of Cache.}
@optional {cache: map # Object containing the user-selectable properties of the new Cache. If read-only properties are included, they must match the existing values of those properties.}
@returns(200) Cache created or updated.
@returns(201) Cache creation or update has been initiated. Poll the new Cache's provisioningState property to monitor creation progress.

@endpoint PATCH /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}
@desc Update a Cache instance.
@required {resourceGroupName: any # Target resource group., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call., cacheName: any # Name of Cache.}
@optional {cache: map # Object containing the user-selectable properties of the Cache. If read-only properties are included, they must match the existing values of those properties.}
@returns(200) Updated the Cache.

@endpoint POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/flush
@desc Tells a Cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors returned until the flush is complete.
@required {resourceGroupName: any # Target resource group., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call., cacheName: any # Name of Cache.}
@returns(200) All cached data has been flushed to the Storage Target(s).
@returns(202) Cache has started flushing to its Storage Target(s). Poll the Cache's state field to monitor.
@returns(204) Cache flushed.

@endpoint POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/start
@desc Tells a Stopped state Cache to transition to Active state.
@required {resourceGroupName: any # Target resource group., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call., cacheName: any # Name of Cache.}
@returns(200) Cache is Active.
@returns(202) Cache has started the transition to Active. Poll the Cache's state field to monitor.
@returns(204) Restarted VMs associated with the cache.

@endpoint POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/stop
@desc Tells an Active Cache to transition to Stopped state.
@required {resourceGroupName: any # Target resource group., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call., cacheName: any # Name of Cache.}
@returns(200) Cache is stopped.
@returns(202) Cache has started the transition to Stopped. Poll the Cache's state field to monitor.
@returns(204) Stopped VMs associated with the cache.

@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets
@desc Returns a list of Storage Targets for the specified Cache.
@required {resourceGroupName: any # Target resource group., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call., cacheName: any # Name of Cache.}
@returns(200) Returns the list of Storage Targets defined by cacheName.

@endpoint DELETE /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}
@desc Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or unhealthy, the actual removal of the Storage Target may be delayed until the Cache is healthy again. Note that if the Cache has data to flush to the Storage Target, the data will be flushed before the Storage Target will be deleted.
@required {resourceGroupName: any # Target resource group., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call., cacheName: any # Name of Cache., storageTargetName: any # Name of Storage Target.}
@returns(200) Storage target deleted.
@returns(202) Started the Storage Target's deletion. Poll the Cache's Storage Targets to monitor.
@returns(204) Storage Target deleted.

@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}
@desc Returns a Storage Target from a Cache.
@required {resourceGroupName: any # Target resource group., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call., cacheName: any # Name of Cache., storageTargetName: any # Name of the Storage Target.}
@returns(200) Returns the Storage Target object corresponding to storageTargetName.

@endpoint PUT /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}
@desc Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down or unhealthy, the actual creation/modification of the Storage Target may be delayed until the Cache is healthy again.
@required {resourceGroupName: any # Target resource group., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call., cacheName: any # Name of Cache., storageTargetName: any # Name of the Storage Target.}
@optional {storagetarget: map # Object containing the definition of a Storage Target.}
@returns(200) Storage Target has been created or updated.
@returns(201) Storage Target creation or update has been initiated. Poll the new Storage Target's provisioningState property to monitor creation progress.

@endpoint POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/upgrade
@desc Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
@required {resourceGroupName: any # Target resource group., subscriptionId: any # Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call., cacheName: any # Name of Cache.}
@returns(201) Cache firmware is up to date.
@returns(202) Cache has started the upgrade. Poll the Cache's state field to monitor.
@returns(204) Cache firmware is up to date.

@endgroup

@end
