alicloud.ecs.DedicatedHost
Explore with Pulumi AI
Import
Ecs dedicated host can be imported using the id, e.g.
$ pulumi import alicloud:ecs/dedicatedHost:DedicatedHost default dh-2zedmxxxx
Create DedicatedHost Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DedicatedHost(name: string, args: DedicatedHostArgs, opts?: CustomResourceOptions);@overload
def DedicatedHost(resource_name: str,
                  args: DedicatedHostArgs,
                  opts: Optional[ResourceOptions] = None)
@overload
def DedicatedHost(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  dedicated_host_type: Optional[str] = None,
                  detail_fee: Optional[bool] = None,
                  zone_id: Optional[str] = None,
                  description: Optional[str] = None,
                  auto_renew_period: Optional[int] = None,
                  cpu_over_commit_ratio: Optional[float] = None,
                  dedicated_host_cluster_id: Optional[str] = None,
                  dedicated_host_name: Optional[str] = None,
                  auto_placement: Optional[str] = None,
                  auto_renew: Optional[bool] = None,
                  auto_release_time: Optional[str] = None,
                  expired_time: Optional[str] = None,
                  dry_run: Optional[bool] = None,
                  min_quantity: Optional[int] = None,
                  network_attributes: Optional[Sequence[DedicatedHostNetworkAttributeArgs]] = None,
                  payment_type: Optional[str] = None,
                  resource_group_id: Optional[str] = None,
                  sale_cycle: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  action_on_maintenance: Optional[str] = None)func NewDedicatedHost(ctx *Context, name string, args DedicatedHostArgs, opts ...ResourceOption) (*DedicatedHost, error)public DedicatedHost(string name, DedicatedHostArgs args, CustomResourceOptions? opts = null)
public DedicatedHost(String name, DedicatedHostArgs args)
public DedicatedHost(String name, DedicatedHostArgs args, CustomResourceOptions options)
type: alicloud:ecs:DedicatedHost
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 DedicatedHostArgs
- 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 DedicatedHostArgs
- 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 DedicatedHostArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DedicatedHostArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DedicatedHostArgs
- 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 alicloudDedicatedHostResource = new AliCloud.Ecs.DedicatedHost("alicloudDedicatedHostResource", new()
{
    DedicatedHostType = "string",
    DetailFee = false,
    ZoneId = "string",
    Description = "string",
    AutoRenewPeriod = 0,
    CpuOverCommitRatio = 0,
    DedicatedHostClusterId = "string",
    DedicatedHostName = "string",
    AutoPlacement = "string",
    AutoRenew = false,
    AutoReleaseTime = "string",
    ExpiredTime = "string",
    DryRun = false,
    MinQuantity = 0,
    NetworkAttributes = new[]
    {
        new AliCloud.Ecs.Inputs.DedicatedHostNetworkAttributeArgs
        {
            SlbUdpTimeout = 0,
            UdpTimeout = 0,
        },
    },
    PaymentType = "string",
    ResourceGroupId = "string",
    SaleCycle = "string",
    Tags = 
    {
        { "string", "string" },
    },
    ActionOnMaintenance = "string",
});
example, err := ecs.NewDedicatedHost(ctx, "alicloudDedicatedHostResource", &ecs.DedicatedHostArgs{
	DedicatedHostType:      pulumi.String("string"),
	DetailFee:              pulumi.Bool(false),
	ZoneId:                 pulumi.String("string"),
	Description:            pulumi.String("string"),
	AutoRenewPeriod:        pulumi.Int(0),
	CpuOverCommitRatio:     pulumi.Float64(0),
	DedicatedHostClusterId: pulumi.String("string"),
	DedicatedHostName:      pulumi.String("string"),
	AutoPlacement:          pulumi.String("string"),
	AutoRenew:              pulumi.Bool(false),
	AutoReleaseTime:        pulumi.String("string"),
	ExpiredTime:            pulumi.String("string"),
	DryRun:                 pulumi.Bool(false),
	MinQuantity:            pulumi.Int(0),
	NetworkAttributes: ecs.DedicatedHostNetworkAttributeArray{
		&ecs.DedicatedHostNetworkAttributeArgs{
			SlbUdpTimeout: pulumi.Int(0),
			UdpTimeout:    pulumi.Int(0),
		},
	},
	PaymentType:     pulumi.String("string"),
	ResourceGroupId: pulumi.String("string"),
	SaleCycle:       pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	ActionOnMaintenance: pulumi.String("string"),
})
var alicloudDedicatedHostResource = new DedicatedHost("alicloudDedicatedHostResource", DedicatedHostArgs.builder()
    .dedicatedHostType("string")
    .detailFee(false)
    .zoneId("string")
    .description("string")
    .autoRenewPeriod(0)
    .cpuOverCommitRatio(0)
    .dedicatedHostClusterId("string")
    .dedicatedHostName("string")
    .autoPlacement("string")
    .autoRenew(false)
    .autoReleaseTime("string")
    .expiredTime("string")
    .dryRun(false)
    .minQuantity(0)
    .networkAttributes(DedicatedHostNetworkAttributeArgs.builder()
        .slbUdpTimeout(0)
        .udpTimeout(0)
        .build())
    .paymentType("string")
    .resourceGroupId("string")
    .saleCycle("string")
    .tags(Map.of("string", "string"))
    .actionOnMaintenance("string")
    .build());
