1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cen
  5. Instance
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.cen.Instance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides a Cloud Enterprise Network (CEN) Instance resource.

    For information about Cloud Enterprise Network (CEN) Instance and how to use it, see What is Instance.

    NOTE: Available since v1.15.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = new alicloud.cen.Instance("default", {
        cenInstanceName: name,
        description: name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.cen.Instance("default",
        cen_instance_name=name,
        description=name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := cen.NewInstance(ctx, "default", &cen.InstanceArgs{
    			CenInstanceName: pulumi.String(name),
    			Description:     pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = new AliCloud.Cen.Instance("default", new()
        {
            CenInstanceName = name,
            Description = name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cen.Instance;
    import com.pulumi.alicloud.cen.InstanceArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var default_ = new Instance("default", InstanceArgs.builder()
                .cenInstanceName(name)
                .description(name)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: alicloud:cen:Instance
        properties:
          cenInstanceName: ${name}
          description: ${name}
    

    Create Instance Resource

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

    Constructor syntax

    new Instance(name: string, args?: InstanceArgs, opts?: CustomResourceOptions);
    @overload
    def Instance(resource_name: str,
                 args: Optional[InstanceArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Instance(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 cen_instance_name: Optional[str] = None,
                 description: Optional[str] = None,
                 name: Optional[str] = None,
                 protection_level: Optional[str] = None,
                 resource_group_id: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None)
    func NewInstance(ctx *Context, name string, args *InstanceArgs, opts ...ResourceOption) (*Instance, error)
    public Instance(string name, InstanceArgs? args = null, CustomResourceOptions? opts = null)
    public Instance(String name, InstanceArgs args)
    public Instance(String name, InstanceArgs args, CustomResourceOptions options)
    
    type: alicloud:cen:Instance
    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 InstanceArgs
    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 InstanceArgs
    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 InstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceArgs
    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 exampleinstanceResourceResourceFromCeninstance = new AliCloud.Cen.Instance("exampleinstanceResourceResourceFromCeninstance", new()
    {
        CenInstanceName = "string",
        Description = "string",
        ProtectionLevel = "string",
        ResourceGroupId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := cen.NewInstance(ctx, "exampleinstanceResourceResourceFromCeninstance", &cen.InstanceArgs{
    	CenInstanceName: pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	ProtectionLevel: pulumi.String("string"),
    	ResourceGroupId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var exampleinstanceResourceResourceFromCeninstance = new Instance("exampleinstanceResourceResourceFromCeninstance", InstanceArgs.builder()
        .cenInstanceName("string")
        .description("string")
        .protectionLevel("string")
        .resourceGroupId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    exampleinstance_resource_resource_from_ceninstance = alicloud.cen.Instance("exampleinstanceResourceResourceFromCeninstance",
        cen_instance_name="string",
        description="string",
        protection_level="string",
        resource_group_id="string",
        tags={
            "string": "string",
        })
    
    const exampleinstanceResourceResourceFromCeninstance = new alicloud.cen.Instance("exampleinstanceResourceResourceFromCeninstance", {
        cenInstanceName: "string",
        description: "string",
        protectionLevel: "string",
        resourceGroupId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: alicloud:cen:Instance
    properties:
        cenInstanceName: string
        description: string
        protectionLevel: string
        resourceGroupId: string
        tags:
            string: string
    

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

    CenInstanceName string
    The name of the CEN Instance. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.
    Description string
    The description of the CEN Instance. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://.
    Name string
    Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    Deprecated: Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    ProtectionLevel string
    The level of CIDR block overlapping. Default value: REDUCE.
    ResourceGroupId string
    The ID of the resource group. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    CenInstanceName string
    The name of the CEN Instance. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.
    Description string
    The description of the CEN Instance. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://.
    Name string
    Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    Deprecated: Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    ProtectionLevel string
    The level of CIDR block overlapping. Default value: REDUCE.
    ResourceGroupId string
    The ID of the resource group. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    cenInstanceName String
    The name of the CEN Instance. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.
    description String
    The description of the CEN Instance. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://.
    name String
    Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    Deprecated: Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    protectionLevel String
    The level of CIDR block overlapping. Default value: REDUCE.
    resourceGroupId String
    The ID of the resource group. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    cenInstanceName string
    The name of the CEN Instance. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.
    description string
    The description of the CEN Instance. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://.
    name string
    Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    Deprecated: Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    protectionLevel string
    The level of CIDR block overlapping. Default value: REDUCE.
    resourceGroupId string
    The ID of the resource group. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    cen_instance_name str
    The name of the CEN Instance. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.
    description str
    The description of the CEN Instance. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://.
    name str
    Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    Deprecated: Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    protection_level str
    The level of CIDR block overlapping. Default value: REDUCE.
    resource_group_id str
    The ID of the resource group. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    cenInstanceName String
    The name of the CEN Instance. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.
    description String
    The description of the CEN Instance. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://.
    name String
    Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    Deprecated: Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    protectionLevel String
    The level of CIDR block overlapping. Default value: REDUCE.
    resourceGroupId String
    The ID of the resource group. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Instance.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Instance.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the Instance.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the Instance.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Instance.

    Look up Existing Instance Resource

    Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cen_instance_name: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            protection_level: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None) -> Instance
    func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
    public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
    public static Instance get(String name, Output<String> id, InstanceState 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.
    The following state arguments are supported:
    CenInstanceName string
    The name of the CEN Instance. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.
    Description string
    The description of the CEN Instance. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://.
    Name string
    Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    Deprecated: Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    ProtectionLevel string
    The level of CIDR block overlapping. Default value: REDUCE.
    ResourceGroupId string
    The ID of the resource group. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    Status string
    The status of the Instance.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    CenInstanceName string
    The name of the CEN Instance. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.
    Description string
    The description of the CEN Instance. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://.
    Name string
    Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    Deprecated: Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    ProtectionLevel string
    The level of CIDR block overlapping. Default value: REDUCE.
    ResourceGroupId string
    The ID of the resource group. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    Status string
    The status of the Instance.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    cenInstanceName String
    The name of the CEN Instance. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.
    description String
    The description of the CEN Instance. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://.
    name String
    Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    Deprecated: Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    protectionLevel String
    The level of CIDR block overlapping. Default value: REDUCE.
    resourceGroupId String
    The ID of the resource group. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    status String
    The status of the Instance.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    cenInstanceName string
    The name of the CEN Instance. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.
    description string
    The description of the CEN Instance. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://.
    name string
    Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    Deprecated: Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    protectionLevel string
    The level of CIDR block overlapping. Default value: REDUCE.
    resourceGroupId string
    The ID of the resource group. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    status string
    The status of the Instance.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    cen_instance_name str
    The name of the CEN Instance. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.
    description str
    The description of the CEN Instance. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://.
    name str
    Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    Deprecated: Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    protection_level str
    The level of CIDR block overlapping. Default value: REDUCE.
    resource_group_id str
    The ID of the resource group. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    status str
    The status of the Instance.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    cenInstanceName String
    The name of the CEN Instance. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.
    description String
    The description of the CEN Instance. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://.
    name String
    Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    Deprecated: Field name has been deprecated from provider version 1.98.0. New field cen_instance_name instead.

    protectionLevel String
    The level of CIDR block overlapping. Default value: REDUCE.
    resourceGroupId String
    The ID of the resource group. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    status String
    The status of the Instance.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Import

    Cloud Enterprise Network (CEN) Instance can be imported using the id, e.g.

    $ pulumi import alicloud:cen/instance:Instance example <id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi