alicloud logo
Alibaba Cloud v3.37.0, May 15 23

alicloud.edas.Cluster

Explore with Pulumi AI

Provides an EDAS cluster resource.

NOTE: Available in 1.82.0+

Example Usage

Basic Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = new AliCloud.Edas.Cluster("default", new()
    {
        ClusterName = @var.Cluster_name,
        ClusterType = @var.Cluster_type,
        NetworkMode = @var.Network_mode,
        LogicalRegionId = @var.Logical_region_id,
        VpcId = @var.Vpc_id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/edas"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := edas.NewCluster(ctx, "default", &edas.ClusterArgs{
			ClusterName:     pulumi.Any(_var.Cluster_name),
			ClusterType:     pulumi.Any(_var.Cluster_type),
			NetworkMode:     pulumi.Any(_var.Network_mode),
			LogicalRegionId: pulumi.Any(_var.Logical_region_id),
			VpcId:           pulumi.Any(_var.Vpc_id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.edas.Cluster;
import com.pulumi.alicloud.edas.ClusterArgs;
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 default_ = new Cluster("default", ClusterArgs.builder()        
            .clusterName(var_.cluster_name())
            .clusterType(var_.cluster_type())
            .networkMode(var_.network_mode())
            .logicalRegionId(var_.logical_region_id())
            .vpcId(var_.vpc_id())
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.edas.Cluster("default",
    cluster_name=var["cluster_name"],
    cluster_type=var["cluster_type"],
    network_mode=var["network_mode"],
    logical_region_id=var["logical_region_id"],
    vpc_id=var["vpc_id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = new alicloud.edas.Cluster("default", {
    clusterName: _var.cluster_name,
    clusterType: _var.cluster_type,
    networkMode: _var.network_mode,
    logicalRegionId: _var.logical_region_id,
    vpcId: _var.vpc_id,
});
resources:
  default:
    type: alicloud:edas:Cluster
    properties:
      clusterName: ${var.cluster_name}
      clusterType: ${var.cluster_type}
      networkMode: ${var.network_mode}
      logicalRegionId: ${var.logical_region_id}
      vpcId: ${var.vpc_id}

Create Cluster Resource

new Cluster(name: string, args: ClusterArgs, opts?: CustomResourceOptions);
@overload
def Cluster(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            cluster_name: Optional[str] = None,
            cluster_type: Optional[int] = None,
            logical_region_id: Optional[str] = None,
            network_mode: Optional[int] = None,
            vpc_id: Optional[str] = None)
@overload
def Cluster(resource_name: str,
            args: ClusterArgs,
            opts: Optional[ResourceOptions] = None)
func NewCluster(ctx *Context, name string, args ClusterArgs, opts ...ResourceOption) (*Cluster, error)
public Cluster(string name, ClusterArgs args, CustomResourceOptions? opts = null)
public Cluster(String name, ClusterArgs args)
public Cluster(String name, ClusterArgs args, CustomResourceOptions options)
type: alicloud:edas:Cluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ClusterArgs
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 ClusterArgs
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 ClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ClusterArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Cluster Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Cluster resource accepts the following input properties:

ClusterName string

The name of the cluster that you want to create.

ClusterType int

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

NetworkMode int

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

LogicalRegionId string

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

VpcId string

The ID of the Virtual Private Cloud (VPC) for the cluster.

ClusterName string

The name of the cluster that you want to create.

ClusterType int

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

NetworkMode int

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

LogicalRegionId string

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

VpcId string

The ID of the Virtual Private Cloud (VPC) for the cluster.

clusterName String

The name of the cluster that you want to create.

clusterType Integer

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

networkMode Integer

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

logicalRegionId String

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

vpcId String

The ID of the Virtual Private Cloud (VPC) for the cluster.

clusterName string

The name of the cluster that you want to create.

clusterType number

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

networkMode number

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

logicalRegionId string

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

vpcId string

The ID of the Virtual Private Cloud (VPC) for the cluster.

cluster_name str

The name of the cluster that you want to create.

cluster_type int

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

network_mode int

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

logical_region_id str

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

vpc_id str

The ID of the Virtual Private Cloud (VPC) for the cluster.

clusterName String

The name of the cluster that you want to create.

clusterType Number

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

networkMode Number

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

logicalRegionId String

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

vpcId String

The ID of the Virtual Private Cloud (VPC) for the cluster.

Outputs

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

Get an existing Cluster 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?: ClusterState, opts?: CustomResourceOptions): Cluster
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cluster_name: Optional[str] = None,
        cluster_type: Optional[int] = None,
        logical_region_id: Optional[str] = None,
        network_mode: Optional[int] = None,
        vpc_id: Optional[str] = None) -> Cluster
func GetCluster(ctx *Context, name string, id IDInput, state *ClusterState, opts ...ResourceOption) (*Cluster, error)
public static Cluster Get(string name, Input<string> id, ClusterState? state, CustomResourceOptions? opts = null)
public static Cluster get(String name, Output<String> id, ClusterState 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:
ClusterName string

The name of the cluster that you want to create.

ClusterType int

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

LogicalRegionId string

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

NetworkMode int

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

VpcId string

The ID of the Virtual Private Cloud (VPC) for the cluster.

ClusterName string

The name of the cluster that you want to create.

ClusterType int

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

LogicalRegionId string

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

NetworkMode int

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

VpcId string

The ID of the Virtual Private Cloud (VPC) for the cluster.

clusterName String

The name of the cluster that you want to create.

clusterType Integer

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

logicalRegionId String

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

networkMode Integer

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

vpcId String

The ID of the Virtual Private Cloud (VPC) for the cluster.

clusterName string

The name of the cluster that you want to create.

clusterType number

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

logicalRegionId string

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

networkMode number

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

vpcId string

The ID of the Virtual Private Cloud (VPC) for the cluster.

cluster_name str

The name of the cluster that you want to create.

cluster_type int

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

logical_region_id str

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

network_mode int

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

vpc_id str

The ID of the Virtual Private Cloud (VPC) for the cluster.

clusterName String

The name of the cluster that you want to create.

clusterType Number

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

logicalRegionId String

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

networkMode Number

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

vpcId String

The ID of the Virtual Private Cloud (VPC) for the cluster.

Import

EDAS cluster can be imported using the id, e.g.

 $ pulumi import alicloud:edas/cluster:Cluster cluster cluster_id

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.