alicloud.ecs.EcsDedicatedHostCluster
Explore with Pulumi AI
Provides a ECS Dedicated Host Cluster resource.
For information about ECS Dedicated Host Cluster and how to use it, see What is Dedicated Host Cluster.
NOTE: Available in v1.146.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var exampleZones = AliCloud.GetZones.Invoke();
var exampleEcsDedicatedHostCluster = new AliCloud.Ecs.EcsDedicatedHostCluster("exampleEcsDedicatedHostCluster", new()
{
DedicatedHostClusterName = "example_value",
Description = "example_value",
ZoneId = exampleZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
Tags =
{
{ "Create", "TF" },
{ "For", "DDH_Cluster_Test" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleZones, err := alicloud.GetZones(ctx, nil, nil)
if err != nil {
return err
}
_, err = ecs.NewEcsDedicatedHostCluster(ctx, "exampleEcsDedicatedHostCluster", &ecs.EcsDedicatedHostClusterArgs{
DedicatedHostClusterName: pulumi.String("example_value"),
Description: pulumi.String("example_value"),
ZoneId: *pulumi.String(exampleZones.Zones[0].Id),
Tags: pulumi.AnyMap{
"Create": pulumi.Any("TF"),
"For": pulumi.Any("DDH_Cluster_Test"),
},
})
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.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.ecs.EcsDedicatedHostCluster;
import com.pulumi.alicloud.ecs.EcsDedicatedHostClusterArgs;
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 exampleZones = AlicloudFunctions.getZones();
var exampleEcsDedicatedHostCluster = new EcsDedicatedHostCluster("exampleEcsDedicatedHostCluster", EcsDedicatedHostClusterArgs.builder()
.dedicatedHostClusterName("example_value")
.description("example_value")
.zoneId(exampleZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.tags(Map.ofEntries(
Map.entry("Create", "TF"),
Map.entry("For", "DDH_Cluster_Test")
))
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
example_zones = alicloud.get_zones()
example_ecs_dedicated_host_cluster = alicloud.ecs.EcsDedicatedHostCluster("exampleEcsDedicatedHostCluster",
dedicated_host_cluster_name="example_value",
description="example_value",
zone_id=example_zones.zones[0].id,
tags={
"Create": "TF",
"For": "DDH_Cluster_Test",
})
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const exampleZones = alicloud.getZones({});
const exampleEcsDedicatedHostCluster = new alicloud.ecs.EcsDedicatedHostCluster("exampleEcsDedicatedHostCluster", {
dedicatedHostClusterName: "example_value",
description: "example_value",
zoneId: exampleZones.then(exampleZones => exampleZones.zones?.[0]?.id),
tags: {
Create: "TF",
For: "DDH_Cluster_Test",
},
});
resources:
exampleEcsDedicatedHostCluster:
type: alicloud:ecs:EcsDedicatedHostCluster
properties:
dedicatedHostClusterName: example_value
description: example_value
zoneId: ${exampleZones.zones[0].id}
tags:
Create: TF
For: DDH_Cluster_Test
variables:
exampleZones:
fn::invoke:
Function: alicloud:getZones
Arguments: {}
Create EcsDedicatedHostCluster Resource
new EcsDedicatedHostCluster(name: string, args: EcsDedicatedHostClusterArgs, opts?: CustomResourceOptions);
@overload
def EcsDedicatedHostCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
dedicated_host_cluster_name: Optional[str] = None,
description: Optional[str] = None,
dry_run: Optional[bool] = None,
tags: Optional[Mapping[str, Any]] = None,
zone_id: Optional[str] = None)
@overload
def EcsDedicatedHostCluster(resource_name: str,
args: EcsDedicatedHostClusterArgs,
opts: Optional[ResourceOptions] = None)
func NewEcsDedicatedHostCluster(ctx *Context, name string, args EcsDedicatedHostClusterArgs, opts ...ResourceOption) (*EcsDedicatedHostCluster, error)
public EcsDedicatedHostCluster(string name, EcsDedicatedHostClusterArgs args, CustomResourceOptions? opts = null)
public EcsDedicatedHostCluster(String name, EcsDedicatedHostClusterArgs args)
public EcsDedicatedHostCluster(String name, EcsDedicatedHostClusterArgs args, CustomResourceOptions options)
type: alicloud:ecs:EcsDedicatedHostCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EcsDedicatedHostClusterArgs
- 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 EcsDedicatedHostClusterArgs
- 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 EcsDedicatedHostClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EcsDedicatedHostClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EcsDedicatedHostClusterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
EcsDedicatedHostCluster 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 EcsDedicatedHostCluster resource accepts the following input properties:
- Zone
Id string The ID of the zone in which to create the dedicated host cluster.
- Dedicated
Host stringCluster Name The name of the dedicated host cluster. The name must be
2
to128
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot containhttp://
orhttps://
.- Description string
The description of the dedicated host cluster. The description must be
2
to256
characters in length. It cannot start withhttp://
orhttps://
.- Dry
Run bool The dry run.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Zone
Id string The ID of the zone in which to create the dedicated host cluster.
- Dedicated
Host stringCluster Name The name of the dedicated host cluster. The name must be
2
to128
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot containhttp://
orhttps://
.- Description string
The description of the dedicated host cluster. The description must be
2
to256
characters in length. It cannot start withhttp://
orhttps://
.- Dry
Run bool The dry run.
- map[string]interface{}
A mapping of tags to assign to the resource.
- zone
Id String The ID of the zone in which to create the dedicated host cluster.
- dedicated
Host StringCluster Name The name of the dedicated host cluster. The name must be
2
to128
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot containhttp://
orhttps://
.- description String
The description of the dedicated host cluster. The description must be
2
to256
characters in length. It cannot start withhttp://
orhttps://
.- dry
Run Boolean The dry run.
- Map<String,Object>
A mapping of tags to assign to the resource.
- zone
Id string The ID of the zone in which to create the dedicated host cluster.
- dedicated
Host stringCluster Name The name of the dedicated host cluster. The name must be
2
to128
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot containhttp://
orhttps://
.- description string
The description of the dedicated host cluster. The description must be
2
to256
characters in length. It cannot start withhttp://
orhttps://
.- dry
Run boolean The dry run.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- zone_
id str The ID of the zone in which to create the dedicated host cluster.
- dedicated_
host_ strcluster_ name The name of the dedicated host cluster. The name must be
2
to128
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot containhttp://
orhttps://
.- description str
The description of the dedicated host cluster. The description must be
2
to256
characters in length. It cannot start withhttp://
orhttps://
.- dry_
run bool The dry run.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- zone
Id String The ID of the zone in which to create the dedicated host cluster.
- dedicated
Host StringCluster Name The name of the dedicated host cluster. The name must be
2
to128
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot containhttp://
orhttps://
.- description String
The description of the dedicated host cluster. The description must be
2
to256
characters in length. It cannot start withhttp://
orhttps://
.- dry
Run Boolean The dry run.
- Map<Any>
A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the EcsDedicatedHostCluster 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 EcsDedicatedHostCluster Resource
Get an existing EcsDedicatedHostCluster 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?: EcsDedicatedHostClusterState, opts?: CustomResourceOptions): EcsDedicatedHostCluster
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dedicated_host_cluster_name: Optional[str] = None,
description: Optional[str] = None,
dry_run: Optional[bool] = None,
tags: Optional[Mapping[str, Any]] = None,
zone_id: Optional[str] = None) -> EcsDedicatedHostCluster
func GetEcsDedicatedHostCluster(ctx *Context, name string, id IDInput, state *EcsDedicatedHostClusterState, opts ...ResourceOption) (*EcsDedicatedHostCluster, error)
public static EcsDedicatedHostCluster Get(string name, Input<string> id, EcsDedicatedHostClusterState? state, CustomResourceOptions? opts = null)
public static EcsDedicatedHostCluster get(String name, Output<String> id, EcsDedicatedHostClusterState 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.
- Dedicated
Host stringCluster Name The name of the dedicated host cluster. The name must be
2
to128
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot containhttp://
orhttps://
.- Description string
The description of the dedicated host cluster. The description must be
2
to256
characters in length. It cannot start withhttp://
orhttps://
.- Dry
Run bool The dry run.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Zone
Id string The ID of the zone in which to create the dedicated host cluster.
- Dedicated
Host stringCluster Name The name of the dedicated host cluster. The name must be
2
to128
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot containhttp://
orhttps://
.- Description string
The description of the dedicated host cluster. The description must be
2
to256
characters in length. It cannot start withhttp://
orhttps://
.- Dry
Run bool The dry run.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Zone
Id string The ID of the zone in which to create the dedicated host cluster.
- dedicated
Host StringCluster Name The name of the dedicated host cluster. The name must be
2
to128
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot containhttp://
orhttps://
.- description String
The description of the dedicated host cluster. The description must be
2
to256
characters in length. It cannot start withhttp://
orhttps://
.- dry
Run Boolean The dry run.
- Map<String,Object>
A mapping of tags to assign to the resource.
- zone
Id String The ID of the zone in which to create the dedicated host cluster.
- dedicated
Host stringCluster Name The name of the dedicated host cluster. The name must be
2
to128
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot containhttp://
orhttps://
.- description string
The description of the dedicated host cluster. The description must be
2
to256
characters in length. It cannot start withhttp://
orhttps://
.- dry
Run boolean The dry run.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- zone
Id string The ID of the zone in which to create the dedicated host cluster.
- dedicated_
host_ strcluster_ name The name of the dedicated host cluster. The name must be
2
to128
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot containhttp://
orhttps://
.- description str
The description of the dedicated host cluster. The description must be
2
to256
characters in length. It cannot start withhttp://
orhttps://
.- dry_
run bool The dry run.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- zone_
id str The ID of the zone in which to create the dedicated host cluster.
- dedicated
Host StringCluster Name The name of the dedicated host cluster. The name must be
2
to128
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot containhttp://
orhttps://
.- description String
The description of the dedicated host cluster. The description must be
2
to256
characters in length. It cannot start withhttp://
orhttps://
.- dry
Run Boolean The dry run.
- Map<Any>
A mapping of tags to assign to the resource.
- zone
Id String The ID of the zone in which to create the dedicated host cluster.
Import
ECS Dedicated Host Cluster can be imported using the id, e.g.
$ pulumi import alicloud:ecs/ecsDedicatedHostCluster:EcsDedicatedHostCluster example <id>
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.