From 98de6eb9157ffdd9bcdbe55fdc6e2c29c0f9fba5 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Tue, 18 Jan 2022 17:19:20 +0000 Subject: [PATCH 01/34] add support for Custom domains and certificates --- .../2022-01-01-preview/ContainerApps.json | 197 ++++++++++++++++++ 1 file changed, 197 insertions(+) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index 3546171f470c..d55cf9f9e3a7 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -309,6 +309,53 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}/analyzeCustomHostName": { + "get": { + "tags" : [ + "ContainerApps" + ], + "summary" : "Analyzes a custom hostname for a Container App", + "operationId": "ContainerAppsRevisions_AnalyzeCustomHostName", + "parameters" :[ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "containerAppName", + "in": "path", + "description": "Name of the Container App.", + "required": true, + "type": "string" + }, + { + "name": "hostName", + "in": "query", + "description": "Custom hostname.", + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CustomHostnameAnalysisResult" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + } + } } }, "definitions": { @@ -489,6 +536,13 @@ "revisionName" ] }, + "hostNameSslStates": { + "description": "Hostname SSL states used to manage the SSL bindings for Container Apps' hostnames.", + "type": "array", + "items": { + "$ref": "./CommonDefinitions.json#/definitions/HostNameSslState" + } + }, "allowInsecure": { "description": "Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections", "type": "boolean" @@ -551,6 +605,149 @@ "type": "boolean" } } + }, + "HostNameSslState": { + "description": "SSL-enabled hostname.", + "type": "object", + "properties": { + "name": { + "description": "Hostname.", + "type": "string" + }, + "revisionName": { + "description": "Revision to which this hostname ssl state applies.", + "type": "string" + }, + "sslState": { + "description": "SSL type.", + "enum": [ + "Disabled", + "SniEnabled", + "IpBasedEnabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SslState", + "modelAsString": false + } + }, + "virtualIP": { + "description": "Virtual IP address assigned to the hostname if IP based SSL is enabled.", + "type": "string" + }, + "thumbprint": { + "description": "SSL certificate thumbprint.", + "type": "string" + }, + "certificateId": { + "description": "Resource Id of the Certificate", + "type": "string" + }, + "hostType": { + "description": "Indicates whether the hostname is a standard or repository hostname.", + "enum": [ + "Standard", + "Repository" + ], + "type": "string", + "x-ms-enum": { + "name": "HostType", + "modelAsString": false + } + } + } + }, + "CustomHostnameAnalysisResult": { + "description": "Custom domain analysis.", + "type": "object", + "allOf": [ + { + "$ref": "./CommonDefinitions.json#/definitions/ProxyOnlyResource" + } + ], + "properties": { + "properties": { + "description": "CustomHostnameAnalysisResult resource specific properties", + "type": "object", + "properties": { + "isHostnameAlreadyVerified": { + "description": "true if hostname is already verified; otherwise, false.", + "type": "boolean", + "readOnly": true + }, + "customDomainVerificationTest": { + "description": "DNS verification test result.", + "enum": [ + "Passed", + "Failed", + "Skipped" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "DnsVerificationTestResult", + "modelAsString": false + } + }, + "customDomainVerificationFailureInfo": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse", + "description": "Raw failure information if DNS verification fails.", + "readOnly": true + }, + "hasConflictOnManagedEnvironment": { + "description": "true if there is a conflict on the Container App's managed environment; otherwise, false.", + "type": "boolean", + "readOnly": true + }, + "hasConflictAcrossSubscription": { + "description": "true if there is a conflict across subscriptions; otherwise, false.", + "type": "boolean", + "readOnly": true + }, + "conflictingAppResourceId": { + "description": "Name of the conflicting Container App on the Managed Environment if it's within the same subscription.", + "type": "string", + "readOnly": true + }, + "cNameRecords": { + "description": "CName records visible for this hostname.", + "type": "array", + "items": { + "type": "string" + } + }, + "txtRecords": { + "description": "TXT records visible for this hostname.", + "type": "array", + "items": { + "type": "string" + } + }, + "aRecords": { + "description": "A records visible for this hostname.", + "type": "array", + "items": { + "type": "string" + } + }, + "alternateCNameRecords": { + "description": "Alternate CName records visible for this hostname.", + "type": "array", + "items": { + "type": "string" + } + }, + "alternateTxtRecords": { + "description": "Alternate TXT records visible for this hostname.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "x-ms-client-flatten": true + } + } } }, "securityDefinitions": { From 8f6cb60c7cfd4df2c0fa715bb8c230416829a546 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Tue, 18 Jan 2022 17:20:42 +0000 Subject: [PATCH 02/34] add Certificates --- .../2022-01-01-preview/Certificates.json | 527 ++++++++++++++++++ 1 file changed, 527 insertions(+) create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/Certificates.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/Certificates.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/Certificates.json new file mode 100644 index 000000000000..26016911ee85 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/Certificates.json @@ -0,0 +1,527 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-01-01-preview", + "title": "Certificates API Client" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.App/certificates": { + "get": { + "tags": [ + "Certificates" + ], + "summary": "Get the Certificates in a given subscription.", + "operationId": "Certificates_ListBySubscription", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CertificateCollection" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "List Certificates by subscription": { + "$ref": "./examples/Certificates_ListBySubscription.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/certificates": { + "get": { + "tags": [ + "Certificates" + ], + "summary": "Get the Certificates in a given resource group.", + "operationId": "Certificates_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CertificateCollection" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "List Container Apps by resource group": { + "$ref": "./examples/Certificates_ListByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/certificates/{name}": { + "get": { + "tags": [ + "Certificates" + ], + "summary": "Get the properties of a Certificate.", + "operationId": "Certificates_Get", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Certificate.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "#/definitions/Certificate" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Get Container App": { + "$ref": "./examples/Certificates_Get.json" + } + } + }, + "put": { + "tags": [ + "Certificates" + ], + "summary": "Create or update a Certificate.", + "description": "Create or update a Certificate.", + "operationId": "Certificates_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Certificate.", + "required": true, + "type": "string" + }, + { + "name": "certificateEnvelope", + "in": "body", + "description": "Properties used to create a Certificate", + "required": true, + "schema": { + "$ref": "#/definitions/Certificate" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "No change performed on the Certificate.", + "schema": { + "$ref": "#/definitions/Certificate" + } + }, + "201": { + "description": "Certificate create or update has been started.", + "schema": { + "$ref": "#/definitions/ContainerApp" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Create or Update Certificate": { + "$ref": "./examples/Certificate_CreateOrUpdate.json" + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "Certificates" + ], + "summary": "Delete a Certificate.", + "description": "Delete a Certificate.", + "operationId": "Certificates_Delete", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Certificate.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Certificate deleted successfully." + }, + "202": { + "description": "Delete operation is in progress." + }, + "204": { + "description": "Certificate does not exist." + }, + "409": { + "description": "Conflict. Certificate is in use by one or more Container Apps" + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete Container App": { + "$ref": "./examples/Certificates_Delete.json" + } + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "Certificates" + ], + "summary": "Update properties of a Certificate", + "description": "Patches a Certificate. Currently only patching of tags is supported", + "operationId": "Certificates_Update", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Certificate.", + "required": true, + "type": "string" + }, + { + "name": "certificateAppEnvelope", + "in": "body", + "required": true, + "description": "Properties of a Certificate that need to be updated", + "schema": { + "$ref": "#/definitions/CertificatePatch" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Certificate updated successfully.", + "schema": { + "$ref": "#/definitions/Certificate" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Patch Container App": { + "$ref": "./examples/Certificate_Patch.json" + } + } + } + } + }, + "definitions": { + "Certificate": { + "description": "Certificate.", + "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": [ + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CertificateProvisioningState", + "modelAsString": true + } + }, + "managedEnvironmentId": { + "description": "Resource ID of the Certificates's environment.", + "type": "string", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "password": { + "description": "Certificate password.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "friendlyName": { + "description": "Friendly name of the certificate.", + "type": "string", + "readOnly": true + }, + "subjectName": { + "description": "Subject name of the certificate.", + "type": "string", + "readOnly": true + }, + "hostNames": { + "description": "Host names the certificate applies to.", + "type": "array", + "items": { + "type": "string" + } + }, + "pfxBlob": { + "format": "byte", + "description": "Pfx blob.", + "type": "string" + }, + "containerAppName": { + "description": "Container App name.", + "type": "string", + "readOnly": true + }, + "selfLink": { + "description": "Self link.", + "type": "string", + "readOnly": true + }, + "issuer": { + "description": "Certificate issuer.", + "type": "string", + "readOnly": true + }, + "issueDate": { + "format": "date-time", + "description": "Certificate issue Date.", + "type": "string", + "readOnly": true + }, + "expirationDate": { + "format": "date-time", + "description": "Certificate expiration date.", + "type": "string", + "readOnly": true + }, + "thumbprint": { + "description": "Certificate thumbprint.", + "type": "string", + "readOnly": true + }, + "valid": { + "description": "Is the certificate valid?.", + "type": "boolean", + "readOnly": true + }, + "cerBlob": { + "format": "byte", + "description": "Raw bytes of .cer file", + "type": "string", + "readOnly": true + }, + "publicKeyHash": { + "description": "Public key hash.", + "type": "string", + "readOnly": true + }, + "keyVaultId": { + "description": "Key Vault Csm resource Id.", + "type": "string" + }, + "keyVaultSecretName": { + "description": "Key Vault secret name.", + "type": "string" + }, + "keyVaultSecretStatus": { + "description": "Status of the Key Vault secret.", + "enum": [ + "Initialized", + "WaitingOnCertificateOrder", + "Succeeded", + "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", + "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", + "KeyVaultSecretDoesNotExist", + "UnknownError", + "ExternalPrivateKey", + "Unknown" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "KeyVaultSecretStatus", + "modelAsString": false + } + }, + "canonicalName": { + "description": "CNAME of the certificate to be issued via free certificate", + "type": "string" + }, + "domainValidationMethod": { + "description": "Method of domain validation for free cert", + "type": "string" + } + }, + "x-ms-client-flatten": true + } + } + }, + "ContainerAppCollection": { + "description": "Certificate collection ARM resource.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/Certificate" + } + }, + "nextLink": { + "description": "Link to next page of resources.", + "type": "string", + "readOnly": true + } + } + }, + "CertificatePatch": { + "description": "Certificate Patch.", + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Certificate-specific metadata in the form of key-value pairs." + } + } + } + }, + "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" + ] + } + ] +} From 925c9c6a57bee9b70ff56523f6efe5fa294c7a32 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Tue, 18 Jan 2022 23:40:17 +0000 Subject: [PATCH 03/34] Ccertificate as child resource of Managed Env. --- .../2022-01-01-preview/Certificates.json | 527 ------------------ .../2022-01-01-preview/ContainerApps.json | 22 +- .../ManagedEnvironments.json | 410 ++++++++++++++ 3 files changed, 421 insertions(+), 538 deletions(-) delete mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/Certificates.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/Certificates.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/Certificates.json deleted file mode 100644 index 26016911ee85..000000000000 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/Certificates.json +++ /dev/null @@ -1,527 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2022-01-01-preview", - "title": "Certificates API Client" - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.App/certificates": { - "get": { - "tags": [ - "Certificates" - ], - "summary": "Get the Certificates in a given subscription.", - "operationId": "Certificates_ListBySubscription", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/CertificateCollection" - } - }, - "default": { - "description": "Error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "List Certificates by subscription": { - "$ref": "./examples/Certificates_ListBySubscription.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/certificates": { - "get": { - "tags": [ - "Certificates" - ], - "summary": "Get the Certificates in a given resource group.", - "operationId": "Certificates_ListByResourceGroup", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/CertificateCollection" - } - }, - "default": { - "description": "Common error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "List Container Apps by resource group": { - "$ref": "./examples/Certificates_ListByResourceGroup.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/certificates/{name}": { - "get": { - "tags": [ - "Certificates" - ], - "summary": "Get the properties of a Certificate.", - "operationId": "Certificates_Get", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "name", - "in": "path", - "description": "Name of the Certificate.", - "required": true, - "type": "string" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK.", - "schema": { - "$ref": "#/definitions/Certificate" - } - }, - "404": { - "description": "Not found.", - "x-ms-error-response": true - }, - "default": { - "description": "Common error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "Get Container App": { - "$ref": "./examples/Certificates_Get.json" - } - } - }, - "put": { - "tags": [ - "Certificates" - ], - "summary": "Create or update a Certificate.", - "description": "Create or update a Certificate.", - "operationId": "Certificates_CreateOrUpdate", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "name", - "in": "path", - "description": "Name of the Certificate.", - "required": true, - "type": "string" - }, - { - "name": "certificateEnvelope", - "in": "body", - "description": "Properties used to create a Certificate", - "required": true, - "schema": { - "$ref": "#/definitions/Certificate" - } - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "No change performed on the Certificate.", - "schema": { - "$ref": "#/definitions/Certificate" - } - }, - "201": { - "description": "Certificate create or update has been started.", - "schema": { - "$ref": "#/definitions/ContainerApp" - } - }, - "default": { - "description": "Common error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "Create or Update Certificate": { - "$ref": "./examples/Certificate_CreateOrUpdate.json" - } - }, - "x-ms-long-running-operation": true - }, - "delete": { - "tags": [ - "Certificates" - ], - "summary": "Delete a Certificate.", - "description": "Delete a Certificate.", - "operationId": "Certificates_Delete", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "name", - "in": "path", - "description": "Name of the Certificate.", - "required": true, - "type": "string" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Certificate deleted successfully." - }, - "202": { - "description": "Delete operation is in progress." - }, - "204": { - "description": "Certificate does not exist." - }, - "409": { - "description": "Conflict. Certificate is in use by one or more Container Apps" - }, - "default": { - "description": "Common error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "Delete Container App": { - "$ref": "./examples/Certificates_Delete.json" - } - }, - "x-ms-long-running-operation": true - }, - "patch": { - "tags": [ - "Certificates" - ], - "summary": "Update properties of a Certificate", - "description": "Patches a Certificate. Currently only patching of tags is supported", - "operationId": "Certificates_Update", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "name", - "in": "path", - "description": "Name of the Certificate.", - "required": true, - "type": "string" - }, - { - "name": "certificateAppEnvelope", - "in": "body", - "required": true, - "description": "Properties of a Certificate that need to be updated", - "schema": { - "$ref": "#/definitions/CertificatePatch" - } - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Certificate updated successfully.", - "schema": { - "$ref": "#/definitions/Certificate" - } - }, - "default": { - "description": "Common error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "Patch Container App": { - "$ref": "./examples/Certificate_Patch.json" - } - } - } - } - }, - "definitions": { - "Certificate": { - "description": "Certificate.", - "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": [ - "InProgress", - "Succeeded", - "Failed", - "Canceled" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "CertificateProvisioningState", - "modelAsString": true - } - }, - "managedEnvironmentId": { - "description": "Resource ID of the Certificates's environment.", - "type": "string", - "x-ms-mutability": [ - "create", - "read" - ] - }, - "password": { - "description": "Certificate password.", - "type": "string", - "x-ms-mutability": [ - "create" - ] - }, - "friendlyName": { - "description": "Friendly name of the certificate.", - "type": "string", - "readOnly": true - }, - "subjectName": { - "description": "Subject name of the certificate.", - "type": "string", - "readOnly": true - }, - "hostNames": { - "description": "Host names the certificate applies to.", - "type": "array", - "items": { - "type": "string" - } - }, - "pfxBlob": { - "format": "byte", - "description": "Pfx blob.", - "type": "string" - }, - "containerAppName": { - "description": "Container App name.", - "type": "string", - "readOnly": true - }, - "selfLink": { - "description": "Self link.", - "type": "string", - "readOnly": true - }, - "issuer": { - "description": "Certificate issuer.", - "type": "string", - "readOnly": true - }, - "issueDate": { - "format": "date-time", - "description": "Certificate issue Date.", - "type": "string", - "readOnly": true - }, - "expirationDate": { - "format": "date-time", - "description": "Certificate expiration date.", - "type": "string", - "readOnly": true - }, - "thumbprint": { - "description": "Certificate thumbprint.", - "type": "string", - "readOnly": true - }, - "valid": { - "description": "Is the certificate valid?.", - "type": "boolean", - "readOnly": true - }, - "cerBlob": { - "format": "byte", - "description": "Raw bytes of .cer file", - "type": "string", - "readOnly": true - }, - "publicKeyHash": { - "description": "Public key hash.", - "type": "string", - "readOnly": true - }, - "keyVaultId": { - "description": "Key Vault Csm resource Id.", - "type": "string" - }, - "keyVaultSecretName": { - "description": "Key Vault secret name.", - "type": "string" - }, - "keyVaultSecretStatus": { - "description": "Status of the Key Vault secret.", - "enum": [ - "Initialized", - "WaitingOnCertificateOrder", - "Succeeded", - "CertificateOrderFailed", - "OperationNotPermittedOnKeyVault", - "AzureServiceUnauthorizedToAccessKeyVault", - "KeyVaultDoesNotExist", - "KeyVaultSecretDoesNotExist", - "UnknownError", - "ExternalPrivateKey", - "Unknown" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "KeyVaultSecretStatus", - "modelAsString": false - } - }, - "canonicalName": { - "description": "CNAME of the certificate to be issued via free certificate", - "type": "string" - }, - "domainValidationMethod": { - "description": "Method of domain validation for free cert", - "type": "string" - } - }, - "x-ms-client-flatten": true - } - } - }, - "ContainerAppCollection": { - "description": "Certificate collection ARM resource.", - "required": [ - "value" - ], - "type": "object", - "properties": { - "value": { - "description": "Collection of resources.", - "type": "array", - "items": { - "$ref": "#/definitions/Certificate" - } - }, - "nextLink": { - "description": "Link to next page of resources.", - "type": "string", - "readOnly": true - } - } - }, - "CertificatePatch": { - "description": "Certificate Patch.", - "type": "object", - "properties": { - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Certificate-specific metadata in the form of key-value pairs." - } - } - } - }, - "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/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index d55cf9f9e3a7..fad04cc32c2e 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -536,11 +536,11 @@ "revisionName" ] }, - "hostNameSslStates": { - "description": "Hostname SSL states used to manage the SSL bindings for Container Apps' hostnames.", + "customDomains": { + "description": "custom domain bindings for Container Apps' hostnames.", "type": "array", "items": { - "$ref": "./CommonDefinitions.json#/definitions/HostNameSslState" + "$ref": "./CommonDefinitions.json#/definitions/CustomDomain" } }, "allowInsecure": { @@ -606,8 +606,8 @@ } } }, - "HostNameSslState": { - "description": "SSL-enabled hostname.", + "CustomDomain": { + "description": "Custom Domain of a Container App", "type": "object", "properties": { "name": { @@ -615,11 +615,11 @@ "type": "string" }, "revisionName": { - "description": "Revision to which this hostname ssl state applies.", + "description": "Revision to which this Custom Domain applies.", "type": "string" }, - "sslState": { - "description": "SSL type.", + "bindingType": { + "description": "Custom Domain binding type.", "enum": [ "Disabled", "SniEnabled", @@ -627,16 +627,16 @@ ], "type": "string", "x-ms-enum": { - "name": "SslState", + "name": "bindingType", "modelAsString": false } }, "virtualIP": { - "description": "Virtual IP address assigned to the hostname if IP based SSL is enabled.", + "description": "Virtual IP address assigned to the hostname if IP based binding is enabled.", "type": "string" }, "thumbprint": { - "description": "SSL certificate thumbprint.", + "description": "Certificate thumbprint.", "type": "string" }, "certificateId": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index 840bd906a7df..eec281b7b536 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -308,6 +308,239 @@ } } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates": { + "get": { + "tags": [ + "ManagedEnvironments" + ], + "summary": "Get the Certificates in a given managed environment.", + "operationId": "Certificates_ListByManagedEnvironment", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "managedEnvironmentName", + "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": "#/definitions/CertificateCollection" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "List Certificates by subscription": { + "$ref": "./examples/Certificates_ListByManagedEnvironment.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironment/{managedEnvironmentName}/certificates/{name}": { + "get": { + "tags": [ + "Certificates" + ], + "summary": "Get the properties of a Certificate.", + "operationId": "Certificates_Get", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "managedEnvironmentName", + "in": "path", + "description": "Name of the Managed Environment.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Certificate.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "#/definitions/Certificate" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Get Container App": { + "$ref": "./examples/Certificates_Get.json" + } + } + }, + "put": { + "tags": [ + "Certificates" + ], + "summary": "Create or update a Certificate.", + "description": "Create or update a Certificate.", + "operationId": "Certificates_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "managedEnvironmentName", + "in": "path", + "description": "Name of the Managed Environment.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Certificate.", + "required": true, + "type": "string" + }, + { + "name": "certificateEnvelope", + "in": "body", + "description": "Properties used to create a Certificate", + "required": true, + "schema": { + "$ref": "#/definitions/Certificate" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "No change performed on the Certificate.", + "schema": { + "$ref": "#/definitions/Certificate" + } + }, + "201": { + "description": "Certificate create or update has been started.", + "schema": { + "$ref": "#/definitions/ContainerApp" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Create or Update Certificate": { + "$ref": "./examples/Certificate_CreateOrUpdate.json" + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "Certificates" + ], + "summary": "Delete a Certificate.", + "description": "Delete a Certificate.", + "operationId": "Certificates_Delete", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "managedEnvironmentName", + "in": "path", + "description": "Name of the Managed Environment.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Certificate.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Certificate deleted successfully." + }, + "202": { + "description": "Delete operation is in progress." + }, + "204": { + "description": "Certificate does not exist." + }, + "409": { + "description": "Conflict. Certificate is in use by one or more Container Apps" + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete Container App": { + "$ref": "./examples/Certificates_Delete.json" + } + }, + "x-ms-long-running-operation": true + } } }, "definitions": { @@ -501,6 +734,183 @@ "x-ms-secret": true } } + }, + "Certificate": { + "description": "Certificate 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": [ + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CertificateProvisioningState", + "modelAsString": true + } + }, + "managedEnvironmentId": { + "description": "Resource ID of the Certificates's environment.", + "type": "string", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "password": { + "description": "Certificate password.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "friendlyName": { + "description": "Friendly name of the certificate.", + "type": "string", + "readOnly": true + }, + "subjectName": { + "description": "Subject name of the certificate.", + "type": "string", + "readOnly": true + }, + "hostNames": { + "description": "Host names the certificate applies to.", + "type": "array", + "items": { + "type": "string" + } + }, + "pfxBlob": { + "format": "byte", + "description": "Pfx blob.", + "type": "string" + }, + "containerAppName": { + "description": "Container App name.", + "type": "string", + "readOnly": true + }, + "selfLink": { + "description": "Self link.", + "type": "string", + "readOnly": true + }, + "issuer": { + "description": "Certificate issuer.", + "type": "string", + "readOnly": true + }, + "issueDate": { + "format": "date-time", + "description": "Certificate issue Date.", + "type": "string", + "readOnly": true + }, + "expirationDate": { + "format": "date-time", + "description": "Certificate expiration date.", + "type": "string", + "readOnly": true + }, + "thumbprint": { + "description": "Certificate thumbprint.", + "type": "string", + "readOnly": true + }, + "valid": { + "description": "Is the certificate valid?.", + "type": "boolean", + "readOnly": true + }, + "cerBlob": { + "format": "byte", + "description": "Raw bytes of .cer file", + "type": "string", + "readOnly": true + }, + "publicKeyHash": { + "description": "Public key hash.", + "type": "string", + "readOnly": true + }, + "keyVaultId": { + "description": "Key Vault Csm resource Id.", + "type": "string" + }, + "keyVaultSecretName": { + "description": "Key Vault secret name.", + "type": "string" + }, + "keyVaultSecretStatus": { + "description": "Status of the Key Vault secret.", + "enum": [ + "Initialized", + "WaitingOnCertificateOrder", + "Succeeded", + "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", + "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", + "KeyVaultSecretDoesNotExist", + "UnknownError", + "ExternalPrivateKey", + "Unknown" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "KeyVaultSecretStatus", + "modelAsString": false + } + }, + "canonicalName": { + "description": "CNAME of the certificate to be issued via free certificate", + "type": "string" + }, + "domainValidationMethod": { + "description": "Method of domain validation for free cert", + "type": "string" + } + }, + "x-ms-client-flatten": true + } + } + }, + "CertificateCollection": { + "description": "Certificate collection ARM resource.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/Certificate" + } + }, + "nextLink": { + "description": "Link to next page of resources.", + "type": "string", + "readOnly": true + } + } } }, "securityDefinitions": { From 6e3b5a430acef690955b622c1dcad4fef5d221c2 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Tue, 18 Jan 2022 23:52:41 +0000 Subject: [PATCH 04/34] Support default custom domain --- .../preview/2022-01-01-preview/ContainerApps.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index fad04cc32c2e..fcf7ad22c298 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -536,6 +536,13 @@ "revisionName" ] }, + "defaultCustomDomain": { + "description": "Custom domain to be used by default for the Active revision", + "type": "object", + "schema": { + "$ref": "#/definitions/CustomDomain" + } + }, "customDomains": { "description": "custom domain bindings for Container Apps' hostnames.", "type": "array", From b716fd1756871d7e8c75659425385b36739a5bc7 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Wed, 19 Jan 2022 00:27:57 +0000 Subject: [PATCH 05/34] PUT/DELETE certificate are not long-running --- .../preview/2022-01-01-preview/ManagedEnvironments.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index eec281b7b536..15c2b1ab7b90 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -479,8 +479,7 @@ "Create or Update Certificate": { "$ref": "./examples/Certificate_CreateOrUpdate.json" } - }, - "x-ms-long-running-operation": true + } }, "delete": { "tags": [ @@ -538,8 +537,7 @@ "Delete Container App": { "$ref": "./examples/Certificates_Delete.json" } - }, - "x-ms-long-running-operation": true + } } } }, From d47481be8a9891f624daee79f724073dd985d895 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Wed, 19 Jan 2022 00:46:31 +0000 Subject: [PATCH 06/34] Add Custom Domain Verification Id --- .../preview/2022-01-01-preview/ContainerApps.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index fcf7ad22c298..0089a4de9484 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -447,6 +447,11 @@ "type": "string", "readOnly": true }, + "customDomainVerificationId": { + "description": "Id used to verify domain name ownership", + "type": "string", + "readOnly": true + }, "configuration": { "$ref": "#/definitions/Configuration", "description": "Non versioned Container App configuration properties." From 436f0b7c29cd08a5d9cffd10a00f076c125b6b9f Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Mon, 24 Jan 2022 17:36:55 +0000 Subject: [PATCH 07/34] domains for all revisions and adding examples --- .../examples/ContainerApps_CreateOrUpdate.json | 14 +++++++++++++- .../examples/ManagedEnvironments_Get.json | 16 +++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json index 1b05daa84158..82d401dfdb5f 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json @@ -11,7 +11,19 @@ "configuration": { "ingress": { "external": true, - "targetPort": 3000 + "targetPort": 3000, + "customDomains": [ + { + "name": "www.my-name.com", + "bindingType": "SniEnabled", + "certificateName": "my-certificate-for-my-name-dot-com" + }, + { + "name": "www.my--other-name.com", + "bindingType": "SniEnabled", + "certificateName": "my-certificate-for-my-other-name-dot-com" + } + ] } }, "template": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json index 24ccc069bae7..186d0831ce2a 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json @@ -19,7 +19,21 @@ "deploymentErrors": null, "internalLoadBalancerEnabled": false, "defaultDomain": "jlaw-demo1.k4apps.io", - "staticIp": "20.42.33.145" + "staticIp": "20.42.33.145", + "certificates": [ + { + "password":"private key password", + "name":"certificate-firendly-name", + "subjectName":"my.custom.subject.name.example", + "value" :"PFX-or-PEM-blob" + }, + { + "password":"private key password", + "name":"other-certificate-firendly-name", + "subjectName":"my.custom..different.subject.name.example", + "value" :"PFX-or-PEM-blob" + } + ] } } } From b00c1f06ee4766cd9fb72956f45122f26ef4dfe9 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Mon, 24 Jan 2022 17:43:47 +0000 Subject: [PATCH 08/34] missing examples --- .../2022-01-01-preview/ContainerApps.json | 21 +- .../ManagedEnvironments.json | 303 +----------------- .../examples/ContainerApps_Get.json | 1 + .../ContainerApps_ListByResourceGroup.json | 14 +- .../ContainerApps_ListBySubscription.json | 14 +- .../ManagedEnvironments_CreateOrUpdate.json | 16 +- ...nagedEnvironments_ListByResourceGroup.json | 19 +- ...anagedEnvironments_ListBySubscription.json | 19 +- .../examples/ManagedEnvironments_Patch.json | 16 +- 9 files changed, 108 insertions(+), 315 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index 0089a4de9484..74570e737b8b 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -541,18 +541,11 @@ "revisionName" ] }, - "defaultCustomDomain": { - "description": "Custom domain to be used by default for the Active revision", - "type": "object", - "schema": { - "$ref": "#/definitions/CustomDomain" - } - }, "customDomains": { "description": "custom domain bindings for Container Apps' hostnames.", "type": "array", "items": { - "$ref": "./CommonDefinitions.json#/definitions/CustomDomain" + "$ref": "#/definitions/CustomDomain" } }, "allowInsecure": { @@ -626,10 +619,6 @@ "description": "Hostname.", "type": "string" }, - "revisionName": { - "description": "Revision to which this Custom Domain applies.", - "type": "string" - }, "bindingType": { "description": "Custom Domain binding type.", "enum": [ @@ -647,12 +636,8 @@ "description": "Virtual IP address assigned to the hostname if IP based binding is enabled.", "type": "string" }, - "thumbprint": { - "description": "Certificate thumbprint.", - "type": "string" - }, - "certificateId": { - "description": "Resource Id of the Certificate", + "certificateName": { + "description": "Name of the Certificate to be bound to this hostname. Must exist in the Managed Environment.", "type": "string" }, "hostType": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index 15c2b1ab7b90..ae8f8bd04a3b 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -308,237 +308,6 @@ } } } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates": { - "get": { - "tags": [ - "ManagedEnvironments" - ], - "summary": "Get the Certificates in a given managed environment.", - "operationId": "Certificates_ListByManagedEnvironment", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "managedEnvironmentName", - "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": "#/definitions/CertificateCollection" - } - }, - "default": { - "description": "Error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "List Certificates by subscription": { - "$ref": "./examples/Certificates_ListByManagedEnvironment.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironment/{managedEnvironmentName}/certificates/{name}": { - "get": { - "tags": [ - "Certificates" - ], - "summary": "Get the properties of a Certificate.", - "operationId": "Certificates_Get", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "managedEnvironmentName", - "in": "path", - "description": "Name of the Managed Environment.", - "required": true, - "type": "string" - }, - { - "name": "name", - "in": "path", - "description": "Name of the Certificate.", - "required": true, - "type": "string" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK.", - "schema": { - "$ref": "#/definitions/Certificate" - } - }, - "404": { - "description": "Not found.", - "x-ms-error-response": true - }, - "default": { - "description": "Common error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "Get Container App": { - "$ref": "./examples/Certificates_Get.json" - } - } - }, - "put": { - "tags": [ - "Certificates" - ], - "summary": "Create or update a Certificate.", - "description": "Create or update a Certificate.", - "operationId": "Certificates_CreateOrUpdate", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "managedEnvironmentName", - "in": "path", - "description": "Name of the Managed Environment.", - "required": true, - "type": "string" - }, - { - "name": "name", - "in": "path", - "description": "Name of the Certificate.", - "required": true, - "type": "string" - }, - { - "name": "certificateEnvelope", - "in": "body", - "description": "Properties used to create a Certificate", - "required": true, - "schema": { - "$ref": "#/definitions/Certificate" - } - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "No change performed on the Certificate.", - "schema": { - "$ref": "#/definitions/Certificate" - } - }, - "201": { - "description": "Certificate create or update has been started.", - "schema": { - "$ref": "#/definitions/ContainerApp" - } - }, - "default": { - "description": "Common error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "Create or Update Certificate": { - "$ref": "./examples/Certificate_CreateOrUpdate.json" - } - } - }, - "delete": { - "tags": [ - "Certificates" - ], - "summary": "Delete a Certificate.", - "description": "Delete a Certificate.", - "operationId": "Certificates_Delete", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "managedEnvironmentName", - "in": "path", - "description": "Name of the Managed Environment.", - "required": true, - "type": "string" - }, - { - "name": "name", - "in": "path", - "description": "Name of the Certificate.", - "required": true, - "type": "string" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Certificate deleted successfully." - }, - "202": { - "description": "Delete operation is in progress." - }, - "204": { - "description": "Certificate does not exist." - }, - "409": { - "description": "Conflict. Certificate is in use by one or more Container Apps" - }, - "default": { - "description": "Common error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "Delete Container App": { - "$ref": "./examples/Certificates_Delete.json" - } - } - } } }, "definitions": { @@ -674,6 +443,13 @@ "appLogsConfiguration": { "$ref": "#/definitions/AppLogsConfiguration", "description": "Cluster configuration which enables the log daemon to export\napp logs to a destination. Currently only \"log-analytics\" is\nsupported" + }, + "certificates": { + "description": "Hostname binding Certificates available to container apps in the Managed Environment", + "type": "array", + "items": { + "$ref": "#/definitions/Certificate" + } } }, "x-ms-client-flatten": true @@ -749,10 +525,8 @@ "provisioningState": { "description": "Provisioning state of the Certificate.", "enum": [ - "InProgress", "Succeeded", - "Failed", - "Canceled" + "Failed" ], "type": "string", "readOnly": true, @@ -761,14 +535,6 @@ "modelAsString": true } }, - "managedEnvironmentId": { - "description": "Resource ID of the Certificates's environment.", - "type": "string", - "x-ms-mutability": [ - "create", - "read" - ] - }, "password": { "description": "Certificate password.", "type": "string", @@ -776,7 +542,7 @@ "create" ] }, - "friendlyName": { + "name": { "description": "Friendly name of the certificate.", "type": "string", "readOnly": true @@ -786,27 +552,13 @@ "type": "string", "readOnly": true }, - "hostNames": { - "description": "Host names the certificate applies to.", - "type": "array", - "items": { - "type": "string" - } - }, - "pfxBlob": { + "value": { "format": "byte", - "description": "Pfx blob.", - "type": "string" - }, - "containerAppName": { - "description": "Container App name.", - "type": "string", - "readOnly": true - }, - "selfLink": { - "description": "Self link.", + "description": "PFX or PEM blob", "type": "string", - "readOnly": true + "x-ms-mutability": [ + "create" + ] }, "issuer": { "description": "Certificate issuer.", @@ -835,12 +587,6 @@ "type": "boolean", "readOnly": true }, - "cerBlob": { - "format": "byte", - "description": "Raw bytes of .cer file", - "type": "string", - "readOnly": true - }, "publicKeyHash": { "description": "Public key hash.", "type": "string", @@ -888,27 +634,6 @@ "x-ms-client-flatten": true } } - }, - "CertificateCollection": { - "description": "Certificate collection ARM resource.", - "required": [ - "value" - ], - "type": "object", - "properties": { - "value": { - "description": "Collection of resources.", - "type": "array", - "items": { - "$ref": "#/definitions/Certificate" - } - }, - "nextLink": { - "description": "Link to next page of resources.", - "type": "string", - "readOnly": true - } - } } }, "securityDefinitions": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json index 2194863d1c4b..e7e227e45b3f 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json @@ -23,6 +23,7 @@ "external": true, "targetPort": 3000, "transport": "auto" + //add custom domain binding here } }, "template": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json index 85c441949e13..8982cc53c029 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json @@ -23,7 +23,19 @@ "fqdn": "testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io", "external": true, "targetPort": 3000, - "transport": "auto" + "transport": "auto", + "customDomains": [ + { + "name": "www.my-name.com", + "bindingType": "SniEnabled", + "certificateName": "my-certificate-for-my-name-dot-com" + }, + { + "name": "www.my--other-name.com", + "bindingType": "SniEnabled", + "certificateName": "my-certificate-for-my-other-name-dot-com" + } + ] } }, "template": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json index 2e9fd134a9aa..fa6281d8cb60 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json @@ -22,7 +22,19 @@ "fqdn": "testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io", "external": true, "targetPort": 3000, - "transport": "auto" + "transport": "auto", + "customDomains": [ + { + "name": "www.my-name.com", + "bindingType": "SniEnabled", + "certificateName": "my-certificate-for-my-name-dot-com" + }, + { + "name": "www.my--other-name.com", + "bindingType": "SniEnabled", + "certificateName": "my-certificate-for-my-other-name-dot-com" + } + ] } }, "template": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json index 640ce9846b09..5698cb0c247b 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json @@ -13,7 +13,21 @@ "customerId": "string", "sharedKey": "string" } - } + }, + "certificates": [ + { + "password":"private key password", + "name":"certificate-firendly-name", + "subjectName":"my.custom.subject.name.example", + "value" :"PFX-or-PEM-blob" + }, + { + "password":"private key password", + "name":"other-certificate-firendly-name", + "subjectName":"my.custom..different.subject.name.example", + "value" :"PFX-or-PEM-blob" + } + ] } } }, diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json index 17aaacf5b93c..5e536d30d46f 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json @@ -20,7 +20,21 @@ "internalLoadBalancerEnabled": false, "defaultDomain": "jlaw-demo1.k4apps.io", "staticIp": "20.42.33.145", - "appLogsConfiguration": null + "appLogsConfiguration": null, + "certificates": [ + { + "password":"private key password", + "name":"certificate-firendly-name", + "subjectName":"my.custom.subject.name.example", + "value" :"PFX-or-PEM-blob" + }, + { + "password":"private key password", + "name":"other-certificate-firendly-name", + "subjectName":"my.custom..different.subject.name.example", + "value" :"PFX-or-PEM-blob" + } + ] } }, { @@ -35,7 +49,8 @@ "internalLoadBalancerEnabled": false, "defaultDomain": "demo1.k4apps.io", "staticIp": "52.142.21.61", - "appLogsConfiguration": null + "appLogsConfiguration": null, + "certificates": null } } ] diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json index 7a482b66afe3..16c424a5d6dd 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json @@ -19,7 +19,21 @@ "internalLoadBalancerEnabled": false, "defaultDomain": "jlaw-demo1.k4apps.io", "staticIp": "20.42.33.145", - "appLogsConfiguration": null + "appLogsConfiguration": null, + "certificates": [ + { + "password":"private key password", + "name":"certificate-firendly-name", + "subjectName":"my.custom.subject.name.example", + "value" :"PFX-or-PEM-blob" + }, + { + "password":"private key password", + "name":"other-certificate-firendly-name", + "subjectName":"my.custom..different.subject.name.example", + "value" :"PFX-or-PEM-blob" + } + ] } }, { @@ -34,7 +48,8 @@ "internalLoadBalancerEnabled": false, "defaultDomain": "demo1.k4apps.io", "staticIp": "52.142.21.61", - "appLogsConfiguration": null + "appLogsConfiguration": null, + "certificates": null } } ] diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json index 360d8a665ddb..f03d3ec52117 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json @@ -33,7 +33,21 @@ "logAnalyticsConfiguration": { "customerId": "string" } - } + }, + "certificates": [ + { + "password":"private key password", + "name":"certificate-firendly-name", + "subjectName":"my.custom.subject.name.example", + "value" :"PFX-or-PEM-blob" + }, + { + "password":"private key password", + "name":"other-certificate-firendly-name", + "subjectName":"my.custom..different.subject.name.example", + "value" :"PFX-or-PEM-blob" + } + ] } } } From e4b0d0f5ebacbdb3321bf1fc8b89995060866a2f Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Mon, 24 Jan 2022 17:49:06 +0000 Subject: [PATCH 09/34] one more missing example --- .../examples/ContainerApps_Get.json | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json index e7e227e45b3f..e3d872d69848 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json @@ -22,8 +22,19 @@ "fqdn": "testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io", "external": true, "targetPort": 3000, - "transport": "auto" - //add custom domain binding here + "transport": "auto", + "customDomains": [ + { + "name": "www.my-name.com", + "bindingType": "SniEnabled", + "certificateName": "my-certificate-for-my-name-dot-com" + }, + { + "name": "www.my--other-name.com", + "bindingType": "SniEnabled", + "certificateName": "my-certificate-for-my-other-name-dot-com" + } + ] } }, "template": { From 86c094e78d3519629507c74398f1cde89a91f563 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Wed, 26 Jan 2022 00:01:29 +0000 Subject: [PATCH 10/34] Examples+missing paths --- .../ManagedEnvironments.json | 565 ++++++++++++++---- .../examples/Certificate_CreateOrUpdate.json | 27 + .../examples/Certificate_Delete.json | 11 + .../examples/Certificate_Get.json | 20 + .../examples/Certificates_CreateOrUpdate.json | 46 ++ .../examples/Certificates_Delete.json | 10 + ...Certificates_ListByManagedEnvironment.json | 33 + .../ContainerApps_CreateOrUpdate.json | 2 +- .../ManagedEnvironments_CreateOrUpdate.json | 50 +- .../examples/ManagedEnvironments_Get.json | 20 +- ...nagedEnvironments_ListByResourceGroup.json | 20 +- ...anagedEnvironments_ListBySubscription.json | 20 +- .../examples/ManagedEnvironments_Patch.json | 20 +- 13 files changed, 697 insertions(+), 147 deletions(-) create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_CreateOrUpdate.json create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index ae8f8bd04a3b..8579ba36a1f4 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -308,6 +308,326 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates": { + "get": { + "tags": [ + "ManagedEnvironments" + ], + "summary": "Get the Certificates in a given managed environment.", + "operationId": "Certificates_ListByManagedEnvironment", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "managedEnvironmentName", + "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": "#/definitions/CertificateCollection" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "List Certificates by Managed Environment": { + "$ref": "./examples/Certificates_ListByManagedEnvironment.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + }, + "put": { + "tags": [ + "ManagedEnvironments" + ], + "summary": "Creates pr updates the Certificates collection in a given managed environment.", + "operationId": "Certificates_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "managedEnvironmentName", + "in": "path", + "description": "Name of the Managed Environment.", + "required": true, + "type": "string" + }, + { + "name": "certificates", + "in": "body", + "description" : "List of Certificates", + "schema": { + "$ref": "#/definitions/CertificateCollection" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CertificateCollection" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Create or Update Certificates in Managed Environment": { + "$ref": "./examples/Certificates_CreateOrUpdate.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + + }, + "delete": { + "tags": [ + "ManagedEnvironments" + ], + "summary": "Deletes all Certificates in a given managed environment.", + "operationId": "Certificates_Delete", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "managedEnvironmentName", + "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": "Delete operation completed" + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete Certificates by Managed Environment": { + "$ref": "./examples/Certificates_Delete.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}": { + "get": { + "tags": [ + "ManagedEnvironments" + ], + "summary": "Get the specified Certificate.", + "operationId": "Certificate_GetByName", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "managedEnvironmentName", + "in": "path", + "description": "Name of the Managed Environment.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Certificate.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Certificate" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Get Certificate": { + "$ref": "./examples/Certificate_Get.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + }, + "put": { + "tags": [ + "ManagedEnvironments" + ], + "summary": "Create or Update a Certificate.", + "operationId": "Certificate_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "managedEnvironmentName", + "in": "path", + "description": "Name of the Managed Environment.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Certificate.", + "required": true, + "type": "string" + }, + { + "name": "certificate", + "in": "body", + "description": "Certificate to be created or updated", + "schema": { + "$ref":"#/definitions/Certificate" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Certificate" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Create or Update Certificate": { + "$ref": "./examples/Certificate_CreateOrUpdate.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + }, + "delete": { + "tags": [ + "ManagedEnvironments" + ], + "summary": "Deletes the specified Certificate.", + "operationId": "Certificate_Delete", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "managedEnvironmentName", + "in": "path", + "description": "Name of the Managed Environment.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Certificate.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Delete operation completed" + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete Certificate": { + "$ref": "./examples/Certificate_Delete.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + + } } }, "definitions": { @@ -512,129 +832,138 @@ "Certificate": { "description": "Certificate 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": { + "provisioningState": { + "description": "Provisioning state of the Certificate.", + "enum": [ + "Succeeded", + "Failed" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CertificateProvisioningState", + "modelAsString": true + } + }, + "password": { + "description": "Certificate password.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "name": { + "description": "Friendly name of the certificate.", + "type": "string", + "readOnly": true + }, + "subjectName": { + "description": "Subject name of the certificate.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "byte", + "description": "PFX or PEM blob", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "issuer": { + "description": "Certificate issuer.", + "type": "string", + "readOnly": true + }, + "issueDate": { + "format": "date-time", + "description": "Certificate issue Date.", + "type": "string", + "readOnly": true + }, + "expirationDate": { + "format": "date-time", + "description": "Certificate expiration date.", + "type": "string", + "readOnly": true + }, + "thumbprint": { + "description": "Certificate thumbprint.", + "type": "string", + "readOnly": true + }, + "valid": { + "description": "Is the certificate valid?.", + "type": "boolean", + "readOnly": true + }, + "publicKeyHash": { + "description": "Public key hash.", + "type": "string", + "readOnly": true + }, + "keyVaultId": { + "description": "Key Vault Csm resource Id.", + "type": "string" + }, + "keyVaultSecretName": { + "description": "Key Vault secret name.", + "type": "string" + }, + "keyVaultSecretStatus": { + "description": "Status of the Key Vault secret.", + "enum": [ + "Initialized", + "WaitingOnCertificateOrder", + "Succeeded", + "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", + "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", + "KeyVaultSecretDoesNotExist", + "UnknownError", + "ExternalPrivateKey", + "Unknown" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "KeyVaultSecretStatus", + "modelAsString": false + } + }, + "canonicalName": { + "description": "CNAME of the certificate to be issued via free certificate", + "type": "string" + }, + "domainValidationMethod": { + "description": "Method of domain validation for free cert", + "type": "string" } + }, + "x-ms-client-flatten": true + }, + "CertificateCollection": { + "description": "Certificate collection ARM resource.", + "required": [ + "value" ], + "type": "object", "properties": { - "properties": { - "description": "Certificate resource specific properties", - "type": "object", - "properties": { - "provisioningState": { - "description": "Provisioning state of the Certificate.", - "enum": [ - "Succeeded", - "Failed" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "CertificateProvisioningState", - "modelAsString": true - } - }, - "password": { - "description": "Certificate password.", - "type": "string", - "x-ms-mutability": [ - "create" - ] - }, - "name": { - "description": "Friendly name of the certificate.", - "type": "string", - "readOnly": true - }, - "subjectName": { - "description": "Subject name of the certificate.", - "type": "string", - "readOnly": true - }, - "value": { - "format": "byte", - "description": "PFX or PEM blob", - "type": "string", - "x-ms-mutability": [ - "create" - ] - }, - "issuer": { - "description": "Certificate issuer.", - "type": "string", - "readOnly": true - }, - "issueDate": { - "format": "date-time", - "description": "Certificate issue Date.", - "type": "string", - "readOnly": true - }, - "expirationDate": { - "format": "date-time", - "description": "Certificate expiration date.", - "type": "string", - "readOnly": true - }, - "thumbprint": { - "description": "Certificate thumbprint.", - "type": "string", - "readOnly": true - }, - "valid": { - "description": "Is the certificate valid?.", - "type": "boolean", - "readOnly": true - }, - "publicKeyHash": { - "description": "Public key hash.", - "type": "string", - "readOnly": true - }, - "keyVaultId": { - "description": "Key Vault Csm resource Id.", - "type": "string" - }, - "keyVaultSecretName": { - "description": "Key Vault secret name.", - "type": "string" - }, - "keyVaultSecretStatus": { - "description": "Status of the Key Vault secret.", - "enum": [ - "Initialized", - "WaitingOnCertificateOrder", - "Succeeded", - "CertificateOrderFailed", - "OperationNotPermittedOnKeyVault", - "AzureServiceUnauthorizedToAccessKeyVault", - "KeyVaultDoesNotExist", - "KeyVaultSecretDoesNotExist", - "UnknownError", - "ExternalPrivateKey", - "Unknown" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "KeyVaultSecretStatus", - "modelAsString": false - } - }, - "canonicalName": { - "description": "CNAME of the certificate to be issued via free certificate", - "type": "string" - }, - "domainValidationMethod": { - "description": "Method of domain validation for free cert", - "type": "string" - } - }, - "x-ms-client-flatten": true + "value": { + "description": "Collection of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/Certificate" + } + }, + "nextLink": { + "description": "Link to next page of resources.", + "type": "string", + "readOnly": true } } - } }, "securityDefinitions": { "azure_auth": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json new file mode 100644 index 000000000000..d46a5329b7b3 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json @@ -0,0 +1,27 @@ +{ + "parameters" :{ + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "managedEnvironmentName": "testcontainerenv", + "certificate": { + "password":"private key password", + "name":"certificate-firendly-name", + "value" :"PFX-or-PEM-blob" + } + }, + "responses": { + "200" :{ + "certificate": { + "name":"certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + } + } + + } + } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json new file mode 100644 index 000000000000..4b93d0f08e60 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json @@ -0,0 +1,11 @@ +{ + "parameters" :{ + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "managedEnvironmentName": "testcontainerenv", + "name": "certificate-firendly-name" + }, + "responses": { + "200" :{} + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json new file mode 100644 index 000000000000..b5b881e4f46b --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json @@ -0,0 +1,20 @@ +{ + "parameters" :{ + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "managedEnvironmentName": "testcontainerenv", + "name": "certificate-firendly-name" + }, + "responses": { + "200": { + "name":"certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_CreateOrUpdate.json new file mode 100644 index 000000000000..524b8cc96121 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_CreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "parameters" :{ + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "managedEnvironmentName": "testcontainerenv", + "name": "certificate-firendly-name", + "certificates": [ + { + "password":"private key password", + "name":"certificate-firendly-name", + "value" :"PFX-or-PEM-blob" + }, + { + "password":"private key password", + "name":"other-certificate-firendly-name", + "value" :"PFX-or-PEM-blob" + } + ] + }, + "responses": { + "200" :{ + "certificates": [ + { + "name":"certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + }, + { + "name":"other-certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-other-subject-name.company.country.net", + "issuer": "Other Issuer Name", + "issueDate" : "2021-12-10T04:00:00Z", + "expirationDate": "2022-12-10T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + } + ] + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json new file mode 100644 index 000000000000..e423dda1c898 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json @@ -0,0 +1,10 @@ +{ + "parameters" :{ + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "managedEnvironmentName": "testcontainerenv" + }, + "responses": { + "200" :{} + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json new file mode 100644 index 000000000000..26a02399ac6c --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json @@ -0,0 +1,33 @@ +{ + "parameters" :{ + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "managedEnvironmentName": "testcontainerenv" + }, + "responses": { + "200" :{ + "certificates": [ + { + "name":"certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + }, + { + "name":"other-certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-other-subject-name.company.country.net", + "issuer": "Other Issuer Name", + "issueDate" : "2021-12-10T04:00:00Z", + "expirationDate": "2022-12-10T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + } + ] + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json index 82d401dfdb5f..e67c2ffa9fdf 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json @@ -19,7 +19,7 @@ "certificateName": "my-certificate-for-my-name-dot-com" }, { - "name": "www.my--other-name.com", + "name": "www.my-other-name.com", "bindingType": "SniEnabled", "certificateName": "my-certificate-for-my-other-name-dot-com" } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json index 5698cb0c247b..570577d8ee80 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json @@ -18,13 +18,11 @@ { "password":"private key password", "name":"certificate-firendly-name", - "subjectName":"my.custom.subject.name.example", "value" :"PFX-or-PEM-blob" }, { "password":"private key password", "name":"other-certificate-firendly-name", - "subjectName":"my.custom..different.subject.name.example", "value" :"PFX-or-PEM-blob" } ] @@ -48,7 +46,29 @@ "logAnalyticsConfiguration": { "customerId": "string" } - } + }, + "certificates": [ + { + "name":"certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + }, + { + "name":"other-certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-other-subject-name.company.country.net", + "issuer": "Other Issuer Name", + "issueDate" : "2021-12-10T04:00:00Z", + "expirationDate": "2022-12-10T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + } + ] } } }, @@ -68,7 +88,29 @@ "logAnalyticsConfiguration": { "customerId": "string" } - } + }, + "certificates": [ + { + "name":"certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + }, + { + "name":"other-certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-other-subject-name.company.country.net", + "issuer": "Other Issuer Name", + "issueDate" : "2021-12-10T04:00:00Z", + "expirationDate": "2022-12-10T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + } + ] } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json index 186d0831ce2a..80b66b286012 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json @@ -22,16 +22,24 @@ "staticIp": "20.42.33.145", "certificates": [ { - "password":"private key password", "name":"certificate-firendly-name", - "subjectName":"my.custom.subject.name.example", - "value" :"PFX-or-PEM-blob" + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" }, { - "password":"private key password", "name":"other-certificate-firendly-name", - "subjectName":"my.custom..different.subject.name.example", - "value" :"PFX-or-PEM-blob" + "provisioningState": "Succeeded", + "subjectName": "my-other-subject-name.company.country.net", + "issuer": "Other Issuer Name", + "issueDate" : "2021-12-10T04:00:00Z", + "expirationDate": "2022-12-10T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" } ] } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json index 5e536d30d46f..d861336d8a6a 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json @@ -23,16 +23,24 @@ "appLogsConfiguration": null, "certificates": [ { - "password":"private key password", "name":"certificate-firendly-name", - "subjectName":"my.custom.subject.name.example", - "value" :"PFX-or-PEM-blob" + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" }, { - "password":"private key password", "name":"other-certificate-firendly-name", - "subjectName":"my.custom..different.subject.name.example", - "value" :"PFX-or-PEM-blob" + "provisioningState": "Succeeded", + "subjectName": "my-other-subject-name.company.country.net", + "issuer": "Other Issuer Name", + "issueDate" : "2021-12-10T04:00:00Z", + "expirationDate": "2022-12-10T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" } ] } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json index 16c424a5d6dd..39a18e01e432 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json @@ -22,16 +22,24 @@ "appLogsConfiguration": null, "certificates": [ { - "password":"private key password", "name":"certificate-firendly-name", - "subjectName":"my.custom.subject.name.example", - "value" :"PFX-or-PEM-blob" + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" }, { - "password":"private key password", "name":"other-certificate-firendly-name", - "subjectName":"my.custom..different.subject.name.example", - "value" :"PFX-or-PEM-blob" + "provisioningState": "Succeeded", + "subjectName": "my-other-subject-name.company.country.net", + "issuer": "Other Issuer Name", + "issueDate" : "2021-12-10T04:00:00Z", + "expirationDate": "2022-12-10T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" } ] } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json index f03d3ec52117..19a149033afc 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json @@ -36,16 +36,24 @@ }, "certificates": [ { - "password":"private key password", "name":"certificate-firendly-name", - "subjectName":"my.custom.subject.name.example", - "value" :"PFX-or-PEM-blob" + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" }, { - "password":"private key password", "name":"other-certificate-firendly-name", - "subjectName":"my.custom..different.subject.name.example", - "value" :"PFX-or-PEM-blob" + "provisioningState": "Succeeded", + "subjectName": "my-other-subject-name.company.country.net", + "issuer": "Other Issuer Name", + "issueDate" : "2021-12-10T04:00:00Z", + "expirationDate": "2022-12-10T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" } ] } From 3fce21cd24251a1cf699f031ea69826e9d7a251d Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Wed, 26 Jan 2022 18:42:36 +0000 Subject: [PATCH 11/34] Adding missing envelope properties --- .../ManagedEnvironments.json | 52 +++++++++++-------- .../examples/Certificate_CreateOrUpdate.json | 4 +- .../examples/Certificates_CreateOrUpdate.json | 29 ++++++----- 3 files changed, 49 insertions(+), 36 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index 8579ba36a1f4..5845a03a1e4a 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -378,7 +378,7 @@ "type": "string" }, { - "name": "certificates", + "name": "certificatesEnvelope", "in": "body", "description" : "List of Certificates", "schema": { @@ -542,7 +542,7 @@ "type": "string" }, { - "name": "certificate", + "name": "certificateEnvelope", "in": "body", "description": "Certificate to be created or updated", "schema": { @@ -832,6 +832,11 @@ "Certificate": { "description": "Certificate 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": { "provisioningState": { "description": "Provisioning state of the Certificate.", @@ -946,10 +951,12 @@ }, "CertificateCollection": { "description": "Certificate collection ARM resource.", - "required": [ - "value" - ], "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ], "properties": { "value": { "description": "Collection of resources.", @@ -964,23 +971,24 @@ "readOnly": true } } - }, - "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" + }, + "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" - ] - } - ] + { + "azure_auth": [ + "user_impersonation" + ] + } + ] + } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json index d46a5329b7b3..ed0903fc4fce 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json @@ -3,7 +3,9 @@ "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "examplerg", "managedEnvironmentName": "testcontainerenv", - "certificate": { + "name": "certificate-firendly-name", + "api-version": "2022-01-01-preview", + "certificateEnvelope": { "password":"private key password", "name":"certificate-firendly-name", "value" :"PFX-or-PEM-blob" diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_CreateOrUpdate.json index 524b8cc96121..09cbb461c761 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_CreateOrUpdate.json @@ -3,19 +3,22 @@ "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "examplerg", "managedEnvironmentName": "testcontainerenv", - "name": "certificate-firendly-name", - "certificates": [ - { - "password":"private key password", - "name":"certificate-firendly-name", - "value" :"PFX-or-PEM-blob" - }, - { - "password":"private key password", - "name":"other-certificate-firendly-name", - "value" :"PFX-or-PEM-blob" - } - ] + "api-version": "2022-01-01-preview", + "certificatesEnvelope": { + "location": "East US", + "certificates": [ + { + "password":"private key password", + "name":"certificate-firendly-name", + "value" :"PFX-or-PEM-blob" + }, + { + "password":"private key password", + "name":"other-certificate-firendly-name", + "value" :"PFX-or-PEM-blob" + } + ] + } }, "responses": { "200" :{ From 76090236891f21968d765533f11e3cb941c25046 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Thu, 27 Jan 2022 23:31:09 +0000 Subject: [PATCH 12/34] Addressing PR comments --- .../2022-01-01-preview/ContainerApps.json | 14 +-- .../ManagedEnvironments.json | 101 +++--------------- .../examples/Certificate_CreateOrUpdate.json | 10 +- .../examples/Certificate_Get.json | 27 +++-- .../examples/Certificates_CreateOrUpdate.json | 49 --------- ...Certificates_ListByManagedEnvironment.json | 59 ++++++---- .../ManagedEnvironments_CreateOrUpdate.json | 62 +---------- .../examples/ManagedEnvironments_Get.json | 24 +---- ...nagedEnvironments_ListByResourceGroup.json | 27 +---- ...anagedEnvironments_ListBySubscription.json | 27 +---- .../examples/ManagedEnvironments_Patch.json | 24 +---- 11 files changed, 89 insertions(+), 335 deletions(-) delete mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_CreateOrUpdate.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index 74570e737b8b..c0af37c77149 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -311,7 +311,7 @@ } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}/analyzeCustomHostName": { - "get": { + "post": { "tags" : [ "ContainerApps" ], @@ -639,18 +639,6 @@ "certificateName": { "description": "Name of the Certificate to be bound to this hostname. Must exist in the Managed Environment.", "type": "string" - }, - "hostType": { - "description": "Indicates whether the hostname is a standard or repository hostname.", - "enum": [ - "Standard", - "Repository" - ], - "type": "string", - "x-ms-enum": { - "name": "HostType", - "modelAsString": false - } } } }, diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index 5845a03a1e4a..402e0aa234cb 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -312,7 +312,8 @@ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates": { "get": { "tags": [ - "ManagedEnvironments" + "ManagedEnvironments", + "Certificates" ], "summary": "Get the Certificates in a given managed environment.", "operationId": "Certificates_ListByManagedEnvironment", @@ -357,65 +358,10 @@ "nextLinkName": "nextLink" } }, - "put": { - "tags": [ - "ManagedEnvironments" - ], - "summary": "Creates pr updates the Certificates collection in a given managed environment.", - "operationId": "Certificates_CreateOrUpdate", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "managedEnvironmentName", - "in": "path", - "description": "Name of the Managed Environment.", - "required": true, - "type": "string" - }, - { - "name": "certificatesEnvelope", - "in": "body", - "description" : "List of Certificates", - "schema": { - "$ref": "#/definitions/CertificateCollection" - } - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/CertificateCollection" - } - }, - "default": { - "description": "Error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "Create or Update Certificates in Managed Environment": { - "$ref": "./examples/Certificates_CreateOrUpdate.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - - }, "delete": { "tags": [ - "ManagedEnvironments" + "ManagedEnvironments", + "Certificates" ], "summary": "Deletes all Certificates in a given managed environment.", "operationId": "Certificates_Delete", @@ -462,7 +408,8 @@ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}": { "get": { "tags": [ - "ManagedEnvironments" + "ManagedEnvironments", + "Certificates" ], "summary": "Get the specified Certificate.", "operationId": "Certificate_GetByName", @@ -516,7 +463,8 @@ }, "put": { "tags": [ - "ManagedEnvironments" + "ManagedEnvironments", + "Certificates" ], "summary": "Create or Update a Certificate.", "operationId": "Certificate_CreateOrUpdate", @@ -578,7 +526,8 @@ }, "delete": { "tags": [ - "ManagedEnvironments" + "ManagedEnvironments", + "Certificates" ], "summary": "Deletes the specified Certificate.", "operationId": "Certificate_Delete", @@ -763,13 +712,6 @@ "appLogsConfiguration": { "$ref": "#/definitions/AppLogsConfiguration", "description": "Cluster configuration which enables the log daemon to export\napp logs to a destination. Currently only \"log-analytics\" is\nsupported" - }, - "certificates": { - "description": "Hostname binding Certificates available to container apps in the Managed Environment", - "type": "array", - "items": { - "$ref": "#/definitions/Certificate" - } } }, "x-ms-client-flatten": true @@ -834,29 +776,17 @@ "type": "object", "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyOnlyResource" } ], "properties": { - "provisioningState": { - "description": "Provisioning state of the Certificate.", - "enum": [ - "Succeeded", - "Failed" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "CertificateProvisioningState", - "modelAsString": true - } - }, "password": { "description": "Certificate password.", "type": "string", "x-ms-mutability": [ "create" - ] + ], + "x-ms-secret": true }, "name": { "description": "Friendly name of the certificate.", @@ -874,7 +804,8 @@ "type": "string", "x-ms-mutability": [ "create" - ] + ], + "x-ms-secret": true }, "issuer": { "description": "Certificate issuer.", @@ -954,7 +885,7 @@ "type": "object", "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyOnlyResource" } ], "properties": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json index ed0903fc4fce..562b7f75808c 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json @@ -13,7 +13,13 @@ }, "responses": { "200" :{ - "certificate": { + "headers": {}, + "body":{ + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", + "name": "certificate-firendly-name", + "type": "Microsoft.App/ManagedEnvironments/Certificates", + "location": "East US", + "properties": { "name":"certificate-firendly-name", "provisioningState": "Succeeded", "subjectName": "my-subject-name.company.country.net", @@ -24,6 +30,6 @@ "valid": "true" } } - } } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json index b5b881e4f46b..554cee135d45 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json @@ -6,15 +6,24 @@ "name": "certificate-firendly-name" }, "responses": { - "200": { - "name":"certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-subject-name.company.country.net", - "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", - "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" + "200" :{ + "headers": {}, + "body":{ + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", + "name": "certificate-firendly-name", + "type": "Microsoft.App/ManagedEnvironments/Certificates", + "location": "East US", + "properties": { + "name":"certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + } + } } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_CreateOrUpdate.json deleted file mode 100644 index 09cbb461c761..000000000000 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_CreateOrUpdate.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "parameters" :{ - "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", - "resourceGroupName": "examplerg", - "managedEnvironmentName": "testcontainerenv", - "api-version": "2022-01-01-preview", - "certificatesEnvelope": { - "location": "East US", - "certificates": [ - { - "password":"private key password", - "name":"certificate-firendly-name", - "value" :"PFX-or-PEM-blob" - }, - { - "password":"private key password", - "name":"other-certificate-firendly-name", - "value" :"PFX-or-PEM-blob" - } - ] - } - }, - "responses": { - "200" :{ - "certificates": [ - { - "name":"certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-subject-name.company.country.net", - "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", - "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - }, - { - "name":"other-certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-other-subject-name.company.country.net", - "issuer": "Other Issuer Name", - "issueDate" : "2021-12-10T04:00:00Z", - "expirationDate": "2022-12-10T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - } - ] - } - } -} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json index 26a02399ac6c..f2b9eb931950 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json @@ -6,28 +6,43 @@ }, "responses": { "200" :{ - "certificates": [ - { - "name":"certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-subject-name.company.country.net", - "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", - "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - }, - { - "name":"other-certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-other-subject-name.company.country.net", - "issuer": "Other Issuer Name", - "issueDate" : "2021-12-10T04:00:00Z", - "expirationDate": "2022-12-10T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - } - ] + "headers": {}, + "body" :{ + "value" : [ + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", + "name": "certificate-firendly-name", + "type": "Microsoft.App/ManagedEnvironments/Certificates", + "location": "East US", + "properties": { + "name":"certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + } + }, + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", + "name": "certificate-firendly-name", + "type": "Microsoft.App/ManagedEnvironments/Certificates", + "location": "East US", + "properties": { + "name":"certificate-firendly-name", + "provisioningState": "Succeeded", + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate" : "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint":"CERTIFICATE_THUMBPRINT", + "valid": "true" + } + } + ] + } } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json index 570577d8ee80..640ce9846b09 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json @@ -13,19 +13,7 @@ "customerId": "string", "sharedKey": "string" } - }, - "certificates": [ - { - "password":"private key password", - "name":"certificate-firendly-name", - "value" :"PFX-or-PEM-blob" - }, - { - "password":"private key password", - "name":"other-certificate-firendly-name", - "value" :"PFX-or-PEM-blob" - } - ] + } } } }, @@ -46,29 +34,7 @@ "logAnalyticsConfiguration": { "customerId": "string" } - }, - "certificates": [ - { - "name":"certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-subject-name.company.country.net", - "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", - "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - }, - { - "name":"other-certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-other-subject-name.company.country.net", - "issuer": "Other Issuer Name", - "issueDate" : "2021-12-10T04:00:00Z", - "expirationDate": "2022-12-10T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - } - ] + } } } }, @@ -88,29 +54,7 @@ "logAnalyticsConfiguration": { "customerId": "string" } - }, - "certificates": [ - { - "name":"certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-subject-name.company.country.net", - "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", - "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - }, - { - "name":"other-certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-other-subject-name.company.country.net", - "issuer": "Other Issuer Name", - "issueDate" : "2021-12-10T04:00:00Z", - "expirationDate": "2022-12-10T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - } - ] + } } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json index 80b66b286012..24ccc069bae7 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json @@ -19,29 +19,7 @@ "deploymentErrors": null, "internalLoadBalancerEnabled": false, "defaultDomain": "jlaw-demo1.k4apps.io", - "staticIp": "20.42.33.145", - "certificates": [ - { - "name":"certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-subject-name.company.country.net", - "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", - "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - }, - { - "name":"other-certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-other-subject-name.company.country.net", - "issuer": "Other Issuer Name", - "issueDate" : "2021-12-10T04:00:00Z", - "expirationDate": "2022-12-10T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - } - ] + "staticIp": "20.42.33.145" } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json index d861336d8a6a..17aaacf5b93c 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json @@ -20,29 +20,7 @@ "internalLoadBalancerEnabled": false, "defaultDomain": "jlaw-demo1.k4apps.io", "staticIp": "20.42.33.145", - "appLogsConfiguration": null, - "certificates": [ - { - "name":"certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-subject-name.company.country.net", - "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", - "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - }, - { - "name":"other-certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-other-subject-name.company.country.net", - "issuer": "Other Issuer Name", - "issueDate" : "2021-12-10T04:00:00Z", - "expirationDate": "2022-12-10T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - } - ] + "appLogsConfiguration": null } }, { @@ -57,8 +35,7 @@ "internalLoadBalancerEnabled": false, "defaultDomain": "demo1.k4apps.io", "staticIp": "52.142.21.61", - "appLogsConfiguration": null, - "certificates": null + "appLogsConfiguration": null } } ] diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json index 39a18e01e432..7a482b66afe3 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json @@ -19,29 +19,7 @@ "internalLoadBalancerEnabled": false, "defaultDomain": "jlaw-demo1.k4apps.io", "staticIp": "20.42.33.145", - "appLogsConfiguration": null, - "certificates": [ - { - "name":"certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-subject-name.company.country.net", - "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", - "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - }, - { - "name":"other-certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-other-subject-name.company.country.net", - "issuer": "Other Issuer Name", - "issueDate" : "2021-12-10T04:00:00Z", - "expirationDate": "2022-12-10T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - } - ] + "appLogsConfiguration": null } }, { @@ -56,8 +34,7 @@ "internalLoadBalancerEnabled": false, "defaultDomain": "demo1.k4apps.io", "staticIp": "52.142.21.61", - "appLogsConfiguration": null, - "certificates": null + "appLogsConfiguration": null } } ] diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json index 19a149033afc..360d8a665ddb 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json @@ -33,29 +33,7 @@ "logAnalyticsConfiguration": { "customerId": "string" } - }, - "certificates": [ - { - "name":"certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-subject-name.company.country.net", - "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", - "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - }, - { - "name":"other-certificate-firendly-name", - "provisioningState": "Succeeded", - "subjectName": "my-other-subject-name.company.country.net", - "issuer": "Other Issuer Name", - "issueDate" : "2021-12-10T04:00:00Z", - "expirationDate": "2022-12-10T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", - "valid": "true" - } - ] + } } } } From b37c3ace3252ce17972e02f7d3b63724c57c94bc Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Thu, 27 Jan 2022 23:34:50 +0000 Subject: [PATCH 13/34] Removing AKV and Free cert related properties --- .../ManagedEnvironments.json | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index 402e0aa234cb..f51ac5a417bc 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -838,44 +838,6 @@ "description": "Public key hash.", "type": "string", "readOnly": true - }, - "keyVaultId": { - "description": "Key Vault Csm resource Id.", - "type": "string" - }, - "keyVaultSecretName": { - "description": "Key Vault secret name.", - "type": "string" - }, - "keyVaultSecretStatus": { - "description": "Status of the Key Vault secret.", - "enum": [ - "Initialized", - "WaitingOnCertificateOrder", - "Succeeded", - "CertificateOrderFailed", - "OperationNotPermittedOnKeyVault", - "AzureServiceUnauthorizedToAccessKeyVault", - "KeyVaultDoesNotExist", - "KeyVaultSecretDoesNotExist", - "UnknownError", - "ExternalPrivateKey", - "Unknown" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "KeyVaultSecretStatus", - "modelAsString": false - } - }, - "canonicalName": { - "description": "CNAME of the certificate to be issued via free certificate", - "type": "string" - }, - "domainValidationMethod": { - "description": "Method of domain validation for free cert", - "type": "string" } }, "x-ms-client-flatten": true From b9f38464e7266d032ed19d84236e3adfa3639ad9 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Fri, 28 Jan 2022 17:29:42 +0000 Subject: [PATCH 14/34] Prettier and semantic validation fixes --- .../2022-01-01-preview/ContainerApps.json | 8 ++++---- .../ManagedEnvironments.json | 16 +++++++-------- .../examples/Certificate_CreateOrUpdate.json | 18 ++++++++--------- .../examples/Certificate_Delete.json | 4 ++-- .../examples/Certificate_Get.json | 12 +++++------ .../examples/Certificates_Delete.json | 4 ++-- ...Certificates_ListByManagedEnvironment.json | 20 +++++++++---------- 7 files changed, 40 insertions(+), 42 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index c0af37c77149..636c515d8c53 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -312,12 +312,12 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}/analyzeCustomHostName": { "post": { - "tags" : [ + "tags": [ "ContainerApps" ], - "summary" : "Analyzes a custom hostname for a Container App", + "summary": "Analyzes a custom hostname for a Container App", "operationId": "ContainerAppsRevisions_AnalyzeCustomHostName", - "parameters" :[ + "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, @@ -647,7 +647,7 @@ "type": "object", "allOf": [ { - "$ref": "./CommonDefinitions.json#/definitions/ProxyOnlyResource" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" } ], "properties": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index f51ac5a417bc..3a258195b4d1 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -402,7 +402,6 @@ "x-ms-pageable": { "nextLinkName": "nextLink" } - } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}": { @@ -494,7 +493,7 @@ "in": "body", "description": "Certificate to be created or updated", "schema": { - "$ref":"#/definitions/Certificate" + "$ref": "#/definitions/Certificate" } }, { @@ -575,7 +574,6 @@ "x-ms-pageable": { "nextLinkName": "nextLink" } - } } }, @@ -776,7 +774,7 @@ "type": "object", "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyOnlyResource" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ], "properties": { @@ -847,7 +845,7 @@ "type": "object", "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyOnlyResource" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ], "properties": { @@ -876,10 +874,10 @@ } } }, - "security": [ - { - "azure_auth": [ - "user_impersonation" + "security": [ + { + "azure_auth": [ + "user_impersonation" ] } ] diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json index 562b7f75808c..1e897b085953 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json @@ -1,32 +1,32 @@ { - "parameters" :{ + "parameters": { "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "examplerg", "managedEnvironmentName": "testcontainerenv", "name": "certificate-firendly-name", "api-version": "2022-01-01-preview", "certificateEnvelope": { - "password":"private key password", - "name":"certificate-firendly-name", - "value" :"PFX-or-PEM-blob" + "password": "private key password", + "name": "certificate-firendly-name", + "value": "PFX-or-PEM-blob" } }, "responses": { - "200" :{ + "200": { "headers": {}, - "body":{ + "body": { "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", "location": "East US", "properties": { - "name":"certificate-firendly-name", + "name": "certificate-firendly-name", "provisioningState": "Succeeded", "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", + "issueDate": "2021-11-06T04:00:00Z", "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", + "thumbprint": "CERTIFICATE_THUMBPRINT", "valid": "true" } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json index 4b93d0f08e60..e083ada56d37 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json @@ -1,11 +1,11 @@ { - "parameters" :{ + "parameters": { "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "examplerg", "managedEnvironmentName": "testcontainerenv", "name": "certificate-firendly-name" }, "responses": { - "200" :{} + "200": {} } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json index 554cee135d45..a5e5d37a696a 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json @@ -1,26 +1,26 @@ { - "parameters" :{ + "parameters": { "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "examplerg", "managedEnvironmentName": "testcontainerenv", "name": "certificate-firendly-name" }, "responses": { - "200" :{ + "200": { "headers": {}, - "body":{ + "body": { "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", "location": "East US", "properties": { - "name":"certificate-firendly-name", + "name": "certificate-firendly-name", "provisioningState": "Succeeded", "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", + "issueDate": "2021-11-06T04:00:00Z", "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", + "thumbprint": "CERTIFICATE_THUMBPRINT", "valid": "true" } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json index e423dda1c898..bb2d090cd4a5 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json @@ -1,10 +1,10 @@ { - "parameters" :{ + "parameters": { "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "examplerg", "managedEnvironmentName": "testcontainerenv" }, "responses": { - "200" :{} + "200": {} } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json index f2b9eb931950..7da520aa2368 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json @@ -1,27 +1,27 @@ { - "parameters" :{ + "parameters": { "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "examplerg", "managedEnvironmentName": "testcontainerenv" }, "responses": { - "200" :{ + "200": { "headers": {}, - "body" :{ - "value" : [ + "body": { + "value": [ { "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", "location": "East US", "properties": { - "name":"certificate-firendly-name", + "name": "certificate-firendly-name", "provisioningState": "Succeeded", "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", + "issueDate": "2021-11-06T04:00:00Z", "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", + "thumbprint": "CERTIFICATE_THUMBPRINT", "valid": "true" } }, @@ -31,13 +31,13 @@ "type": "Microsoft.App/ManagedEnvironments/Certificates", "location": "East US", "properties": { - "name":"certificate-firendly-name", + "name": "certificate-firendly-name", "provisioningState": "Succeeded", "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", - "issueDate" : "2021-11-06T04:00:00Z", + "issueDate": "2021-11-06T04:00:00Z", "expirationDate": "2022-11-06T04:00:00Z", - "thumbprint":"CERTIFICATE_THUMBPRINT", + "thumbprint": "CERTIFICATE_THUMBPRINT", "valid": "true" } } From 8c1cd8bbc5533bc4b1b687ddea37875e16f619d7 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Fri, 28 Jan 2022 18:18:45 +0000 Subject: [PATCH 15/34] Fixing semantic validations and examples --- .../2022-01-01-preview/ContainerApps.json | 16 +-- .../ManagedEnvironments.json | 117 +++++++++--------- .../examples/Certificate_CreateOrUpdate.json | 1 - .../examples/Certificate_Delete.json | 3 +- .../examples/Certificate_Get.json | 4 +- ...Certificates_ListByManagedEnvironment.json | 5 +- ...erAppsRevisions_AnalyzeCustomHostName.json | 46 +++++++ 7 files changed, 119 insertions(+), 73 deletions(-) create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index 636c515d8c53..97de032f6401 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -310,7 +310,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}/analyzeCustomHostName": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/analyzeCustomHostName": { "post": { "tags": [ "ContainerApps" @@ -332,7 +332,7 @@ "type": "string" }, { - "name": "hostName", + "name": "customHostname", "in": "query", "description": "Custom hostname.", "type": "string" @@ -655,6 +655,11 @@ "description": "CustomHostnameAnalysisResult resource specific properties", "type": "object", "properties": { + "hostName": { + "description": "Host name that was analyzed", + "type": "string", + "readOnly": true + }, "isHostnameAlreadyVerified": { "description": "true if hostname is already verified; otherwise, false.", "type": "boolean", @@ -684,12 +689,7 @@ "type": "boolean", "readOnly": true }, - "hasConflictAcrossSubscription": { - "description": "true if there is a conflict across subscriptions; otherwise, false.", - "type": "boolean", - "readOnly": true - }, - "conflictingAppResourceId": { + "conflictingContainerAppResourceId": { "description": "Name of the conflicting Container App on the Managed Environment if it's within the same subscription.", "type": "string", "readOnly": true diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index 3a258195b4d1..2762ff0e8580 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -778,64 +778,65 @@ } ], "properties": { - "password": { - "description": "Certificate password.", - "type": "string", - "x-ms-mutability": [ - "create" - ], - "x-ms-secret": true - }, - "name": { - "description": "Friendly name of the certificate.", - "type": "string", - "readOnly": true - }, - "subjectName": { - "description": "Subject name of the certificate.", - "type": "string", - "readOnly": true - }, - "value": { - "format": "byte", - "description": "PFX or PEM blob", - "type": "string", - "x-ms-mutability": [ - "create" - ], - "x-ms-secret": true - }, - "issuer": { - "description": "Certificate issuer.", - "type": "string", - "readOnly": true - }, - "issueDate": { - "format": "date-time", - "description": "Certificate issue Date.", - "type": "string", - "readOnly": true - }, - "expirationDate": { - "format": "date-time", - "description": "Certificate expiration date.", - "type": "string", - "readOnly": true - }, - "thumbprint": { - "description": "Certificate thumbprint.", - "type": "string", - "readOnly": true - }, - "valid": { - "description": "Is the certificate valid?.", - "type": "boolean", - "readOnly": true - }, - "publicKeyHash": { - "description": "Public key hash.", - "type": "string", - "readOnly": true + "properties": { + "password": { + "description": "Certificate password.", + "type": "string", + "x-ms-mutability": [ + "create" + ], + "x-ms-secret": true + }, + "name": { + "description": "Friendly name of the certificate.", + "type": "string" + }, + "subjectName": { + "description": "Subject name of the certificate.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "byte", + "description": "PFX or PEM blob", + "type": "string", + "x-ms-mutability": [ + "create" + ], + "x-ms-secret": true + }, + "issuer": { + "description": "Certificate issuer.", + "type": "string", + "readOnly": true + }, + "issueDate": { + "format": "date-time", + "description": "Certificate issue Date.", + "type": "string", + "readOnly": true + }, + "expirationDate": { + "format": "date-time", + "description": "Certificate expiration date.", + "type": "string", + "readOnly": true + }, + "thumbprint": { + "description": "Certificate thumbprint.", + "type": "string", + "readOnly": true + }, + "valid": { + "description": "Is the certificate valid?.", + "type": "boolean", + "readOnly": true + }, + "publicKeyHash": { + "description": "Public key hash.", + "type": "string", + "readOnly": true + } } }, "x-ms-client-flatten": true diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json index 1e897b085953..8f69abcc031b 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json @@ -18,7 +18,6 @@ "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", - "location": "East US", "properties": { "name": "certificate-firendly-name", "provisioningState": "Succeeded", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json index e083ada56d37..cee25de0a169 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json @@ -3,7 +3,8 @@ "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "examplerg", "managedEnvironmentName": "testcontainerenv", - "name": "certificate-firendly-name" + "name": "certificate-firendly-name", + "api-version": "2022-01-01-preview" }, "responses": { "200": {} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json index a5e5d37a696a..a16e98c5a237 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json @@ -3,7 +3,8 @@ "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "examplerg", "managedEnvironmentName": "testcontainerenv", - "name": "certificate-firendly-name" + "name": "certificate-firendly-name", + "api-version": "2022-01-01-preview" }, "responses": { "200": { @@ -12,7 +13,6 @@ "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", - "location": "East US", "properties": { "name": "certificate-firendly-name", "provisioningState": "Succeeded", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json index 7da520aa2368..40d4ea307703 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json @@ -2,7 +2,8 @@ "parameters": { "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "examplerg", - "managedEnvironmentName": "testcontainerenv" + "managedEnvironmentName": "testcontainerenv", + "api-version": "2022-01-01-preview" }, "responses": { "200": { @@ -13,7 +14,6 @@ "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", - "location": "East US", "properties": { "name": "certificate-firendly-name", "provisioningState": "Succeeded", @@ -29,7 +29,6 @@ "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", - "location": "East US", "properties": { "name": "certificate-firendly-name", "provisioningState": "Succeeded", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json new file mode 100644 index 000000000000..a42961940491 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "rg", + "containerAppName": "testcontainerApp0", + "customHostname": "my.name.corp", + "api-version": "2022-01-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerApp0", + "properties": { + "hostName": "my.name.corp", + "isHostnameAlreadyVerified": true, + "customDomainVerificationTest": "Passed", + "customDomainVerificationFailureInfo": {}, + "hasConflictOnManagedEnvironment": false, + "conflictingContainerAppResourceId": "", + "cNameRecords": [ + "cNameRecord1", + "cNameRecord2" + ], + "txtRecords": [ + "txtRecord1", + "txtRecord2" + ], + "aRecords": [ + "aRecord1", + "aRecord2" + ], + "alternateCNameRecords": [ + "cNameRecord1", + "cNameRecord2" + ], + "alternateTxtRecords": [ + "txtRecord1", + "txtRecord2" + ] + } + } + }, + "404": {} + } +} From 34300f3cc1f096aef63ea6d9f614173c09627748 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Fri, 28 Jan 2022 18:50:24 +0000 Subject: [PATCH 16/34] More fixes --- .../2022-01-01-preview/ContainerApps.json | 5 + .../ManagedEnvironments.json | 142 +++++++++--------- .../examples/Certificate_CreateOrUpdate.json | 8 +- .../examples/Certificates_Delete.json | 3 +- 4 files changed, 83 insertions(+), 75 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index 97de032f6401..fe0158ff7887 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -354,6 +354,11 @@ "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" } } + }, + "x-ms-examples": { + "Patch Container App": { + "$ref": "./examples/ContainerAppsRevisions_AnalyzeCustomHostName.json" + } } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index 2762ff0e8580..f56168c21849 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -648,7 +648,7 @@ ], "properties": { "properties": { - "description": "Environment resource specific properties", + "description": "Managed environment resource specific properties", "type": "object", "properties": { "provisioningState": { @@ -779,76 +779,78 @@ ], "properties": { "properties": { - "password": { - "description": "Certificate password.", - "type": "string", - "x-ms-mutability": [ - "create" - ], - "x-ms-secret": true - }, - "name": { - "description": "Friendly name of the certificate.", - "type": "string" - }, - "subjectName": { - "description": "Subject name of the certificate.", - "type": "string", - "readOnly": true - }, - "value": { - "format": "byte", - "description": "PFX or PEM blob", - "type": "string", - "x-ms-mutability": [ - "create" - ], - "x-ms-secret": true - }, - "issuer": { - "description": "Certificate issuer.", - "type": "string", - "readOnly": true - }, - "issueDate": { - "format": "date-time", - "description": "Certificate issue Date.", - "type": "string", - "readOnly": true - }, - "expirationDate": { - "format": "date-time", - "description": "Certificate expiration date.", - "type": "string", - "readOnly": true - }, - "thumbprint": { - "description": "Certificate thumbprint.", - "type": "string", - "readOnly": true - }, - "valid": { - "description": "Is the certificate valid?.", - "type": "boolean", - "readOnly": true - }, - "publicKeyHash": { - "description": "Public key hash.", - "type": "string", - "readOnly": true + "description": "Certificate resource specific properties", + "type": "object", + "properties": { + "password": { + "description": "Certificate password.", + "type": "string", + "x-ms-mutability": [ + "create" + ], + "x-ms-secret": true + }, + "name": { + "description": "Friendly name of the certificate.", + "type": "string" + }, + "subjectName": { + "description": "Subject name of the certificate.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "byte", + "description": "PFX or PEM blob", + "type": "string", + "x-ms-mutability": [ + "create" + ], + "x-ms-secret": true + }, + "issuer": { + "description": "Certificate issuer.", + "type": "string", + "readOnly": true + }, + "issueDate": { + "format": "date-time", + "description": "Certificate issue Date.", + "type": "string", + "readOnly": true + }, + "expirationDate": { + "format": "date-time", + "description": "Certificate expiration date.", + "type": "string", + "readOnly": true + }, + "thumbprint": { + "description": "Certificate thumbprint.", + "type": "string", + "readOnly": true + }, + "valid": { + "description": "Is the certificate valid?.", + "type": "boolean", + "readOnly": true + }, + "publicKeyHash": { + "description": "Public key hash.", + "type": "string", + "readOnly": true + } } } }, "x-ms-client-flatten": true }, "CertificateCollection": { - "description": "Certificate collection ARM resource.", - "type": "object", - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" - } + "description": "Collection of Certificates.", + "required": [ + "value" ], + "type": "object", "properties": { "value": { "description": "Collection of resources.", @@ -875,12 +877,10 @@ } } }, - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ] + "security": { + "azure_auth": [ + "user_impersonation" + ] + } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json index 8f69abcc031b..8527714b60af 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json @@ -6,9 +6,11 @@ "name": "certificate-firendly-name", "api-version": "2022-01-01-preview", "certificateEnvelope": { - "password": "private key password", - "name": "certificate-firendly-name", - "value": "PFX-or-PEM-blob" + "properties": { + "password": "private key password", + "name": "certificate-firendly-name", + "value": "PFX-or-PEM-blob" + } } }, "responses": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json index bb2d090cd4a5..58492c0dc41b 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json @@ -2,7 +2,8 @@ "parameters": { "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "examplerg", - "managedEnvironmentName": "testcontainerenv" + "managedEnvironmentName": "testcontainerenv", + "api-version": "2022-01-01-preview" }, "responses": { "200": {} From 5d9fe2c8ef968b9ddf17166d241bc5fb8d935e5d Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Sat, 29 Jan 2022 01:27:10 +0000 Subject: [PATCH 17/34] Addressing more PR comments --- .../2022-01-01-preview/ContainerApps.json | 5 +- .../ManagedEnvironments.json | 58 ------------------- .../examples/Certificates_Delete.json | 11 ---- ...Certificates_ListByManagedEnvironment.json | 6 +- 4 files changed, 6 insertions(+), 74 deletions(-) delete mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index fe0158ff7887..02413ad28ed0 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -551,7 +551,10 @@ "type": "array", "items": { "$ref": "#/definitions/CustomDomain" - } + }, + "x-ms-identifiers": [ + "name" + ] }, "allowInsecure": { "description": "Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index f56168c21849..d8db072803aa 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -357,51 +357,6 @@ "x-ms-pageable": { "nextLinkName": "nextLink" } - }, - "delete": { - "tags": [ - "ManagedEnvironments", - "Certificates" - ], - "summary": "Deletes all Certificates in a given managed environment.", - "operationId": "Certificates_Delete", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "managedEnvironmentName", - "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": "Delete operation completed" - }, - "default": { - "description": "Error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "Delete Certificates by Managed Environment": { - "$ref": "./examples/Certificates_Delete.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}": { @@ -455,9 +410,6 @@ "Get Certificate": { "$ref": "./examples/Certificate_Get.json" } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } }, "put": { @@ -518,9 +470,6 @@ "Create or Update Certificate": { "$ref": "./examples/Certificate_CreateOrUpdate.json" } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } }, "delete": { @@ -570,9 +519,6 @@ "Delete Certificate": { "$ref": "./examples/Certificate_Delete.json" } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } } @@ -790,10 +736,6 @@ ], "x-ms-secret": true }, - "name": { - "description": "Friendly name of the certificate.", - "type": "string" - }, "subjectName": { "description": "Subject name of the certificate.", "type": "string", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json deleted file mode 100644 index 58492c0dc41b..000000000000 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Delete.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parameters": { - "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", - "resourceGroupName": "examplerg", - "managedEnvironmentName": "testcontainerenv", - "api-version": "2022-01-01-preview" - }, - "responses": { - "200": {} - } -} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json index 40d4ea307703..dea3f9f323e2 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json @@ -15,14 +15,13 @@ "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", "properties": { - "name": "certificate-firendly-name", "provisioningState": "Succeeded", "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", "issueDate": "2021-11-06T04:00:00Z", "expirationDate": "2022-11-06T04:00:00Z", "thumbprint": "CERTIFICATE_THUMBPRINT", - "valid": "true" + "valid": "true" } }, { @@ -30,14 +29,13 @@ "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", "properties": { - "name": "certificate-firendly-name", "provisioningState": "Succeeded", "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", "issueDate": "2021-11-06T04:00:00Z", "expirationDate": "2022-11-06T04:00:00Z", "thumbprint": "CERTIFICATE_THUMBPRINT", - "valid": "true" + "valid": "true" } } ] From b1f5004fea70a3ff78895cd4556c75b1e22aff20 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Sat, 29 Jan 2022 01:49:54 +0000 Subject: [PATCH 18/34] Updating examples --- .../preview/2022-01-01-preview/ContainerApps.json | 6 +++++- .../examples/Certificate_CreateOrUpdate.json | 4 +--- .../2022-01-01-preview/examples/Certificate_Get.json | 4 +--- .../examples/Certificates_ListByManagedEnvironment.json | 2 -- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index 02413ad28ed0..099f6bf74fbe 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -346,6 +346,10 @@ "description": "OK", "schema": { "$ref": "#/definitions/CustomHostnameAnalysisResult" + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true } }, "default": { @@ -655,7 +659,7 @@ "type": "object", "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ], "properties": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json index 8527714b60af..66210b6e0c01 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json @@ -21,14 +21,12 @@ "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", "properties": { - "name": "certificate-firendly-name", - "provisioningState": "Succeeded", "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", "issueDate": "2021-11-06T04:00:00Z", "expirationDate": "2022-11-06T04:00:00Z", "thumbprint": "CERTIFICATE_THUMBPRINT", - "valid": "true" + "valid": "true" } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json index a16e98c5a237..7cf7301d7fee 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json @@ -14,14 +14,12 @@ "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", "properties": { - "name": "certificate-firendly-name", - "provisioningState": "Succeeded", "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", "issueDate": "2021-11-06T04:00:00Z", "expirationDate": "2022-11-06T04:00:00Z", "thumbprint": "CERTIFICATE_THUMBPRINT", - "valid": "true" + "valid": "true" } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json index dea3f9f323e2..beb75000dea9 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json @@ -15,7 +15,6 @@ "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", "properties": { - "provisioningState": "Succeeded", "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", "issueDate": "2021-11-06T04:00:00Z", @@ -29,7 +28,6 @@ "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", "properties": { - "provisioningState": "Succeeded", "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", "issueDate": "2021-11-06T04:00:00Z", From 8da8fa580c59e8b3cf5858d916b3346a42396a0c Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Sat, 29 Jan 2022 01:57:00 +0000 Subject: [PATCH 19/34] fixing type --- .../examples/Certificates_ListByManagedEnvironment.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json index beb75000dea9..8a1322098018 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json @@ -20,7 +20,7 @@ "issueDate": "2021-11-06T04:00:00Z", "expirationDate": "2022-11-06T04:00:00Z", "thumbprint": "CERTIFICATE_THUMBPRINT", - "valid": "true" + "valid": true } }, { @@ -33,7 +33,7 @@ "issueDate": "2021-11-06T04:00:00Z", "expirationDate": "2022-11-06T04:00:00Z", "thumbprint": "CERTIFICATE_THUMBPRINT", - "valid": "true" + "valid": true } } ] From 0fbec142f29176ad8fb8894d0694fd00aff37c70 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Sat, 29 Jan 2022 01:57:36 +0000 Subject: [PATCH 20/34] fixing types --- .../2022-01-01-preview/examples/Certificate_CreateOrUpdate.json | 2 +- .../preview/2022-01-01-preview/examples/Certificate_Get.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json index 66210b6e0c01..b65e13258027 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json @@ -26,7 +26,7 @@ "issueDate": "2021-11-06T04:00:00Z", "expirationDate": "2022-11-06T04:00:00Z", "thumbprint": "CERTIFICATE_THUMBPRINT", - "valid": "true" + "valid": true } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json index 7cf7301d7fee..e6381853fc15 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json @@ -19,7 +19,7 @@ "issueDate": "2021-11-06T04:00:00Z", "expirationDate": "2022-11-06T04:00:00Z", "thumbprint": "CERTIFICATE_THUMBPRINT", - "valid": "true" + "valid": true } } } From 4ccd72de4c3bb881737a79a70040abe37c864974 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Sat, 29 Jan 2022 02:03:33 +0000 Subject: [PATCH 21/34] Extra properties and responses --- .../examples/Certificate_CreateOrUpdate.json | 2 -- .../examples/ContainerAppsRevisions_AnalyzeCustomHostName.json | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json index b65e13258027..f669ee87525e 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json @@ -8,7 +8,6 @@ "certificateEnvelope": { "properties": { "password": "private key password", - "name": "certificate-firendly-name", "value": "PFX-or-PEM-blob" } } @@ -18,7 +17,6 @@ "headers": {}, "body": { "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", - "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", "properties": { "subjectName": "my-subject-name.company.country.net", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json index a42961940491..21f55a593221 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json @@ -40,7 +40,6 @@ ] } } - }, - "404": {} + } } } From a98ac1ab197f136e50f5e92ccb96538401220da0 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Sat, 29 Jan 2022 02:05:23 +0000 Subject: [PATCH 22/34] misplaced response --- .../preview/2022-01-01-preview/ContainerApps.json | 8 ++++---- .../ContainerAppsRevisions_AnalyzeCustomHostName.json | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index 099f6bf74fbe..a3eebefb382d 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -346,12 +346,12 @@ "description": "OK", "schema": { "$ref": "#/definitions/CustomHostnameAnalysisResult" - }, - "404": { - "description": "Not found.", - "x-ms-error-response": true } }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + }, "default": { "description": "Common error response.", "schema": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json index 21f55a593221..e0f12c47ac1e 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json @@ -40,6 +40,7 @@ ] } } - } + }, + "404": { } } } From 755f6700331c4e6fed681d89c45c45106b97db48 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Sat, 29 Jan 2022 02:11:07 +0000 Subject: [PATCH 23/34] whitespace --- .../examples/ContainerAppsRevisions_AnalyzeCustomHostName.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json index e0f12c47ac1e..a42961940491 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json @@ -41,6 +41,6 @@ } } }, - "404": { } + "404": {} } } From 1a697d0e38505bb4670ba3f078aa948cac4ddeb0 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Sat, 29 Jan 2022 02:14:57 +0000 Subject: [PATCH 24/34] fix security section --- .../2022-01-01-preview/ManagedEnvironments.json | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index d8db072803aa..8e91d82629df 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -819,10 +819,12 @@ } } }, - "security": { - "azure_auth": [ - "user_impersonation" - ] - } + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] } } From cbb2b95f6efe35d4f55d79149ca5c6ca124f420c Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Mon, 31 Jan 2022 15:05:32 +0000 Subject: [PATCH 25/34] fixing ManageEnvironment securityDefinitions --- .../ManagedEnvironments.json | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index 8e91d82629df..42f0a6d04a9e 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -807,24 +807,24 @@ "readOnly": true } } - }, - "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" - ] + } + }, + "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" + ] + } + ] } From 64dab7a2bbfc09edeafea6382c037b5d4ef0ae00 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Mon, 31 Jan 2022 15:13:34 +0000 Subject: [PATCH 26/34] add 204 delete response --- .../preview/2022-01-01-preview/ManagedEnvironments.json | 3 +++ .../2022-01-01-preview/examples/Certificate_Delete.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index 42f0a6d04a9e..9ae49cd42d0f 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -508,6 +508,9 @@ "200": { "description": "Delete operation completed" }, + "204": { + "description": "Certificate does not exist" + }, "default": { "description": "Error response.", "schema": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json index cee25de0a169..a94acec7bb08 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json @@ -7,6 +7,7 @@ "api-version": "2022-01-01-preview" }, "responses": { - "200": {} + "200": {}, + "204": {} } } From 72b90e7b8a345e7c80d66028c7398caf2a067d87 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Mon, 31 Jan 2022 18:37:34 +0000 Subject: [PATCH 27/34] Removing virtual IP and IP Based option --- .../preview/2022-01-01-preview/ContainerApps.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index a3eebefb382d..74f8bd77587c 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -635,8 +635,7 @@ "description": "Custom Domain binding type.", "enum": [ "Disabled", - "SniEnabled", - "IpBasedEnabled" + "SniEnabled" ], "type": "string", "x-ms-enum": { @@ -644,10 +643,6 @@ "modelAsString": false } }, - "virtualIP": { - "description": "Virtual IP address assigned to the hostname if IP based binding is enabled.", - "type": "string" - }, "certificateName": { "description": "Name of the Certificate to be bound to this hostname. Must exist in the Managed Environment.", "type": "string" From 3ecab2bf996adab49203ccf12706994eebc4768e Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Mon, 31 Jan 2022 19:05:37 +0000 Subject: [PATCH 28/34] change modelAsString --- .../Microsoft.App/preview/2022-01-01-preview/ContainerApps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index 74f8bd77587c..0b828d232639 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -640,7 +640,7 @@ "type": "string", "x-ms-enum": { "name": "bindingType", - "modelAsString": false + "modelAsString": true } }, "certificateName": { From e9b4877d4aa0f7746740400e12a34093d0ff5d23 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Tue, 1 Feb 2022 00:04:17 +0000 Subject: [PATCH 29/34] Addressing ARM PR comments --- .../preview/2022-01-01-preview/ContainerApps.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index 0b828d232639..893e4e7eb33a 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -348,10 +348,6 @@ "$ref": "#/definitions/CustomHostnameAnalysisResult" } }, - "404": { - "description": "Not found.", - "x-ms-error-response": true - }, "default": { "description": "Common error response.", "schema": { @@ -360,7 +356,7 @@ } }, "x-ms-examples": { - "Patch Container App": { + "Analyze Custom Hostname": { "$ref": "./examples/ContainerAppsRevisions_AnalyzeCustomHostName.json" } } From cdb52ddbfbfafe2890ae4496486cb1593fcf41df Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Tue, 1 Feb 2022 00:07:52 +0000 Subject: [PATCH 30/34] Removing 404 response from example --- .../examples/ContainerAppsRevisions_AnalyzeCustomHostName.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json index a42961940491..21f55a593221 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json @@ -40,7 +40,6 @@ ] } } - }, - "404": {} + } } } From 6792d83da074e1c851731961f76e0731a45bb049 Mon Sep 17 00:00:00 2001 From: Vini Soto <18271663+vinisoto@users.noreply.github.com> Date: Tue, 1 Feb 2022 00:52:36 +0000 Subject: [PATCH 31/34] renaming custom hostname analysis operation --- .../preview/2022-01-01-preview/ContainerApps.json | 6 +++--- ...e.json => ContainerApps_ListCustomHostNameAnalysis.json} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/{ContainerAppsRevisions_AnalyzeCustomHostName.json => ContainerApps_ListCustomHostNameAnalysis.json} (100%) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index 893e4e7eb33a..c0e8389a7658 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -310,13 +310,13 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/analyzeCustomHostName": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listCustomHostNameAnalysis": { "post": { "tags": [ "ContainerApps" ], "summary": "Analyzes a custom hostname for a Container App", - "operationId": "ContainerAppsRevisions_AnalyzeCustomHostName", + "operationId": "ContainerApps_ListCustomHostNameAnalysis", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -357,7 +357,7 @@ }, "x-ms-examples": { "Analyze Custom Hostname": { - "$ref": "./examples/ContainerAppsRevisions_AnalyzeCustomHostName.json" + "$ref": "./examples/ContainerApps_ListCustomHostNameAnalysis.json" } } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json similarity index 100% rename from specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerAppsRevisions_AnalyzeCustomHostName.json rename to specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json From 7eddc6ebbcd72fdccab24d2422d5621f7116f325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruslan=20Yakushev=20=F0=9F=9A=B4?= Date: Tue, 1 Feb 2022 15:31:13 -0800 Subject: [PATCH 32/34] mark certificate as tracked resource --- .../ManagedEnvironments.json | 77 ++++++++++++++++++- .../examples/Certificate_CreateOrUpdate.json | 2 + .../examples/Certificate_Get.json | 1 + ...Certificates_ListByManagedEnvironment.json | 2 + .../examples/Certificates_Patch.json | 39 ++++++++++ 5 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json index 9ae49cd42d0f..232f057b1778 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ManagedEnvironments.json @@ -523,6 +523,68 @@ "$ref": "./examples/Certificate_Delete.json" } } + }, + "patch": { + "tags": [ + "ManagedEnvironments", + "Certificates" + ], + "summary": "Update properties of a certificate", + "description": "Patches a certificate. Currently only patching of tags is supported", + "operationId": "Certificates_Update", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "managedEnvironmentName", + "in": "path", + "description": "Name of the Managed Environment.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Certificate.", + "required": true, + "type": "string" + }, + { + "name": "certificateEnvelope", + "in": "body", + "required": true, + "description": "Properties of a certificate that need to be updated", + "schema": { + "$ref": "#/definitions/CertificatePatch" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Container App updated successfully.", + "schema": { + "$ref": "#/definitions/Certificate" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Patch Certificate": { + "$ref": "./examples/Certificates_Patch.json" + } + } } } }, @@ -723,7 +785,7 @@ "type": "object", "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" } ], "properties": { @@ -810,6 +872,19 @@ "readOnly": true } } + }, + "CertificatePatch": { + "description": "A certificate to update", + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Application-specific metadata in the form of key-value pairs." + } + } } }, "securityDefinitions": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json index f669ee87525e..7f2020bbde18 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json @@ -6,6 +6,7 @@ "name": "certificate-firendly-name", "api-version": "2022-01-01-preview", "certificateEnvelope": { + "location": "East US", "properties": { "password": "private key password", "value": "PFX-or-PEM-blob" @@ -18,6 +19,7 @@ "body": { "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", + "location": "East US", "properties": { "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json index e6381853fc15..bdb732bd2d6c 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json @@ -13,6 +13,7 @@ "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", + "location": "East US", "properties": { "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json index 8a1322098018..b2c49403e21c 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json @@ -14,6 +14,7 @@ "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", + "location": "East US", "properties": { "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", @@ -27,6 +28,7 @@ "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", "name": "certificate-firendly-name", "type": "Microsoft.App/ManagedEnvironments/Certificates", + "location": "East US", "properties": { "subjectName": "my-subject-name.company.country.net", "issuer": "Issuer Name", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json new file mode 100644 index 000000000000..756e5d4fdc86 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "examplerg", + "managedEnvironmentName": "testcontainerenv", + "name": "certificate-firendly-name", + "api-version": "2022-01-01-preview", + "certificateEnvelope": { + "containerAppEnvelope": { + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificate-firendly-name", + "type": "Microsoft.App/ManagedEnvironments/Certificates", + "location": "East US", + "tags": { + "tag1": "value1", + "tag2": "value2" + }, + "properties": { + "subjectName": "my-subject-name.company.country.net", + "issuer": "Issuer Name", + "issueDate": "2021-11-06T04:00:00Z", + "expirationDate": "2022-11-06T04:00:00Z", + "thumbprint": "CERTIFICATE_THUMBPRINT", + "valid": true + } + } + } + } +} From 1ee5c24df8a07dbde13324f8b1e49586a12d1418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruslan=20Yakushev=20=F0=9F=9A=B4?= Date: Tue, 1 Feb 2022 15:48:08 -0800 Subject: [PATCH 33/34] fix sample --- .../2022-01-01-preview/examples/Certificates_Patch.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json index 756e5d4fdc86..f26a38744f41 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json @@ -6,11 +6,9 @@ "name": "certificate-firendly-name", "api-version": "2022-01-01-preview", "certificateEnvelope": { - "containerAppEnvelope": { - "tags": { - "tag1": "value1", - "tag2": "value2" - } + "tags": { + "tag1": "value1", + "tag2": "value2" } } }, From 2058c9728b0855ec4c98e7436072cb404a815b03 Mon Sep 17 00:00:00 2001 From: vinisoto Date: Thu, 3 Feb 2022 13:36:19 -0800 Subject: [PATCH 34/34] Use Certificate Id instead of Certificate name --- .../2022-01-01-preview/ContainerApps.json | 4 ++-- .../examples/ContainerApps_CreateOrUpdate.json | 18 +++++++++++++++--- .../examples/ContainerApps_Get.json | 4 ++-- .../ContainerApps_ListByResourceGroup.json | 4 ++-- .../ContainerApps_ListBySubscription.json | 4 ++-- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index c0e8389a7658..eeb88222661a 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -639,8 +639,8 @@ "modelAsString": true } }, - "certificateName": { - "description": "Name of the Certificate to be bound to this hostname. Must exist in the Managed Environment.", + "certificateId": { + "description": "Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment.", "type": "string" } } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json index e67c2ffa9fdf..b0c13e993503 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json @@ -16,12 +16,12 @@ { "name": "www.my-name.com", "bindingType": "SniEnabled", - "certificateName": "my-certificate-for-my-name-dot-com" + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" }, { "name": "www.my-other-name.com", "bindingType": "SniEnabled", - "certificateName": "my-certificate-for-my-other-name-dot-com" + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" } ] } @@ -73,7 +73,19 @@ "fqdn": "testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io", "external": true, "targetPort": 3000, - "transport": "auto" + "transport": "auto", + "customDomains": [ + { + "name": "www.my-name.com", + "bindingType": "SniEnabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" + }, + { + "name": "www.my-other-name.com", + "bindingType": "SniEnabled", + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" + } + ] } }, "template": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json index e3d872d69848..eda7d97e4c09 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json @@ -27,12 +27,12 @@ { "name": "www.my-name.com", "bindingType": "SniEnabled", - "certificateName": "my-certificate-for-my-name-dot-com" + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" }, { "name": "www.my--other-name.com", "bindingType": "SniEnabled", - "certificateName": "my-certificate-for-my-other-name-dot-com" + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" } ] } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json index 8982cc53c029..16216da219e6 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json @@ -28,12 +28,12 @@ { "name": "www.my-name.com", "bindingType": "SniEnabled", - "certificateName": "my-certificate-for-my-name-dot-com" + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" }, { "name": "www.my--other-name.com", "bindingType": "SniEnabled", - "certificateName": "my-certificate-for-my-other-name-dot-com" + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" } ] } diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json index fa6281d8cb60..cdc204f34756 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json @@ -27,12 +27,12 @@ { "name": "www.my-name.com", "bindingType": "SniEnabled", - "certificateName": "my-certificate-for-my-name-dot-com" + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" }, { "name": "www.my--other-name.com", "bindingType": "SniEnabled", - "certificateName": "my-certificate-for-my-other-name-dot-com" + "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" } ] }