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

edgecenter.ProtectionResourceAlias

Explore with Pulumi AI

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

    Allows to manage aliases 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 subdomain1 = new edgecenter.ProtectionResourceAlias("subdomain1", {resource: protectedExampleCom.protectionResourceId});
    const subdomain2 = new edgecenter.ProtectionResourceAlias("subdomain2", {resource: protectedExampleCom.protectionResourceId});
    
    import pulumi
    import pulumi_edgecenter as edgecenter
    
    protected_example_com = edgecenter.ProtectionResource("protectedExampleCom", tls=[
        "1.2",
        "1.3",
    ])
    subdomain1 = edgecenter.ProtectionResourceAlias("subdomain1", resource=protected_example_com.protection_resource_id)
    subdomain2 = edgecenter.ProtectionResourceAlias("subdomain2", resource=protected_example_com.protection_resource_id)
    
    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.NewProtectionResourceAlias(ctx, "subdomain1", &edgecenter.ProtectionResourceAliasArgs{
    			Resource: protectedExampleCom.ProtectionResourceId,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = edgecenter.NewProtectionResourceAlias(ctx, "subdomain2", &edgecenter.ProtectionResourceAliasArgs{
    			Resource: protectedExampleCom.ProtectionResourceId,
    		})
    		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 subdomain1 = new Edgecenter.ProtectionResourceAlias("subdomain1", new()
        {
            Resource = protectedExampleCom.ProtectionResourceId,
        });
    
        var subdomain2 = new Edgecenter.ProtectionResourceAlias("subdomain2", new()
        {
            Resource = protectedExampleCom.ProtectionResourceId,
        });
    
    });
    
    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.ProtectionResourceAlias;
    import com.pulumi.edgecenter.ProtectionResourceAliasArgs;
    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 subdomain1 = new ProtectionResourceAlias("subdomain1", ProtectionResourceAliasArgs.builder()
                .resource(protectedExampleCom.protectionResourceId())
                .build());
    
            var subdomain2 = new ProtectionResourceAlias("subdomain2", ProtectionResourceAliasArgs.builder()
                .resource(protectedExampleCom.protectionResourceId())
                .build());
    
        }
    }
    
    resources:
      protectedExampleCom:
        type: edgecenter:ProtectionResource
        properties:
          tls:
            - '1.2'
            - '1.3'
      subdomain1:
        type: edgecenter:ProtectionResourceAlias
        properties:
          resource: ${protectedExampleCom.protectionResourceId}
      subdomain2:
        type: edgecenter:ProtectionResourceAlias
        properties:
          resource: ${protectedExampleCom.protectionResourceId}
    

    Create ProtectionResourceAlias Resource

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

    Constructor syntax

    new ProtectionResourceAlias(name: string, args: ProtectionResourceAliasArgs, opts?: CustomResourceOptions);
    @overload
    def ProtectionResourceAlias(resource_name: str,
                                args: ProtectionResourceAliasArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProtectionResourceAlias(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                resource: Optional[str] = None,
                                name: Optional[str] = None,
                                protection_resource_alias_id: Optional[str] = None)
    func NewProtectionResourceAlias(ctx *Context, name string, args ProtectionResourceAliasArgs, opts ...ResourceOption) (*ProtectionResourceAlias, error)
    public ProtectionResourceAlias(string name, ProtectionResourceAliasArgs args, CustomResourceOptions? opts = null)
    public ProtectionResourceAlias(String name, ProtectionResourceAliasArgs args)
    public ProtectionResourceAlias(String name, ProtectionResourceAliasArgs args, CustomResourceOptions options)
    
    type: edgecenter:ProtectionResourceAlias
    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 ProtectionResourceAliasArgs
    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 ProtectionResourceAliasArgs
    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 ProtectionResourceAliasArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProtectionResourceAliasArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProtectionResourceAliasArgs
    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 protectionResourceAliasResource = new Edgecenter.ProtectionResourceAlias("protectionResourceAliasResource", new()
    {
        Resource = "string",
        Name = "string",
        ProtectionResourceAliasId = "string",
    });
    
    example, err := edgecenter.NewProtectionResourceAlias(ctx, "protectionResourceAliasResource", &edgecenter.ProtectionResourceAliasArgs{
    	Resource:                  pulumi.String("string"),
    	Name:                      pulumi.String("string"),
    	ProtectionResourceAliasId: pulumi.String("string"),
    })
    
    var protectionResourceAliasResource = new ProtectionResourceAlias("protectionResourceAliasResource", ProtectionResourceAliasArgs.builder()
        .resource("string")
        .name("string")
        .protectionResourceAliasId("string")
        .build());
    
    protection_resource_alias_resource = edgecenter.ProtectionResourceAlias("protectionResourceAliasResource",
        resource="string",
        name="string",
        protection_resource_alias_id="string")
    
    const protectionResourceAliasResource = new edgecenter.ProtectionResourceAlias("protectionResourceAliasResource", {
        resource: "string",
        name: "string",
        protectionResourceAliasId: "string",
    });
    
    type: edgecenter:ProtectionResourceAlias
    properties:
        name: string
        protectionResourceAliasId: string
        resource: string
    

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

    Resource string
    The ID of DDoS protection resource to manage alias for.
    Name string
    The name of alias of DDoS protection resource. Must be a sub-domain of resource.
    ProtectionResourceAliasId string
    The ID of this resource.
    Resource string
    The ID of DDoS protection resource to manage alias for.
    Name string
    The name of alias of DDoS protection resource. Must be a sub-domain of resource.
    ProtectionResourceAliasId string
    The ID of this resource.
    resource String
    The ID of DDoS protection resource to manage alias for.
    name String
    The name of alias of DDoS protection resource. Must be a sub-domain of resource.
    protectionResourceAliasId String
    The ID of this resource.
    resource string
    The ID of DDoS protection resource to manage alias for.
    name string
    The name of alias of DDoS protection resource. Must be a sub-domain of resource.
    protectionResourceAliasId string
    The ID of this resource.
    resource str
    The ID of DDoS protection resource to manage alias for.
    name str
    The name of alias of DDoS protection resource. Must be a sub-domain of resource.
    protection_resource_alias_id str
    The ID of this resource.
    resource String
    The ID of DDoS protection resource to manage alias for.
    name String
    The name of alias of DDoS protection resource. Must be a sub-domain of resource.
    protectionResourceAliasId String
    The ID of this resource.

    Outputs

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

    Get an existing ProtectionResourceAlias 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?: ProtectionResourceAliasState, opts?: CustomResourceOptions): ProtectionResourceAlias
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            protection_resource_alias_id: Optional[str] = None,
            resource: Optional[str] = None) -> ProtectionResourceAlias
    func GetProtectionResourceAlias(ctx *Context, name string, id IDInput, state *ProtectionResourceAliasState, opts ...ResourceOption) (*ProtectionResourceAlias, error)
    public static ProtectionResourceAlias Get(string name, Input<string> id, ProtectionResourceAliasState? state, CustomResourceOptions? opts = null)
    public static ProtectionResourceAlias get(String name, Output<String> id, ProtectionResourceAliasState state, CustomResourceOptions options)
    resources:  _:    type: edgecenter:ProtectionResourceAlias    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:
    Name string
    The name of alias of DDoS protection resource. Must be a sub-domain of resource.
    ProtectionResourceAliasId string
    The ID of this resource.
    Resource string
    The ID of DDoS protection resource to manage alias for.
    Name string
    The name of alias of DDoS protection resource. Must be a sub-domain of resource.
    ProtectionResourceAliasId string
    The ID of this resource.
    Resource string
    The ID of DDoS protection resource to manage alias for.
    name String
    The name of alias of DDoS protection resource. Must be a sub-domain of resource.
    protectionResourceAliasId String
    The ID of this resource.
    resource String
    The ID of DDoS protection resource to manage alias for.
    name string
    The name of alias of DDoS protection resource. Must be a sub-domain of resource.
    protectionResourceAliasId string
    The ID of this resource.
    resource string
    The ID of DDoS protection resource to manage alias for.
    name str
    The name of alias of DDoS protection resource. Must be a sub-domain of resource.
    protection_resource_alias_id str
    The ID of this resource.
    resource str
    The ID of DDoS protection resource to manage alias for.
    name String
    The name of alias of DDoS protection resource. Must be a sub-domain of resource.
    protectionResourceAliasId String
    The ID of this resource.
    resource String
    The ID of DDoS protection resource to manage alias for.

    Import

    import using <resource_id>:<alias_id> format

    $ pulumi import edgecenter:index/protectionResourceAlias:ProtectionResourceAlias subdomain1 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