origins
Creates, updates, deletes, gets or lists an origins resource.
Overview
| Name | origins |
| Type | Resource |
| Id | azure.cdn.origins |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_endpoint
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
enabled | boolean | Origin is enabled for load balancing or not. |
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. Required. |
httpPort | integer | The value of the HTTP port. Must be between 1 and 65535. |
httpsPort | integer | The value of the HTTPS port. Must be between 1 and 65535. |
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. |
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. |
privateEndpointStatus | string | The approval status for the connection to the Private Link. Known values are: "Pending", "Approved", "Rejected", "Disconnected", and "Timeout". (Pending, Approved, Rejected, Disconnected, Timeout) |
privateLinkAlias | string | The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'. |
privateLinkApprovalMessage | string | A custom message to be included in the approval request to connect to the Private Link. |
privateLinkLocation | string | The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated. |
privateLinkResourceId | string | The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'. |
provisioningState | string | Provisioning status of the origin. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". (Succeeded, Failed, Updating, Deleting, Creating) |
resourceState | string | Resource status of the origin. Known values are: "Creating", "Active", and "Deleting". (Creating, Active, Deleting) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
weight | integer | Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
enabled | boolean | Origin is enabled for load balancing or not. |
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. Required. |
httpPort | integer | The value of the HTTP port. Must be between 1 and 65535. |
httpsPort | integer | The value of the HTTPS port. Must be between 1 and 65535. |
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. |
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. |
privateEndpointStatus | string | The approval status for the connection to the Private Link. Known values are: "Pending", "Approved", "Rejected", "Disconnected", and "Timeout". (Pending, Approved, Rejected, Disconnected, Timeout) |
privateLinkAlias | string | The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'. |
privateLinkApprovalMessage | string | A custom message to be included in the approval request to connect to the Private Link. |
privateLinkLocation | string | The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated. |
privateLinkResourceId | string | The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'. |
provisioningState | string | Provisioning status of the origin. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". (Succeeded, Failed, Updating, Deleting, Creating) |
resourceState | string | Resource status of the origin. Known values are: "Creating", "Active", and "Deleting". (Creating, Active, Deleting) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
weight | integer | Weight 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, profile_name, endpoint_name, origin_name, subscription_id | Gets an existing origin within an endpoint. | |
list_by_endpoint | select | resource_group_name, profile_name, endpoint_name, subscription_id | Lists all of the existing origins within an endpoint. | |
create | insert | resource_group_name, profile_name, endpoint_name, origin_name, subscription_id | Creates a new origin within the specified endpoint. | |
update | update | resource_group_name, profile_name, endpoint_name, origin_name, subscription_id | Updates an existing origin within an endpoint. | |
delete | delete | resource_group_name, profile_name, endpoint_name, origin_name, subscription_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
endpoint_name | string | Name of the endpoint under the profile which is unique globally. Required. |
origin_name | string | Name of the origin which is unique within the endpoint. Required. |
profile_name | string | Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_endpoint
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
;
Lists all of the existing origins 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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: origins
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the origins resource.
- name: profile_name
value: "{{ profile_name }}"
description: Required parameter for the origins resource.
- name: endpoint_name
value: "{{ endpoint_name }}"
description: Required parameter for the origins resource.
- name: origin_name
value: "{{ origin_name }}"
description: Required parameter for the origins resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the origins resource.
- name: properties
description: |
The JSON object that contains the properties of the origin.
value:
hostName: "{{ hostName }}"
httpPort: {{ httpPort }}
httpsPort: {{ httpsPort }}
originHostHeader: "{{ originHostHeader }}"
priority: {{ priority }}
weight: {{ weight }}
enabled: {{ enabled }}
privateLinkAlias: "{{ privateLinkAlias }}"
privateLinkResourceId: "{{ privateLinkResourceId }}"
privateLinkLocation: "{{ privateLinkLocation }}"
privateLinkApprovalMessage: "{{ privateLinkApprovalMessage }}"
resourceState: "{{ resourceState }}"
provisioningState: "{{ provisioningState }}"
privateEndpointStatus: "{{ privateEndpointStatus }}"
UPDATE examples
- update
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
- delete
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
;