Skip to main content

afd_origins

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

Overview

Nameafd_origins
TypeResource
Idazure.cdn.afd_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.
azureOriginobjectResource reference to the Azure origin resource.
deploymentStatusstringKnown values are: "NotStarted", "InProgress", "Succeeded", and "Failed". (NotStarted, InProgress, Succeeded, Failed)
enabledStatestringWhether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. Known values are: "Enabled" and "Disabled". (Enabled, Disabled)
enforceCertificateNameCheckbooleanWhether to enable certificate name check at origin level.
hostNamestringThe address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.
httpPortintegerThe value of the HTTP port. Must be between 1 and 65535.
httpsPortintegerThe value of the HTTPS port. Must be between 1 and 65535.
originGroupNamestringThe name of the origin group which contains this origin.
originHostHeaderstringThe host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door 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.
provisioningStatestringProvisioning status. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". (Succeeded, Failed, Updating, Deleting, Creating)
sharedPrivateLinkResourceobjectThe properties of the private link resource for private origin.
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, origin_group_name, origin_name, subscription_idGets an existing origin within an origin group.
list_by_origin_groupselectresource_group_name, profile_name, origin_group_name, subscription_idLists all of the existing origins within an origin group.
createinsertresource_group_name, profile_name, origin_group_name, origin_name, subscription_idCreates a new origin within the specified origin group.
updateupdateresource_group_name, profile_name, origin_group_name, origin_name, subscription_idUpdates an existing origin within an origin group.
deletedeleteresource_group_name, profile_name, origin_group_name, origin_name, subscription_idDeletes an existing origin within an origin group.

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
origin_group_namestringName of the origin group which is unique within the endpoint. Required.
origin_namestringName of the origin which is unique within the profile. 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 origin group.

SELECT
id,
name,
azureOrigin,
deploymentStatus,
enabledState,
enforceCertificateNameCheck,
hostName,
httpPort,
httpsPort,
originGroupName,
originHostHeader,
priority,
provisioningState,
sharedPrivateLinkResource,
systemData,
type,
weight
FROM azure.cdn.afd_origins
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND profile_name = '{{ profile_name }}' -- required
AND origin_group_name = '{{ origin_group_name }}' -- required
AND origin_name = '{{ origin_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a new origin within the specified origin group.

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

UPDATE examples

Updates an existing origin within an origin group.

UPDATE azure.cdn.afd_origins
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND profile_name = '{{ profile_name }}' --required
AND origin_group_name = '{{ origin_group_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 origin group.

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