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 since v1.146.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.getZones({});
const exampleEcsDedicatedHostCluster = new alicloud.ecs.EcsDedicatedHostCluster("example", {
dedicatedHostClusterName: "example_value",
description: "example_value",
zoneId: example.then(example => example.zones?.[0]?.id),
tags: {
Create: "TF",
For: "DDH_Cluster_Test",
},
});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.get_zones()
example_ecs_dedicated_host_cluster = alicloud.ecs.EcsDedicatedHostCluster("example",
dedicated_host_cluster_name="example_value",
description="example_value",
zone_id=example.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 {
example, err := alicloud.GetZones(ctx, nil, nil)
if err != nil {
return err
}
_, err = ecs.NewEcsDedicatedHostCluster(ctx, "example", &ecs.EcsDedicatedHostClusterArgs{
DedicatedHostClusterName: pulumi.String("example_value"),
Description: pulumi.String("example_value"),
ZoneId: pulumi.String(example.Zones[0].Id),
Tags: pulumi.StringMap{
"Create": pulumi.String("TF"),
"For": pulumi.String("DDH_Cluster_Test"),
},
})
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 example = AliCloud.GetZones.Invoke();
var exampleEcsDedicatedHostCluster = new AliCloud.Ecs.EcsDedicatedHostCluster("example", new()
{
DedicatedHostClusterName = "example_value",
Description = "example_value",
ZoneId = example.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
Tags =
{
{ "Create", "TF" },
{ "For", "DDH_Cluster_Test" },
},
});
});
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 example = AlicloudFunctions.getZones();
var exampleEcsDedicatedHostCluster = new EcsDedicatedHostCluster("exampleEcsDedicatedHostCluster", EcsDedicatedHostClusterArgs.builder()
.dedicatedHostClusterName("example_value")
.description("example_value")
.zoneId(example.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.tags(Map.ofEntries(
Map.entry("Create", "TF"),
Map.entry("For", "DDH_Cluster_Test")
))
.build());
}
}
resources:
exampleEcsDedicatedHostCluster:
type: alicloud:ecs:EcsDedicatedHostCluster
name: example
properties:
dedicatedHostClusterName: example_value
description: example_value
zoneId: ${example.zones[0].id}
tags:
Create: TF
For: DDH_Cluster_Test
variables:
example:
fn::invoke:
Function: alicloud:getZones
Arguments: {}
Create EcsDedicatedHostCluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EcsDedicatedHostCluster(name: string, args: EcsDedicatedHostClusterArgs, opts?: CustomResourceOptions);
@overload
def EcsDedicatedHostCluster(resource_name: str,
args: EcsDedicatedHostClusterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EcsDedicatedHostCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
zone_id: Optional[str] = None,
dedicated_host_cluster_name: Optional[str] = None,
description: Optional[str] = None,
dry_run: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var ecsDedicatedHostClusterResource = new AliCloud.Ecs.EcsDedicatedHostCluster("ecsDedicatedHostClusterResource", new()
{
ZoneId = "string",
DedicatedHostClusterName = "string",
Description = "string",
DryRun = false,
Tags =
{
{ "string", "string" },
},
});
example, err := ecs.NewEcsDedicatedHostCluster(ctx, "ecsDedicatedHostClusterResource", &ecs.EcsDedicatedHostClusterArgs{
ZoneId: pulumi.String("string"),
DedicatedHostClusterName: pulumi.String("string"),
Description: pulumi.String("string"),
DryRun: pulumi.Bool(false),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var ecsDedicatedHostClusterResource = new EcsDedicatedHostCluster("ecsDedicatedHostClusterResource", EcsDedicatedHostClusterArgs.builder()
.zoneId("string")
.dedicatedHostClusterName("string")
.description("string")
.dryRun(false)
.tags(Map.of("string", "string"))
.build());
ecs_dedicated_host_cluster_resource = alicloud.ecs.EcsDedicatedHostCluster("ecsDedicatedHostClusterResource",
zone_id="string",
dedicated_host_cluster_name="string",
description="string",
dry_run=False,
tags={
"string": "string",
})
const ecsDedicatedHostClusterResource = new alicloud.ecs.EcsDedicatedHostCluster("ecsDedicatedHostClusterResource", {
zoneId: "string",
dedicatedHostClusterName: "string",
description: "string",
dryRun: false,
tags: {
string: "string",
},
});
type: alicloud:ecs:EcsDedicatedHostCluster
properties:
dedicatedHostClusterName: string
description: string
dryRun: false
tags:
string: string
zoneId: string
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, string>
- 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]string
- 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,String>
- 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]: string}
- 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, str]
- 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>
- 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, str]] = 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, string>
- 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]string
- 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,String>
- 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]: string}
- 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, str]
- 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<String>
- 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>
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.