Origin Args
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, 2025-04-15. 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/#accessing-any-api-version-via-local-packages for details.
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/v3"
"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
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}
Constructors
Properties
Name of the endpoint under the profile which is unique globally.
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
Name of the origin that is unique within the endpoint.
The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'
A custom message to be included in the approval request to connect to the Private Link.
The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated
The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'
Name of the CDN profile which is unique within the resource group.
Name of the Resource group within the Azure subscription.