1. Packages
  2. Edgecenter Provider
  3. API Docs
  4. CdnOrigingroup
edgecenter 0.7.34 published on Monday, Apr 14, 2025 by edge-center

edgecenter.CdnOrigingroup

Explore with Pulumi AI

Represent origin group

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as edgecenter from "@pulumi/edgecenter";

const originGroup1 = new edgecenter.CdnOrigingroup("originGroup1", {
    authorization: {
        accessKeyId: "test_access_key_id",
        authType: "aws_signature_v2",
        bucketName: "test_bucket_name",
        secretKey: "keywqueiuqwiueiqweqwiueiqwiueuiqw",
    },
    consistentBalancing: true,
    origins: [
        {
            enabled: true,
            source: "example.com",
        },
        {
            backup: true,
            enabled: true,
            source: "mirror.example.com",
        },
    ],
    useNext: true,
});
Copy
import pulumi
import pulumi_edgecenter as edgecenter

origin_group1 = edgecenter.CdnOrigingroup("originGroup1",
    authorization={
        "access_key_id": "test_access_key_id",
        "auth_type": "aws_signature_v2",
        "bucket_name": "test_bucket_name",
        "secret_key": "keywqueiuqwiueiqweqwiueiqwiueuiqw",
    },
    consistent_balancing=True,
    origins=[
        {
            "enabled": True,
            "source": "example.com",
        },
        {
            "backup": True,
            "enabled": True,
            "source": "mirror.example.com",
        },
    ],
    use_next=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := edgecenter.NewCdnOrigingroup(ctx, "originGroup1", &edgecenter.CdnOrigingroupArgs{
			Authorization: &edgecenter.CdnOrigingroupAuthorizationArgs{
				AccessKeyId: pulumi.String("test_access_key_id"),
				AuthType:    pulumi.String("aws_signature_v2"),
				BucketName:  pulumi.String("test_bucket_name"),
				SecretKey:   pulumi.String("keywqueiuqwiueiqweqwiueiqwiueuiqw"),
			},
			ConsistentBalancing: pulumi.Bool(true),
			Origins: edgecenter.CdnOrigingroupOriginArray{
				&edgecenter.CdnOrigingroupOriginArgs{
					Enabled: pulumi.Bool(true),
					Source:  pulumi.String("example.com"),
				},
				&edgecenter.CdnOrigingroupOriginArgs{
					Backup:  pulumi.Bool(true),
					Enabled: pulumi.Bool(true),
					Source:  pulumi.String("mirror.example.com"),
				},
			},
			UseNext: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;

return await Deployment.RunAsync(() => 
{
    var originGroup1 = new Edgecenter.CdnOrigingroup("originGroup1", new()
    {
        Authorization = new Edgecenter.Inputs.CdnOrigingroupAuthorizationArgs
        {
            AccessKeyId = "test_access_key_id",
            AuthType = "aws_signature_v2",
            BucketName = "test_bucket_name",
            SecretKey = "keywqueiuqwiueiqweqwiueiqwiueuiqw",
        },
        ConsistentBalancing = true,
        Origins = new[]
        {
            new Edgecenter.Inputs.CdnOrigingroupOriginArgs
            {
                Enabled = true,
                Source = "example.com",
            },
            new Edgecenter.Inputs.CdnOrigingroupOriginArgs
            {
                Backup = true,
                Enabled = true,
                Source = "mirror.example.com",
            },
        },
        UseNext = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.CdnOrigingroup;
import com.pulumi.edgecenter.CdnOrigingroupArgs;
import com.pulumi.edgecenter.inputs.CdnOrigingroupAuthorizationArgs;
import com.pulumi.edgecenter.inputs.CdnOrigingroupOriginArgs;
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 originGroup1 = new CdnOrigingroup("originGroup1", CdnOrigingroupArgs.builder()
            .authorization(CdnOrigingroupAuthorizationArgs.builder()
                .accessKeyId("test_access_key_id")
                .authType("aws_signature_v2")
                .bucketName("test_bucket_name")
                .secretKey("keywqueiuqwiueiqweqwiueiqwiueuiqw")
                .build())
            .consistentBalancing(true)
            .origins(            
                CdnOrigingroupOriginArgs.builder()
                    .enabled(true)
                    .source("example.com")
                    .build(),
                CdnOrigingroupOriginArgs.builder()
                    .backup(true)
                    .enabled(true)
                    .source("mirror.example.com")
                    .build())
            .useNext(true)
            .build());

    }
}
Copy
resources:
  originGroup1:
    type: edgecenter:CdnOrigingroup
    properties:
      authorization:
        accessKeyId: test_access_key_id
        authType: aws_signature_v2
        bucketName: test_bucket_name
        secretKey: keywqueiuqwiueiqweqwiueiqwiueuiqw
      consistentBalancing: true
      origins:
        - enabled: true
          source: example.com
        - backup: true
          enabled: true
          source: mirror.example.com
      useNext: true
Copy

Create CdnOrigingroup Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new CdnOrigingroup(name: string, args: CdnOrigingroupArgs, opts?: CustomResourceOptions);
@overload
def CdnOrigingroup(resource_name: str,
                   args: CdnOrigingroupArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def CdnOrigingroup(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   consistent_balancing: Optional[bool] = None,
                   origins: Optional[Sequence[CdnOrigingroupOriginArgs]] = None,
                   use_next: Optional[bool] = None,
                   authorization: Optional[CdnOrigingroupAuthorizationArgs] = None,
                   cdn_origingroup_id: Optional[str] = None,
                   name: Optional[str] = None)
func NewCdnOrigingroup(ctx *Context, name string, args CdnOrigingroupArgs, opts ...ResourceOption) (*CdnOrigingroup, error)
public CdnOrigingroup(string name, CdnOrigingroupArgs args, CustomResourceOptions? opts = null)
public CdnOrigingroup(String name, CdnOrigingroupArgs args)
public CdnOrigingroup(String name, CdnOrigingroupArgs args, CustomResourceOptions options)
type: edgecenter:CdnOrigingroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CdnOrigingroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CdnOrigingroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CdnOrigingroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CdnOrigingroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CdnOrigingroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var cdnOrigingroupResource = new Edgecenter.CdnOrigingroup("cdnOrigingroupResource", new()
{
    ConsistentBalancing = false,
    Origins = new[]
    {
        new Edgecenter.Inputs.CdnOrigingroupOriginArgs
        {
            Source = "string",
            Backup = false,
            Enabled = false,
            Id = 0,
        },
    },
    UseNext = false,
    Authorization = new Edgecenter.Inputs.CdnOrigingroupAuthorizationArgs
    {
        AccessKeyId = "string",
        AuthType = "string",
        BucketName = "string",
        SecretKey = "string",
    },
    CdnOrigingroupId = "string",
    Name = "string",
});
Copy
example, err := edgecenter.NewCdnOrigingroup(ctx, "cdnOrigingroupResource", &edgecenter.CdnOrigingroupArgs{
ConsistentBalancing: pulumi.Bool(false),
Origins: .CdnOrigingroupOriginArray{
&.CdnOrigingroupOriginArgs{
Source: pulumi.String("string"),
Backup: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
Id: pulumi.Float64(0),
},
},
UseNext: pulumi.Bool(false),
Authorization: &.CdnOrigingroupAuthorizationArgs{
AccessKeyId: pulumi.String("string"),
AuthType: pulumi.String("string"),
BucketName: pulumi.String("string"),
SecretKey: pulumi.String("string"),
},
CdnOrigingroupId: pulumi.String("string"),
Name: pulumi.String("string"),
})
Copy
var cdnOrigingroupResource = new CdnOrigingroup("cdnOrigingroupResource", CdnOrigingroupArgs.builder()
    .consistentBalancing(false)
    .origins(CdnOrigingroupOriginArgs.builder()
        .source("string")
        .backup(false)
        .enabled(false)
        .id(0)
        .build())
    .useNext(false)
    .authorization(CdnOrigingroupAuthorizationArgs.builder()
        .accessKeyId("string")
        .authType("string")
        .bucketName("string")
        .secretKey("string")
        .build())
    .cdnOrigingroupId("string")
    .name("string")
    .build());
Copy
cdn_origingroup_resource = edgecenter.CdnOrigingroup("cdnOrigingroupResource",
    consistent_balancing=False,
    origins=[{
        "source": "string",
        "backup": False,
        "enabled": False,
        "id": 0,
    }],
    use_next=False,
    authorization={
        "access_key_id": "string",
        "auth_type": "string",
        "bucket_name": "string",
        "secret_key": "string",
    },
    cdn_origingroup_id="string",
    name="string")
Copy
const cdnOrigingroupResource = new edgecenter.CdnOrigingroup("cdnOrigingroupResource", {
    consistentBalancing: false,
    origins: [{
        source: "string",
        backup: false,
        enabled: false,
        id: 0,
    }],
    useNext: false,
    authorization: {
        accessKeyId: "string",
        authType: "string",
        bucketName: "string",
        secretKey: "string",
    },
    cdnOrigingroupId: "string",
    name: "string",
});
Copy
type: edgecenter:CdnOrigingroup
properties:
    authorization:
        accessKeyId: string
        authType: string
        bucketName: string
        secretKey: string
    cdnOrigingroupId: string
    consistentBalancing: false
    name: string
    origins:
        - backup: false
          enabled: false
          id: 0
          source: string
    useNext: false
Copy

CdnOrigingroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CdnOrigingroup resource accepts the following input properties:

ConsistentBalancing This property is required. bool
Consistent load balancing (consistent hashing) for the source group
Origins This property is required. List<CdnOrigingroupOrigin>
Add information about your sources.
UseNext This property is required. bool
Specify whether or not the CDN will use the next source in the list if your source responds with an HTTP status code of 4XX or 5XX.
Authorization CdnOrigingroupAuthorization
Add information about authorization.
CdnOrigingroupId string
The ID of this resource.
Name string
Add the source group name.
ConsistentBalancing This property is required. bool
Consistent load balancing (consistent hashing) for the source group
Origins This property is required. []CdnOrigingroupOriginArgs
Add information about your sources.
UseNext This property is required. bool
Specify whether or not the CDN will use the next source in the list if your source responds with an HTTP status code of 4XX or 5XX.
Authorization CdnOrigingroupAuthorizationArgs
Add information about authorization.
CdnOrigingroupId string
The ID of this resource.
Name string
Add the source group name.
consistentBalancing This property is required. Boolean
Consistent load balancing (consistent hashing) for the source group
origins This property is required. List<CdnOrigingroupOrigin>
Add information about your sources.
useNext This property is required. Boolean
Specify whether or not the CDN will use the next source in the list if your source responds with an HTTP status code of 4XX or 5XX.
authorization CdnOrigingroupAuthorization
Add information about authorization.
cdnOrigingroupId String
The ID of this resource.
name String
Add the source group name.
consistentBalancing This property is required. boolean
Consistent load balancing (consistent hashing) for the source group
origins This property is required. CdnOrigingroupOrigin[]
Add information about your sources.
useNext This property is required. boolean
Specify whether or not the CDN will use the next source in the list if your source responds with an HTTP status code of 4XX or 5XX.
authorization CdnOrigingroupAuthorization
Add information about authorization.
cdnOrigingroupId string
The ID of this resource.
name string
Add the source group name.
consistent_balancing This property is required. bool
Consistent load balancing (consistent hashing) for the source group
origins This property is required. Sequence[CdnOrigingroupOriginArgs]
Add information about your sources.
use_next This property is required. bool
Specify whether or not the CDN will use the next source in the list if your source responds with an HTTP status code of 4XX or 5XX.
authorization CdnOrigingroupAuthorizationArgs
Add information about authorization.
cdn_origingroup_id str
The ID of this resource.
name str
Add the source group name.
consistentBalancing This property is required. Boolean
Consistent load balancing (consistent hashing) for the source group
origins This property is required. List<Property Map>
Add information about your sources.
useNext This property is required. Boolean
Specify whether or not the CDN will use the next source in the list if your source responds with an HTTP status code of 4XX or 5XX.
authorization Property Map
Add information about authorization.
cdnOrigingroupId String
The ID of this resource.
name String
Add the source group name.

Outputs

All input properties are implicitly available as output properties. Additionally, the CdnOrigingroup resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing CdnOrigingroup Resource

Get an existing CdnOrigingroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: CdnOrigingroupState, opts?: CustomResourceOptions): CdnOrigingroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        authorization: Optional[CdnOrigingroupAuthorizationArgs] = None,
        cdn_origingroup_id: Optional[str] = None,
        consistent_balancing: Optional[bool] = None,
        name: Optional[str] = None,
        origins: Optional[Sequence[CdnOrigingroupOriginArgs]] = None,
        use_next: Optional[bool] = None) -> CdnOrigingroup
func GetCdnOrigingroup(ctx *Context, name string, id IDInput, state *CdnOrigingroupState, opts ...ResourceOption) (*CdnOrigingroup, error)
public static CdnOrigingroup Get(string name, Input<string> id, CdnOrigingroupState? state, CustomResourceOptions? opts = null)
public static CdnOrigingroup get(String name, Output<String> id, CdnOrigingroupState state, CustomResourceOptions options)
resources:  _:    type: edgecenter:CdnOrigingroup    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Authorization CdnOrigingroupAuthorization
Add information about authorization.
CdnOrigingroupId string
The ID of this resource.
ConsistentBalancing bool
Consistent load balancing (consistent hashing) for the source group
Name string
Add the source group name.
Origins List<CdnOrigingroupOrigin>
Add information about your sources.
UseNext bool
Specify whether or not the CDN will use the next source in the list if your source responds with an HTTP status code of 4XX or 5XX.
Authorization CdnOrigingroupAuthorizationArgs
Add information about authorization.
CdnOrigingroupId string
The ID of this resource.
ConsistentBalancing bool
Consistent load balancing (consistent hashing) for the source group
Name string
Add the source group name.
Origins []CdnOrigingroupOriginArgs
Add information about your sources.
UseNext bool
Specify whether or not the CDN will use the next source in the list if your source responds with an HTTP status code of 4XX or 5XX.
authorization CdnOrigingroupAuthorization
Add information about authorization.
cdnOrigingroupId String
The ID of this resource.
consistentBalancing Boolean
Consistent load balancing (consistent hashing) for the source group
name String
Add the source group name.
origins List<CdnOrigingroupOrigin>
Add information about your sources.
useNext Boolean
Specify whether or not the CDN will use the next source in the list if your source responds with an HTTP status code of 4XX or 5XX.
authorization CdnOrigingroupAuthorization
Add information about authorization.
cdnOrigingroupId string
The ID of this resource.
consistentBalancing boolean
Consistent load balancing (consistent hashing) for the source group
name string
Add the source group name.
origins CdnOrigingroupOrigin[]
Add information about your sources.
useNext boolean
Specify whether or not the CDN will use the next source in the list if your source responds with an HTTP status code of 4XX or 5XX.
authorization CdnOrigingroupAuthorizationArgs
Add information about authorization.
cdn_origingroup_id str
The ID of this resource.
consistent_balancing bool
Consistent load balancing (consistent hashing) for the source group
name str
Add the source group name.
origins Sequence[CdnOrigingroupOriginArgs]
Add information about your sources.
use_next bool
Specify whether or not the CDN will use the next source in the list if your source responds with an HTTP status code of 4XX or 5XX.
authorization Property Map
Add information about authorization.
cdnOrigingroupId String
The ID of this resource.
consistentBalancing Boolean
Consistent load balancing (consistent hashing) for the source group
name String
Add the source group name.
origins List<Property Map>
Add information about your sources.
useNext Boolean
Specify whether or not the CDN will use the next source in the list if your source responds with an HTTP status code of 4XX or 5XX.

Supporting Types

CdnOrigingroupAuthorization
, CdnOrigingroupAuthorizationArgs

AccessKeyId This property is required. string
Specify the access key ID in 20 alphanumeric characters.
AuthType This property is required. string
The type of authorization on the source. It can take two values - awssignaturev2 or awssignaturev4.
BucketName This property is required. string
Specify the bucket name. The name is restricted to 255 symbols and may include alphanumeric characters, slashes, pluses, hyphens, and underscores.
SecretKey This property is required. string
Specify the secret access key. The value must be between 32 and 40 characters and may include alphanumeric characters, slashes, pluses, hyphens, and underscores.
AccessKeyId This property is required. string
Specify the access key ID in 20 alphanumeric characters.
AuthType This property is required. string
The type of authorization on the source. It can take two values - awssignaturev2 or awssignaturev4.
BucketName This property is required. string
Specify the bucket name. The name is restricted to 255 symbols and may include alphanumeric characters, slashes, pluses, hyphens, and underscores.
SecretKey This property is required. string
Specify the secret access key. The value must be between 32 and 40 characters and may include alphanumeric characters, slashes, pluses, hyphens, and underscores.
accessKeyId This property is required. String
Specify the access key ID in 20 alphanumeric characters.
authType This property is required. String
The type of authorization on the source. It can take two values - awssignaturev2 or awssignaturev4.
bucketName This property is required. String
Specify the bucket name. The name is restricted to 255 symbols and may include alphanumeric characters, slashes, pluses, hyphens, and underscores.
secretKey This property is required. String
Specify the secret access key. The value must be between 32 and 40 characters and may include alphanumeric characters, slashes, pluses, hyphens, and underscores.
accessKeyId This property is required. string
Specify the access key ID in 20 alphanumeric characters.
authType This property is required. string
The type of authorization on the source. It can take two values - awssignaturev2 or awssignaturev4.
bucketName This property is required. string
Specify the bucket name. The name is restricted to 255 symbols and may include alphanumeric characters, slashes, pluses, hyphens, and underscores.
secretKey This property is required. string
Specify the secret access key. The value must be between 32 and 40 characters and may include alphanumeric characters, slashes, pluses, hyphens, and underscores.
access_key_id This property is required. str
Specify the access key ID in 20 alphanumeric characters.
auth_type This property is required. str
The type of authorization on the source. It can take two values - awssignaturev2 or awssignaturev4.
bucket_name This property is required. str
Specify the bucket name. The name is restricted to 255 symbols and may include alphanumeric characters, slashes, pluses, hyphens, and underscores.
secret_key This property is required. str
Specify the secret access key. The value must be between 32 and 40 characters and may include alphanumeric characters, slashes, pluses, hyphens, and underscores.
accessKeyId This property is required. String
Specify the access key ID in 20 alphanumeric characters.
authType This property is required. String
The type of authorization on the source. It can take two values - awssignaturev2 or awssignaturev4.
bucketName This property is required. String
Specify the bucket name. The name is restricted to 255 symbols and may include alphanumeric characters, slashes, pluses, hyphens, and underscores.
secretKey This property is required. String
Specify the secret access key. The value must be between 32 and 40 characters and may include alphanumeric characters, slashes, pluses, hyphens, and underscores.

CdnOrigingroupOrigin
, CdnOrigingroupOriginArgs

Source This property is required. string
Enter the source’s domain name or the IP address with a custom port (if any).
Backup bool
If set to "true", this source will not be used until one of the active sources becomes unavailable.
Enabled bool
Enable or disable the source. The source group must contain at least one enabled source.
Id double
Source This property is required. string
Enter the source’s domain name or the IP address with a custom port (if any).
Backup bool
If set to "true", this source will not be used until one of the active sources becomes unavailable.
Enabled bool
Enable or disable the source. The source group must contain at least one enabled source.
Id float64
source This property is required. String
Enter the source’s domain name or the IP address with a custom port (if any).
backup Boolean
If set to "true", this source will not be used until one of the active sources becomes unavailable.
enabled Boolean
Enable or disable the source. The source group must contain at least one enabled source.
id Double
source This property is required. string
Enter the source’s domain name or the IP address with a custom port (if any).
backup boolean
If set to "true", this source will not be used until one of the active sources becomes unavailable.
enabled boolean
Enable or disable the source. The source group must contain at least one enabled source.
id number
source This property is required. str
Enter the source’s domain name or the IP address with a custom port (if any).
backup bool
If set to "true", this source will not be used until one of the active sources becomes unavailable.
enabled bool
Enable or disable the source. The source group must contain at least one enabled source.
id float
source This property is required. String
Enter the source’s domain name or the IP address with a custom port (if any).
backup Boolean
If set to "true", this source will not be used until one of the active sources becomes unavailable.
enabled Boolean
Enable or disable the source. The source group must contain at least one enabled source.
id Number

Package Details

Repository
edgecenter edge-center/terraform-provider-edgecenter
License
Notes
This Pulumi package is based on the edgecenter Terraform Provider.