Origin

class Origin : KotlinCustomResource

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/#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/v2"
"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}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

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

Origin is enabled for load balancing or not

Link copied to clipboard
val hostName: Output<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.

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

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

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

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

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Resource name.

Link copied to clipboard
val originHostHeader: Output<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

Link copied to clipboard
val priority: Output<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

Link copied to clipboard

The approval status for the connection to the Private Link

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

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Provisioning status of the origin.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceState: Output<String>

Resource status of the origin.

Link copied to clipboard

Read only system data

Link copied to clipboard
val type: Output<String>

Resource type.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val weight: Output<Int>?

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