Custom Domains - Enable Custom Https

Enable https delivery of the custom domain.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps?api-version=2024-02-01

URI Parameters

Name In Required Type Description
customDomainName
path True

string

Name of the custom domain within an endpoint.

endpointName
path True

string

Name of the endpoint under the profile which is unique globally.

profileName
path True

string

Name of the CDN profile which is unique within the resource group.

resourceGroupName
path True

string

minLength: 1
maxLength: 90
pattern: ^[-\w\._\(\)]+$

Name of the Resource group within the Azure subscription.

subscriptionId
path True

string

Azure Subscription ID.

api-version
query True

string

Version of the API to be used with the client request. Current version is 2024-02-01.

Request Body

The request body can be one of the following:

Name Description
CdnManagedHttpsParameters

Defines the certificate source parameters using CDN managed certificate for enabling SSL.

UserManagedHttpsParameters

Defines the certificate source parameters using user's keyvault certificate for enabling SSL.

CdnManagedHttpsParameters

Defines the certificate source parameters using CDN managed certificate for enabling SSL.

Name Required Type Description
certificateSource True string:

Cdn

Defines the source of the SSL certificate.

certificateSourceParameters True

CdnCertificateSourceParameters

Defines the certificate source parameters using CDN managed certificate for enabling SSL.

protocolType True

ProtocolType

Defines the TLS extension protocol that is used for secure delivery.

minimumTlsVersion

MinimumTlsVersion

TLS protocol version that will be used for Https

UserManagedHttpsParameters

Defines the certificate source parameters using user's keyvault certificate for enabling SSL.

Name Required Type Description
certificateSource True string:

AzureKeyVault

Defines the source of the SSL certificate.

certificateSourceParameters True

KeyVaultCertificateSourceParameters

Defines the certificate source parameters using user's keyvault certificate for enabling SSL.

protocolType True

ProtocolType

Defines the TLS extension protocol that is used for secure delivery.

minimumTlsVersion

MinimumTlsVersion

TLS protocol version that will be used for Https

Responses

Name Type Description
200 OK

CustomDomain

OK. The request has succeeded.

202 Accepted

CustomDomain

Accepted and the operation will complete asynchronously.

Headers

location: string

Other Status Codes

ErrorResponse

CDN error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate
CustomDomains_EnableCustomHttpsUsingYourOwnCertificate

CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate

Sample request

POST https://management.azure.com/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customDomains/www-someDomain-net/enableCustomHttps?api-version=2024-02-01

Sample response

{
  "name": "www-someDomain-net",
  "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net",
  "type": "Microsoft.Cdn/profiles/endpoints/customdomains",
  "properties": {
    "provisioningState": "Succeeded",
    "resourceState": "Active",
    "hostName": "www.someDomain.net",
    "customHttpsProvisioningState": "Enabled",
    "customHttpsProvisioningSubstate": "CertificateDeployed",
    "validationData": "validationdata"
  }
}
azure-asyncoperation: https://management.azure.com/subscriptions/subid/resourcegroups/resourceGroupName/providers/Microsoft.Cdn/operationresults/operationId?api-version=2024-02-01
{
  "name": "www-someDomain-net",
  "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net",
  "type": "Microsoft.Cdn/profiles/endpoints/customdomains",
  "properties": {
    "provisioningState": "Succeeded",
    "resourceState": "Active",
    "hostName": "www.someDomain.net",
    "customHttpsProvisioningState": "Enabling",
    "customHttpsProvisioningSubstate": "PendingDomainControlValidationREquestApproval",
    "validationData": "validationdata"
  }
}

CustomDomains_EnableCustomHttpsUsingYourOwnCertificate

Sample request

POST https://management.azure.com/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customDomains/www-someDomain-net/enableCustomHttps?api-version=2024-02-01

Sample response

{
  "name": "www-someDomain-net",
  "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net",
  "type": "Microsoft.Cdn/profiles/endpoints/customdomains",
  "properties": {
    "provisioningState": "Succeeded",
    "resourceState": "Active",
    "hostName": "www.someDomain.net",
    "customHttpsProvisioningState": "Enabled",
    "customHttpsProvisioningSubstate": "CertificateDeployed",
    "validationData": "validationdata"
  }
}
azure-asyncoperation: https://management.azure.com/subscriptions/subid/resourcegroups/resourceGroupName/providers/Microsoft.Cdn/operationresults/operationId?api-version=2024-02-01
{
  "name": "www-someDomain-net",
  "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net",
  "type": "Microsoft.Cdn/profiles/endpoints/customdomains",
  "properties": {
    "provisioningState": "Succeeded",
    "resourceState": "Active",
    "hostName": "www.someDomain.net",
    "customHttpsProvisioningState": "Enabling",
    "customHttpsProvisioningSubstate": "PendingDomainControlValidationREquestApproval",
    "validationData": "validationdata"
  }
}

Definitions

Name Description
CdnCertificateSourceParameters

Defines the parameters for using CDN managed certificate for securing custom domain.

CdnManagedHttpsParameters

Defines the certificate source parameters using CDN managed certificate for enabling SSL.

