1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. edas
  5. K8sCluster
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.edas.K8sCluster

Explore with Pulumi AI

Provides an EDAS K8s cluster resource. For information about EDAS K8s Cluster and how to use it, seeWhat is EDAS K8s Cluster.

NOTE: Available since v1.93.0.

Create K8sCluster Resource

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

Constructor syntax

new K8sCluster(name: string, args: K8sClusterArgs, opts?: CustomResourceOptions);
@overload
def K8sCluster(resource_name: str,
               args: K8sClusterArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def K8sCluster(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               cs_cluster_id: Optional[str] = None,
               namespace_id: Optional[str] = None)
func NewK8sCluster(ctx *Context, name string, args K8sClusterArgs, opts ...ResourceOption) (*K8sCluster, error)
public K8sCluster(string name, K8sClusterArgs args, CustomResourceOptions? opts = null)
public K8sCluster(String name, K8sClusterArgs args)
public K8sCluster(String name, K8sClusterArgs args, CustomResourceOptions options)
type: alicloud:edas:K8sCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. K8sClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. K8sClusterArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. K8sClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. K8sClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. K8sClusterArgs
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 k8sClusterResource = new AliCloud.Edas.K8sCluster("k8sClusterResource", new()
{
    CsClusterId = "string",
    NamespaceId = "string",
});
Copy
example, err := edas.NewK8sCluster(ctx, "k8sClusterResource", &edas.K8sClusterArgs{
	CsClusterId: pulumi.String("string"),
	NamespaceId: pulumi.String("string"),
})
Copy
var k8sClusterResource = new K8sCluster("k8sClusterResource", K8sClusterArgs.builder()
    .csClusterId("string")
    .namespaceId("string")
    .build());
Copy
k8s_cluster_resource = alicloud.edas.K8sCluster("k8sClusterResource",
    cs_cluster_id="string",
    namespace_id="string")
Copy
const k8sClusterResource = new alicloud.edas.K8sCluster("k8sClusterResource", {
    csClusterId: "string",
    namespaceId: "string",
});
Copy
type: alicloud:edas:K8sCluster
properties:
    csClusterId: string
    namespaceId: string
Copy

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

CsClusterId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the alicloud container service kubernetes cluster that you want to import.
NamespaceId Changes to this property will trigger replacement. string
The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
CsClusterId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the alicloud container service kubernetes cluster that you want to import.
NamespaceId Changes to this property will trigger replacement. string
The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
csClusterId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the alicloud container service kubernetes cluster that you want to import.
namespaceId Changes to this property will trigger replacement. String
The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
csClusterId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the alicloud container service kubernetes cluster that you want to import.
namespaceId Changes to this property will trigger replacement. string
The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
cs_cluster_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the alicloud container service kubernetes cluster that you want to import.
namespace_id Changes to this property will trigger replacement. str
The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
csClusterId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the alicloud container service kubernetes cluster that you want to import.
namespaceId Changes to this property will trigger replacement. String
The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.

Outputs

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

ClusterImportStatus int
The import status of cluster: 1: success. 2: failed. 3: importing. 4: deleted.
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: 5: K8s cluster.
Id string
The provider-assigned unique ID for this managed resource.
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.
ClusterImportStatus int
The import status of cluster: 1: success. 2: failed. 3: importing. 4: deleted.
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: 5: K8s cluster.
Id string
The provider-assigned unique ID for this managed resource.
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.
clusterImportStatus Integer
The import status of cluster: 1: success. 2: failed. 3: importing. 4: deleted.
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: 5: K8s cluster.
id String
The provider-assigned unique ID for this managed resource.
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.
clusterImportStatus number
The import status of cluster: 1: success. 2: failed. 3: importing. 4: deleted.
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: 5: K8s cluster.
id string
The provider-assigned unique ID for this managed resource.
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_import_status int
The import status of cluster: 1: success. 2: failed. 3: importing. 4: deleted.
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: 5: K8s cluster.
id str
The provider-assigned unique ID for this managed resource.
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.
clusterImportStatus Number
The import status of cluster: 1: success. 2: failed. 3: importing. 4: deleted.
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: 5: K8s cluster.
id String
The provider-assigned unique ID for this managed resource.
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.

Look up Existing K8sCluster Resource

Get an existing K8sCluster 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?: K8sClusterState, opts?: CustomResourceOptions): K8sCluster
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cluster_import_status: Optional[int] = None,
        cluster_name: Optional[str] = None,
        cluster_type: Optional[int] = None,
        cs_cluster_id: Optional[str] = None,
        namespace_id: Optional[str] = None,
        network_mode: Optional[int] = None,
        vpc_id: Optional[str] = None) -> K8sCluster
func GetK8sCluster(ctx *Context, name string, id IDInput, state *K8sClusterState, opts ...ResourceOption) (*K8sCluster, error)
public static K8sCluster Get(string name, Input<string> id, K8sClusterState? state, CustomResourceOptions? opts = null)
public static K8sCluster get(String name, Output<String> id, K8sClusterState state, CustomResourceOptions options)
resources:  _:    type: alicloud:edas:K8sCluster    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ClusterImportStatus int
The import status of cluster: 1: success. 2: failed. 3: importing. 4: deleted.
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: 5: K8s cluster.
CsClusterId Changes to this property will trigger replacement. string
The ID of the alicloud container service kubernetes cluster that you want to import.
NamespaceId Changes to this property will trigger replacement. string
The ID of the namespace where you want to import. 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.
ClusterImportStatus int
The import status of cluster: 1: success. 2: failed. 3: importing. 4: deleted.
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: 5: K8s cluster.
CsClusterId Changes to this property will trigger replacement. string
The ID of the alicloud container service kubernetes cluster that you want to import.
NamespaceId Changes to this property will trigger replacement. string
The ID of the namespace where you want to import. 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.
clusterImportStatus Integer
The import status of cluster: 1: success. 2: failed. 3: importing. 4: deleted.
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: 5: K8s cluster.
csClusterId Changes to this property will trigger replacement. String
The ID of the alicloud container service kubernetes cluster that you want to import.
namespaceId Changes to this property will trigger replacement. String
The ID of the namespace where you want to import. 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.
clusterImportStatus number
The import status of cluster: 1: success. 2: failed. 3: importing. 4: deleted.
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: 5: K8s cluster.
csClusterId Changes to this property will trigger replacement. string
The ID of the alicloud container service kubernetes cluster that you want to import.
namespaceId Changes to this property will trigger replacement. string
The ID of the namespace where you want to import. 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_import_status int
The import status of cluster: 1: success. 2: failed. 3: importing. 4: deleted.
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: 5: K8s cluster.
cs_cluster_id Changes to this property will trigger replacement. str
The ID of the alicloud container service kubernetes cluster that you want to import.
namespace_id Changes to this property will trigger replacement. str
The ID of the namespace where you want to import. 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.
clusterImportStatus Number
The import status of cluster: 1: success. 2: failed. 3: importing. 4: deleted.
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: 5: K8s cluster.
csClusterId Changes to this property will trigger replacement. String
The ID of the alicloud container service kubernetes cluster that you want to import.
namespaceId Changes to this property will trigger replacement. String
The ID of the namespace where you want to import. 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/k8sCluster:K8sCluster cluster cluster_id
Copy

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.