Origin Group Args
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 2023-05-01. In version 1.x of the Azure Native provider, it used API version 2020-09-01. Other available API versions: 2023-07-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview, 2024-09-01.
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/v2"
"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
Properties
Name of the endpoint under the profile which is unique globally.
Health probe settings to the origin that is used to determine the health of the origin.
Name of the origin group which is unique within the endpoint.
The source of the content being delivered via CDN within given origin group.
Name of the CDN profile which is unique within the resource group.
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.