Origins - Create

Creates a new origin within the specified endpoint.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}?api-version=2023-05-01

URI Parameters

Name In Required Type Description
endpointName
path True

string

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

originName
path True

string

Name of the origin that is unique within the endpoint.

profileName
path True

string

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

resourceGroupName
path True

string

Name of the Resource group within the Azure subscription.

Regex pattern: ^[-\w\._\(\)]+$

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 2023-05-01.

Request Body

Name Required Type Description
properties.hostName True

string

The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.

properties.enabled

boolean

Origin is enabled for load balancing or not

properties.httpPort

integer

The value of the HTTP port. Must be between 1 and 65535.

properties.httpsPort

integer

The value of the HTTPS port. Must be between 1 and 65535.

properties.originHostHeader

string

The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint

properties.priority

integer

Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5

properties.privateLinkAlias

string

The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'

properties.privateLinkApprovalMessage

string

A custom message to be included in the approval request to connect to the Private Link.

properties.privateLinkLocation

string

The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated

properties.privateLinkResourceId

string

The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'

properties.weight

integer

Weight of the origin in given origin group for load balancing. Must be between 1 and 1000

Responses

Name Type Description
200 OK

Origin

OK. The request has succeeded.

201 Created

Origin

Created. The request has been fulfilled and a new origin has been created.

202 Accepted

Origin

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

Origins_Create

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net?api-version=2023-05-01

{
  "properties": {
    "hostName": "www.someDomain.net",
    "httpPort": 80,
    "httpsPort": 443,
    "originHostHeader": "www.someDomain.net",
    "priority": 1,
    "weight": 50,
    "enabled": true,
    "privateLinkResourceId": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1",
    "privateLinkLocation": "eastus",
    "privateLinkApprovalMessage": "Please approve the connection request for this Private Link"
  }
}

Sample Response

{
  "name": "www-someDomain-net",
  "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net",
  "type": "Microsoft.Cdn/profiles/endpoints/origins",
  "properties": {
    "provisioningState": "Succeeded",
    "resourceState": "Active",
    "hostName": "www.someDomain.net",
    "httpPort": 80,
    "httpsPort": 443,
    "originHostHeader": "www.someDomain.net",
    "priority": 1,
    "weight": 50,
    "enabled": true,
    "privateEndpointStatus": "Pending",
    "privateLinkResourceId": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1",
    "privateLinkLocation": "eastus",
    "privateLinkApprovalMessage": "Please approve the connection request for this Private Link"
  }
}
{
  "name": "www-someDomain-net",
  "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net",
  "type": "Microsoft.Cdn/profiles/endpoints/origins",
  "properties": {
    "provisioningState": "Succeeded",
    "resourceState": "Active",
    "hostName": "www.someDomain.net",
    "httpPort": 80,
    "httpsPort": 443,
    "originHostHeader": "www.someDomain.net",
    "priority": 1,
    "weight": 50,
    "enabled": true,
    "privateEndpointStatus": "Pending",
    "privateLinkApprovalMessage": "",
    "privateLinkResourceId": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1",
    "privateLinkLocation": "eastus"
  }
}
azure-asyncoperation: https://management.azure.com/subscriptions/subid/resourcegroups/resourceGroupName/providers/Microsoft.Cdn/operationresults/operationId?api-version=2023-05-01
{
  "name": "www-someDomain-net",
  "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net",
  "type": "Microsoft.Cdn/profiles/endpoints/origins",
  "properties": {
    "provisioningState": "Succeeded",
    "resourceState": "Active",
    "hostName": "www.someDomain.net",
    "httpPort": 80,
    "httpsPort": 443,
    "originHostHeader": "www.someDomain.net",
    "priority": 1,
    "weight": 50,
    "enabled": true,
    "privateEndpointStatus": "Pending",
    "privateLinkApprovalMessage": "",
    "privateLinkResourceId": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1",
    "privateLinkLocation": "eastus"
  }
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

IdentityType

The type of identity that creates/modifies resources

Origin

CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins.

OriginProvisioningState

Provisioning status of the origin.

OriginResourceState

Resource status of the origin.

PrivateEndpointStatus

The approval status for the connection to the Private Link

SystemData

Read only system data

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

Name Type Description
application

string

key

string

managedIdentity

string

user

string

Origin

CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.enabled

boolean

Origin is enabled for load balancing or not

properties.hostName

string

The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.

properties.httpPort

integer

The value of the HTTP port. Must be between 1 and 65535.

properties.httpsPort

integer

The value of the HTTPS port. Must be between 1 and 65535.

properties.originHostHeader

string

The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint

properties.priority

integer

Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5

properties.privateEndpointStatus

PrivateEndpointStatus

The approval status for the connection to the Private Link

properties.privateLinkAlias

string

The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'

properties.privateLinkApprovalMessage

string

A custom message to be included in the approval request to connect to the Private Link.

properties.privateLinkLocation

string

The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated

properties.privateLinkResourceId

string

The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'

properties.provisioningState

OriginProvisioningState

Provisioning status of the origin.

properties.resourceState

OriginResourceState

Resource status of the origin.

properties.weight

integer

Weight of the origin in given origin group for load balancing. Must be between 1 and 1000

systemData

SystemData

Read only system data

type

string

Resource type.

OriginProvisioningState

Provisioning status of the origin.

Name Type Description
Creating

string

Deleting

string

Failed

string

Succeeded

string

Updating

string

OriginResourceState

Resource status of the origin.

Name Type Description
Active

string

Creating

string

Deleting

string

PrivateEndpointStatus

The approval status for the connection to the Private Link

Name Type Description
Approved

string

Disconnected

string

Pending

string

Rejected

string

Timeout

string

SystemData

Read only system data

Name Type Description
createdAt

string

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

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