CertificateType

Type of certificate used

CustomDomain

Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com.

CustomDomainResourceState

Resource status of the custom domain.

CustomHttpsProvisioningState

Provisioning status of the custom domain.

CustomHttpsProvisioningSubstate

Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step.

DeleteRule

Describes the action that shall be taken when the certificate is removed from Key Vault.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

IdentityType

The type of identity that creates/modifies resources

KeyVaultCertificateSourceParameters

Describes the parameters for using a user's KeyVault certificate for securing custom domain.

MinimumTlsVersion

TLS protocol version that will be used for Https

ProtocolType

Defines the TLS extension protocol that is used for secure delivery.

SystemData

Read only system data

UpdateRule

Describes the action that shall be taken when the certificate is updated in Key Vault.

UserManagedHttpsParameters

Defines the certificate source parameters using user's keyvault certificate for enabling SSL.

CdnCertificateSourceParameters

Defines the parameters for using CDN managed certificate for securing custom domain.

Name Type Description
certificateType

CertificateType

Type of certificate used

typeName string:

CdnCertificateSourceParameters

CdnManagedHttpsParameters

Defines the certificate source parameters using CDN managed certificate for enabling SSL.

Name Type Description
certificateSource string:

Cdn

Defines the source of the SSL certificate.

certificateSourceParameters

CdnCertificateSourceParameters

Defines the certificate source parameters using CDN managed certificate for enabling SSL.

minimumTlsVersion

MinimumTlsVersion

TLS protocol version that will be used for Https

protocolType

ProtocolType

Defines the TLS extension protocol that is used for secure delivery.

CertificateType

Type of certificate used

Value Description
Dedicated
Shared

CustomDomain

Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.customHttpsParameters CustomDomainHttpsParameters:

Certificate parameters for securing custom HTTPS

properties.customHttpsProvisioningState

CustomHttpsProvisioningState

Provisioning status of the custom domain.

properties.customHttpsProvisioningSubstate

CustomHttpsProvisioningSubstate

Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step.

properties.hostName

string

The host name of the custom domain. Must be a domain name.

properties.provisioningState

CustomHttpsProvisioningState

Provisioning status of Custom Https of the custom domain.

properties.resourceState

CustomDomainResourceState

Resource status of the custom domain.

properties.validationData

string

Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China.

systemData

SystemData

Read only system data

type

string

Resource type.

CustomDomainResourceState

Resource status of the custom domain.

Value Description
Active
Creating
Deleting

CustomHttpsProvisioningState

Provisioning status of the custom domain.

Value Description
Disabled
Disabling
Enabled
Enabling
Failed

CustomHttpsProvisioningSubstate

Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step.

Value Description
CertificateDeleted
CertificateDeployed
DeletingCertificate
DeployingCertificate
DomainControlValidationRequestApproved
DomainControlValidationRequestRejected
DomainControlValidationRequestTimedOut
IssuingCertificate
PendingDomainControlValidationREquestApproval
SubmittingDomainControlValidationRequest

DeleteRule

Describes the action that shall be taken when the certificate is removed from Key Vault.

Value Description
NoAction

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

IdentityType

The type of identity that creates/modifies resources

Value Description
application
key
managedIdentity
user

KeyVaultCertificateSourceParameters

Describes the parameters for using a user's KeyVault certificate for securing custom domain.

Name Type Description
deleteRule

DeleteRule

Describes the action that shall be taken when the certificate is removed from Key Vault.

resourceGroupName

string

Resource group of the user's Key Vault containing the SSL certificate

secretName

string

The name of Key Vault Secret (representing the full certificate PFX) in Key Vault.

secretVersion

string

The version(GUID) of Key Vault Secret in Key Vault.

subscriptionId

string

Subscription Id of the user's Key Vault containing the SSL certificate

typeName string:

KeyVaultCertificateSourceParameters

updateRule

UpdateRule

Describes the action that shall be taken when the certificate is updated in Key Vault.

vaultName

string

The name of the user's Key Vault containing the SSL certificate

MinimumTlsVersion

TLS protocol version that will be used for Https

Value Description
None
TLS10
TLS12

ProtocolType

Defines the TLS extension protocol that is used for secure delivery.

Value Description
IPBased
ServerNameIndication

SystemData

Read only system data

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC)

createdBy

string

An identifier for the identity that created the resource

createdByType

IdentityType

The type of identity that created the resource

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

An identifier for the identity that last modified the resource

lastModifiedByType

IdentityType

The type of identity that last modified the resource

UpdateRule

Describes the action that shall be taken when the certificate is updated in Key Vault.

Value Description
NoAction

UserManagedHttpsParameters

Defines the certificate source parameters using user's keyvault certificate for enabling SSL.

Name Type Description
certificateSource string:

AzureKeyVault

Defines the source of the SSL certificate.

certificateSourceParameters

KeyVaultCertificateSourceParameters

Defines the certificate source parameters using user's keyvault certificate for enabling SSL.

minimumTlsVersion

MinimumTlsVersion

TLS protocol version that will be used for Https

protocolType

ProtocolType

Defines the TLS extension protocol that is used for secure delivery.