diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/CommonDefinitions.json b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/CommonDefinitions.json index 0ef44f122f77..c446580151ec 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/CommonDefinitions.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/CommonDefinitions.json @@ -335,6 +335,36 @@ } } }, + "CustomDomain": { + "description": "Custom Domain of a Container App", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Hostname.", + "type": "string" + }, + "bindingType": { + "description": "Custom Domain binding type.", + "enum": [ + "Disabled", + "SniEnabled", + "Auto" + ], + "type": "string", + "x-ms-enum": { + "name": "bindingType", + "modelAsString": true + } + }, + "certificateId": { + "description": "Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment.", + "type": "string" + } + } + }, "CustomDomainConfiguration": { "type": "object", "description": "Configuration properties for apps environment custom domain", @@ -2176,6 +2206,15 @@ } }, "parameters": { + "EnvironmentNameParameter": { + "name": "environmentName", + "in": "path", + "description": "Name of the Managed Environment.", + "required": true, + "type": "string", + "pattern": "^[-\\w\\._\\(\\)]+$", + "x-ms-parameter-location": "method" + }, "ContainerAppsNameParameter": { "name": "containerAppName", "in": "path", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/ContainerApps.json index e39fcab95f60..8d5fc8d43bf7 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/ContainerApps.json @@ -1063,7 +1063,7 @@ "description": "custom domain bindings for Container Apps' hostnames.", "type": "array", "items": { - "$ref": "#/definitions/CustomDomain" + "$ref": "./CommonDefinitions.json#/definitions/CustomDomain" }, "x-ms-identifiers": [ "name" @@ -1235,36 +1235,6 @@ } } }, - "CustomDomain": { - "description": "Custom Domain of a Container App", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "description": "Hostname.", - "type": "string" - }, - "bindingType": { - "description": "Custom Domain binding type.", - "enum": [ - "Disabled", - "SniEnabled", - "Auto" - ], - "type": "string", - "x-ms-enum": { - "name": "bindingType", - "modelAsString": true - } - }, - "certificateId": { - "description": "Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment.", - "type": "string" - } - } - }, "IpSecurityRestrictionRule": { "description": "Rule to restrict incoming IP address.", "type": "object", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/ManagedEnvironmentsHttpRouteConfig.json b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/ManagedEnvironmentsHttpRouteConfig.json new file mode 100644 index 000000000000..fe1601b5d044 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/ManagedEnvironmentsHttpRouteConfig.json @@ -0,0 +1,525 @@ +{ + "swagger": "2.0", + "info": { + "version": "2024-10-02-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/{environmentName}/httpRouteConfigs/{httpRouteName}": { + "get": { + "tags": [ + "HttpRouteConfig" + ], + "summary": "Get the specified Managed Http Route Config.", + "operationId": "HttpRouteConfig_Get", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./CommonDefinitions.json#/parameters/EnvironmentNameParameter" + }, + { + "$ref": "#/parameters/HttpRouteConfigNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/HttpRouteConfig" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Get HttpRoute": { + "$ref": "./examples/HttpRouteConfig_Get.json" + } + } + }, + "put": { + "tags": [ + "HttpRouteConfig" + ], + "summary": "Create or Update a Http Route Config.", + "operationId": "HttpRouteConfig_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./CommonDefinitions.json#/parameters/EnvironmentNameParameter" + }, + { + "$ref": "#/parameters/HttpRouteConfigNameParameter" + }, + { + "name": "httpRouteConfigEnvelope", + "in": "body", + "description": "Http Route config to be created or updated", + "schema": { + "$ref": "#/definitions/HttpRouteConfig" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/HttpRouteConfig" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/HttpRouteConfig" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-long-running-operation": false, + "x-ms-examples": { + "Create or Update Http Route": { + "$ref": "./examples/HttpRouteConfig_CreateOrUpdate.json" + }, + "Create or Update Http Route Prefix Rule": { + "$ref": "./examples/HttpRouteConfig_CreateOrUpdatePrefix.json" + }, + "Create or Update Http Route Path Separated Prefix Rule": { + "$ref": "./examples/HttpRouteConfig_CreateOrUpdate_PathSepPrefix.json" + } + } + }, + "patch": { + "tags": [ + "HttpRouteConfig" + ], + "summary": "Update tags of a manged http route object", + "description": "Patches an http route config resource. Only patching of tags is supported", + "operationId": "HttpRouteConfig_Update", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "environmentName", + "in": "path", + "description": "Name of the Managed Environment.", + "required": true, + "type": "string" + }, + { + "name": "httpRouteName", + "in": "path", + "description": "Name of the Http Route Config Resource.", + "required": true, + "type": "string" + }, + { + "name": "httpRouteConfigEnvelope", + "in": "body", + "required": true, + "description": "Properties of http route config that need to be updated", + "schema": { + "$ref": "#/definitions/HttpRouteConfig" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Managed Http Routes updated successfully.", + "schema": { + "$ref": "#/definitions/HttpRouteConfig" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Patch Managed Http Route": { + "$ref": "./examples/HttpRouteConfig_Patch.json" + } + } + }, + "delete": { + "tags": [ + "HttpRouteConfig" + ], + "summary": "Deletes the specified Managed Http Route.", + "operationId": "HttpRouteConfig_Delete", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./CommonDefinitions.json#/parameters/EnvironmentNameParameter" + }, + { + "$ref": "#/parameters/HttpRouteConfigNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Delete operation completed" + }, + "204": { + "description": "Http Route does not exist" + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete Certificate": { + "$ref": "./examples/HttpRouteConfig_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/httpRouteConfigs": { + "get": { + "tags": [ + "HttpRouteConfig" + ], + "summary": "Get the Managed Http Routes in a given managed environment.", + "operationId": "HttpRouteConfig_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./CommonDefinitions.json#/parameters/EnvironmentNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/HttpRouteConfigCollection" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "List Managed Http Routes by Managed Environment": { + "$ref": "./examples/HttpRouteConfig_ListByManagedEnvironment.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "HttpRouteConfig": { + "description": "Advanced Ingress routing for path/header based routing for a Container App Environment", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "description": "Http Route Config properties", + "type": "object", + "properties": { + "provisioningState": { + "description": "The provisioning state of the Http Route Config in cluster", + "$ref": "#/definitions/HttpRouteProvisioningState" + }, + "provisioningErrors": { + "description": "List of errors when trying to reconcile http routes", + "type": "array", + "items": { + "$ref": "#/definitions/HttpRouteProvisioningErrors" + }, + "readOnly": true + }, + "fqdn": { + "description": "FQDN of the route resource.", + "type": "string", + "readOnly": true + }, + "customDomains": { + "description": "Custom domain bindings for http Routes' hostnames.", + "type": "array", + "items": { + "$ref": "./CommonDefinitions.json#/definitions/CustomDomain" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "rules": { + "description": "Routing Rules for http route resource.", + "type": "array", + "items": { + "$ref": "#/definitions/HttpRouteRule" + }, + "x-ms-identifiers": [ + "name" + ] + } + } + } + }, + "x-ms-client-flatten": true + }, + "HttpRouteProvisioningErrors": { + "description": "List of provisioning errors for a http route config object", + "type": "object", + "properties": { + "timestamp": { + "description": "Timestamp error occured at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "message": { + "description": "Description or error message", + "type": "string", + "readOnly": true + } + } + }, + "HttpRouteTarget": { + "description": "Targets - Container App Names, Revision Names, Labels.", + "type": "object", + "required": [ + "containerApp" + ], + "properties": { + "containerApp": { + "description": "Container App Name to route requests to", + "type": "string" + }, + "revision": { + "description": "Revision to route requests to", + "type": "string" + }, + "label": { + "description": "Label/Revision to route requests to", + "type": "string" + }, + "weight": { + "description": "Weighted routing", + "type": "integer", + "format": "int32", + "minimum": 0, + "maximum": 100 + } + } + }, + "HttpRouteMatch": { + "description": "Criteria to match on", + "type": "object", + "properties": { + "prefix": { + "description": "match on all prefix's. Not exact", + "type": "string" + }, + "path": { + "description": "match on exact path", + "type": "string" + }, + "pathSeparatedPrefix": { + "description": "match on all prefix's. Not exact", + "type": "string" + }, + "caseSensitive": { + "description": "path case sensitive, default is true", + "type": "boolean" + } + } + }, + "HttpRouteAction": { + "description": "Action to perform once matching of routes is done", + "type": "object", + "properties": { + "prefixRewrite": { + "description": "Rewrite prefix, default is no rewrites", + "type": "string" + } + } + }, + "HttpRoute": { + "description": "Http Routes configuration, including paths to match on and whether or not rewrites are to be done.", + "type": "object", + "properties": { + "match": { + "description": "Conditions route will match on", + "$ref": "#/definitions/HttpRouteMatch" + }, + "action": { + "description": "Once route is matched, what is the desired action", + "$ref": "#/definitions/HttpRouteAction" + } + } + }, + "HttpRouteRule": { + "description": "Http Route rule.", + "type": "object", + "properties": { + "targets": { + "description": "Targets- container apps, revisions, labels", + "type": "array", + "items": { + "$ref": "#/definitions/HttpRouteTarget" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "routes": { + "description": "Routing configuration that will allow matches on specific paths/headers.", + "type": "array", + "items": { + "$ref": "#/definitions/HttpRoute" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "description": { + "type": "string", + "description": "Description of rule. Optional." + } + } + }, + "HttpRouteProvisioningState": { + "type": "string", + "readOnly": true, + "description": "The current provisioning state.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Waiting", + "Updating", + "Deleting", + "Pending" + ], + "x-ms-enum": { + "name": "HttpRouteProvisioningState", + "modelAsString": true + } + }, + "HttpRouteConfigCollection": { + "description": "Collection of Advanced Ingress Routing Config resources.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/HttpRouteConfig" + } + }, + "nextLink": { + "description": "Link to next page of resources.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "HttpRouteConfigNameParameter": { + "name": "httpRouteName", + "in": "path", + "description": "Name of the Http Route Config Resource.", + "required": true, + "type": "string", + "pattern": "^[a-z][a-z0-9]*$", + "minLength": 3, + "maxLength": 63, + "x-ms-parameter-location": "method" + } + }, + "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" + ] + } + ] +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_CreateOrUpdate.json new file mode 100644 index 000000000000..7f94d84b1376 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_CreateOrUpdate.json @@ -0,0 +1,127 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "environmentName": "testcontainerenv", + "httpRouteName": "httproutefriendlyname", + "api-version": "2024-10-02-preview", + "httpRouteConfigEnvelope": { + "properties": { + "customDomains": [ + { + "name": "example.com", + "bindingType": "SniEnabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "capp-1", + "revision": "rev-1", + "weight": 100 + } + ], + "routes": [ + { + "match": { + "path": "/v1", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ], + "description": "random-description" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/httpRouteConfigs/route-1", + "type": "Microsoft.App/managedEnvironments/httpRouteConfigs", + "properties": { + "fqdn": "app1.example.com", + "provisioningState": "InProgress", + "customDomains": [ + { + "name": "example.com", + "bindingType": "SniEnabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "capp-1", + "revision": "rev-1", + "weight": 100 + } + ], + "routes": [ + { + "match": { + "path": "/v1", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ], + "description": "random-description" + } + ] + } + } + }, + "201": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/httpRouteConfigs/route-1", + "type": "Microsoft.App/managedEnvironments/httpRouteConfigs", + "properties": { + "fqdn": "app1.example.com", + "provisioningState": "Succeeded", + "customDomains": [ + { + "name": "example.com", + "bindingType": "SniEnabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "capp-1", + "revision": "rev-1", + "weight": 100 + } + ], + "routes": [ + { + "match": { + "path": "/v1", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ], + "description": "random-description" + } + ] + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_CreateOrUpdatePrefix.json b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_CreateOrUpdatePrefix.json new file mode 100644 index 000000000000..79bdb988c998 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_CreateOrUpdatePrefix.json @@ -0,0 +1,124 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "environmentName": "testcontainerenv", + "httpRouteName": "httproutefriendlyname", + "api-version": "2024-10-02-preview", + "httpRouteConfigEnvelope": { + "properties": { + "customDomains": [ + { + "name": "example.com", + "bindingType": "Disabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "capp-1", + "label": "label-1" + } + ], + "routes": [ + { + "match": { + "prefix": "/v1", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ], + "description": "random-description" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/httpRouteConfigs/route-1", + "type": "Microsoft.App/managedEnvironments/httpRouteConfigs", + "properties": { + "fqdn": "app1.example.com", + "provisioningState": "InProgress", + "customDomains": [ + { + "name": "example.com", + "bindingType": "Disabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "capp-1", + "label": "label-1" + } + ], + "routes": [ + { + "match": { + "prefix": "/v1", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ], + "description": "random-description" + } + ] + } + } + }, + "201": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/httpRouteConfigs/route-1", + "type": "Microsoft.App/managedEnvironments/httpRouteConfigs", + "properties": { + "fqdn": "app1.example.com", + "provisioningState": "Succeeded", + "customDomains": [ + { + "name": "example.com", + "bindingType": "Disabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "capp-1", + "label": "label-1" + } + ], + "routes": [ + { + "match": { + "prefix": "/v1", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ], + "description": "random-description" + } + ] + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_CreateOrUpdate_PathSepPrefix.json b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_CreateOrUpdate_PathSepPrefix.json new file mode 100644 index 000000000000..cfad854c0642 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_CreateOrUpdate_PathSepPrefix.json @@ -0,0 +1,124 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "environmentName": "testcontainerenv", + "httpRouteName": "httproutefriendlyname", + "api-version": "2024-10-02-preview", + "httpRouteConfigEnvelope": { + "properties": { + "customDomains": [ + { + "name": "example.com", + "bindingType": "Disabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "capp-1", + "label": "label-1" + } + ], + "routes": [ + { + "match": { + "pathSeparatedPrefix": "/v1", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ], + "description": "random-description" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/httpRouteConfigs/route-1", + "type": "Microsoft.App/managedEnvironments/httpRouteConfigs", + "properties": { + "fqdn": "app1.example.com", + "provisioningState": "InProgress", + "customDomains": [ + { + "name": "example.com", + "bindingType": "Disabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "capp-1", + "label": "label-1" + } + ], + "routes": [ + { + "match": { + "pathSeparatedPrefix": "/v1", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ], + "description": "random-description" + } + ] + } + } + }, + "201": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/httpRouteConfigs/route-1", + "type": "Microsoft.App/managedEnvironments/httpRouteConfigs", + "properties": { + "fqdn": "app1.example.com", + "provisioningState": "Succeeded", + "customDomains": [ + { + "name": "example.com", + "bindingType": "Disabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "capp-1", + "label": "label-1" + } + ], + "routes": [ + { + "match": { + "pathSeparatedPrefix": "/v1", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ], + "description": "random-description" + } + ] + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Delete.json b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Delete.json new file mode 100644 index 000000000000..a20f7662ccbd --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Delete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "environmentName": "testcontainerenv", + "httpRouteName": "httproutefriendlyname", + "api-version": "2024-10-02-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Get.json new file mode 100644 index 000000000000..d7378825d59a --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Get.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "environmentName": "testcontainerenv", + "httpRouteName": "httproutefriendlyname", + "api-version": "2024-10-02-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/httpRouteConfigs/route-1", + "type": "Microsoft.App/managedEnvironments/httpRouteConfigs", + "properties": { + "fqdn": "app1.example.com", + "provisioningState": "Succeeded", + "customDomains": [ + { + "name": "example.com", + "bindingType": "SniEnabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "capp-1", + "revision": "rev-1", + "weight": 100 + } + ], + "routes": [ + { + "match": { + "prefix": "/api", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ] + } + ] + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_ListByManagedEnvironment.json b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_ListByManagedEnvironment.json new file mode 100644 index 000000000000..630848235a7e --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_ListByManagedEnvironment.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "environmentName": "testcontainerenv", + "api-version": "2024-10-02-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/httpRouteConfigs/route-1", + "type": "Microsoft.App/managedEnvironments/httpRouteConfigs", + "properties": { + "fqdn": "app1.example.com", + "provisioningState": "Succeeded", + "customDomains": [ + { + "name": "example.com", + "bindingType": "SniEnabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "containerApp1" + } + ], + "routes": [ + { + "match": { + "prefix": "/api", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ] + } + ] + } + }, + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/httpRouteConfigs/route-2", + "type": "Microsoft.App/managedEnvironments/httpRouteConfigs", + "properties": { + "fqdn": "app2.example.com", + "provisioningState": "Succeeded", + "customDomains": [ + { + "name": "example.com", + "bindingType": "SniEnabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-2" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "containerApp2", + "revision": "rev-2", + "weight": 50 + }, + { + "containerApp": "containerApp2", + "revision": "rev-3", + "weight": 50 + } + ], + "routes": [ + { + "match": { + "prefix": "/api", + "caseSensitive": false + }, + "action": { + "prefixRewrite": "/v2/api" + } + } + ] + } + ] + } + } + ] + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Patch.json b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Patch.json new file mode 100644 index 000000000000..36eea9f99a51 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-10-02-preview/examples/HttpRouteConfig_Patch.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "environmentName": "testcontainerenv", + "httpRouteName": "httproutefriendlyname", + "api-version": "2024-10-02-preview", + "httpRouteConfigEnvelope": { + "properties": { + "customDomains": [ + { + "name": "example.com", + "bindingType": "SniEnabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "capp-1", + "revision": "rev-1", + "weight": 100 + } + ], + "routes": [ + { + "match": { + "path": "/v1", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ], + "description": "random-description" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/httpRouteConfigs/route-1", + "type": "Microsoft.App/managedEnvironments/httpRouteConfigs", + "properties": { + "fqdn": "app1.example.com", + "provisioningState": "InProgress", + "customDomains": [ + { + "name": "example.com", + "bindingType": "SniEnabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1" + } + ], + "rules": [ + { + "targets": [ + { + "containerApp": "capp-1", + "revision": "rev-1", + "weight": 100 + } + ], + "routes": [ + { + "match": { + "path": "/v1", + "caseSensitive": true + }, + "action": { + "prefixRewrite": "/v1/api" + } + } + ], + "description": "random-description" + } + ] + } + } + } + } +} diff --git a/specification/app/resource-manager/readme.md b/specification/app/resource-manager/readme.md index bc8f6ee4a0b3..ec482eae7a83 100644 --- a/specification/app/resource-manager/readme.md +++ b/specification/app/resource-manager/readme.md @@ -62,6 +62,7 @@ input-file: - Microsoft.App/preview/2024-10-02-preview/ManagedEnvironmentsDaprComponentResiliencyPolicies.json - Microsoft.App/preview/2024-10-02-preview/ManagedEnvironmentsDaprComponents.json - Microsoft.App/preview/2024-10-02-preview/ManagedEnvironmentsDaprSubscriptions.json + - Microsoft.App/preview/2024-10-02-preview/ManagedEnvironmentsHttpRouteConfig.json - Microsoft.App/preview/2024-10-02-preview/ManagedEnvironmentsMaintenanceConfigurations.json - Microsoft.App/preview/2024-10-02-preview/ManagedEnvironmentsStorages.json - Microsoft.App/preview/2024-10-02-preview/SessionPools.json