alicloud_dedicated_host_resource = alicloud.ecs.DedicatedHost("alicloudDedicatedHostResource",
    dedicated_host_type="string",
    detail_fee=False,
    zone_id="string",
    description="string",
    auto_renew_period=0,
    cpu_over_commit_ratio=0,
    dedicated_host_cluster_id="string",
    dedicated_host_name="string",
    auto_placement="string",
    auto_renew=False,
    auto_release_time="string",
    expired_time="string",
    dry_run=False,
    min_quantity=0,
    network_attributes=[{
        "slb_udp_timeout": 0,
        "udp_timeout": 0,
    }],
    payment_type="string",
    resource_group_id="string",
    sale_cycle="string",
    tags={
        "string": "string",
    },
    action_on_maintenance="string")
const alicloudDedicatedHostResource = new alicloud.ecs.DedicatedHost("alicloudDedicatedHostResource", {
    dedicatedHostType: "string",
    detailFee: false,
    zoneId: "string",
    description: "string",
    autoRenewPeriod: 0,
    cpuOverCommitRatio: 0,
    dedicatedHostClusterId: "string",
    dedicatedHostName: "string",
    autoPlacement: "string",
    autoRenew: false,
    autoReleaseTime: "string",
    expiredTime: "string",
    dryRun: false,
    minQuantity: 0,
    networkAttributes: [{
        slbUdpTimeout: 0,
        udpTimeout: 0,
    }],
    paymentType: "string",
    resourceGroupId: "string",
    saleCycle: "string",
    tags: {
        string: "string",
    },
    actionOnMaintenance: "string",
});
type: alicloud:ecs:DedicatedHost
properties:
    actionOnMaintenance: string
    autoPlacement: string
    autoReleaseTime: string
    autoRenew: false
    autoRenewPeriod: 0
    cpuOverCommitRatio: 0
    dedicatedHostClusterId: string
    dedicatedHostName: string
    dedicatedHostType: string
    description: string
    detailFee: false
    dryRun: false
    expiredTime: string
    minQuantity: 0
    networkAttributes:
        - slbUdpTimeout: 0
          udpTimeout: 0
    paymentType: string
    resourceGroupId: string
    saleCycle: string
    tags:
        string: string
    zoneId: string
