Yandex

Pulumi Official
Package maintained by Pulumi
v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

CdnOriginGroup

Allows management of Yandex.Cloud CDN Origin Groups.

NOTE: CDN provider must be activated prior usage of CDN resources, either via UI console or via yc cli command: yc cdn provider activate --folder-id <folder-id> --type gcore

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var myGroup = new Yandex.CdnOriginGroup("myGroup", new Yandex.CdnOriginGroupArgs
        {
            Origins = 
            {
                new Yandex.Inputs.CdnOriginGroupOriginArgs
                {
                    Source = "ya.ru",
                },
                new Yandex.Inputs.CdnOriginGroupOriginArgs
                {
                    Source = "yandex.ru",
                },
                new Yandex.Inputs.CdnOriginGroupOriginArgs
                {
                    Source = "goo.gl",
                },
                new Yandex.Inputs.CdnOriginGroupOriginArgs
                {
                    Backup = false,
                    Source = "amazon.com",
                },
            },
            UseNext = true,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := yandex.NewCdnOriginGroup(ctx, "myGroup", &yandex.CdnOriginGroupArgs{
			Origins: CdnOriginGroupOriginArray{
				&CdnOriginGroupOriginArgs{
					Source: pulumi.String("ya.ru"),
				},
				&CdnOriginGroupOriginArgs{
					Source: pulumi.String("yandex.ru"),
				},
				&CdnOriginGroupOriginArgs{
					Source: pulumi.String("goo.gl"),
				},
				&CdnOriginGroupOriginArgs{
					Backup: pulumi.Bool(false),
					Source: pulumi.String("amazon.com"),
				},
			},
			UseNext: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_yandex as yandex

my_group = yandex.CdnOriginGroup("myGroup",
    origins=[
        yandex.CdnOriginGroupOriginArgs(
            source="ya.ru",
        ),
        yandex.CdnOriginGroupOriginArgs(
            source="yandex.ru",
        ),
        yandex.CdnOriginGroupOriginArgs(
            source="goo.gl",
        ),
        yandex.CdnOriginGroupOriginArgs(
            backup=False,
            source="amazon.com",
        ),
    ],
    use_next=True)
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const myGroup = new yandex.CdnOriginGroup("my_group", {
    origins: [
        {
            source: "ya.ru",
        },
        {
            source: "yandex.ru",
        },
        {
            source: "goo.gl",
        },
        {
            backup: false,
            source: "amazon.com",
        },
    ],
    useNext: true,
});

Coming soon!

Create a CdnOriginGroup Resource

new CdnOriginGroup(name: string, args: CdnOriginGroupArgs, opts?: CustomResourceOptions);
@overload
def CdnOriginGroup(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   name: Optional[str] = None,
                   origins: Optional[Sequence[CdnOriginGroupOriginArgs]] = None,
                   use_next: Optional[bool] = None)
@overload
def CdnOriginGroup(resource_name: str,
                   args: CdnOriginGroupArgs,
                   opts: Optional[ResourceOptions] = 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: yandex:CdnOriginGroup
properties: # The arguments to resource properties.
options: # 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.
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.

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

The CdnOriginGroup resource accepts the following input properties:

Origins List<CdnOriginGroupOriginArgs>
Name string

CDN Origin Group name used to define device.

UseNext bool

If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

Origins []CdnOriginGroupOriginArgs
Name string

CDN Origin Group name used to define device.

UseNext bool

If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

origins List<CdnOriginGroupOriginArgs>
name String

CDN Origin Group name used to define device.

useNext Boolean

If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

origins CdnOriginGroupOriginArgs[]
name string

CDN Origin Group name used to define device.

useNext boolean

If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

origins Sequence[CdnOriginGroupOriginArgs]
name str

CDN Origin Group name used to define device.

use_next bool

If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

origins List<Property Map>
name String

CDN Origin Group name used to define device.

useNext Boolean

If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

Outputs

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

FolderId string
Id string

The provider-assigned unique ID for this managed resource.

FolderId string
Id string

The provider-assigned unique ID for this managed resource.

folderId String
id String

The provider-assigned unique ID for this managed resource.

folderId string
id string

The provider-assigned unique ID for this managed resource.

folder_id str
id str

The provider-assigned unique ID for this managed resource.

folderId String
id String

The provider-assigned unique ID for this managed resource.

Look up an 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,
        folder_id: Optional[str] = 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)
Resource lookup is not supported in YAML
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:
FolderId string
Name string

CDN Origin Group name used to define device.

Origins List<CdnOriginGroupOriginArgs>
UseNext bool

If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

FolderId string
Name string

CDN Origin Group name used to define device.

Origins []CdnOriginGroupOriginArgs
UseNext bool

If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

folderId String
name String

CDN Origin Group name used to define device.

origins List<CdnOriginGroupOriginArgs>
useNext Boolean

If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

folderId string
name string

CDN Origin Group name used to define device.

origins CdnOriginGroupOriginArgs[]
useNext boolean

If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

folder_id str
name str

CDN Origin Group name used to define device.

origins Sequence[CdnOriginGroupOriginArgs]
use_next bool

If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

folderId String
name String

CDN Origin Group name used to define device.

origins List<Property Map>
useNext Boolean

If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.

Supporting Types

CdnOriginGroupOrigin

source String
backup Boolean
enabled Boolean
originGroupId Integer
source string
backup boolean
enabled boolean
originGroupId number
source String
backup Boolean
enabled Boolean
originGroupId Number

Import

A origin group can be imported using any of these accepted formats

 $ pulumi import yandex:index/cdnOriginGroup:CdnOriginGroup default origin_group_id

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes

This Pulumi package is based on the yandex Terraform Provider.