OriginArgs

data class OriginArgs(val enabled: Output<Boolean>? = null, val endpointName: Output<String>? = null, val hostName: Output<String>? = null, val httpPort: Output<Int>? = null, val httpsPort: Output<Int>? = null, val originHostHeader: Output<String>? = null, val originName: Output<String>? = null, val priority: Output<Int>? = null, val privateLinkAlias: Output<String>? = null, val privateLinkApprovalMessage: Output<String>? = null, val privateLinkLocation: Output<String>? = null, val privateLinkResourceId: Output<String>? = null, val profileName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val weight: Output<Int>? = null) : ConvertibleToJava<OriginArgs>

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

Link copied to clipboard
constructor(enabled: Output<Boolean>? = null, endpointName: Output<String>? = null, hostName: Output<String>? = null, httpPort: Output<Int>? = null, httpsPort: Output<Int>? = null, originHostHeader: Output<String>? = null, originName: Output<String>? = null, priority: Output<Int>? = null, privateLinkAlias: Output<String>? = null, privateLinkApprovalMessage: Output<String>? = null, privateLinkLocation: Output<String>? = null, privateLinkResourceId: Output<String>? = null, profileName: Output<String>? = null, resourceGroupName: Output<String>? = null, weight: Output<Int>? = null)

Properties

Link copied to clipboard
val enabled: Output<Boolean>? = null

Origin is enabled for load balancing or not

Link copied to clipboard
val endpointName: Output<String>? = null

Name of the endpoint under the profile which is unique globally.

Link copied to clipboard
val hostName: Output<String>? = null

The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.

Link copied to clipboard
val httpPort: Output<Int>? = null

The value of the HTTP port. Must be between 1 and 65535.

Link copied to clipboard
val httpsPort: Output<Int>? = null

The value of the HTTPS port. Must be between 1 and 65535.

Link copied to clipboard
val originHostHeader: Output<String>? = null

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

Link copied to clipboard
val originName: Output<String>? = null

Name of the origin that is unique within the endpoint.

Link copied to clipboard
val priority: Output<Int>? = null

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

Link copied to clipboard
val privateLinkAlias: Output<String>? = null

The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'

Link copied to clipboard
val privateLinkApprovalMessage: Output<String>? = null

A custom message to be included in the approval request to connect to the Private Link.

Link copied to clipboard
val privateLinkLocation: Output<String>? = null

The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated

Link copied to clipboard
val privateLinkResourceId: Output<String>? = null

The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'

Link copied to clipboard
val profileName: Output<String>? = null

Name of the CDN profile which is unique within the resource group.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of the Resource group within the Azure subscription.

Link copied to clipboard
val weight: Output<Int>? = null

Weight of the origin in given origin group for load balancing. Must be between 1 and 1000

Functions

Link copied to clipboard
open override fun toJava(): OriginArgs