azure-native.cdn.Origin
Explore with Pulumi AI
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.
Uses Azure REST API version 2024-09-01. In version 2.x of the Azure Native provider, it used API version 2023-05-01.
Other available API versions: 2023-05-01, 2023-07-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native cdn [ApiVersion]
. See the version guide for details.
Create Origin Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Origin(name: string, args: OriginArgs, opts?: CustomResourceOptions);
@overload
def Origin(resource_name: str,
args: OriginArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Origin(resource_name: str,
opts: Optional[ResourceOptions] = None,
profile_name: Optional[str] = None,
endpoint_name: Optional[str] = None,
host_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
origin_name: Optional[str] = None,
origin_host_header: Optional[str] = None,
enabled: Optional[bool] = None,
priority: Optional[int] = None,
private_link_alias: Optional[str] = None,
private_link_approval_message: Optional[str] = None,
private_link_location: Optional[str] = None,
private_link_resource_id: Optional[str] = None,
https_port: Optional[int] = None,
http_port: Optional[int] = None,
weight: Optional[int] = None)
func NewOrigin(ctx *Context, name string, args OriginArgs, opts ...ResourceOption) (*Origin, error)
public Origin(string name, OriginArgs args, CustomResourceOptions? opts = null)
public Origin(String name, OriginArgs args)
public Origin(String name, OriginArgs args, CustomResourceOptions options)
type: azure-native:cdn:Origin
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. OriginArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. OriginArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. OriginArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. OriginArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. OriginArgs - The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var originResource = new AzureNative.Cdn.Origin("originResource", new()
{
ProfileName = "string",
EndpointName = "string",
HostName = "string",
ResourceGroupName = "string",
OriginName = "string",
OriginHostHeader = "string",
Enabled = false,
Priority = 0,
PrivateLinkAlias = "string",
PrivateLinkApprovalMessage = "string",
PrivateLinkLocation = "string",
PrivateLinkResourceId = "string",
HttpsPort = 0,
HttpPort = 0,
Weight = 0,
});
example, err := cdn.NewOrigin(ctx, "originResource", &cdn.OriginArgs{
ProfileName: pulumi.String("string"),
EndpointName: pulumi.String("string"),
HostName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
OriginName: pulumi.String("string"),
OriginHostHeader: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Priority: pulumi.Int(0),
PrivateLinkAlias: pulumi.String("string"),
PrivateLinkApprovalMessage: pulumi.String("string"),
PrivateLinkLocation: pulumi.String("string"),
PrivateLinkResourceId: pulumi.String("string"),
HttpsPort: pulumi.Int(0),
HttpPort: pulumi.Int(0),
Weight: pulumi.Int(0),
})
var originResource = new Origin("originResource", OriginArgs.builder()
.profileName("string")
.endpointName("string")
.hostName("string")
.resourceGroupName("string")
.originName("string")
.originHostHeader("string")
.enabled(false)
.priority(0)
.privateLinkAlias("string")
.privateLinkApprovalMessage("string")
.privateLinkLocation("string")
.privateLinkResourceId("string")
.httpsPort(0)
.httpPort(0)
.weight(0)
.build());
origin_resource = azure_native.cdn.Origin("originResource",
profile_name="string",
endpoint_name="string",
host_name="string",
resource_group_name="string",
origin_name="string",
origin_host_header="string",
enabled=False,
priority=0,
private_link_alias="string",
private_link_approval_message="string",
private_link_location="string",
private_link_resource_id="string",
https_port=0,
http_port=0,
weight=0)
const originResource = new azure_native.cdn.Origin("originResource", {
profileName: "string",
endpointName: "string",
hostName: "string",
resourceGroupName: "string",
originName: "string",
originHostHeader: "string",
enabled: false,
priority: 0,
privateLinkAlias: "string",
privateLinkApprovalMessage: "string",
privateLinkLocation: "string",
privateLinkResourceId: "string",
httpsPort: 0,
httpPort: 0,
weight: 0,
});
type: azure-native:cdn:Origin
properties:
enabled: false
endpointName: string
hostName: string
httpPort: 0
httpsPort: 0
originHostHeader: string
originName: string
priority: 0
privateLinkAlias: string
privateLinkApprovalMessage: string
privateLinkLocation: string
privateLinkResourceId: string
profileName: string
resourceGroupName: string
weight: 0
Origin Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Origin resource accepts the following input properties:
- Endpoint
Name This property is required. Changes to this property will trigger replacement.
- Name of the endpoint under the profile which is unique globally.
- Host
Name This property is required. 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.
- Profile
Name This property is required. Changes to this property will trigger replacement.
- Name of the CDN profile which is unique within the resource group.
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- Name of the Resource group within the Azure subscription.
- Enabled bool
- Origin is enabled for load balancing or not
- Http
Port int - The value of the HTTP port. Must be between 1 and 65535.
- Https
Port int - The value of the HTTPS port. Must be between 1 and 65535.
- Origin
Host stringHeader - 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
- Origin
Name Changes to this property will trigger replacement.
- Name of the origin that is unique within the endpoint.
- Priority int
- 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
- Private
Link stringAlias - The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'
- Private
Link stringApproval Message - A custom message to be included in the approval request to connect to the Private Link.
- Private
Link stringLocation - The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated
- Private
Link stringResource Id - The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'
- Weight int
- Weight of the origin in given origin group for load balancing. Must be between 1 and 1000
- Endpoint
Name This property is required. Changes to this property will trigger replacement.
- Name of the endpoint under the profile which is unique globally.
- Host
Name This property is required. 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.
- Profile
Name This property is required. Changes to this property will trigger replacement.
- Name of the CDN profile which is unique within the resource group.
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- Name of the Resource group within the Azure subscription.
- Enabled bool
- Origin is enabled for load balancing or not
- Http
Port int - The value of the HTTP port. Must be between 1 and 65535.
- Https
Port int - The value of the HTTPS port. Must be between 1 and 65535.
- Origin
Host stringHeader - 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
- Origin
Name Changes to this property will trigger replacement.
- Name of the origin that is unique within the endpoint.
- Priority int
- 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
- Private
Link stringAlias - The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'
- Private
Link stringApproval Message - A custom message to be included in the approval request to connect to the Private Link.
- Private
Link stringLocation - The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated
- Private
Link stringResource Id - The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'
- Weight int
- Weight of the origin in given origin group for load balancing. Must be between 1 and 1000
- endpoint
Name This property is required. Changes to this property will trigger replacement.
- Name of the endpoint under the profile which is unique globally.
- host
Name This property is required. 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.
- profile
Name This property is required. Changes to this property will trigger replacement.
- Name of the CDN profile which is unique within the resource group.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- Name of the Resource group within the Azure subscription.
- enabled Boolean
- Origin is enabled for load balancing or not
- http
Port Integer - The value of the HTTP port. Must be between 1 and 65535.
- https
Port Integer - The value of the HTTPS port. Must be between 1 and 65535.
- origin
Host StringHeader - 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
- origin
Name Changes to this property will trigger replacement.
- Name of the origin that is unique within the 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
- private
Link StringAlias - The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'
- private
Link StringApproval Message - A custom message to be included in the approval request to connect to the Private Link.
- private
Link StringLocation - The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated
- private
Link StringResource Id - The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'
- weight Integer
- Weight of the origin in given origin group for load balancing. Must be between 1 and 1000
- endpoint
Name This property is required. Changes to this property will trigger replacement.
- Name of the endpoint under the profile which is unique globally.
- host
Name This property is required. 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.
- profile
Name This property is required. Changes to this property will trigger replacement.
- Name of the CDN profile which is unique within the resource group.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- Name of the Resource group within the Azure subscription.
- enabled boolean
- Origin is enabled for load balancing or not
- http
Port number - The value of the HTTP port. Must be between 1 and 65535.
- https
Port number - The value of the HTTPS port. Must be between 1 and 65535.
- origin
Host stringHeader - 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
- origin
Name Changes to this property will trigger replacement.
- Name of the origin that is unique within the endpoint.
- priority number
- 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
- private
Link stringAlias - The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'
- private
Link stringApproval Message - A custom message to be included in the approval request to connect to the Private Link.
- private
Link stringLocation - The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated
- private
Link stringResource Id - The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'
- weight number
- Weight of the origin in given origin group for load balancing. Must be between 1 and 1000
- endpoint_
name This property is required. Changes to this property will trigger replacement.
- Name of the endpoint under the profile which is unique globally.
- host_
name This property is required. str - The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.
- profile_
name This property is required. Changes to this property will trigger replacement.
- Name of the CDN profile which is unique within the resource group.
- resource_
group_ name This property is required. Changes to this property will trigger replacement.
- Name of the Resource group within the Azure subscription.
- enabled bool
- Origin is enabled for load balancing or not
- http_
port int - The value of the HTTP port. Must be between 1 and 65535.
- https_
port int - The value of the HTTPS port. Must be between 1 and 65535.
- origin_
host_ strheader - 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
- origin_
name Changes to this property will trigger replacement.
- Name of the origin that is unique within the endpoint.
- priority int
- 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
- private_
link_ stralias - The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'
- private_
link_ strapproval_ message - A custom message to be included in the approval request to connect to the Private Link.
- private_
link_ strlocation - The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated
- private_
link_ strresource_ id - The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'
- weight int
- Weight of the origin in given origin group for load balancing. Must be between 1 and 1000
- endpoint
Name This property is required. Changes to this property will trigger replacement.
- Name of the endpoint under the profile which is unique globally.
- host
Name This property is required. 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.
- profile
Name This property is required. Changes to this property will trigger replacement.
- Name of the CDN profile which is unique within the resource group.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- Name of the Resource group within the Azure subscription.
- enabled Boolean
- Origin is enabled for load balancing or not
- http
Port Number - The value of the HTTP port. Must be between 1 and 65535.
- https
Port Number - The value of the HTTPS port. Must be between 1 and 65535.
- origin
Host StringHeader - 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
- origin
Name Changes to this property will trigger replacement.
- Name of the origin that is unique within the endpoint.
- priority Number
- 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
- private
Link StringAlias - The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'
- private
Link StringApproval Message - A custom message to be included in the approval request to connect to the Private Link.
- private
Link StringLocation - The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated
- private
Link StringResource Id - The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'
- weight Number
- Weight of the origin in given origin group for load balancing. Must be between 1 and 1000
Outputs
All input properties are implicitly available as output properties. Additionally, the Origin resource produces the following output properties:
- Azure
Api stringVersion - The Azure API version of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- Private
Endpoint stringStatus - The approval status for the connection to the Private Link
- Provisioning
State string - Provisioning status of the origin.
- Resource
State string - Resource status of the origin.
- System
Data Pulumi.Azure Native. Cdn. Outputs. System Data Response - Read only system data
- Type string
- Resource type.
- Azure
Api stringVersion - The Azure API version of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- Private
Endpoint stringStatus - The approval status for the connection to the Private Link
- Provisioning
State string - Provisioning status of the origin.
- Resource
State string - Resource status of the origin.
- System
Data SystemData Response - Read only system data
- Type string
- Resource type.
- azure
Api StringVersion - The Azure API version of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- private
Endpoint StringStatus - The approval status for the connection to the Private Link
- provisioning
State String - Provisioning status of the origin.
- resource
State String - Resource status of the origin.
- system
Data SystemData Response - Read only system data
- type String
- Resource type.
- azure
Api stringVersion - The Azure API version of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Resource name.
- private
Endpoint stringStatus - The approval status for the connection to the Private Link
- provisioning
State string - Provisioning status of the origin.
- resource
State string - Resource status of the origin.
- system
Data SystemData Response - Read only system data
- type string
- Resource type.
- azure_
api_ strversion - The Azure API version of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Resource name.
- private_
endpoint_ strstatus - The approval status for the connection to the Private Link
- provisioning_
state str - Provisioning status of the origin.
- resource_
state str - Resource status of the origin.
- system_
data SystemData Response - Read only system data
- type str
- Resource type.
- azure
Api StringVersion - The Azure API version of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- private
Endpoint StringStatus - The approval status for the connection to the Private Link
- provisioning
State String - Provisioning status of the origin.
- resource
State String - Resource status of the origin.
- system
Data Property Map - Read only system data
- type String
- Resource type.
Supporting Types
SystemDataResponse, SystemDataResponseArgs
- Created
At string - The timestamp of resource creation (UTC)
- Created
By string - An identifier for the identity that created the resource
- Created
By stringType - The type of identity that created the resource
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - An identifier for the identity that last modified the resource
- Last
Modified stringBy Type - The type of identity that last modified the resource
- Created
At string - The timestamp of resource creation (UTC)
- Created
By string - An identifier for the identity that created the resource
- Created
By stringType - The type of identity that created the resource
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - An identifier for the identity that last modified the resource
- Last
Modified stringBy Type - The type of identity that last modified the resource
- created
At String - The timestamp of resource creation (UTC)
- created
By String - An identifier for the identity that created the resource
- created
By StringType - The type of identity that created the resource
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - An identifier for the identity that last modified the resource
- last
Modified StringBy Type - The type of identity that last modified the resource
- created
At string - The timestamp of resource creation (UTC)
- created
By string - An identifier for the identity that created the resource
- created
By stringType - The type of identity that created the resource
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - An identifier for the identity that last modified the resource
- last
Modified stringBy Type - The type of identity that last modified the resource
- created_
at str - The timestamp of resource creation (UTC)
- created_
by str - An identifier for the identity that created the resource
- created_
by_ strtype - The type of identity that created the resource
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - An identifier for the identity that last modified the resource
- last_
modified_ strby_ type - The type of identity that last modified the resource
- created
At String - The timestamp of resource creation (UTC)
- created
By String - An identifier for the identity that created the resource
- created
By StringType - The type of identity that created the resource
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - An identifier for the identity that last modified the resource
- last
Modified StringBy Type - The type of identity that last modified the resource
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:cdn:Origin www-someDomain-net /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0