autorest.testserver/swagger/storage.json

729 строки
25 KiB
JSON
Исходник Постоянная ссылка Ответственный История

Этот файл содержит неоднозначные символы Юникода!

Этот файл содержит неоднозначные символы Юникода, которые могут быть перепутаны с другими в текущей локали. Если это намеренно, можете спокойно проигнорировать это предупреждение. Используйте кнопку Экранировать, чтобы подсветить эти символы.

{
"swagger": "2.0",
"info": {
"title": "StorageManagementClient",
"version": "2015-05-01-preview"
},
"host": "management.azure.com",
"schemes": ["https"],
"consumes": ["application/json", "text/json"],
"produces": ["application/json", "text/json"],
"paths": {
"/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability": {
"post": {
"tags": ["StorageAccounts"],
"operationId": "StorageAccounts_CheckNameAvailability",
"description": "Checks that account name is valid and is not in use.",
"parameters": [
{
"name": "accountName",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/StorageAccountCheckNameAvailabilityParameters"
},
"description": "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. "
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/CheckNameAvailabilityResult"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}": {
"put": {
"tags": ["StorageAccounts"],
"operationId": "StorageAccounts_Create",
"description": "Asynchronously creates a new storage account with the specified parameters. Existing accounts cannot be updated with this API and should instead use the Update Storage Account API. If an account is already created and subsequent PUT request is issued with exact same set of properties, then HTTP 200 would be returned. ",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"name": "accountName",
"in": "path",
"required": true,
"type": "string",
"description": "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. "
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/StorageAccountCreateParameters"
},
"description": "The parameters to provide for the created account."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/StorageAccount"
}
},
"202": {
"description": ""
}
},
"x-ms-long-running-operation": true
},
"delete": {
"tags": ["StorageAccounts"],
"operationId": "StorageAccounts_Delete",
"description": "Deletes a storage account in Microsoft Azure.",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"name": "accountName",
"in": "path",
"required": true,
"type": "string",
"description": "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. "
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": ""
},
"204": {
"description": ""
}
}
},
"get": {
"tags": ["StorageAccounts"],
"operationId": "StorageAccounts_GetProperties",
"description": "Returns the properties for the specified storage account including but not limited to name, account type, location, and account status. The ListKeys operation should be used to retrieve storage keys.",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"name": "accountName",
"in": "path",
"required": true,
"type": "string",
"description": "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. "
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/StorageAccount"
}
}
}
},
"patch": {
"tags": ["StorageAccounts"],
"operationId": "StorageAccounts_Update",
"description": "Updates the account type or tags for a storage account. It can also be used to add a custom domain (note that custom domains cannot be added via the Create operation). Only one custom domain is supported per storage account. This API can only be used to update one of tags, accountType, or customDomain per call. To update multiple of these properties, call the API multiple times with one change per call. This call does not change the storage keys for the account. If you want to change storage account keys, use the RegenerateKey operation. The location and name of the storage account cannot be changed after creation.",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"name": "accountName",
"in": "path",
"required": true,
"type": "string",
"description": "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. "
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/StorageAccountUpdateParameters"
},
"description": "The parameters to update on the account. Note that only one property can be changed at a time using this API. "
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/StorageAccount"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys": {
"post": {
"tags": ["StorageAccounts"],
"operationId": "StorageAccounts_ListKeys",
"description": "Lists the access keys for the specified storage account.",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"name": "accountName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the storage account."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/StorageAccountKeys"
}
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts": {
"get": {
"tags": ["StorageAccounts"],
"operationId": "StorageAccounts_List",
"description": "Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/StorageAccountListResult"
}
}
},
"x-ms-pageable": { "nextLinkName": null }
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts": {
"get": {
"tags": ["StorageAccounts"],
"operationId": "StorageAccounts_ListByResourceGroup",
"description": "Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/StorageAccountListResult"
}
}
},
"x-ms-pageable": { "nextLinkName": null }
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey": {
"post": {
"tags": ["StorageAccounts"],
"operationId": "StorageAccounts_RegenerateKey",
"description": "Regenerates the access keys for the specified storage account.",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"name": "accountName",
"in": "path",
"required": true,
"type": "string",
"description": "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. "
},
{
"name": "regenerateKey",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/StorageAccountRegenerateKeyParameters"
},
"description": "Specifies name of the key which should be regenerated."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/StorageAccountKeys"
}
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Storage/usages": {
"get": {
"tags": ["Usage"],
"operationId": "Usage_List",
"description": "Gets the current usage count and the limit for the resources under the subscription.",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/UsageListResult"
}
}
}
}
}
},
"definitions": {
"StorageAccountCheckNameAvailabilityParameters": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"default": "Microsoft.Storage/storageAccounts"
}
},
"required": ["name"]
},
"CheckNameAvailabilityResult": {
"type": "object",
"properties": {
"nameAvailable": {
"type": "boolean",
"description": "Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or invalid and cannot be used."
},
"reason": {
"type": "string",
"description": "Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false.",
"enum": ["AccountNameInvalid", "AlreadyExists"],
"x-ms-enum": { "name": "Reason" }
},
"message": {
"type": "string",
"description": "Gets an error message explaining the Reason value in more detail."
}
},
"description": "The CheckNameAvailability operation response."
},
"StorageAccountPropertiesCreateParameters": {
"type": "object",
"properties": {
"accountType": {
"type": "string",
"description": "Gets or sets the account type.",
"enum": ["Standard_LRS", "Standard_ZRS", "Standard_GRS", "Standard_RAGRS", "Premium_LRS"],
"x-ms-enum": { "name": "AccountType" }
}
}
},
"StorageAccountCreateParameters": {
"type": "object",
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/StorageAccountPropertiesCreateParameters"
}
},
"allOf": [
{
"$ref": "#/definitions/Resource"
}
],
"description": "The parameters to provide for the account."
},
"Endpoints": {
"type": "object",
"properties": {
"blob": {
"type": "string",
"description": "Gets the blob endpoint."
},
"queue": {
"type": "string",
"description": "Gets the queue endpoint."
},
"table": {
"type": "string",
"description": "Gets the table endpoint."
},
"dummyEndPoint": {
"$ref": "#/definitions/Endpoints",
"description": "Dummy EndPoint"
},
"FooPoint": {
"$ref": "#/definitions/Foo",
"description": "Foo point"
}
},
"description": "The URIs that are used to perform a retrieval of a public blob, queue or table object."
},
"Foo": {
"type": "object",
"properties": {
"Bar.Point": {
"$ref": "#/definitions/Bar",
"description": "Bar point"
}
},
"description": "The URIs that are used to perform a retrieval of a public blob, queue or table object."
},
"Bar": {
"type": "object",
"properties": {
"RecursivePoint": {
"$ref": "#/definitions/Endpoints",
"description": "Recursive Endpoints"
}
},
"description": "The URIs that are used to perform a retrieval of a public blob, queue or table object."
},
"CustomDomain": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Gets or sets the custom domain name. Name is the CNAME source."
},
"useSubDomain": {
"type": "boolean",
"description": "Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates"
}
},
"description": "The custom domain assigned to this storage account. This can be set via Update."
},
"StorageAccountProperties": {
"type": "object",
"properties": {
"provisioningState": {
"type": "string",
"description": "Gets the status of the storage account at the time the operation was called.",
"enum": ["Creating", "ResolvingDNS", "Succeeded"],
"x-ms-enum": { "name": "ProvisioningState" }
},
"accountType": {
"type": "string",
"description": "Gets the type of the storage account.",
"enum": ["Standard_LRS", "Standard_ZRS", "Standard_GRS", "Standard_RAGRS", "Premium_LRS"],
"x-ms-enum": { "name": "AccountType" }
},
"primaryEndpoints": {
"$ref": "#/definitions/Endpoints",
"description": "Gets the URLs that are used to perform a retrieval of a public blob, queue or table object.Note that StandardZRS and PremiumLRS accounts only return the blob endpoint."
},
"primaryLocation": {
"type": "string",
"description": "Gets the location of the primary for the storage account."
},
"statusOfPrimary": {
"type": "string",
"description": "Gets the status indicating whether the primary location of the storage account is available or unavailable.",
"enum": ["Available", "Unavailable"],
"x-ms-enum": { "name": "AccountStatus" }
},
"lastGeoFailoverTime": {
"type": "string",
"format": "date-time",
"description": "Gets the timestamp of the most recent instance of a failover to the secondary location. Only the most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only available if the accountType is StandardGRS or StandardRAGRS."
},
"secondaryLocation": {
"type": "string",
"description": "Gets the location of the geo replicated secondary for the storage account. Only available if the accountType is StandardGRS or StandardRAGRS."
},
"statusOfSecondary": {
"type": "string",
"description": "Gets the status indicating whether the secondary location of the storage account is available or unavailable. Only available if the accountType is StandardGRS or StandardRAGRS.",
"enum": ["Available", "Unavailable"],
"x-ms-enum": { "name": "AccountStatus" }
},
"creationTime": {
"type": "string",
"format": "date-time",
"description": "Gets the creation date and time of the storage account in UTC."
},
"customDomain": {
"$ref": "#/definitions/CustomDomain",
"description": "Gets the user assigned custom domain assigned to this storage account."
},
"secondaryEndpoints": {
"$ref": "#/definitions/Endpoints",
"description": "Gets the URLs that are used to perform a retrieval of a public blob, queue or table object from the secondary location of the storage account. Only available if the accountType is StandardRAGRS."
}
}
},
"StorageAccount": {
"type": "object",
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/StorageAccountProperties"
}
},
"allOf": [
{
"$ref": "#/definitions/Resource"
}
],
"description": "The storage account."
},
"StorageAccountKeys": {
"type": "object",
"properties": {
"key1": {
"type": "string",
"description": "Gets the value of key 1."
},
"key2": {
"type": "string",
"description": "Gets the value of key 2."
}
},
"description": "The access keys for the storage account."
},
"StorageAccountListResult": {
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/StorageAccount"
},
"description": "Gets the list of storage accounts and their properties."
},
"nextLink": {
"type": "string",
"description": "Gets the link to the next set of results. Currently this will always be empty as the API does not support pagination."
}
},
"description": "The list storage accounts operation response."
},
"StorageAccountPropertiesUpdateParameters": {
"type": "object",
"properties": {
"accountType": {
"type": "string",
"description": "Gets or sets the account type. Note that StandardZRS and PremiumLRS accounts cannot be changed to other account types, and other account types cannot be changed to StandardZRS or PremiumLRS.",
"enum": ["Standard_LRS", "Standard_ZRS", "Standard_GRS", "Standard_RAGRS", "Premium_LRS"],
"x-ms-enum": { "name": "AccountType" }
},
"customDomain": {
"$ref": "#/definitions/CustomDomain",
"description": "User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property."
}
}
},
"StorageAccountUpdateParameters": {
"type": "object",
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/StorageAccountPropertiesUpdateParameters"
}
},
"allOf": [
{
"$ref": "#/definitions/Resource"
}
],
"description": "The parameters to update on the account."
},
"StorageAccountRegenerateKeyParameters": {
"type": "object",
"properties": {
"keyName": {
"type": "string",
"enum": ["key1", "key2"],
"x-ms-enum": { "name": "KeyName" }
}
}
},
"UsageName": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Gets a string describing the resource name."
},
"localizedValue": {
"type": "string",
"description": "Gets a localized string describing the resource name."
}
},
"description": "The Usage Names."
},
"Usage": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"description": "Gets the unit of measurement.",
"enum": ["Count", "Bytes", "Seconds", "Percent", "CountsPerSecond", "BytesPerSecond"],
"x-ms-enum": { "name": "UsageUnit" }
},
"currentValue": {
"type": "integer",
"format": "int32",
"description": "Gets the current count of the allocated resources in the subscription."
},
"limit": {
"type": "integer",
"format": "int32",
"description": "Gets the maximum count of the resources that can be allocated in the subscription."
},
"name": {
"$ref": "#/definitions/UsageName",
"description": "Gets the name of the type of usage."
}
},
"description": "Describes Storage Resource Usage."
},
"UsageListResult": {
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/Usage"
},
"description": "Gets or sets the list Storage Resource Usages."
}
},
"description": "The List Usages operation response."
},
"Resource": {
"type": "object",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource Id"
},
"name": {
"readOnly": true,
"type": "string",
"description": "Resource name"
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type"
},
"location": {
"type": "string",
"description": "Resource location"
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags"
}
},
"required": ["location"],
"x-ms-azure-resource": true
},
"SubResource": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Resource Id"
}
},
"x-ms-azure-resource": true
}
},
"parameters": {
"SubscriptionIdParameter": {
"name": "subscriptionId",
"in": "path",
"required": true,
"type": "string",
"description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
},
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "Client Api Version."
},
"ResourceGroupName": {
"description": "The name of the resource group within the users subscription.",
"in": "path",
"name": "resourceGroupName",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
}
}
}