Origins - Update
Updates an existing origin within an endpoint.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}?api-version=2024-02-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
Name of the endpoint under the profile which is unique globally. |
origin
|
path | True |
string |
Name of the origin which is unique within the endpoint. |
profile
|
path | True |
string |
Name of the CDN profile which is unique within the resource group. |
resource
|
path | True |
string |
Name of the Resource group within the Azure subscription. Regex pattern: |
subscription
|
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
Name | Type | Description |
---|---|---|
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.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 |
OK. The request has succeeded. |
|
202 Accepted |
Accepted and the operation will complete asynchronously. Headers location: string |
|
Other Status Codes |
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_Update
Sample Request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net?api-version=2024-02-01
{
"properties": {
"httpPort": 42,
"httpsPort": 43,
"originHostHeader": "www.someDomain2.net",
"priority": 1,
"weight": 50,
"enabled": true,
"privateLinkAlias": "APPSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice"
}
}
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": 42,
"httpsPort": 43,
"originHostHeader": "www.someDomain2.net",
"priority": 1,
"weight": 50,
"enabled": true,
"privateEndpointStatus": "Pending",
"privateLinkApprovalMessage": "Please approve the connection request for this Private Link",
"privateLinkAlias": "APPSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice"
}
}
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/origins/www-someDomain-net",
"type": "Microsoft.Cdn/profiles/endpoints/origins",
"properties": {
"provisioningState": "Succeeded",
"resourceState": "Active",
"hostName": "www.someDomain.net",
"httpPort": 42,
"httpsPort": 43,
"originHostHeader": "www.someDomain2.net",
"priority": 1,
"weight": 50,
"enabled": true,
"privateEndpointStatus": "Pending",
"privateLinkApprovalMessage": "Please approve the connection request for this Private Link",
"privateLinkAlias": "APPSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice"
}
}
Definitions
Name | Description |
---|---|
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Identity |
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. |
Origin |
Provisioning status of the origin. |
Origin |
Resource status of the origin. |
Origin |
Origin properties needed for origin update. |
Private |
The approval status for the connection to the Private Link |
System |
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 |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
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 |
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 |
Provisioning status of the origin. |
|
properties.resourceState |
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 |
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 |
OriginUpdateParameters
Origin properties needed for origin update.
Name | Type | Description |
---|---|---|
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.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 |
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 |
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 |
The type of identity that last modified the resource |