DedicatedHost 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 DedicatedHost resource accepts the following input properties:
- DedicatedHost stringType 
- The type of the dedicated host. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.
- ActionOn stringMaintenance 
- The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: Migrate,Stop.
- AutoPlacement string
- Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: on,off. Default:on.
- AutoRelease stringTime 
- The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
- AutoRenew bool
- Specifies whether to automatically renew the subscription dedicated host.
- AutoRenew intPeriod 
- The auto-renewal period of the dedicated host. Unit: months. Valid values: 1,2,3,6, and12. takes effect and is required only when the AutoRenew parameter is set to true.
- CpuOver doubleCommit Ratio 
- CPU oversold ratio. Only custom specifications g6s, c6s, r6s support setting the CPU oversold ratio.
- DedicatedHost stringCluster Id 
- The dedicated host cluster ID to which the dedicated host belongs.
- DedicatedHost stringName 
- The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- Description string
- The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- DetailFee bool
- Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: false.
- DryRun bool
- Specifies whether to only validate the request. Default: false.
- ExpiredTime string
- The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
- MinQuantity int
- Specify the minimum purchase quantity of a dedicated host.
- NetworkAttributes List<Pulumi.Ali Cloud. Ecs. Inputs. Dedicated Host Network Attribute> 
- dedicated host network parameters. contains the following attributes:
- PaymentType string
- The billing method of the dedicated host. Valid values: PrePaid,PostPaid. Default:PostPaid.
- ResourceGroup stringId 
- The ID of the resource group to which the dedicated host belongs.
- SaleCycle string
- The unit of the subscription period of the dedicated host.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- ZoneId string
- The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
- DedicatedHost stringType 
- The type of the dedicated host. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.
- ActionOn stringMaintenance 
- The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: Migrate,Stop.
- AutoPlacement string
- Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: on,off. Default:on.
- AutoRelease stringTime 
- The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
- AutoRenew bool
- Specifies whether to automatically renew the subscription dedicated host.
- AutoRenew intPeriod 
- The auto-renewal period of the dedicated host. Unit: months. Valid values: 1,2,3,6, and12. takes effect and is required only when the AutoRenew parameter is set to true.
- CpuOver float64Commit Ratio 
- CPU oversold ratio. Only custom specifications g6s, c6s, r6s support setting the CPU oversold ratio.
- DedicatedHost stringCluster Id 
- The dedicated host cluster ID to which the dedicated host belongs.
- DedicatedHost stringName 
- The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- Description string
- The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- DetailFee bool
- Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: false.
- DryRun bool
- Specifies whether to only validate the request. Default: false.
- ExpiredTime string
- The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
- MinQuantity int
- Specify the minimum purchase quantity of a dedicated host.
- NetworkAttributes []DedicatedHost Network Attribute Args 
- dedicated host network parameters. contains the following attributes:
- PaymentType string
- The billing method of the dedicated host. Valid values: PrePaid,PostPaid. Default:PostPaid.
- ResourceGroup stringId 
- The ID of the resource group to which the dedicated host belongs.
- SaleCycle string
- The unit of the subscription period of the dedicated host.
- map[string]string
- A mapping of tags to assign to the resource.
- ZoneId string
- The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
- dedicatedHost StringType 
- The type of the dedicated host. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.
- actionOn StringMaintenance 
- The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: Migrate,Stop.
- autoPlacement String
- Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: on,off. Default:on.
- autoRelease StringTime 
- The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
- autoRenew Boolean
- Specifies whether to automatically renew the subscription dedicated host.
- autoRenew IntegerPeriod 
- The auto-renewal period of the dedicated host. Unit: months. Valid values: 1,2,3,6, and12. takes effect and is required only when the AutoRenew parameter is set to true.
- cpuOver DoubleCommit Ratio 
- CPU oversold ratio. Only custom specifications g6s, c6s, r6s support setting the CPU oversold ratio.
- dedicatedHost StringCluster Id 
- The dedicated host cluster ID to which the dedicated host belongs.
- dedicatedHost StringName 
- The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- description String
- The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- detailFee Boolean
- Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: false.
- dryRun Boolean
- Specifies whether to only validate the request. Default: false.
- expiredTime String
- The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
- minQuantity Integer
- Specify the minimum purchase quantity of a dedicated host.
- networkAttributes List<DedicatedHost Network Attribute> 
- dedicated host network parameters. contains the following attributes:
- paymentType String
- The billing method of the dedicated host. Valid values: PrePaid,PostPaid. Default:PostPaid.
- resourceGroup StringId 
- The ID of the resource group to which the dedicated host belongs.
- saleCycle String
- The unit of the subscription period of the dedicated host.
- Map<String,String>
- A mapping of tags to assign to the resource.
- zoneId String
- The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
- dedicatedHost stringType 
- The type of the dedicated host. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.
- actionOn stringMaintenance 
- The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: Migrate,Stop.
- autoPlacement string
- Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: on,off. Default:on.
- autoRelease stringTime 
- The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
- autoRenew boolean
- Specifies whether to automatically renew the subscription dedicated host.
- autoRenew numberPeriod 
- The auto-renewal period of the dedicated host. Unit: months. Valid values: 1,2,3,6, and12. takes effect and is required only when the AutoRenew parameter is set to true.
- cpuOver numberCommit Ratio 
- CPU oversold ratio. Only custom specifications g6s, c6s, r6s support setting the CPU oversold ratio.
- dedicatedHost stringCluster Id 
- The dedicated host cluster ID to which the dedicated host belongs.
- dedicatedHost stringName 
- The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- description string
- The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- detailFee boolean
- Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: false.
- dryRun boolean
- Specifies whether to only validate the request. Default: false.
- expiredTime string
- The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
- minQuantity number
- Specify the minimum purchase quantity of a dedicated host.
- networkAttributes DedicatedHost Network Attribute[] 
- dedicated host network parameters. contains the following attributes:
- paymentType string
- The billing method of the dedicated host. Valid values: PrePaid,PostPaid. Default:PostPaid.
- resourceGroup stringId 
- The ID of the resource group to which the dedicated host belongs.
- saleCycle string
- The unit of the subscription period of the dedicated host.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- zoneId string
- The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
- dedicated_host_ strtype 
- The type of the dedicated host. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.
- action_on_ strmaintenance 
- The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: Migrate,Stop.
- auto_placement str
- Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: on,off. Default:on.
- auto_release_ strtime 
- The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
- auto_renew bool
- Specifies whether to automatically renew the subscription dedicated host.
- auto_renew_ intperiod 
- The auto-renewal period of the dedicated host. Unit: months. Valid values: 1,2,3,6, and12. takes effect and is required only when the AutoRenew parameter is set to true.
- cpu_over_ floatcommit_ ratio 
- CPU oversold ratio. Only custom specifications g6s, c6s, r6s support setting the CPU oversold ratio.
- dedicated_host_ strcluster_ id 
- The dedicated host cluster ID to which the dedicated host belongs.
- dedicated_host_ strname 
- The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- description str
- The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- detail_fee bool
- Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: false.
- dry_run bool
- Specifies whether to only validate the request. Default: false.
- expired_time str
- The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
- min_quantity int
- Specify the minimum purchase quantity of a dedicated host.
- network_attributes Sequence[DedicatedHost Network Attribute Args] 
- dedicated host network parameters. contains the following attributes:
- payment_type str
- The billing method of the dedicated host. Valid values: PrePaid,PostPaid. Default:PostPaid.
- resource_group_ strid 
- The ID of the resource group to which the dedicated host belongs.
- sale_cycle str
- The unit of the subscription period of the dedicated host.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- zone_id str
- The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
- dedicatedHost StringType 
- The type of the dedicated host. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.
- actionOn StringMaintenance 
- The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: Migrate,Stop.
- autoPlacement String
- Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: on,off. Default:on.
- autoRelease StringTime 
- The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
- autoRenew Boolean
- Specifies whether to automatically renew the subscription dedicated host.
- autoRenew NumberPeriod 
- The auto-renewal period of the dedicated host. Unit: months. Valid values: 1,2,3,6, and12. takes effect and is required only when the AutoRenew parameter is set to true.
- cpuOver NumberCommit Ratio 
- CPU oversold ratio. Only custom specifications g6s, c6s, r6s support setting the CPU oversold ratio.
- dedicatedHost StringCluster Id 
- The dedicated host cluster ID to which the dedicated host belongs.
- dedicatedHost StringName 
- The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- description String
- The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- detailFee Boolean
- Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: false.
- dryRun Boolean
- Specifies whether to only validate the request. Default: false.
- expiredTime String
- The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
- minQuantity Number
- Specify the minimum purchase quantity of a dedicated host.
- networkAttributes List<Property Map>
- dedicated host network parameters. contains the following attributes:
- paymentType String
- The billing method of the dedicated host. Valid values: PrePaid,PostPaid. Default:PostPaid.
- resourceGroup StringId 
- The ID of the resource group to which the dedicated host belongs.
- saleCycle String
- The unit of the subscription period of the dedicated host.
- Map<String>
- A mapping of tags to assign to the resource.
- zoneId String
- The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
Outputs
All input properties are implicitly available as output properties. Additionally, the DedicatedHost resource produces the following output properties:
Look up Existing DedicatedHost Resource
Get an existing DedicatedHost 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?: DedicatedHostState, opts?: CustomResourceOptions): DedicatedHost@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        action_on_maintenance: Optional[str] = None,
        auto_placement: Optional[str] = None,
        auto_release_time: Optional[str] = None,
        auto_renew: Optional[bool] = None,
        auto_renew_period: Optional[int] = None,
        cpu_over_commit_ratio: Optional[float] = None,
        dedicated_host_cluster_id: Optional[str] = None,
        dedicated_host_name: Optional[str] = None,
        dedicated_host_type: Optional[str] = None,
        description: Optional[str] = None,
        detail_fee: Optional[bool] = None,
        dry_run: Optional[bool] = None,
        expired_time: Optional[str] = None,
        min_quantity: Optional[int] = None,
        network_attributes: Optional[Sequence[DedicatedHostNetworkAttributeArgs]] = None,
        payment_type: Optional[str] = None,
        resource_group_id: Optional[str] = None,
        sale_cycle: Optional[str] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        zone_id: Optional[str] = None) -> DedicatedHostfunc GetDedicatedHost(ctx *Context, name string, id IDInput, state *DedicatedHostState, opts ...ResourceOption) (*DedicatedHost, error)public static DedicatedHost Get(string name, Input<string> id, DedicatedHostState? state, CustomResourceOptions? opts = null)public static DedicatedHost get(String name, Output<String> id, DedicatedHostState state, CustomResourceOptions options)resources:  _:    type: alicloud:ecs:DedicatedHost    get:      id: ${id}- 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.
