gcorelabs.CdnOrigingroup
Explore with Pulumi AI
Represent origin group
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const originGroup1 = new gcore.index.Gcore_cdn_origingroup("originGroup1", {
name: "origin_group_1",
useNext: true,
origin: [
{
source: "example.com",
enabled: true,
},
{
source: "mirror.example.com",
enabled: true,
backup: true,
},
],
});
import pulumi
import pulumi_gcore as gcore
origin_group1 = gcore.index.Gcore_cdn_origingroup("originGroup1",
name=origin_group_1,
use_next=True,
origin=[
{
source: example.com,
enabled: True,
},
{
source: mirror.example.com,
enabled: True,
backup: True,
},
])
package main
import (
"github.com/pulumi/pulumi-gcore/sdk/go/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gcore.NewGcore_cdn_origingroup(ctx, "originGroup1", &gcore.Gcore_cdn_origingroupArgs{
Name: "origin_group_1",
UseNext: true,
Origin: []map[string]interface{}{
map[string]interface{}{
"source": "example.com",
"enabled": true,
},
map[string]interface{}{
"source": "mirror.example.com",
"enabled": true,
"backup": true,
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
var originGroup1 = new Gcore.Index.Gcore_cdn_origingroup("originGroup1", new()
{
Name = "origin_group_1",
UseNext = true,
Origin = new[]
{
{
{ "source", "example.com" },
{ "enabled", true },
},
{
{ "source", "mirror.example.com" },
{ "enabled", true },
{ "backup", true },
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.gcore_cdn_origingroup;
import com.pulumi.gcore.Gcore_cdn_origingroupArgs;
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 Gcore_cdn_origingroup("originGroup1", Gcore_cdn_origingroupArgs.builder()
.name("origin_group_1")
.useNext(true)
.origin(
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
}
}
resources:
originGroup1:
type: gcore:gcore_cdn_origingroup
properties:
name: origin_group_1
useNext: true
origin:
- source: example.com
enabled: true
- source: mirror.example.com
enabled: true
backup: 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,
use_next: Optional[bool] = 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: gcorelabs: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 Gcorelabs.CdnOrigingroup("cdnOrigingroupResource", new()
{
Origins = new[]
{
new Gcorelabs.Inputs.CdnOrigingroupOriginArgs
{
Source = "string",
Backup = false,
Enabled = false,
Id = 0,
},
},
UseNext = false,
CdnOrigingroupId = "string",
Name = "string",
});
example, err := gcorelabs.NewCdnOrigingroup(ctx, "cdnOrigingroupResource", &gcorelabs.CdnOrigingroupArgs{
Origins: gcorelabs.CdnOrigingroupOriginArray{
&gcorelabs.CdnOrigingroupOriginArgs{
Source: pulumi.String("string"),
Backup: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
Id: pulumi.Float64(0),
},
},
UseNext: pulumi.Bool(false),
CdnOrigingroupId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var cdnOrigingroupResource = new CdnOrigingroup("cdnOrigingroupResource", CdnOrigingroupArgs.builder()
.origins(CdnOrigingroupOriginArgs.builder()
.source("string")
.backup(false)
.enabled(false)
.id(0)
.build())
.useNext(false)
.cdnOrigingroupId("string")
.name("string")
.build());
cdn_origingroup_resource = gcorelabs.CdnOrigingroup("cdnOrigingroupResource",
origins=[{
"source": "string",
"backup": False,
"enabled": False,
"id": 0,
}],
use_next=False,
cdn_origingroup_id="string",
name="string")
const cdnOrigingroupResource = new gcorelabs.CdnOrigingroup("cdnOrigingroupResource", {
origins: [{
source: "string",
backup: false,
enabled: false,
id: 0,
}],
useNext: false,
cdnOrigingroupId: "string",
name: "string",
});
type: gcorelabs:CdnOrigingroup
properties:
cdnOrigingroupId: string
name: string
origins:
- backup: false
enabled: false
id: 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
Origingroup Origin> - Contains information about all IP address or Domain names of your origin and the port if custom
- Use
Next bool - This options have two possible values: true — The option is active. In case the origin responds with 4XX or 5XX codes, use the next origin from the list. false — The option is disabled.
- Cdn
Origingroup stringId - The ID of this resource.
- Name string
- Name of the origin group
- Origins
[]Cdn
Origingroup Origin Args - Contains information about all IP address or Domain names of your origin and the port if custom
- Use
Next bool - This options have two possible values: true — The option is active. In case the origin responds with 4XX or 5XX codes, use the next origin from the list. false — The option is disabled.
- Cdn
Origingroup stringId - The ID of this resource.
- Name string
- Name of the origin group
- origins
List<Cdn
Origingroup Origin> - Contains information about all IP address or Domain names of your origin and the port if custom
- use
Next Boolean - This options have two possible values: true — The option is active. In case the origin responds with 4XX or 5XX codes, use the next origin from the list. false — The option is disabled.
- cdn
Origingroup StringId - The ID of this resource.
- name String
- Name of the origin group
- origins
Cdn
Origingroup Origin[] - Contains information about all IP address or Domain names of your origin and the port if custom
- use
Next boolean - This options have two possible values: true — The option is active. In case the origin responds with 4XX or 5XX codes, use the next origin from the list. false — The option is disabled.
- cdn
Origingroup stringId - The ID of this resource.
- name string
- Name of the origin group
- origins
Sequence[Cdn
Origingroup Origin Args] - Contains information about all IP address or Domain names of your origin and the port if custom
- use_
next bool - This options have two possible values: true — The option is active. In case the origin responds with 4XX or 5XX codes, use the next origin from the list. false — The option is disabled.
- cdn_
origingroup_ strid - The ID of this resource.
- name str
- Name of the origin group
- origins List<Property Map>
- Contains information about all IP address or Domain names of your origin and the port if custom
- use
Next Boolean - This options have two possible values: true — The option is active. In case the origin responds with 4XX or 5XX codes, use the next origin from the list. false — The option is disabled.
- cdn
Origingroup StringId - The ID of this resource.
- name String
- Name of the origin group
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,
cdn_origingroup_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)
resources: _: type: gcorelabs: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.
- Cdn
Origingroup stringId - The ID of this resource.
- Name string
- Name of the origin group
- Origins
List<Cdn
Origingroup Origin> - Contains information about all IP address or Domain names of your origin and the port if custom
- Use
Next bool - This options have two possible values: true — The option is active. In case the origin responds with 4XX or 5XX codes, use the next origin from the list. false — The option is disabled.
- Cdn
Origingroup stringId - The ID of this resource.
- Name string
- Name of the origin group
- Origins
[]Cdn
Origingroup Origin Args - Contains information about all IP address or Domain names of your origin and the port if custom
- Use
Next bool - This options have two possible values: true — The option is active. In case the origin responds with 4XX or 5XX codes, use the next origin from the list. false — The option is disabled.
- cdn
Origingroup StringId - The ID of this resource.
- name String
- Name of the origin group
- origins
List<Cdn
Origingroup Origin> - Contains information about all IP address or Domain names of your origin and the port if custom
- use
Next Boolean - This options have two possible values: true — The option is active. In case the origin responds with 4XX or 5XX codes, use the next origin from the list. false — The option is disabled.
- cdn
Origingroup stringId - The ID of this resource.
- name string
- Name of the origin group
- origins
Cdn
Origingroup Origin[] - Contains information about all IP address or Domain names of your origin and the port if custom
- use
Next boolean - This options have two possible values: true — The option is active. In case the origin responds with 4XX or 5XX codes, use the next origin from the list. false — The option is disabled.
- cdn_
origingroup_ strid - The ID of this resource.
- name str
- Name of the origin group
- origins
Sequence[Cdn
Origingroup Origin Args] - Contains information about all IP address or Domain names of your origin and the port if custom
- use_
next bool - This options have two possible values: true — The option is active. In case the origin responds with 4XX or 5XX codes, use the next origin from the list. false — The option is disabled.
- cdn
Origingroup StringId - The ID of this resource.
- name String
- Name of the origin group
- origins List<Property Map>
- Contains information about all IP address or Domain names of your origin and the port if custom
- use
Next Boolean - This options have two possible values: true — The option is active. In case the origin responds with 4XX or 5XX codes, use the next origin from the list. false — The option is disabled.
Supporting Types
CdnOrigingroupOrigin, CdnOrigingroupOriginArgs
- Source string
- IP address or Domain name of your origin and the port if custom
- Backup bool
- true — The option is active. The origin will not be used until one of active origins become unavailable. false — The option is disabled.
- Enabled bool
- The setting allows to enable or disable an Origin source in the Origins group
- Id double
- The ID of this resource.
- Source string
- IP address or Domain name of your origin and the port if custom
- Backup bool
- true — The option is active. The origin will not be used until one of active origins become unavailable. false — The option is disabled.
- Enabled bool
- The setting allows to enable or disable an Origin source in the Origins group
- Id float64
- The ID of this resource.
- source String
- IP address or Domain name of your origin and the port if custom
- backup Boolean
- true — The option is active. The origin will not be used until one of active origins become unavailable. false — The option is disabled.
- enabled Boolean
- The setting allows to enable or disable an Origin source in the Origins group
- id Double
- The ID of this resource.
- source string
- IP address or Domain name of your origin and the port if custom
- backup boolean
- true — The option is active. The origin will not be used until one of active origins become unavailable. false — The option is disabled.
- enabled boolean
- The setting allows to enable or disable an Origin source in the Origins group
- id number
- The ID of this resource.
- source str
- IP address or Domain name of your origin and the port if custom
- backup bool
- true — The option is active. The origin will not be used until one of active origins become unavailable. false — The option is disabled.
- enabled bool
- The setting allows to enable or disable an Origin source in the Origins group
- id float
- The ID of this resource.
- source String
- IP address or Domain name of your origin and the port if custom
- backup Boolean
- true — The option is active. The origin will not be used until one of active origins become unavailable. false — The option is disabled.
- enabled Boolean
- The setting allows to enable or disable an Origin source in the Origins group
- id Number
- The ID of this resource.
Package Details
- Repository
- gcorelabs g-core/terraform-provider-gcorelabs
- License
- Notes
- This Pulumi package is based on the
gcorelabs
Terraform Provider.