Package com.pulumi.alicloud.edas
Class Cluster
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.alicloud.edas.Cluster
-
public class Cluster extends com.pulumi.resources.CustomResource
Provides an EDAS cluster resource, see [What is EDAS Cluster](https://www.alibabacloud.com/help/en/edas/developer-reference/api-edas-2017-08-01-insertcluster). > **NOTE:** Available since v1.82.0. ## Example Usage Basic Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.alicloud.AlicloudFunctions; import com.pulumi.alicloud.inputs.GetRegionsArgs; import com.pulumi.alicloud.vpc.Network; import com.pulumi.alicloud.vpc.NetworkArgs; 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) { final var config = ctx.config(); final var name = config.get("name").orElse("tf-example"); final var defaultRegions = AlicloudFunctions.getRegions(GetRegionsArgs.builder() .current(true) .build()); var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder() .vpcName(name) .cidrBlock("10.4.0.0/16") .build()); var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder() .clusterName(name) .clusterType("2") .networkMode("2") .logicalRegionId(defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id())) .vpcId(defaultNetwork.id()) .build()); } } ``` ## Import EDAS cluster can be imported using the id, e.g. ```sh $ pulumi import alicloud:edas/cluster:Cluster cluster cluster_id ```
-
-
Constructor Summary
Constructors Constructor Description Cluster(java.lang.String name)
Cluster(java.lang.String name, ClusterArgs args)
Cluster(java.lang.String name, ClusterArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
clusterName()
com.pulumi.core.Output<java.lang.Integer>
clusterType()
static Cluster
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ClusterState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.lang.String>>
logicalRegionId()
com.pulumi.core.Output<java.lang.Integer>
networkMode()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
vpcId()
-
-
-
Constructor Detail
-
Cluster
public Cluster(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
Cluster
public Cluster(java.lang.String name, ClusterArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
Cluster
public Cluster(java.lang.String name, ClusterArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
clusterName
public com.pulumi.core.Output<java.lang.String> clusterName()
- Returns:
- The name of the cluster that you want to create.
-
clusterType
public com.pulumi.core.Output<java.lang.Integer> clusterType()
- Returns:
- The type of the cluster that you want to create. Valid values only: 2: ECS cluster.
-
logicalRegionId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> logicalRegionId()
- Returns:
- The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.
-
networkMode
public com.pulumi.core.Output<java.lang.Integer> networkMode()
- Returns:
- The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
-
vpcId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> vpcId()
- Returns:
- The ID of the Virtual Private Cloud (VPC) for the cluster.
-
get
public static Cluster get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ClusterState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-