yandex.CdnOriginGroup
Explore with Pulumi AI
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 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,
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: yandex: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 Yandex.CdnOriginGroup("cdnOriginGroupResource", new()
{
Origins = new[]
{
new Yandex.Inputs.CdnOriginGroupOriginArgs
{
Source = "string",
Backup = false,
Enabled = false,
OriginGroupId = 0,
},
},
Name = "string",
UseNext = false,
});
example, err := yandex.NewCdnOriginGroup(ctx, "cdnOriginGroupResource", &yandex.CdnOriginGroupArgs{
Origins: yandex.CdnOriginGroupOriginArray{
&yandex.CdnOriginGroupOriginArgs{
Source: pulumi.String("string"),
Backup: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
OriginGroupId: pulumi.Int(0),
},
},
Name: pulumi.String("string"),
UseNext: pulumi.Bool(false),
})
var cdnOriginGroupResource = new CdnOriginGroup("cdnOriginGroupResource", CdnOriginGroupArgs.builder()
.origins(CdnOriginGroupOriginArgs.builder()
.source("string")
.backup(false)
.enabled(false)
.originGroupId(0)
.build())
.name("string")
.useNext(false)
.build());
cdn_origin_group_resource = yandex.CdnOriginGroup("cdnOriginGroupResource",
origins=[{
"source": "string",
"backup": False,
"enabled": False,
"origin_group_id": 0,
}],
name="string",
use_next=False)
const cdnOriginGroupResource = new yandex.CdnOriginGroup("cdnOriginGroupResource", {
origins: [{
source: "string",
backup: false,
enabled: false,
originGroupId: 0,
}],
name: "string",
useNext: false,
});
type: yandex:CdnOriginGroup
properties:
name: string
origins:
- backup: false
enabled: false
originGroupId: 0
source: 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<Cdn
Origin Group Origin> - Name string
- 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
[]Cdn
Origin Group Origin Args - Name string
- 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<Cdn
Origin Group Origin> - name String
- CDN Origin Group name used to define device.
- use
Next 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
Cdn
Origin Group Origin[] - name string
- CDN Origin Group name used to define device.
- use
Next 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[Cdn
Origin Group Origin Args] - 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.
- use
Next 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:
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,
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.
- Folder
Id string - Name string
- CDN Origin Group name used to define device.
- Origins
List<Cdn
Origin Group Origin> - 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.
- Folder
Id string - Name string
- CDN Origin Group name used to define device.
- Origins
[]Cdn
Origin Group Origin Args - 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.
- folder
Id String - name String
- CDN Origin Group name used to define device.
- origins
List<Cdn
Origin Group Origin> - use
Next 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 string - name string
- CDN Origin Group name used to define device.
- origins
Cdn
Origin Group Origin[] - use
Next 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[Cdn
Origin Group Origin Args] - 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.
- folder
Id String - name String
- CDN Origin Group name used to define device.
- origins List<Property Map>
- use
Next 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, CdnOriginGroupOriginArgs
- Source string
- Backup bool
- Enabled bool
- Origin
Group intId
- Source string
- Backup bool
- Enabled bool
- Origin
Group intId
- source String
- backup Boolean
- enabled Boolean
- origin
Group IntegerId
- source string
- backup boolean
- enabled boolean
- origin
Group numberId
- source str
- backup bool
- enabled bool
- origin_
group_ intid
- source String
- backup Boolean
- enabled Boolean
- origin
Group NumberId
Import
A origin group can be imported using any of these accepted formats
$ pulumi import yandex:index/cdnOriginGroup:CdnOriginGroup default origin_group_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
yandex
Terraform Provider.