Skip to content

Commit

Permalink
Add storages operation for managedEnvironment (#17545)
Browse files Browse the repository at this point in the history
* add storage

* fix

* fix typo
  • Loading branch information
Juliehzl authored Feb 9, 2022
1 parent e6db32c commit 5a694d2
Show file tree
Hide file tree
Showing 6 changed files with 423 additions and 0 deletions.
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"
]
}
]
}
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"
}
}
}
}
}
}
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": {}
}
}
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"
}
}
}
}
}
}
Loading

0 comments on commit 5a694d2

Please sign in to comment.