-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add storages operation for managedEnvironment (#17545)
* add storage * fix * fix typo
- Loading branch information
Showing
6 changed files
with
423 additions
and
0 deletions.
There are no files selected for viewing
321 changes: 321 additions & 0 deletions
321
...esource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironmentsStorages.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,321 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"version": "2022-01-01-preview", | ||
"title": "ContainerApps API Client" | ||
}, | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": { | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages": { | ||
"get": { | ||
"tags": [ | ||
"ManagedEnvironmentsStorages" | ||
], | ||
"summary": "Get all storages for a managedEnvironment.", | ||
"description": "Get all storages for a managedEnvironment.", | ||
"operationId": "ManagedEnvironmentsStorages_List", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"name": "envName", | ||
"in": "path", | ||
"description": "Name of the Environment.", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/ManagedEnvironmentStoragesCollection" | ||
} | ||
}, | ||
"default": { | ||
"description": "Common error response.", | ||
"schema": { | ||
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" | ||
} | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"List environments storages by subscription": { | ||
"$ref": "./examples/ManagedEnvironmentsStorages_List.json" | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}": { | ||
"get": { | ||
"tags": [ | ||
"ManagedEnvironmentsStorages" | ||
], | ||
"summary": "Get storage for a managedEnvironment.", | ||
"description": "Get storage for a managedEnvironment.", | ||
"operationId": "ManagedEnvironmentsStorages_Get", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"name": "envName", | ||
"in": "path", | ||
"description": "Name of the Environment.", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "name", | ||
"in": "path", | ||
"description": "Name of the storage.", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/ManagedEnvironmentStorage" | ||
} | ||
}, | ||
"default": { | ||
"description": "Common error response.", | ||
"schema": { | ||
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" | ||
} | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"get a environments storage properties by subscription": { | ||
"$ref": "./examples/ManagedEnvironmentsStorages_Get.json" | ||
} | ||
} | ||
}, | ||
"put": { | ||
"tags": [ | ||
"ManagedEnvironmentsStorages" | ||
], | ||
"summary": "Create or update storage for a managedEnvironment.", | ||
"description": "Create or update storage for a managedEnvironment.", | ||
"operationId": "ManagedEnvironmentsStorages_CreateOrUpdate", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"name": "envName", | ||
"in": "path", | ||
"description": "Name of the Environment.", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "name", | ||
"in": "path", | ||
"description": "Name of the storage.", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "storageEnvelope", | ||
"in": "body", | ||
"description": "Configuration details of storage.", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/ManagedEnvironmentStorage" | ||
} | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/ManagedEnvironmentStorage" | ||
} | ||
}, | ||
"default": { | ||
"description": "Common error response.", | ||
"schema": { | ||
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" | ||
} | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"Create or update environments storage": { | ||
"$ref": "./examples/ManagedEnvironmentsStorages_CreateOrUpdate.json" | ||
} | ||
} | ||
}, | ||
"delete": { | ||
"tags": [ | ||
"ManagedEnvironmentsStorages" | ||
], | ||
"summary": "Delete storage for a managedEnvironment.", | ||
"description": "Delete storage for a managedEnvironment.", | ||
"operationId": "ManagedEnvironmentsStorages_Delete", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"name": "envName", | ||
"in": "path", | ||
"description": "Name of the Environment.", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "name", | ||
"in": "path", | ||
"description": "Name of the storage.", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
}, | ||
"204": { | ||
"description": "Storage does not exist" | ||
}, | ||
"default": { | ||
"description": "Common error response.", | ||
"schema": { | ||
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" | ||
} | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"List environments storages by subscription": { | ||
"$ref": "./examples/ManagedEnvironmentsStorages_Delete.json" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"AzureFileProperties": { | ||
"description": "Azure File Properties.", | ||
"type": "object", | ||
"properties": { | ||
"accountName": { | ||
"description": "Storage account name for azure file.", | ||
"type": "string" | ||
}, | ||
"accountKey": { | ||
"description": "Storage account key for azure file.", | ||
"type": "string", | ||
"x-ms-secret": true | ||
}, | ||
"accessMode": { | ||
"description": "Access mode for storage", | ||
"enum": [ | ||
"ReadOnly", | ||
"ReadWrite" | ||
], | ||
"type": "string", | ||
"x-ms-enum": { | ||
"name": "AccessMode", | ||
"modelAsString": true | ||
} | ||
}, | ||
"shareName": { | ||
"description": "Azure file share name.", | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"ManagedEnvironmentStoragesCollection": { | ||
"description": "Collection of Storage for Environments", | ||
"required": [ | ||
"value" | ||
], | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"description": "Collection of storage resources.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/ManagedEnvironmentStorage" | ||
} | ||
} | ||
} | ||
}, | ||
"ManagedEnvironmentStorage": { | ||
"description": "Storage resource for managedEnvironment.", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" | ||
} | ||
], | ||
"properties": { | ||
"properties": { | ||
"description": "Storage properties", | ||
"type": "object", | ||
"properties": { | ||
"azureFile": { | ||
"$ref": "#/definitions/AzureFileProperties", | ||
"description": "Azure file properties" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"securityDefinitions": { | ||
"azure_auth": { | ||
"type": "oauth2", | ||
"description": "Azure Active Directory OAuth2 Flow", | ||
"flow": "implicit", | ||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", | ||
"scopes": { | ||
"user_impersonation": "impersonate your user account" | ||
} | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"azure_auth": [ | ||
"user_impersonation" | ||
] | ||
} | ||
] | ||
} |
35 changes: 35 additions & 0 deletions
35
...t.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "8efdecc5-919e-44eb-b179-915dca89ebf9", | ||
"resourceGroupName": "examplerg", | ||
"envName": "managedEnv", | ||
"name": "jlaw-demo1", | ||
"api-version": "2022-01-01-preview", | ||
"storageEnvelope": { | ||
"properties": { | ||
"azureFile": { | ||
"accountName": "account1", | ||
"accountKey": "key", | ||
"shareName": "share1", | ||
"accessMode": "ReadOnly" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/managedEnv/storages/jlaw-demo1", | ||
"name": "jlaw-demo1", | ||
"type": "Microsoft.App/managedEnvironments/storages", | ||
"properties": { | ||
"azureFile": { | ||
"accountName": "account1", | ||
"shareName": "share1", | ||
"accessMode": "ReadOnly" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Delete.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "8efdecc5-919e-44eb-b179-915dca89ebf9", | ||
"resourceGroupName": "examplerg", | ||
"envName": "managedEnv", | ||
"name": "jlaw-demo1", | ||
"api-version": "2022-01-01-preview" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"204": {} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...er/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Get.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "8efdecc5-919e-44eb-b179-915dca89ebf9", | ||
"resourceGroupName": "examplerg", | ||
"envName": "managedEnv", | ||
"name": "jlaw-demo1", | ||
"api-version": "2022-01-01-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/managedEnv/storages/jlaw-demo1", | ||
"name": "jlaw-demo1", | ||
"type": "Microsoft.App/managedEnvironments/storages", | ||
"properties": { | ||
"azureFile": { | ||
"accountName": "account1", | ||
"shareName": "share1", | ||
"accessMode": "ReadOnly" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.