1. Packages
  2. Edgecenter Provider
  3. API Docs
  4. ProtectionResourceOrigin
edgecenter 0.9.4 published on Thursday, Aug 14, 2025 by edge-center

edgecenter.ProtectionResourceOrigin

Explore with Pulumi AI

edgecenter logo
edgecenter 0.9.4 published on Thursday, Aug 14, 2025 by edge-center

    Represent IP address behind DDoS protection resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as edgecenter from "@pulumi/edgecenter";
    
    const protectedExampleCom = new edgecenter.ProtectionResource("protectedExampleCom", {tls: [
        "1.2",
        "1.3",
    ]});
    const primary = new edgecenter.ProtectionResourceOrigin("primary", {
        resource: protectedExampleCom.protectionResourceId,
        ip: "192.168.0.1",
        mode: "primary",
        maxFails: 2,
        failTimeout: 3,
    });
    const backup = new edgecenter.ProtectionResourceOrigin("backup", {
        resource: protectedExampleCom.protectionResourceId,
        ip: "192.168.0.2",
        mode: "backup",
    });
    const down = new edgecenter.ProtectionResourceOrigin("down", {
        resource: protectedExampleCom.protectionResourceId,
        ip: "192.168.0.3",
        mode: "down",
    });
    
    import pulumi
    import pulumi_edgecenter as edgecenter
    
    protected_example_com = edgecenter.ProtectionResource("protectedExampleCom", tls=[
        "1.2",
        "1.3",
    ])
    primary = edgecenter.ProtectionResourceOrigin("primary",
        resource=protected_example_com.protection_resource_id,
        ip="192.168.0.1",
        mode="primary",
        max_fails=2,
        fail_timeout=3)
    backup = edgecenter.ProtectionResourceOrigin("backup",
        resource=protected_example_com.protection_resource_id,
        ip="192.168.0.2",
        mode="backup")
    down = edgecenter.ProtectionResourceOrigin("down",
        resource=protected_example_com.protection_resource_id,
        ip="192.168.0.3",
        mode="down")
    
    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 {
    		protectedExampleCom, err := edgecenter.NewProtectionResource(ctx, "protectedExampleCom", &edgecenter.ProtectionResourceArgs{
    			Tls: pulumi.StringArray{
    				pulumi.String("1.2"),
    				pulumi.String("1.3"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = edgecenter.NewProtectionResourceOrigin(ctx, "primary", &edgecenter.ProtectionResourceOriginArgs{
    			Resource:    protectedExampleCom.ProtectionResourceId,
    			Ip:          pulumi.String("192.168.0.1"),
    			Mode:        pulumi.String("primary"),
    			MaxFails:    pulumi.Float64(2),
    			FailTimeout: pulumi.Float64(3),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = edgecenter.NewProtectionResourceOrigin(ctx, "backup", &edgecenter.ProtectionResourceOriginArgs{
    			Resource: protectedExampleCom.ProtectionResourceId,
    			Ip:       pulumi.String("192.168.0.2"),
    			Mode:     pulumi.String("backup"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = edgecenter.NewProtectionResourceOrigin(ctx, "down", &edgecenter.ProtectionResourceOriginArgs{
    			Resource: protectedExampleCom.ProtectionResourceId,
    			Ip:       pulumi.String("192.168.0.3"),
    			Mode:     pulumi.String("down"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Edgecenter = Pulumi.Edgecenter;
    
    return await Deployment.RunAsync(() => 
    {
        var protectedExampleCom = new Edgecenter.ProtectionResource("protectedExampleCom", new()
        {
            Tls = new[]
            {
                "1.2",
                "1.3",
            },
        });
    
        var primary = new Edgecenter.ProtectionResourceOrigin("primary", new()
        {
            Resource = protectedExampleCom.ProtectionResourceId,
            Ip = "192.168.0.1",
            Mode = "primary",
            MaxFails = 2,
            FailTimeout = 3,
        });
    
        var backup = new Edgecenter.ProtectionResourceOrigin("backup", new()
        {
            Resource = protectedExampleCom.ProtectionResourceId,
            Ip = "192.168.0.2",
            Mode = "backup",
        });
    
        var down = new Edgecenter.ProtectionResourceOrigin("down", new()
        {
            Resource = protectedExampleCom.ProtectionResourceId,
            Ip = "192.168.0.3",
            Mode = "down",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.edgecenter.ProtectionResource;
    import com.pulumi.edgecenter.ProtectionResourceArgs;
    import com.pulumi.edgecenter.ProtectionResourceOrigin;
    import com.pulumi.edgecenter.ProtectionResourceOriginArgs;
    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 protectedExampleCom = new ProtectionResource("protectedExampleCom", ProtectionResourceArgs.builder()
                .tls(            
                    "1.2",
                    "1.3")
                .build());
    
            var primary = new ProtectionResourceOrigin("primary", ProtectionResourceOriginArgs.builder()
                .resource(protectedExampleCom.protectionResourceId())
                .ip("192.168.0.1")
                .mode("primary")
                .maxFails(2)
                .failTimeout(3)
                .build());
    
            var backup = new ProtectionResourceOrigin("backup", ProtectionResourceOriginArgs.builder()
                .resource(protectedExampleCom.protectionResourceId())
                .ip("192.168.0.2")
                .mode("backup")
                .build());
    
            var down = new ProtectionResourceOrigin("down", ProtectionResourceOriginArgs.builder()
                .resource(protectedExampleCom.protectionResourceId())
                .ip("192.168.0.3")
                .mode("down")
                .build());
    
        }
    }
    
    resources:
      protectedExampleCom:
        type: edgecenter:ProtectionResource
        properties:
          tls:
            - '1.2'
            - '1.3'
      primary:
        type: edgecenter:ProtectionResourceOrigin
        properties:
          resource: ${protectedExampleCom.protectionResourceId}
          ip: 192.168.0.1
          mode: primary
          maxFails: 2
          failTimeout: 3
      backup:
        type: edgecenter:ProtectionResourceOrigin
        properties:
          resource: ${protectedExampleCom.protectionResourceId}
          ip: 192.168.0.2
          mode: backup
      down:
        type: edgecenter:ProtectionResourceOrigin
        properties:
          resource: ${protectedExampleCom.protectionResourceId}
          ip: 192.168.0.3
          mode: down
    

    Create ProtectionResourceOrigin Resource

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

    Constructor syntax

    new ProtectionResourceOrigin(name: string, args: ProtectionResourceOriginArgs, opts?: CustomResourceOptions);
    @overload
    def ProtectionResourceOrigin(resource_name: str,
                                 args: ProtectionResourceOriginArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProtectionResourceOrigin(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 ip: Optional[str] = None,
                                 resource: Optional[str] = None,
                                 comment: Optional[str] = None,
                                 fail_timeout: Optional[float] = None,
                                 max_fails: Optional[float] = None,
                                 mode: Optional[str] = None,
                                 protection_resource_origin_id: Optional[str] = None,
                                 weight: Optional[float] = None)
    func NewProtectionResourceOrigin(ctx *Context, name string, args ProtectionResourceOriginArgs, opts ...ResourceOption) (*ProtectionResourceOrigin, error)
    public ProtectionResourceOrigin(string name, ProtectionResourceOriginArgs args, CustomResourceOptions? opts = null)
    public ProtectionResourceOrigin(String name, ProtectionResourceOriginArgs args)
    public ProtectionResourceOrigin(String name, ProtectionResourceOriginArgs args, CustomResourceOptions options)
    
    type: edgecenter:ProtectionResourceOrigin
    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 ProtectionResourceOriginArgs
    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 ProtectionResourceOriginArgs
    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 ProtectionResourceOriginArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProtectionResourceOriginArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProtectionResourceOriginArgs
    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 protectionResourceOriginResource = new Edgecenter.ProtectionResourceOrigin("protectionResourceOriginResource", new()
    {
        Ip = "string",
        Resource = "string",
        Comment = "string",
        FailTimeout = 0,
        MaxFails = 0,
        Mode = "string",
        ProtectionResourceOriginId = "string",
        Weight = 0,
    });
    
    example, err := edgecenter.NewProtectionResourceOrigin(ctx, "protectionResourceOriginResource", &edgecenter.ProtectionResourceOriginArgs{
    	Ip:                         pulumi.String("string"),
    	Resource:                   pulumi.String("string"),
    	Comment:                    pulumi.String("string"),
    	FailTimeout:                pulumi.Float64(0),
    	MaxFails:                   pulumi.Float64(0),
    	Mode:                       pulumi.String("string"),
    	ProtectionResourceOriginId: pulumi.String("string"),
    	Weight:                     pulumi.Float64(0),
    })
    
    var protectionResourceOriginResource = new ProtectionResourceOrigin("protectionResourceOriginResource", ProtectionResourceOriginArgs.builder()
        .ip("string")
        .resource("string")
        .comment("string")
        .failTimeout(0.0)
        .maxFails(0.0)
        .mode("string")
        .protectionResourceOriginId("string")
        .weight(0.0)
        .build());
    
    protection_resource_origin_resource = edgecenter.ProtectionResourceOrigin("protectionResourceOriginResource",
        ip="string",
        resource="string",
        comment="string",
        fail_timeout=0,
        max_fails=0,
        mode="string",
        protection_resource_origin_id="string",
        weight=0)
    
    const protectionResourceOriginResource = new edgecenter.ProtectionResourceOrigin("protectionResourceOriginResource", {
        ip: "string",
        resource: "string",
        comment: "string",
        failTimeout: 0,
        maxFails: 0,
        mode: "string",
        protectionResourceOriginId: "string",
        weight: 0,
    });
    
    type: edgecenter:ProtectionResourceOrigin
    properties:
        comment: string
        failTimeout: 0
        ip: string
        maxFails: 0
        mode: string
        protectionResourceOriginId: string
        resource: string
        weight: 0
    

    ProtectionResourceOrigin 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 ProtectionResourceOrigin resource accepts the following input properties:

    Ip string
    Origin IP for the website behind DDoS protection.
    Resource string
    ID of the DDoS protection resource using this origin.
    Comment string
    Custom comment about the origin.
    FailTimeout double
    Time (in seconds) after which the server is considered unreachable.
    MaxFails double
    Max number of failed connection attempts.
    Mode string
    Operation mode for this origin. Available values are primary, backup, down.
    ProtectionResourceOriginId string
    The ID of this resource.
    Weight double
    Origin weight for request balancing.
    Ip string
    Origin IP for the website behind DDoS protection.
    Resource string
    ID of the DDoS protection resource using this origin.
    Comment string
    Custom comment about the origin.
    FailTimeout float64
    Time (in seconds) after which the server is considered unreachable.
    MaxFails float64
    Max number of failed connection attempts.
    Mode string
    Operation mode for this origin. Available values are primary, backup, down.
    ProtectionResourceOriginId string
    The ID of this resource.
    Weight float64
    Origin weight for request balancing.
    ip String
    Origin IP for the website behind DDoS protection.
    resource String
    ID of the DDoS protection resource using this origin.
    comment String
    Custom comment about the origin.
    failTimeout Double
    Time (in seconds) after which the server is considered unreachable.
    maxFails Double
    Max number of failed connection attempts.
    mode String
    Operation mode for this origin. Available values are primary, backup, down.
    protectionResourceOriginId String
    The ID of this resource.
    weight Double
    Origin weight for request balancing.
    ip string
    Origin IP for the website behind DDoS protection.
    resource string
    ID of the DDoS protection resource using this origin.
    comment string
    Custom comment about the origin.
    failTimeout number
    Time (in seconds) after which the server is considered unreachable.
    maxFails number
    Max number of failed connection attempts.
    mode string
    Operation mode for this origin. Available values are primary, backup, down.
    protectionResourceOriginId string
    The ID of this resource.
    weight number
    Origin weight for request balancing.
    ip str
    Origin IP for the website behind DDoS protection.
    resource str
    ID of the DDoS protection resource using this origin.
    comment str
    Custom comment about the origin.
    fail_timeout float
    Time (in seconds) after which the server is considered unreachable.
    max_fails float
    Max number of failed connection attempts.
    mode str
    Operation mode for this origin. Available values are primary, backup, down.
    protection_resource_origin_id str
    The ID of this resource.
    weight float
    Origin weight for request balancing.
    ip String
    Origin IP for the website behind DDoS protection.
    resource String
    ID of the DDoS protection resource using this origin.
    comment String
    Custom comment about the origin.
    failTimeout Number
    Time (in seconds) after which the server is considered unreachable.
    maxFails Number
    Max number of failed connection attempts.
    mode String
    Operation mode for this origin. Available values are primary, backup, down.
    protectionResourceOriginId String
    The ID of this resource.
    weight Number
    Origin weight for request balancing.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ProtectionResourceOrigin 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 ProtectionResourceOrigin Resource

    Get an existing ProtectionResourceOrigin 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?: ProtectionResourceOriginState, opts?: CustomResourceOptions): ProtectionResourceOrigin
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comment: Optional[str] = None,
            fail_timeout: Optional[float] = None,
            ip: Optional[str] = None,
            max_fails: Optional[float] = None,
            mode: Optional[str] = None,
            protection_resource_origin_id: Optional[str] = None,
            resource: Optional[str] = None,
            weight: Optional[float] = None) -> ProtectionResourceOrigin
    func GetProtectionResourceOrigin(ctx *Context, name string, id IDInput, state *ProtectionResourceOriginState, opts ...ResourceOption) (*ProtectionResourceOrigin, error)
    public static ProtectionResourceOrigin Get(string name, Input<string> id, ProtectionResourceOriginState? state, CustomResourceOptions? opts = null)
    public static ProtectionResourceOrigin get(String name, Output<String> id, ProtectionResourceOriginState state, CustomResourceOptions options)
    resources:  _:    type: edgecenter:ProtectionResourceOrigin    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:
    Comment string
    Custom comment about the origin.
    FailTimeout double
    Time (in seconds) after which the server is considered unreachable.
    Ip string
    Origin IP for the website behind DDoS protection.
    MaxFails double
    Max number of failed connection attempts.
    Mode string
    Operation mode for this origin. Available values are primary, backup, down.
    ProtectionResourceOriginId string
    The ID of this resource.
    Resource string
    ID of the DDoS protection resource using this origin.
    Weight double
    Origin weight for request balancing.
    Comment string
    Custom comment about the origin.
    FailTimeout float64
    Time (in seconds) after which the server is considered unreachable.
    Ip string
    Origin IP for the website behind DDoS protection.
    MaxFails float64
    Max number of failed connection attempts.
    Mode string
    Operation mode for this origin. Available values are primary, backup, down.
    ProtectionResourceOriginId string
    The ID of this resource.
    Resource string
    ID of the DDoS protection resource using this origin.
    Weight float64
    Origin weight for request balancing.
    comment String
    Custom comment about the origin.
    failTimeout Double
    Time (in seconds) after which the server is considered unreachable.
    ip String
    Origin IP for the website behind DDoS protection.
    maxFails Double
    Max number of failed connection attempts.
    mode String
    Operation mode for this origin. Available values are primary, backup, down.
    protectionResourceOriginId String
    The ID of this resource.
    resource String
    ID of the DDoS protection resource using this origin.
    weight Double
    Origin weight for request balancing.
    comment string
    Custom comment about the origin.
    failTimeout number
    Time (in seconds) after which the server is considered unreachable.
    ip string
    Origin IP for the website behind DDoS protection.
    maxFails number
    Max number of failed connection attempts.
    mode string
    Operation mode for this origin. Available values are primary, backup, down.
    protectionResourceOriginId string
    The ID of this resource.
    resource string
    ID of the DDoS protection resource using this origin.
    weight number
    Origin weight for request balancing.
    comment str
    Custom comment about the origin.
    fail_timeout float
    Time (in seconds) after which the server is considered unreachable.
    ip str
    Origin IP for the website behind DDoS protection.
    max_fails float
    Max number of failed connection attempts.
    mode str
    Operation mode for this origin. Available values are primary, backup, down.
    protection_resource_origin_id str
    The ID of this resource.
    resource str
    ID of the DDoS protection resource using this origin.
    weight float
    Origin weight for request balancing.
    comment String
    Custom comment about the origin.
    failTimeout Number
    Time (in seconds) after which the server is considered unreachable.
    ip String
    Origin IP for the website behind DDoS protection.
    maxFails Number
    Max number of failed connection attempts.
    mode String
    Operation mode for this origin. Available values are primary, backup, down.
    protectionResourceOriginId String
    The ID of this resource.
    resource String
    ID of the DDoS protection resource using this origin.
    weight Number
    Origin weight for request balancing.

    Import

    import using <resource_id>:<origin_id> format

    $ pulumi import edgecenter:index/protectionResourceOrigin:ProtectionResourceOrigin primary 12345:67
    

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

    Package Details

    Repository
    edgecenter edge-center/terraform-provider-edgecenter
    License
    Notes
    This Pulumi package is based on the edgecenter Terraform Provider.
    edgecenter logo
    edgecenter 0.9.4 published on Thursday, Aug 14, 2025 by edge-center