1. Packages
  2. Vkcs Provider
  3. API Docs
  4. CdnOriginGroup
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.CdnOriginGroup

Explore with Pulumi AI

vkcs logo
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const originGroup = new vkcs.CdnOriginGroup("originGroup", {
        origins: [
            {
                source: "origin1.vk.com",
            },
            {
                backup: true,
                source: "origin2.vk.com",
            },
        ],
        useNext: true,
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    origin_group = vkcs.CdnOriginGroup("originGroup",
        origins=[
            {
                "source": "origin1.vk.com",
            },
            {
                "backup": True,
                "source": "origin2.vk.com",
            },
        ],
        use_next=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.NewCdnOriginGroup(ctx, "originGroup", &vkcs.CdnOriginGroupArgs{
    			Origins: vkcs.CdnOriginGroupOriginArray{
    				&vkcs.CdnOriginGroupOriginArgs{
    					Source: pulumi.String("origin1.vk.com"),
    				},
    				&vkcs.CdnOriginGroupOriginArgs{
    					Backup: pulumi.Bool(true),
    					Source: pulumi.String("origin2.vk.com"),
    				},
    			},
    			UseNext: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var originGroup = new Vkcs.CdnOriginGroup("originGroup", new()
        {
            Origins = new[]
            {
                new Vkcs.Inputs.CdnOriginGroupOriginArgs
                {
                    Source = "origin1.vk.com",
                },
                new Vkcs.Inputs.CdnOriginGroupOriginArgs
                {
                    Backup = true,
                    Source = "origin2.vk.com",
                },
            },
            UseNext = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.CdnOriginGroup;
    import com.pulumi.vkcs.CdnOriginGroupArgs;
    import com.pulumi.vkcs.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 originGroup = new CdnOriginGroup("originGroup", CdnOriginGroupArgs.builder()
                .origins(            
                    CdnOriginGroupOriginArgs.builder()
                        .source("origin1.vk.com")
                        .build(),
                    CdnOriginGroupOriginArgs.builder()
                        .backup(true)
                        .source("origin2.vk.com")
                        .build())
                .useNext(true)
                .build());
    
        }
    }
    
    resources:
      originGroup:
        type: vkcs:CdnOriginGroup
        properties:
          origins:
            - source: origin1.vk.com
            - backup: true
              source: origin2.vk.com
          useNext: true
    

    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,
                       origins: Optional[Sequence[CdnOriginGroupOriginArgs]] = None,
                       name: Optional[str] = None,
                       region: Optional[str] = None,
                       use_next: Optional[bool] = 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: vkcs:CdnOriginGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CdnOriginGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args CdnOriginGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CdnOriginGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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 Vkcs.CdnOriginGroup("cdnOriginGroupResource", new()
    {
        Origins = new[]
        {
            new Vkcs.Inputs.CdnOriginGroupOriginArgs
            {
                Source = "string",
                Backup = false,
                Enabled = false,
            },
        },
        Name = "string",
        Region = "string",
        UseNext = false,
    });
    
    example, err := vkcs.NewCdnOriginGroup(ctx, "cdnOriginGroupResource", &vkcs.CdnOriginGroupArgs{
    Origins: .CdnOriginGroupOriginArray{
    &.CdnOriginGroupOriginArgs{
    Source: pulumi.String("string"),
    Backup: pulumi.Bool(false),
    Enabled: pulumi.Bool(false),
    },
    },
    Name: pulumi.String("string"),
    Region: pulumi.String("string"),
    UseNext: pulumi.Bool(false),
    })
    
    var cdnOriginGroupResource = new CdnOriginGroup("cdnOriginGroupResource", CdnOriginGroupArgs.builder()
        .origins(CdnOriginGroupOriginArgs.builder()
            .source("string")
            .backup(false)
            .enabled(false)
            .build())
        .name("string")
        .region("string")
        .useNext(false)
        .build());
    
    cdn_origin_group_resource = vkcs.CdnOriginGroup("cdnOriginGroupResource",
        origins=[{
            "source": "string",
            "backup": False,
            "enabled": False,
        }],
        name="string",
        region="string",
        use_next=False)
    
    const cdnOriginGroupResource = new vkcs.CdnOriginGroup("cdnOriginGroupResource", {
        origins: [{
            source: "string",
            backup: false,
            enabled: false,
        }],
        name: "string",
        region: "string",
        useNext: false,
    });
    
    type: vkcs:CdnOriginGroup
    properties:
        name: string
        origins:
            - backup: false
              enabled: false
              source: string
        region: string
        useNext: false
    

    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:

    Origins List<CdnOriginGroupOrigin>
    list → List of origin sources in the origin group.
    Name string
    required string → Name of the origin group.
    Region string
    optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    UseNext bool
    optional boolean → Defines whether to use the next origin from the origin group if origin responds with 4XX or 5XX codes. Defaults to false.
    Origins []CdnOriginGroupOriginArgs
    list → List of origin sources in the origin group.
    Name string
    required string → Name of the origin group.
    Region string
    optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    UseNext bool
    optional boolean → Defines whether to use the next origin from the origin group if origin responds with 4XX or 5XX codes. Defaults to false.
    origins List<CdnOriginGroupOrigin>
    list → List of origin sources in the origin group.
    name String
    required string → Name of the origin group.
    region String
    optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    useNext Boolean
    optional boolean → Defines whether to use the next origin from the origin group if origin responds with 4XX or 5XX codes. Defaults to false.
    origins CdnOriginGroupOrigin[]
    list → List of origin sources in the origin group.
    name string
    required string → Name of the origin group.
    region string
    optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    useNext boolean
    optional boolean → Defines whether to use the next origin from the origin group if origin responds with 4XX or 5XX codes. Defaults to false.
    origins Sequence[CdnOriginGroupOriginArgs]
    list → List of origin sources in the origin group.
    name str
    required string → Name of the origin group.
    region str
    optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    use_next bool
    optional boolean → Defines whether to use the next origin from the origin group if origin responds with 4XX or 5XX codes. Defaults to false.
    origins List<Property Map>
    list → List of origin sources in the origin group.
    name String
    required string → Name of the origin group.
    region String
    optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    useNext Boolean
    optional boolean → Defines whether to use the next origin from the origin group if origin responds with 4XX or 5XX codes. Defaults to false.

    Outputs

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

    CdnOriginGroupId double
    number → ID of the origin group.
    Id string
    The provider-assigned unique ID for this managed resource.
    CdnOriginGroupId float64
    number → ID of the origin group.
    Id string
    The provider-assigned unique ID for this managed resource.
    cdnOriginGroupId Double
    number → ID of the origin group.
    id String
    The provider-assigned unique ID for this managed resource.
    cdnOriginGroupId number
    number → ID of the origin group.
    id string
    The provider-assigned unique ID for this managed resource.
    cdn_origin_group_id float
    number → ID of the origin group.
    id str
    The provider-assigned unique ID for this managed resource.
    cdnOriginGroupId Number
    number → ID of the origin group.
    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,
            cdn_origin_group_id: Optional[float] = None,
            name: Optional[str] = None,
            origins: Optional[Sequence[CdnOriginGroupOriginArgs]] = None,
            region: Optional[str] = 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: vkcs:CdnOriginGroup    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    CdnOriginGroupId double
    number → ID of the origin group.
    Name string
    required string → Name of the origin group.
    Origins List<CdnOriginGroupOrigin>
    list → List of origin sources in the origin group.
    Region string
    optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    UseNext bool
    optional boolean → Defines whether to use the next origin from the origin group if origin responds with 4XX or 5XX codes. Defaults to false.
    CdnOriginGroupId float64
    number → ID of the origin group.
    Name string
    required string → Name of the origin group.
    Origins []CdnOriginGroupOriginArgs
    list → List of origin sources in the origin group.
    Region string
    optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    UseNext bool
    optional boolean → Defines whether to use the next origin from the origin group if origin responds with 4XX or 5XX codes. Defaults to false.
    cdnOriginGroupId Double
    number → ID of the origin group.
    name String
    required string → Name of the origin group.
    origins List<CdnOriginGroupOrigin>
    list → List of origin sources in the origin group.
    region String
    optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    useNext Boolean
    optional boolean → Defines whether to use the next origin from the origin group if origin responds with 4XX or 5XX codes. Defaults to false.
    cdnOriginGroupId number
    number → ID of the origin group.
    name string
    required string → Name of the origin group.
    origins CdnOriginGroupOrigin[]
    list → List of origin sources in the origin group.
    region string
    optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    useNext boolean
    optional boolean → Defines whether to use the next origin from the origin group if origin responds with 4XX or 5XX codes. Defaults to false.
    cdn_origin_group_id float
    number → ID of the origin group.
    name str
    required string → Name of the origin group.
    origins Sequence[CdnOriginGroupOriginArgs]
    list → List of origin sources in the origin group.
    region str
    optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    use_next bool
    optional boolean → Defines whether to use the next origin from the origin group if origin responds with 4XX or 5XX codes. Defaults to false.
    cdnOriginGroupId Number
    number → ID of the origin group.
    name String
    required string → Name of the origin group.
    origins List<Property Map>
    list → List of origin sources in the origin group.
    region String
    optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    useNext Boolean
    optional boolean → Defines whether to use the next origin from the origin group if origin responds with 4XX or 5XX codes. Defaults to false.

    Supporting Types

    CdnOriginGroupOrigin, CdnOriginGroupOriginArgs

    Source string
    required string → IP address or domain name of the origin and the port, if custom port is used.
    Backup bool
    optional boolean → Defines whether the origin is a backup, meaning that it will not be used until one of active origins become unavailable. Defaults to false.
    Enabled bool
    optional boolean → Enables or disables an origin source in the origin group. Enabled by default.
    Source string
    required string → IP address or domain name of the origin and the port, if custom port is used.
    Backup bool
    optional boolean → Defines whether the origin is a backup, meaning that it will not be used until one of active origins become unavailable. Defaults to false.
    Enabled bool
    optional boolean → Enables or disables an origin source in the origin group. Enabled by default.
    source String
    required string → IP address or domain name of the origin and the port, if custom port is used.
    backup Boolean
    optional boolean → Defines whether the origin is a backup, meaning that it will not be used until one of active origins become unavailable. Defaults to false.
    enabled Boolean
    optional boolean → Enables or disables an origin source in the origin group. Enabled by default.
    source string
    required string → IP address or domain name of the origin and the port, if custom port is used.
    backup boolean
    optional boolean → Defines whether the origin is a backup, meaning that it will not be used until one of active origins become unavailable. Defaults to false.
    enabled boolean
    optional boolean → Enables or disables an origin source in the origin group. Enabled by default.
    source str
    required string → IP address or domain name of the origin and the port, if custom port is used.
    backup bool
    optional boolean → Defines whether the origin is a backup, meaning that it will not be used until one of active origins become unavailable. Defaults to false.
    enabled bool
    optional boolean → Enables or disables an origin source in the origin group. Enabled by default.
    source String
    required string → IP address or domain name of the origin and the port, if custom port is used.
    backup Boolean
    optional boolean → Defines whether the origin is a backup, meaning that it will not be used until one of active origins become unavailable. Defaults to false.
    enabled Boolean
    optional boolean → Enables or disables an origin source in the origin group. Enabled by default.

    Import

    An origin group can be imported using the id, e.g.

    $ pulumi import vkcs:index/cdnOriginGroup:CdnOriginGroup resource <resource_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    vkcs vk-cs/terraform-provider-vkcs
    License
    Notes
    This Pulumi package is based on the vkcs Terraform Provider.
    vkcs logo
    vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs