OriginGroup

class OriginGroup : KotlinCustomResource

Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. 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

OriginGroups_Create

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var originGroup = new AzureNative.Cdn.OriginGroup("originGroup", new()
{
EndpointName = "endpoint1",
HealthProbeSettings = new AzureNative.Cdn.Inputs.HealthProbeParametersArgs
{
ProbeIntervalInSeconds = 120,
ProbePath = "/health.aspx",
ProbeProtocol = AzureNative.Cdn.ProbeProtocol.Http,
ProbeRequestType = AzureNative.Cdn.HealthProbeRequestType.GET,
},
OriginGroupName = "origingroup1",
Origins = new[]
{
new AzureNative.Cdn.Inputs.ResourceReferenceArgs
{
Id = "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin1",
},
},
ProfileName = "profile1",
ResourceGroupName = "RG",
ResponseBasedOriginErrorDetectionSettings = new AzureNative.Cdn.Inputs.ResponseBasedOriginErrorDetectionParametersArgs
{
ResponseBasedDetectedErrorTypes = AzureNative.Cdn.ResponseBasedDetectedErrorTypes.TcpErrorsOnly,
ResponseBasedFailoverThresholdPercentage = 10,
},
});
});
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.NewOriginGroup(ctx, "originGroup", &cdn.OriginGroupArgs{
EndpointName: pulumi.String("endpoint1"),
HealthProbeSettings: &cdn.HealthProbeParametersArgs{
ProbeIntervalInSeconds: pulumi.Int(120),
ProbePath: pulumi.String("/health.aspx"),
ProbeProtocol: cdn.ProbeProtocolHttp,
ProbeRequestType: cdn.HealthProbeRequestTypeGET,
},
OriginGroupName: pulumi.String("origingroup1"),
Origins: cdn.ResourceReferenceArray{
&cdn.ResourceReferenceArgs{
Id: pulumi.String("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin1"),
},
},
ProfileName: pulumi.String("profile1"),
ResourceGroupName: pulumi.String("RG"),
ResponseBasedOriginErrorDetectionSettings: &cdn.ResponseBasedOriginErrorDetectionParametersArgs{
ResponseBasedDetectedErrorTypes: cdn.ResponseBasedDetectedErrorTypesTcpErrorsOnly,
ResponseBasedFailoverThresholdPercentage: pulumi.Int(10),
},
})
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.OriginGroup;
import com.pulumi.azurenative.cdn.OriginGroupArgs;
import com.pulumi.azurenative.cdn.inputs.HealthProbeParametersArgs;
import com.pulumi.azurenative.cdn.inputs.ResourceReferenceArgs;
import com.pulumi.azurenative.cdn.inputs.ResponseBasedOriginErrorDetectionParametersArgs;
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 originGroup = new OriginGroup("originGroup", OriginGroupArgs.builder()
.endpointName("endpoint1")
.healthProbeSettings(HealthProbeParametersArgs.builder()
.probeIntervalInSeconds(120)
.probePath("/health.aspx")
.probeProtocol("Http")
.probeRequestType("GET")
.build())
.originGroupName("origingroup1")
.origins(ResourceReferenceArgs.builder()
.id("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin1")
.build())
.profileName("profile1")
.resourceGroupName("RG")
.responseBasedOriginErrorDetectionSettings(ResponseBasedOriginErrorDetectionParametersArgs.builder()
.responseBasedDetectedErrorTypes("TcpErrorsOnly")
.responseBasedFailoverThresholdPercentage(10)
.build())
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:cdn:OriginGroup origingroup1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard

Health probe settings to the origin that is used to determine the health of the origin.

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

Resource name.

Link copied to clipboard

The source of the content being delivered via CDN within given origin group.

Link copied to clipboard

Provisioning status of the origin group.

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 group.

The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported.

Link copied to clipboard

Read only system data

Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.

Link copied to clipboard
val type: Output<String>

Resource type.

Link copied to clipboard
val urn: Output<String>