OriginGroupArgs

data class OriginGroupArgs(val endpointName: Output<String>? = null, val healthProbeSettings: Output<HealthProbeParametersArgs>? = null, val originGroupName: Output<String>? = null, val origins: Output<List<ResourceReferenceArgs>>? = null, val profileName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val responseBasedOriginErrorDetectionSettings: Output<ResponseBasedOriginErrorDetectionParametersArgs>? = null, val trafficRestorationTimeToHealedOrNewEndpointsInMinutes: Output<Int>? = null) : ConvertibleToJava<OriginGroupArgs>

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}

Constructors

Link copied to clipboard
constructor(endpointName: Output<String>? = null, healthProbeSettings: Output<HealthProbeParametersArgs>? = null, originGroupName: Output<String>? = null, origins: Output<List<ResourceReferenceArgs>>? = null, profileName: Output<String>? = null, resourceGroupName: Output<String>? = null, responseBasedOriginErrorDetectionSettings: Output<ResponseBasedOriginErrorDetectionParametersArgs>? = null, trafficRestorationTimeToHealedOrNewEndpointsInMinutes: Output<Int>? = null)

Properties

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

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

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 originGroupName: Output<String>? = null

Name of the origin group which is unique within the endpoint.

Link copied to clipboard
val origins: Output<List<ResourceReferenceArgs>>? = null

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

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.

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

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.

Functions

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