diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/CommonDefinitions.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/CommonDefinitions.json index d72fd53528c6..56b0255a21d5 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/CommonDefinitions.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/CommonDefinitions.json @@ -968,6 +968,101 @@ "description": "Application-specific metadata in the form of key-value pairs." } } + }, + "ManagedCertificate": { + "description": "Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "description": "Certificate resource specific properties", + "type": "object", + "properties": { + "provisioningState": { + "description": "Provisioning state of the certificate.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "DeleteFailed", + "Pending" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CertificateProvisioningState", + "modelAsString": true + } + }, + "subjectName": { + "description": "Subject name of the certificate.", + "type": "string" + }, + "error": { + "description": "Any error occurred during the certificate provision.", + "type": "string", + "readOnly": true + }, + "domainControlValidation": { + "description": "Selected type of domain control validation for managed certificates.", + "enum": [ + "CNAME", + "HTTP", + "TXT" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedCertificateDomainControlValidation", + "modelAsString": true + } + }, + "validationToken": { + "description": "A TXT token used for DNS TXT domain control validation when issuing this type of managed certificates.", + "type": "string", + "readOnly": true + } + } + } + }, + "x-ms-client-flatten": true + }, + "ManagedCertificatePatch": { + "description": "A managed certificate to update", + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Application-specific metadata in the form of key-value pairs." + } + } + }, + "ManagedCertificateCollection": { + "description": "Collection of Managed Certificates.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedCertificate" + } + }, + "nextLink": { + "description": "Link to next page of resources.", + "type": "string", + "readOnly": true + } + } } }, "securityDefinitions": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/ManagedEnvironments.json index 2b0d5e997295..ac59098ea6dc 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/ManagedEnvironments.json @@ -591,6 +591,298 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}": { + "get": { + "tags": [ + "ManagedEnvironments", + "ManagedCertificates" + ], + "summary": "Get the specified Managed Certificate.", + "operationId": "ManagedCertificates_Get", + "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": "managedCertificateName", + "in": "path", + "description": "Name of the Managed Certificate.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/ManagedCertificate" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Get Certificate": { + "$ref": "./examples/ManagedCertificate_Get.json" + } + } + }, + "put": { + "tags": [ + "ManagedEnvironments", + "ManagedCertificates" + ], + "summary": "Create or Update a Managed Certificate.", + "operationId": "ManagedCertificates_CreateOrUpdate", + "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": "managedCertificateName", + "in": "path", + "description": "Name of the Managed Certificate.", + "required": true, + "type": "string" + }, + { + "name": "managedCertificateEnvelope", + "in": "body", + "description": "Managed Certificate to be created or updated", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/ManagedCertificate" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/ManagedCertificate" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/ManagedCertificate" + } + }, + "400": { + "description": "Bad Request.", + "x-ms-error-response": true + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Create or Update Certificate": { + "$ref": "./examples/ManagedCertificate_CreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedEnvironments", + "ManagedCertificates" + ], + "summary": "Deletes the specified Managed Certificate.", + "operationId": "ManagedCertificates_Delete", + "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": "managedCertificateName", + "in": "path", + "description": "Name of the Managed Certificate.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Delete operation completed" + }, + "204": { + "description": "Certificate does not exist" + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete Certificate": { + "$ref": "./examples/ManagedCertificate_Delete.json" + } + } + }, + "patch": { + "tags": [ + "ManagedEnvironments", + "ManagedCertificates" + ], + "summary": "Update tags of a managed certificate", + "description": "Patches a managed certificate. Oly patching of tags is supported", + "operationId": "ManagedCertificates_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": "managedCertificateName", + "in": "path", + "description": "Name of the Managed Certificate.", + "required": true, + "type": "string" + }, + { + "name": "managedCertificateEnvelope", + "in": "body", + "required": true, + "description": "Properties of a managed certificate that need to be updated", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/ManagedCertificatePatch" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Managed Certificate updated successfully.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/ManagedCertificate" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Patch Certificate": { + "$ref": "./examples/ManagedCertificates_Patch.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates": { + "get": { + "tags": [ + "ManagedEnvironments", + "ManagedCertificates" + ], + "summary": "Get the Managed Certificates in a given managed environment.", + "operationId": "ManagedCertificates_List", + "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" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/ManagedCertificateCollection" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "List Managed Certificates by Managed Environment": { + "$ref": "./examples/ManagedCertificates_ListByManagedEnvironment.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/checkNameAvailability": { "post": { "tags": [ diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json new file mode 100644 index 000000000000..26d41bdd1ee5 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "environmentName": "testcontainerenv", + "managedCertificateName": "certificate-firendly-name", + "api-version": "2022-11-01-preview", + "managedCertificateEnvelope": { + "location": "East US", + "properties": { + "subjectName": "my-subject-name.company.country.net", + "domainControlValidation": "CNAME" + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/managedCertificates/certificate-firendly-name", + "type": "Microsoft.App/ManagedEnvironments/managedCertificates", + "location": "East US", + "properties": { + "subjectName": "CN=my-subject-name.company.country.net", + "provisioningState": "Succeeded", + "domainControlValidation": "CNAME" + } + } + }, + "201": { + "headers": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/locations/eastus/managedCertificateOperationStatuses/dc27c9cd-370f-4623-95d4-827b6dc4120a?api-version=2022-06-01-preview&azureAsyncOperation=true" + }, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/managedCertificates/certificate-firendly-name", + "type": "Microsoft.App/ManagedEnvironments/managedCertificates", + "location": "East US", + "properties": { + "subjectName": "CN=my-subject-name.company.country.net", + "provisioningState": "Pending", + "domainControlValidation": "CNAME" + } + } + }, + "400": { + "code": "ManagedCertNoUpdate", + "message": "Properties of managed certificates cannot be updated. Please delete the current resource and retry or use a different resource id." + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json new file mode 100644 index 000000000000..aeb231c5b0c1 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "environmentName": "testcontainerenv", + "managedCertificateName": "certificate-firendly-name", + "api-version": "2022-11-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json new file mode 100644 index 000000000000..5b991d2a6e95 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "environmentName": "testcontainerenv", + "managedCertificateName": "certificate-firendly-name", + "api-version": "2022-11-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/managedCertificates/certificate-firendly-name", + "type": "Microsoft.App/ManagedEnvironments/managedCertificates", + "location": "East US", + "properties": { + "subjectName": "CN=my-subject-name.company.country.net", + "provisioningState": "Succeeded", + "domainControlValidation": "CNAME" + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json new file mode 100644 index 000000000000..fc75cb444975 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "environmentName": "testcontainerenv", + "api-version": "2022-11-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/managedCertificates/certificate-firendly-name", + "type": "Microsoft.App/ManagedEnvironments/managedCertificates", + "location": "East US", + "properties": { + "subjectName": "CN=my-subject-name.company.country.net", + "provisioningState": "Succeeded", + "domainControlValidation": "CNAME" + } + }, + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/managedCertificates/certificate-firendly-name-root", + "type": "Microsoft.App/ManagedEnvironments/managedCertificates", + "location": "East US", + "properties": { + "subjectName": "CN=company.country.net", + "provisioningState": "Succeeded", + "domainControlValidation": "HTTP" + } + }, + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/managedCertificates/certificate-firendly-name-txt", + "type": "Microsoft.App/ManagedEnvironments/managedCertificates", + "location": "East US", + "properties": { + "subjectName": "CN=txt.company.country.net", + "provisioningState": "Succeeded", + "domainControlValidation": "TXT" + } + } + ] + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json new file mode 100644 index 000000000000..88eb1bfef43b --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "environmentName": "testcontainerenv", + "managedCertificateName": "certificate-firendly-name", + "api-version": "2022-11-01-preview", + "managedCertificateEnvelope": { + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/managedCertificates/certificate-firendly-name", + "type": "Microsoft.App/ManagedEnvironments/managedCertificates", + "location": "East US", + "properties": { + "subjectName": "CN=my-subject-name.company.country.net", + "provisioningState": "Succeeded", + "domainControlValidation": "CNAME" + } + } + } + } +}