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. API Version: 2020-09-01.
Example Usage
Origins_Create
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var origin = new AzureNative.Cdn.Origin("origin", new()
{
Enabled = true,
EndpointName = "endpoint1",
HostName = "www.someDomain.net",
HttpPort = 80,
HttpsPort = 443,
OriginHostHeader = "www.someDomain.net",
OriginName = "www-someDomain-net",
Priority = 1,
PrivateLinkApprovalMessage = "Please approve the connection request for this Private Link",
PrivateLinkLocation = "eastus",
PrivateLinkResourceId = "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1",
ProfileName = "profile1",
ResourceGroupName = "RG",
Weight = 50,
});
});
package main
import (
cdn "github.com/pulumi/pulumi-azure-native-sdk/cdn"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cdn.NewOrigin(ctx, "origin", &cdn.OriginArgs{
Enabled: pulumi.Bool(true),
EndpointName: pulumi.String("endpoint1"),
HostName: pulumi.String("www.someDomain.net"),
HttpPort: pulumi.Int(80),
HttpsPort: pulumi.Int(443),
OriginHostHeader: pulumi.String("www.someDomain.net"),
OriginName: pulumi.String("www-someDomain-net"),
Priority: pulumi.Int(1),
PrivateLinkApprovalMessage: pulumi.String("Please approve the connection request for this Private Link"),
PrivateLinkLocation: pulumi.String("eastus"),
PrivateLinkResourceId: pulumi.String("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1"),
ProfileName: pulumi.String("profile1"),
ResourceGroupName: pulumi.String("RG"),
Weight: pulumi.Int(50),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.cdn.Origin;
import com.pulumi.azurenative.cdn.OriginArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var origin = new Origin("origin", OriginArgs.builder()
.enabled(true)
.endpointName("endpoint1")
.hostName("www.someDomain.net")
.httpPort(80)
.httpsPort(443)
.originHostHeader("www.someDomain.net")
.originName("www-someDomain-net")
.priority(1)
.privateLinkApprovalMessage("Please approve the connection request for this Private Link")
.privateLinkLocation("eastus")
.privateLinkResourceId("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1")
.profileName("profile1")
.resourceGroupName("RG")
.weight(50)
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
origin = azure_native.cdn.Origin("origin",
enabled=True,
endpoint_name="endpoint1",
host_name="www.someDomain.net",
http_port=80,
https_port=443,
origin_host_header="www.someDomain.net",
origin_name="www-someDomain-net",
priority=1,
private_link_approval_message="Please approve the connection request for this Private Link",
private_link_location="eastus",
private_link_resource_id="/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1",
profile_name="profile1",
resource_group_name="RG",
weight=50)
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const origin = new azure_native.cdn.Origin("origin", {
enabled: true,
endpointName: "endpoint1",
hostName: "www.someDomain.net",
httpPort: 80,
httpsPort: 443,
originHostHeader: "www.someDomain.net",
originName: "www-someDomain-net",
priority: 1,
privateLinkApprovalMessage: "Please approve the connection request for this Private Link",
privateLinkLocation: "eastus",
privateLinkResourceId: "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1",
profileName: "profile1",
resourceGroupName: "RG",
weight: 50,
});
resources:
origin:
type: azure-native:cdn:Origin
properties:
enabled: true
endpointName: endpoint1
hostName: www.someDomain.net
httpPort: 80
httpsPort: 443
originHostHeader: www.someDomain.net
originName: www-someDomain-net
priority: 1
privateLinkApprovalMessage: Please approve the connection request for this Private Link
privateLinkLocation: eastus
privateLinkResourceId: /subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1
profileName: profile1
resourceGroupName: RG
weight: 50
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 string
- The unique name of the resource.
- args OriginArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args OriginArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OriginArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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: "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,
})
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 string - Name of the endpoint under the profile which is unique globally.
- Host
Name 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 string - Name of the CDN profile which is unique within the resource group.
- Resource
Group stringName - 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 string - 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 string - Name of the endpoint under the profile which is unique globally.
- Host
Name 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 string - Name of the CDN profile which is unique within the resource group.
- Resource
Group stringName - 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 string - 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 String - Name of the endpoint under the profile which is unique globally.
- host
Name 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 String - Name of the CDN profile which is unique within the resource group.
- resource
Group StringName - 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 String - 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 string - Name of the endpoint under the profile which is unique globally.
- host
Name 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 string - Name of the CDN profile which is unique within the resource group.
- resource
Group stringName - 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 string - 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 str - Name of the endpoint under the profile which is unique globally.
- host_
name 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 str - Name of the CDN profile which is unique within the resource group.
- resource_
group_ strname - 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 str - 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 String - Name of the endpoint under the profile which is unique globally.
- host
Name 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 String - Name of the CDN profile which is unique within the resource group.
- resource
Group StringName - 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 String - 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:
- 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.
- 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.
- 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.
- 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.
- 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.
- 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/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0