Skip to main content

origins

Creates, updates, deletes, gets or lists an origins resource.

Overview

Nameorigins
TypeResource
Idazure.cdn.origins

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
enabledbooleanOrigin is enabled for load balancing or not.
hostNamestringThe address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. Required.
httpPortintegerThe value of the HTTP port. Must be between 1 and 65535.
httpsPortintegerThe value of the HTTPS port. Must be between 1 and 65535.
originHostHeaderstringThe 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.
priorityintegerPriority 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.
privateEndpointStatusstringThe approval status for the connection to the Private Link. Known values are: "Pending", "Approved", "Rejected", "Disconnected", and "Timeout". (Pending, Approved, Rejected, Disconnected, Timeout)
privateLinkAliasstringThe Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'.
privateLinkApprovalMessagestringA custom message to be included in the approval request to connect to the Private Link.
privateLinkLocationstringThe location of the Private Link resource. Required only if 'privateLinkResourceId' is populated.
privateLinkResourceIdstringThe Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'.
provisioningStatestringProvisioning status of the origin. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". (Succeeded, Failed, Updating, Deleting, Creating)
resourceStatestringResource status of the origin. Known values are: "Creating", "Active", and "Deleting". (Creating, Active, Deleting)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
weightintegerWeight of the origin in given origin group for load balancing. Must be between 1 and 1000.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, profile_name, endpoint_name, origin_name, subscription_idGets an existing origin within an endpoint.
list_by_endpointselectresource_group_name, profile_name, endpoint_name, subscription_idLists all of the existing origins within an endpoint.
createinsertresource_group_name, profile_name, endpoint_name, origin_name, subscription_idCreates a new origin within the specified endpoint.
updateupdateresource_group_name, profile_name, endpoint_name, origin_name, subscription_idUpdates an existing origin within an endpoint.
deletedeleteresource_group_name, profile_name, endpoint_name, origin_name, subscription_idDeletes an existing origin within an endpoint.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpoint_namestringName of the endpoint under the profile which is unique globally. Required.
origin_namestringName of the origin which is unique within the endpoint. Required.
profile_namestringName of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Gets an existing origin within an endpoint.

SELECT
id,
name,
enabled,
hostName,
httpPort,
httpsPort,
originHostHeader,
priority,
privateEndpointStatus,
privateLinkAlias,
privateLinkApprovalMessage,
privateLinkLocation,
privateLinkResourceId,
provisioningState,
resourceState,
systemData,
type,
weight
FROM azure.cdn.origins
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND profile_name = '{{ profile_name }}' -- required
AND endpoint_name = '{{ endpoint_name }}' -- required
AND origin_name = '{{ origin_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a new origin within the specified endpoint.

INSERT INTO azure.cdn.origins (
properties,
resource_group_name,
profile_name,
endpoint_name,
origin_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ profile_name }}',
'{{ endpoint_name }}',
'{{ origin_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Updates an existing origin within an endpoint.

UPDATE azure.cdn.origins
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND profile_name = '{{ profile_name }}' --required
AND endpoint_name = '{{ endpoint_name }}' --required
AND origin_name = '{{ origin_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes an existing origin within an endpoint.

DELETE FROM azure.cdn.origins
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND profile_name = '{{ profile_name }}' --required
AND endpoint_name = '{{ endpoint_name }}' --required
AND origin_name = '{{ origin_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;