Skip to content

Commit

Permalink
Add API for adding external storage account configurations to a web a…
Browse files Browse the repository at this point in the history
…pp (#3459)

* Add API for adding external storage account configurations to a web app

* Make state of AzureStorageInfoValue readonly
  • Loading branch information
ebencarek authored and dsgouda committed Aug 3, 2018
1 parent d3a52a1 commit 75e6be3
Show file tree
Hide file tree
Showing 2 changed files with 285 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,54 @@
}
}
},
"AzureStorageInfoValue": {
"description": "Azure Files or Blob Storage access information value for dictionary storage.",
"type": "object",
"properties": {
"type": {
"description": "Type of storage.",
"enum": [
"AzureFiles",
"AzureBlob"
],
"type": "string",
"x-ms-enum": {
"name": "AzureStorageType",
"modelAsString": false
}
},
"accountName": {
"description": "Name of the storage account.",
"type": "string"
},
"shareName": {
"description": "Name of the file share (container name, for Blob storage).",
"type": "string"
},
"accessKey": {
"description": "Access key for the storage account.",
"type": "string"
},
"mountPath": {
"description": "Path to mount the storage within the site's runtime environment.",
"type": "string"
},
"state": {
"description": "State of the storage account.",
"enum": [
"Ok",
"InvalidCredentials",
"InvalidShare"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "AzureStorageState",
"modelAsString": false
}
}
}
},
"Capability": {
"description": "Describes the capabilities/features allowed for a specific SKU.",
"type": "object",
Expand Down Expand Up @@ -2127,6 +2175,13 @@
"$ref": "#/definitions/NameValuePair"
}
},
"azureStorageAccounts": {
"description": "User-provided Azure storage accounts.",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/AzureStorageInfoValue"
}
},
"connectionStrings": {
"description": "Connection strings.",
"type": "array",
Expand Down Expand Up @@ -2955,4 +3010,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,99 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts": {
"put": {
"tags": [
"WebApps"
],
"summary": "Updates the Azure storage account configurations of an app.",
"description": "Updates the Azure storage account configurations of an app.",
"operationId": "WebApps_UpdateAzureStorageAccounts",
"parameters": [
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"name": "name",
"in": "path",
"description": "Name of the app.",
"required": true,
"type": "string"
},
{
"name": "azureStorageAccounts",
"in": "body",
"description": "Azure storage accounts of the app.",
"required": true,
"schema": {
"$ref": "#/definitions/AzureStoragePropertyDictionaryResource"
}
},
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/AzureStoragePropertyDictionaryResource"
}
},
"default": {
"description": "App Service error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list": {
"post": {
"tags": [
"WebApps"
],
"summary": "Gets the Azure storage account configurations of an app.",
"description": "Gets the Azure storage account configurations of an app.",
"operationId": "WebApps_ListAzureStorageAccounts",
"parameters": [
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"name": "name",
"in": "path",
"description": "Name of the app.",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/AzureStoragePropertyDictionaryResource"
}
},
"default": {
"description": "App Service error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup": {
"put": {
"tags": [
Expand Down Expand Up @@ -7577,6 +7670,113 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts": {
"put": {
"tags": [
"WebApps"
],
"summary": "Updates the Azure storage account configurations of an app.",
"description": "Updates the Azure storage account configurations of an app.",
"operationId": "WebApps_UpdateAzureStorageAccountsSlot",
"parameters": [
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"name": "name",
"in": "path",
"description": "Name of the app.",
"required": true,
"type": "string"
},
{
"name": "azureStorageAccounts",
"in": "body",
"description": "Azure storage accounts of the app.",
"required": true,
"schema": {
"$ref": "#/definitions/AzureStoragePropertyDictionaryResource"
}
},
{
"name": "slot",
"in": "path",
"description": "Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations for the production slot.",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/AzureStoragePropertyDictionaryResource"
}
},
"default": {
"description": "App Service error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list": {
"post": {
"tags": [
"WebApps"
],
"summary": "Gets the Azure storage account configurations of an app.",
"description": "Gets the Azure storage account configurations of an app.",
"operationId": "WebApps_ListAzureStorageAccountsSlot",
"parameters": [
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"name": "name",
"in": "path",
"description": "Name of the app.",
"required": true,
"type": "string"
},
{
"name": "slot",
"in": "path",
"description": "Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations for the production slot.",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/AzureStoragePropertyDictionaryResource"
}
},
"default": {
"description": "App Service error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup": {
"put": {
"tags": [
Expand Down Expand Up @@ -15659,7 +15859,7 @@
"$ref": "#/definitions/SiteSourceControl"
}
},
"default": {
"default": {
"description": "App Service error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
Expand Down Expand Up @@ -16817,6 +17017,25 @@
}
}
},
"AzureStoragePropertyDictionaryResource": {
"description": "AzureStorageInfo dictionary resource.",
"type": "object",
"allOf": [
{
"$ref": "./CommonDefinitions.json#/definitions/ProxyOnlyResource"
}
],
"properties": {
"properties": {
"description": "Azure storage accounts.",
"type": "object",
"additionalProperties": {
"$ref": "./CommonDefinitions.json#/definitions/AzureStorageInfoValue"
},
"x-ms-client-flatten": true
}
}
},
"AzureTableStorageApplicationLogsConfig": {
"description": "Application logs to Azure table storage configuration.",
"required": [
Expand Down Expand Up @@ -19689,7 +19908,7 @@
}
},
"SlotConfigNames": {
"description": "Names for connection strings and application settings to be marked as sticky to the deployment slot and not moved during a swap operation.\nThis is valid for all deployment slots in an app.",
"description": "Names for connection strings, application settings, and external Azure storage account configuration\nidentifiers to be marked as sticky to the deployment slot and not moved during a swap operation.\nThis is valid for all deployment slots in an app.",
"type": "object",
"properties": {
"connectionStringNames": {
Expand All @@ -19705,6 +19924,13 @@
"items": {
"type": "string"
}
},
"azureStorageConfigNames": {
"description": "List of external Azure storage account identifiers.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -20339,4 +20565,4 @@
]
}
]
}
}

0 comments on commit 75e6be3

Please sign in to comment.