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

edgecenter.ProtectionResourceWhitelistEntry

Explore with Pulumi AI

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

    Represent IP added to whitelist for 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 whitelist1 = new edgecenter.ProtectionResourceWhitelistEntry("whitelist1", {
        resource: protectedExampleCom.protectionResourceId,
        ip: "1.2.3.4",
    });
    const whitelist2 = new edgecenter.ProtectionResourceWhitelistEntry("whitelist2", {
        resource: protectedExampleCom.protectionResourceId,
        ip: "1.2.4.0/27",
    });
    
    import pulumi
    import pulumi_edgecenter as edgecenter
    
    protected_example_com = edgecenter.ProtectionResource("protectedExampleCom", tls=[
        "1.2",
        "1.3",
    ])
    whitelist1 = edgecenter.ProtectionResourceWhitelistEntry("whitelist1",
        resource=protected_example_com.protection_resource_id,
        ip="1.2.3.4")
    whitelist2 = edgecenter.ProtectionResourceWhitelistEntry("whitelist2",
        resource=protected_example_com.protection_resource_id,
        ip="1.2.4.0/27")
    
    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.NewProtectionResourceWhitelistEntry(ctx, "whitelist1", &edgecenter.ProtectionResourceWhitelistEntryArgs{
    			Resource: protectedExampleCom.ProtectionResourceId,
    			Ip:       pulumi.String("1.2.3.4"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = edgecenter.NewProtectionResourceWhitelistEntry(ctx, "whitelist2", &edgecenter.ProtectionResourceWhitelistEntryArgs{
    			Resource: protectedExampleCom.ProtectionResourceId,
    			Ip:       pulumi.String("1.2.4.0/27"),
    		})
    		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 whitelist1 = new Edgecenter.ProtectionResourceWhitelistEntry("whitelist1", new()
        {
            Resource = protectedExampleCom.ProtectionResourceId,
            Ip = "1.2.3.4",
        });
    
        var whitelist2 = new Edgecenter.ProtectionResourceWhitelistEntry("whitelist2", new()
        {
            Resource = protectedExampleCom.ProtectionResourceId,
            Ip = "1.2.4.0/27",
        });
    
    });
    
    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.ProtectionResourceWhitelistEntry;
    import com.pulumi.edgecenter.ProtectionResourceWhitelistEntryArgs;
    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 whitelist1 = new ProtectionResourceWhitelistEntry("whitelist1", ProtectionResourceWhitelistEntryArgs.builder()
                .resource(protectedExampleCom.protectionResourceId())
                .ip("1.2.3.4")
                .build());
    
            var whitelist2 = new ProtectionResourceWhitelistEntry("whitelist2", ProtectionResourceWhitelistEntryArgs.builder()
                .resource(protectedExampleCom.protectionResourceId())
                .ip("1.2.4.0/27")
                .build());
    
        }
    }
    
    resources:
      protectedExampleCom:
        type: edgecenter:ProtectionResource
        properties:
          tls:
            - '1.2'
            - '1.3'
      whitelist1:
        type: edgecenter:ProtectionResourceWhitelistEntry
        properties:
          resource: ${protectedExampleCom.protectionResourceId}
          ip: 1.2.3.4
      whitelist2:
        type: edgecenter:ProtectionResourceWhitelistEntry
        properties:
          resource: ${protectedExampleCom.protectionResourceId}
          ip: 1.2.4.0/27
    

    Create ProtectionResourceWhitelistEntry Resource

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

    Constructor syntax

    new ProtectionResourceWhitelistEntry(name: string, args: ProtectionResourceWhitelistEntryArgs, opts?: CustomResourceOptions);
    @overload
    def ProtectionResourceWhitelistEntry(resource_name: str,
                                         args: ProtectionResourceWhitelistEntryArgs,
                                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProtectionResourceWhitelistEntry(resource_name: str,
                                         opts: Optional[ResourceOptions] = None,
                                         ip: Optional[str] = None,
                                         resource: Optional[str] = None,
                                         protection_resource_whitelist_entry_id: Optional[str] = None)
    func NewProtectionResourceWhitelistEntry(ctx *Context, name string, args ProtectionResourceWhitelistEntryArgs, opts ...ResourceOption) (*ProtectionResourceWhitelistEntry, error)
    public ProtectionResourceWhitelistEntry(string name, ProtectionResourceWhitelistEntryArgs args, CustomResourceOptions? opts = null)
    public ProtectionResourceWhitelistEntry(String name, ProtectionResourceWhitelistEntryArgs args)
    public ProtectionResourceWhitelistEntry(String name, ProtectionResourceWhitelistEntryArgs args, CustomResourceOptions options)
    
    type: edgecenter:ProtectionResourceWhitelistEntry
    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 ProtectionResourceWhitelistEntryArgs
    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 ProtectionResourceWhitelistEntryArgs
    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 ProtectionResourceWhitelistEntryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProtectionResourceWhitelistEntryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProtectionResourceWhitelistEntryArgs
    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 protectionResourceWhitelistEntryResource = new Edgecenter.ProtectionResourceWhitelistEntry("protectionResourceWhitelistEntryResource", new()
    {
        Ip = "string",
        Resource = "string",
        ProtectionResourceWhitelistEntryId = "string",
    });
    
    example, err := edgecenter.NewProtectionResourceWhitelistEntry(ctx, "protectionResourceWhitelistEntryResource", &edgecenter.ProtectionResourceWhitelistEntryArgs{
    	Ip:                                 pulumi.String("string"),
    	Resource:                           pulumi.String("string"),
    	ProtectionResourceWhitelistEntryId: pulumi.String("string"),
    })
    
    var protectionResourceWhitelistEntryResource = new ProtectionResourceWhitelistEntry("protectionResourceWhitelistEntryResource", ProtectionResourceWhitelistEntryArgs.builder()
        .ip("string")
        .resource("string")
        .protectionResourceWhitelistEntryId("string")
        .build());
    
    protection_resource_whitelist_entry_resource = edgecenter.ProtectionResourceWhitelistEntry("protectionResourceWhitelistEntryResource",
        ip="string",
        resource="string",
        protection_resource_whitelist_entry_id="string")
    
    const protectionResourceWhitelistEntryResource = new edgecenter.ProtectionResourceWhitelistEntry("protectionResourceWhitelistEntryResource", {
        ip: "string",
        resource: "string",
        protectionResourceWhitelistEntryId: "string",
    });
    
    type: edgecenter:ProtectionResourceWhitelistEntry
    properties:
        ip: string
        protectionResourceWhitelistEntryId: string
        resource: string
    

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

    Ip string
    Allowed IP address.
    Resource string
    ID of the DDoS protection resource to add header to.
    ProtectionResourceWhitelistEntryId string
    The ID of this resource.
    Ip string
    Allowed IP address.
    Resource string
    ID of the DDoS protection resource to add header to.
    ProtectionResourceWhitelistEntryId string
    The ID of this resource.
    ip String
    Allowed IP address.
    resource String
    ID of the DDoS protection resource to add header to.
    protectionResourceWhitelistEntryId String
    The ID of this resource.
    ip string
    Allowed IP address.
    resource string
    ID of the DDoS protection resource to add header to.
    protectionResourceWhitelistEntryId string
    The ID of this resource.
    ip str
    Allowed IP address.
    resource str
    ID of the DDoS protection resource to add header to.
    protection_resource_whitelist_entry_id str
    The ID of this resource.
    ip String
    Allowed IP address.
    resource String
    ID of the DDoS protection resource to add header to.
    protectionResourceWhitelistEntryId String
    The ID of this resource.

    Outputs

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

    Get an existing ProtectionResourceWhitelistEntry 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?: ProtectionResourceWhitelistEntryState, opts?: CustomResourceOptions): ProtectionResourceWhitelistEntry
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ip: Optional[str] = None,
            protection_resource_whitelist_entry_id: Optional[str] = None,
            resource: Optional[str] = None) -> ProtectionResourceWhitelistEntry
    func GetProtectionResourceWhitelistEntry(ctx *Context, name string, id IDInput, state *ProtectionResourceWhitelistEntryState, opts ...ResourceOption) (*ProtectionResourceWhitelistEntry, error)
    public static ProtectionResourceWhitelistEntry Get(string name, Input<string> id, ProtectionResourceWhitelistEntryState? state, CustomResourceOptions? opts = null)
    public static ProtectionResourceWhitelistEntry get(String name, Output<String> id, ProtectionResourceWhitelistEntryState state, CustomResourceOptions options)
    resources:  _:    type: edgecenter:ProtectionResourceWhitelistEntry    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:
    Ip string
    Allowed IP address.
    ProtectionResourceWhitelistEntryId string
    The ID of this resource.
    Resource string
    ID of the DDoS protection resource to add header to.
    Ip string
    Allowed IP address.
    ProtectionResourceWhitelistEntryId string
    The ID of this resource.
    Resource string
    ID of the DDoS protection resource to add header to.
    ip String
    Allowed IP address.
    protectionResourceWhitelistEntryId String
    The ID of this resource.
    resource String
    ID of the DDoS protection resource to add header to.
    ip string
    Allowed IP address.
    protectionResourceWhitelistEntryId string
    The ID of this resource.
    resource string
    ID of the DDoS protection resource to add header to.
    ip str
    Allowed IP address.
    protection_resource_whitelist_entry_id str
    The ID of this resource.
    resource str
    ID of the DDoS protection resource to add header to.
    ip String
    Allowed IP address.
    protectionResourceWhitelistEntryId String
    The ID of this resource.
    resource String
    ID of the DDoS protection resource to add header to.

    Import

    import using <resource_id>:<entry_id> format

    $ pulumi import edgecenter:index/protectionResourceWhitelistEntry:ProtectionResourceWhitelistEntry whitelist1 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