alicloud.cen.Instance
Explore with Pulumi AI
Provides a Cloud Enterprise Network (CEN) Cen Instance resource.
For information about Cloud Enterprise Network (CEN) Cen Instance and how to use it, see What is Cen 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 com.pulumi.alicloud.cen.Instance("exampleinstanceResourceResourceFromCeninstance", com.pulumi.alicloud.cen.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:
- Cen
Instance stringName - The name of the CEN instance.
- Description string
- The description of the CEN instance.
- Name string
- . Field 'name' has been deprecated from provider version 1.246.0. New field 'cen_instance_name' instead.
- Protection
Level string - The level of CIDR block overlapping. Valid values: REDUCED: Overlapped CIDR blocks are allowed. However, the overlapped CIDR blocks cannot be the same.
- Resource
Group stringId - The ID of the resource group
- Dictionary<string, string>
The tags of the CEN instance.
The following arguments will be discarded. Please use new fields as soon as possible:
- Cen
Instance stringName - The name of the CEN instance.
- Description string
- The description of the CEN instance.
- Name string
- . Field 'name' has been deprecated from provider version 1.246.0. New field 'cen_instance_name' instead.
- Protection
Level string - The level of CIDR block overlapping. Valid values: REDUCED: Overlapped CIDR blocks are allowed. However, the overlapped CIDR blocks cannot be the same.
- Resource
Group stringId - The ID of the resource group
- map[string]string
The tags of the CEN instance.
The following arguments will be discarded. Please use new fields as soon as possible:
- cen
Instance StringName - The name of the CEN instance.
- description String
- The description of the CEN instance.
- name String
- . Field 'name' has been deprecated from provider version 1.246.0. New field 'cen_instance_name' instead.
- protection
Level String - The level of CIDR block overlapping. Valid values: REDUCED: Overlapped CIDR blocks are allowed. However, the overlapped CIDR blocks cannot be the same.
- resource
Group StringId - The ID of the resource group
- Map<String,String>
The tags of the CEN instance.
The following arguments will be discarded. Please use new fields as soon as possible:
- cen
Instance stringName - The name of the CEN instance.
- description string
- The description of the CEN instance.
- name string
- . Field 'name' has been deprecated from provider version 1.246.0. New field 'cen_instance_name' instead.
- protection
Level string - The level of CIDR block overlapping. Valid values: REDUCED: Overlapped CIDR blocks are allowed. However, the overlapped CIDR blocks cannot be the same.
- resource
Group stringId - The ID of the resource group
- {[key: string]: string}
The tags of the CEN instance.
The following arguments will be discarded. Please use new fields as soon as possible:
- cen_
instance_ strname - The name of the CEN instance.
- description str
- The description of the CEN instance.
- name str
- . Field 'name' has been deprecated from provider version 1.246.0. New field 'cen_instance_name' instead.
- protection_
level str - The level of CIDR block overlapping. Valid values: REDUCED: Overlapped CIDR blocks are allowed. However, the overlapped CIDR blocks cannot be the same.
- resource_
group_ strid - The ID of the resource group
- Mapping[str, str]
The tags of the CEN instance.
The following arguments will be discarded. Please use new fields as soon as possible:
- cen
Instance StringName - The name of the CEN instance.
- description String
- The description of the CEN instance.
- name String
- . Field 'name' has been deprecated from provider version 1.246.0. New field 'cen_instance_name' instead.
- protection
Level String - The level of CIDR block overlapping. Valid values: REDUCED: Overlapped CIDR blocks are allowed. However, the overlapped CIDR blocks cannot be the same.
- resource
Group StringId - The ID of the resource group
- Map<String>
The tags of the CEN instance.
The following arguments will be discarded. Please use new fields as soon as possible:
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Create
Time string - The time when the CEN instance was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The state of the CEN instance. Creating: The CEN instance is being created. Active: The CEN instance is running. Deleting: The CEN instance is being deleted.
- Create
Time string - The time when the CEN instance was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The state of the CEN instance. Creating: The CEN instance is being created. Active: The CEN instance is running. Deleting: The CEN instance is being deleted.
- create
Time String - The time when the CEN instance was created.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The state of the CEN instance. Creating: The CEN instance is being created. Active: The CEN instance is running. Deleting: The CEN instance is being deleted.
- create
Time string - The time when the CEN instance was created.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- The state of the CEN instance. Creating: The CEN instance is being created. Active: The CEN instance is running. Deleting: The CEN instance is being deleted.
- create_
time str - The time when the CEN instance was created.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The state of the CEN instance. Creating: The CEN instance is being created. Active: The CEN instance is running. Deleting: The CEN instance is being deleted.
- create
Time String - The time when the CEN instance was created.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The state of the CEN instance. Creating: The CEN instance is being created. Active: The CEN instance is running. Deleting: The CEN instance is being deleted.
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,
create_time: 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)
resources: _: type: alicloud:cen:Instance 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.
- Cen
Instance stringName - The name of the CEN instance.
- Create
Time string - The time when the CEN instance was created.
- Description string
- The description of the CEN instance.
- Name string
- . Field 'name' has been deprecated from provider version 1.246.0. New field 'cen_instance_name' instead.
- Protection
Level string - The level of CIDR block overlapping. Valid values: REDUCED: Overlapped CIDR blocks are allowed. However, the overlapped CIDR blocks cannot be the same.
- Resource
Group stringId - The ID of the resource group
- Status string
- The state of the CEN instance. Creating: The CEN instance is being created. Active: The CEN instance is running. Deleting: The CEN instance is being deleted.
- Dictionary<string, string>
The tags of the CEN instance.
The following arguments will be discarded. Please use new fields as soon as possible:
- Cen
Instance stringName - The name of the CEN instance.
- Create
Time string - The time when the CEN instance was created.
- Description string
- The description of the CEN instance.
- Name string
- . Field 'name' has been deprecated from provider version 1.246.0. New field 'cen_instance_name' instead.
- Protection
Level string - The level of CIDR block overlapping. Valid values: REDUCED: Overlapped CIDR blocks are allowed. However, the overlapped CIDR blocks cannot be the same.
- Resource
Group stringId - The ID of the resource group
- Status string
- The state of the CEN instance. Creating: The CEN instance is being created. Active: The CEN instance is running. Deleting: The CEN instance is being deleted.
- map[string]string
The tags of the CEN instance.
The following arguments will be discarded. Please use new fields as soon as possible:
- cen
Instance StringName - The name of the CEN instance.
- create
Time String - The time when the CEN instance was created.
- description String
- The description of the CEN instance.
- name String
- . Field 'name' has been deprecated from provider version 1.246.0. New field 'cen_instance_name' instead.
- protection
Level String - The level of CIDR block overlapping. Valid values: REDUCED: Overlapped CIDR blocks are allowed. However, the overlapped CIDR blocks cannot be the same.
- resource
Group StringId - The ID of the resource group
- status String
- The state of the CEN instance. Creating: The CEN instance is being created. Active: The CEN instance is running. Deleting: The CEN instance is being deleted.
- Map<String,String>
The tags of the CEN instance.
The following arguments will be discarded. Please use new fields as soon as possible:
- cen
Instance stringName - The name of the CEN instance.
- create
Time string - The time when the CEN instance was created.
- description string
- The description of the CEN instance.
- name string
- . Field 'name' has been deprecated from provider version 1.246.0. New field 'cen_instance_name' instead.
- protection
Level string - The level of CIDR block overlapping. Valid values: REDUCED: Overlapped CIDR blocks are allowed. However, the overlapped CIDR blocks cannot be the same.
- resource
Group stringId - The ID of the resource group
- status string
- The state of the CEN instance. Creating: The CEN instance is being created. Active: The CEN instance is running. Deleting: The CEN instance is being deleted.
- {[key: string]: string}
The tags of the CEN instance.
The following arguments will be discarded. Please use new fields as soon as possible:
- cen_
instance_ strname - The name of the CEN instance.
- create_
time str - The time when the CEN instance was created.
- description str
- The description of the CEN instance.
- name str
- . Field 'name' has been deprecated from provider version 1.246.0. New field 'cen_instance_name' instead.
- protection_
level str - The level of CIDR block overlapping. Valid values: REDUCED: Overlapped CIDR blocks are allowed. However, the overlapped CIDR blocks cannot be the same.
- resource_
group_ strid - The ID of the resource group
- status str
- The state of the CEN instance. Creating: The CEN instance is being created. Active: The CEN instance is running. Deleting: The CEN instance is being deleted.
- Mapping[str, str]
The tags of the CEN instance.
The following arguments will be discarded. Please use new fields as soon as possible:
- cen
Instance StringName - The name of the CEN instance.
- create
Time String - The time when the CEN instance was created.
- description String
- The description of the CEN instance.
- name String
- . Field 'name' has been deprecated from provider version 1.246.0. New field 'cen_instance_name' instead.
- protection
Level String - The level of CIDR block overlapping. Valid values: REDUCED: Overlapped CIDR blocks are allowed. However, the overlapped CIDR blocks cannot be the same.
- resource
Group StringId - The ID of the resource group
- status String
- The state of the CEN instance. Creating: The CEN instance is being created. Active: The CEN instance is running. Deleting: The CEN instance is being deleted.
- Map<String>
The tags of the CEN instance.
The following arguments will be discarded. Please use new fields as soon as possible:
Import
Cloud Enterprise Network (CEN) 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.