- ActionOn stringMaintenance 
- The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: Migrate,Stop.
- AutoPlacement string
- Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: on,off. Default:on.
- AutoRelease stringTime 
- The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
- AutoRenew bool
- Specifies whether to automatically renew the subscription dedicated host.
- AutoRenew intPeriod 
- The auto-renewal period of the dedicated host. Unit: months. Valid values: 1,2,3,6, and12. takes effect and is required only when the AutoRenew parameter is set to true.
- CpuOver doubleCommit Ratio 
- CPU oversold ratio. Only custom specifications g6s, c6s, r6s support setting the CPU oversold ratio.
- DedicatedHost stringCluster Id 
- The dedicated host cluster ID to which the dedicated host belongs.
- DedicatedHost stringName 
- The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- DedicatedHost stringType 
- The type of the dedicated host. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.
- Description string
- The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- DetailFee bool
- Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: false.
- DryRun bool
- Specifies whether to only validate the request. Default: false.
- ExpiredTime string
- The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
- MinQuantity int
- Specify the minimum purchase quantity of a dedicated host.
- NetworkAttributes List<Pulumi.Ali Cloud. Ecs. Inputs. Dedicated Host Network Attribute> 
- dedicated host network parameters. contains the following attributes:
- PaymentType string
- The billing method of the dedicated host. Valid values: PrePaid,PostPaid. Default:PostPaid.
- ResourceGroup stringId 
- The ID of the resource group to which the dedicated host belongs.
- SaleCycle string
- The unit of the subscription period of the dedicated host.
- Status string
- The status of the dedicated host.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- ZoneId string
- The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
- ActionOn stringMaintenance 
- The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: Migrate,Stop.
- AutoPlacement string
- Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: on,off. Default:on.
- AutoRelease stringTime 
- The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
- AutoRenew bool
- Specifies whether to automatically renew the subscription dedicated host.
- AutoRenew intPeriod 
- The auto-renewal period of the dedicated host. Unit: months. Valid values: 1,2,3,6, and12. takes effect and is required only when the AutoRenew parameter is set to true.
- CpuOver float64Commit Ratio 
- CPU oversold ratio. Only custom specifications g6s, c6s, r6s support setting the CPU oversold ratio.
- DedicatedHost stringCluster Id 
- The dedicated host cluster ID to which the dedicated host belongs.
- DedicatedHost stringName 
- The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- DedicatedHost stringType 
- The type of the dedicated host. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.
- Description string
- The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- DetailFee bool
- Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: false.
- DryRun bool
- Specifies whether to only validate the request. Default: false.
- ExpiredTime string
- The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
- MinQuantity int
- Specify the minimum purchase quantity of a dedicated host.
- NetworkAttributes []DedicatedHost Network Attribute Args 
- dedicated host network parameters. contains the following attributes:
- PaymentType string
- The billing method of the dedicated host. Valid values: PrePaid,PostPaid. Default:PostPaid.
- ResourceGroup stringId 
- The ID of the resource group to which the dedicated host belongs.
- SaleCycle string
- The unit of the subscription period of the dedicated host.
- Status string
- The status of the dedicated host.
- map[string]string
- A mapping of tags to assign to the resource.
- ZoneId string
- The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
- actionOn StringMaintenance 
- The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: Migrate,Stop.
- autoPlacement String
- Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: on,off. Default:on.
- autoRelease StringTime 
- The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
- autoRenew Boolean
- Specifies whether to automatically renew the subscription dedicated host.
- autoRenew IntegerPeriod 
- The auto-renewal period of the dedicated host. Unit: months. Valid values: 1,2,3,6, and12. takes effect and is required only when the AutoRenew parameter is set to true.
- cpuOver DoubleCommit Ratio 
- CPU oversold ratio. Only custom specifications g6s, c6s, r6s support setting the CPU oversold ratio.
- dedicatedHost StringCluster Id 
- The dedicated host cluster ID to which the dedicated host belongs.
- dedicatedHost StringName 
- The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- dedicatedHost StringType 
- The type of the dedicated host. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.
- description String
- The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- detailFee Boolean
- Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: false.
- dryRun Boolean
- Specifies whether to only validate the request. Default: false.
- expiredTime String
- The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
- minQuantity Integer
- Specify the minimum purchase quantity of a dedicated host.
- networkAttributes List<DedicatedHost Network Attribute> 
- dedicated host network parameters. contains the following attributes:
- paymentType String
- The billing method of the dedicated host. Valid values: PrePaid,PostPaid. Default:PostPaid.
- resourceGroup StringId 
- The ID of the resource group to which the dedicated host belongs.
- saleCycle String
- The unit of the subscription period of the dedicated host.
- status String
- The status of the dedicated host.
- Map<String,String>
- A mapping of tags to assign to the resource.
- zoneId String
- The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
- actionOn stringMaintenance 
- The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: Migrate,Stop.
- autoPlacement string
- Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: on,off. Default:on.
- autoRelease stringTime 
- The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
- autoRenew boolean
- Specifies whether to automatically renew the subscription dedicated host.
- autoRenew numberPeriod 
- The auto-renewal period of the dedicated host. Unit: months. Valid values: 1,2,3,6, and12. takes effect and is required only when the AutoRenew parameter is set to true.
- cpuOver numberCommit Ratio 
- CPU oversold ratio. Only custom specifications g6s, c6s, r6s support setting the CPU oversold ratio.
- dedicatedHost stringCluster Id 
- The dedicated host cluster ID to which the dedicated host belongs.
- dedicatedHost stringName 
- The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- dedicatedHost stringType 
- The type of the dedicated host. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.
- description string
- The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- detailFee boolean
- Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: false.
- dryRun boolean
- Specifies whether to only validate the request. Default: false.
- expiredTime string
- The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
- minQuantity number
- Specify the minimum purchase quantity of a dedicated host.
- networkAttributes DedicatedHost Network Attribute[] 
- dedicated host network parameters. contains the following attributes:
- paymentType string
- The billing method of the dedicated host. Valid values: PrePaid,PostPaid. Default:PostPaid.
- resourceGroup stringId 
- The ID of the resource group to which the dedicated host belongs.
- saleCycle string
- The unit of the subscription period of the dedicated host.
- status string
- The status of the dedicated host.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- zoneId string
- The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
- action_on_ strmaintenance 
- The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: Migrate,Stop.
- auto_placement str
- Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: on,off. Default:on.
- auto_release_ strtime 
- The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
- auto_renew bool
- Specifies whether to automatically renew the subscription dedicated host.
- auto_renew_ intperiod 
- The auto-renewal period of the dedicated host. Unit: months. Valid values: 1,2,3,6, and12. takes effect and is required only when the AutoRenew parameter is set to true.
- cpu_over_ floatcommit_ ratio 
- CPU oversold ratio. Only custom specifications g6s, c6s, r6s support setting the CPU oversold ratio.
- dedicated_host_ strcluster_ id 
- The dedicated host cluster ID to which the dedicated host belongs.
- dedicated_host_ strname 
- The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- dedicated_host_ strtype 
- The type of the dedicated host. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.
- description str
- The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- detail_fee bool
- Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: false.
- dry_run bool
- Specifies whether to only validate the request. Default: false.
- expired_time str
- The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
- min_quantity int
- Specify the minimum purchase quantity of a dedicated host.
- network_attributes Sequence[DedicatedHost Network Attribute Args] 
- dedicated host network parameters. contains the following attributes:
- payment_type str
- The billing method of the dedicated host. Valid values: PrePaid,PostPaid. Default:PostPaid.
- resource_group_ strid 
- The ID of the resource group to which the dedicated host belongs.
- sale_cycle str
- The unit of the subscription period of the dedicated host.
- status str
- The status of the dedicated host.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- zone_id str
- The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
- actionOn StringMaintenance 
- The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: Migrate,Stop.
- autoPlacement String
- Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: on,off. Default:on.
- autoRelease StringTime 
- The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
- autoRenew Boolean
- Specifies whether to automatically renew the subscription dedicated host.
- autoRenew NumberPeriod 
- The auto-renewal period of the dedicated host. Unit: months. Valid values: 1,2,3,6, and12. takes effect and is required only when the AutoRenew parameter is set to true.
- cpuOver NumberCommit Ratio 
- CPU oversold ratio. Only custom specifications g6s, c6s, r6s support setting the CPU oversold ratio.
- dedicatedHost StringCluster Id 
- The dedicated host cluster ID to which the dedicated host belongs.
- dedicatedHost StringName 
- The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- dedicatedHost StringType 
- The type of the dedicated host. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.
- description String
- The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- detailFee Boolean
- Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: false.
- dryRun Boolean
- Specifies whether to only validate the request. Default: false.
- expiredTime String
- The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
- minQuantity Number
- Specify the minimum purchase quantity of a dedicated host.
- networkAttributes List<Property Map>
- dedicated host network parameters. contains the following attributes:
- paymentType String
- The billing method of the dedicated host. Valid values: PrePaid,PostPaid. Default:PostPaid.
- resourceGroup StringId 
- The ID of the resource group to which the dedicated host belongs.
- saleCycle String
- The unit of the subscription period of the dedicated host.
- status String
- The status of the dedicated host.
- Map<String>
- A mapping of tags to assign to the resource.
- zoneId String
- The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
Supporting Types
DedicatedHostNetworkAttribute, DedicatedHostNetworkAttributeArgs        
- SlbUdp intTimeout 
- The timeout period for a UDP session between Server Load Balancer (SLB) and the dedicated host. Unit: seconds. Valid values: 15 to 310.
- UdpTimeout int
- The timeout period for a UDP session between a user and an Alibaba Cloud service on the dedicated host. Unit: seconds. Valid values: 15 to 310.
- SlbUdp intTimeout 
- The timeout period for a UDP session between Server Load Balancer (SLB) and the dedicated host. Unit: seconds. Valid values: 15 to 310.
- UdpTimeout int
- The timeout period for a UDP session between a user and an Alibaba Cloud service on the dedicated host. Unit: seconds. Valid values: 15 to 310.
- slbUdp IntegerTimeout 
- The timeout period for a UDP session between Server Load Balancer (SLB) and the dedicated host. Unit: seconds. Valid values: 15 to 310.
- udpTimeout Integer
- The timeout period for a UDP session between a user and an Alibaba Cloud service on the dedicated host. Unit: seconds. Valid values: 15 to 310.
- slbUdp numberTimeout 
- The timeout period for a UDP session between Server Load Balancer (SLB) and the dedicated host. Unit: seconds. Valid values: 15 to 310.
- udpTimeout number
- The timeout period for a UDP session between a user and an Alibaba Cloud service on the dedicated host. Unit: seconds. Valid values: 15 to 310.
- slb_udp_ inttimeout 
- The timeout period for a UDP session between Server Load Balancer (SLB) and the dedicated host. Unit: seconds. Valid values: 15 to 310.
- udp_timeout int
- The timeout period for a UDP session between a user and an Alibaba Cloud service on the dedicated host. Unit: seconds. Valid values: 15 to 310.
- slbUdp NumberTimeout 
- The timeout period for a UDP session between Server Load Balancer (SLB) and the dedicated host. Unit: seconds. Valid values: 15 to 310.
- udpTimeout Number
- The timeout period for a UDP session between a user and an Alibaba Cloud service on the dedicated host. Unit: seconds. Valid values: 15 to 310.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.