Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add storages operation for managedEnvironment #17545

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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}": {
pilor marked this conversation as resolved.
Show resolved Hide resolved
"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",
pilor marked this conversation as resolved.
Show resolved Hide resolved
"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