DedicatedHostGroup

Provides a ApsaraDB for MyBase Dedicated Host Group resource.

For information about ApsaraDB for MyBase Dedicated Host Group and how to use it, see What is Dedicated Host Group.

NOTE: Available in v1.132.0+.

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var vpc = new AliCloud.Vpc.Network("vpc", new AliCloud.Vpc.NetworkArgs
        {
            VpcName = "tf_test_foo",
            CidrBlock = "172.16.0.0/12",
        });
        var @default = new AliCloud.Cddc.DedicatedHostGroup("default", new AliCloud.Cddc.DedicatedHostGroupArgs
        {
            Engine = "MongoDB",
            VpcId = vpc.Id,
            CpuAllocationRatio = 101,
            MemAllocationRatio = 50,
            DiskAllocationRatio = 200,
            AllocationPolicy = "Evenly",
            HostReplacePolicy = "Manual",
            DedicatedHostGroupDesc = "tf-testaccDesc",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cddc"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		vpc, err := vpc.NewNetwork(ctx, "vpc", &vpc.NetworkArgs{
			VpcName:   pulumi.String("tf_test_foo"),
			CidrBlock: pulumi.String("172.16.0.0/12"),
		})
		if err != nil {
			return err
		}
		_, err = cddc.NewDedicatedHostGroup(ctx, "default", &cddc.DedicatedHostGroupArgs{
			Engine:                 pulumi.String("MongoDB"),
			VpcId:                  vpc.ID(),
			CpuAllocationRatio:     pulumi.Int(101),
			MemAllocationRatio:     pulumi.Int(50),
			DiskAllocationRatio:    pulumi.Int(200),
			AllocationPolicy:       pulumi.String("Evenly"),
			HostReplacePolicy:      pulumi.String("Manual"),
			DedicatedHostGroupDesc: pulumi.String("tf-testaccDesc"),
		})
		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.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.cddc.DedicatedHostGroup;
import com.pulumi.alicloud.cddc.DedicatedHostGroupArgs;
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) {
        var vpc = new Network("vpc", NetworkArgs.builder()        
            .vpcName("tf_test_foo")
            .cidrBlock("172.16.0.0/12")
            .build());

        var default_ = new DedicatedHostGroup("default", DedicatedHostGroupArgs.builder()        
            .engine("MongoDB")
            .vpcId(vpc.id())
            .cpuAllocationRatio(101)
            .memAllocationRatio(50)
            .diskAllocationRatio(200)
            .allocationPolicy("Evenly")
            .hostReplacePolicy("Manual")
            .dedicatedHostGroupDesc("tf-testaccDesc")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

vpc = alicloud.vpc.Network("vpc",
    vpc_name="tf_test_foo",
    cidr_block="172.16.0.0/12")
default = alicloud.cddc.DedicatedHostGroup("default",
    engine="MongoDB",
    vpc_id=vpc.id,
    cpu_allocation_ratio=101,
    mem_allocation_ratio=50,
    disk_allocation_ratio=200,
    allocation_policy="Evenly",
    host_replace_policy="Manual",
    dedicated_host_group_desc="tf-testaccDesc")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const vpc = new alicloud.vpc.Network("vpc", {
    vpcName: "tf_test_foo",
    cidrBlock: "172.16.0.0/12",
});
const _default = new alicloud.cddc.DedicatedHostGroup("default", {
    engine: "MongoDB",
    vpcId: vpc.id,
    cpuAllocationRatio: 101,
    memAllocationRatio: 50,
    diskAllocationRatio: 200,
    allocationPolicy: "Evenly",
    hostReplacePolicy: "Manual",
    dedicatedHostGroupDesc: "tf-testaccDesc",
});
resources:
  vpc:
    type: alicloud:vpc:Network
    properties:
      vpcName: tf_test_foo
      cidrBlock: 172.16.0.0/12
  default:
    type: alicloud:cddc:DedicatedHostGroup
    properties:
      engine: MongoDB
      vpcId: ${vpc.id}
      cpuAllocationRatio: 101
      memAllocationRatio: 50
      diskAllocationRatio: 200
      allocationPolicy: Evenly
      hostReplacePolicy: Manual
      dedicatedHostGroupDesc: tf-testaccDesc

Create DedicatedHostGroup Resource

new DedicatedHostGroup(name: string, args: DedicatedHostGroupArgs, opts?: CustomResourceOptions);
@overload
def DedicatedHostGroup(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       allocation_policy: Optional[str] = None,
                       cpu_allocation_ratio: Optional[int] = None,
                       dedicated_host_group_desc: Optional[str] = None,
                       disk_allocation_ratio: Optional[int] = None,
                       engine: Optional[str] = None,
                       host_replace_policy: Optional[str] = None,
                       mem_allocation_ratio: Optional[int] = None,
                       open_permission: Optional[bool] = None,
                       vpc_id: Optional[str] = None)
@overload
def DedicatedHostGroup(resource_name: str,
                       args: DedicatedHostGroupArgs,
                       opts: Optional[ResourceOptions] = None)
func NewDedicatedHostGroup(ctx *Context, name string, args DedicatedHostGroupArgs, opts ...ResourceOption) (*DedicatedHostGroup, error)
public DedicatedHostGroup(string name, DedicatedHostGroupArgs args, CustomResourceOptions? opts = null)
public DedicatedHostGroup(String name, DedicatedHostGroupArgs args)
public DedicatedHostGroup(String name, DedicatedHostGroupArgs args, CustomResourceOptions options)
type: alicloud:cddc:DedicatedHostGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DedicatedHostGroupArgs
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 DedicatedHostGroupArgs
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 DedicatedHostGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DedicatedHostGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DedicatedHostGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Engine string

Database Engine Type.The database engine of the dedicated cluster. Valid values:Redis, SQLServer, MySQL, PostgreSQL, MongoDB

VpcId string

The virtual private cloud (VPC) ID of the dedicated cluster.

AllocationPolicy string

AThe policy that is used to allocate resources in the dedicated cluster. Valid values:Evenly,Intensively

CpuAllocationRatio int

The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.

DedicatedHostGroupDesc string

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

DiskAllocationRatio int

The Disk Allocation Ratio of the Dedicated Host Group. NOTE: When engine = SQLServer, this attribute does not support to set.

HostReplacePolicy string

The policy based on which the system handles host failures. Valid values:Auto,Manual

MemAllocationRatio int

The Memory Allocation Ratio of the Dedicated Host Group.

OpenPermission bool

Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: true and false. NOTE: The open_permission should be true when engine = "SQLServer"

Engine string

Database Engine Type.The database engine of the dedicated cluster. Valid values:Redis, SQLServer, MySQL, PostgreSQL, MongoDB

VpcId string

The virtual private cloud (VPC) ID of the dedicated cluster.

AllocationPolicy string

AThe policy that is used to allocate resources in the dedicated cluster. Valid values:Evenly,Intensively

CpuAllocationRatio int

The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.

DedicatedHostGroupDesc string

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

DiskAllocationRatio int

The Disk Allocation Ratio of the Dedicated Host Group. NOTE: When engine = SQLServer, this attribute does not support to set.

HostReplacePolicy string

The policy based on which the system handles host failures. Valid values:Auto,Manual

MemAllocationRatio int

The Memory Allocation Ratio of the Dedicated Host Group.

OpenPermission bool

Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: true and false. NOTE: The open_permission should be true when engine = "SQLServer"

engine String

Database Engine Type.The database engine of the dedicated cluster. Valid values:Redis, SQLServer, MySQL, PostgreSQL, MongoDB

vpcId String

The virtual private cloud (VPC) ID of the dedicated cluster.

allocationPolicy String

AThe policy that is used to allocate resources in the dedicated cluster. Valid values:Evenly,Intensively

cpuAllocationRatio Integer

The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.

dedicatedHostGroupDesc String

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

diskAllocationRatio Integer

The Disk Allocation Ratio of the Dedicated Host Group. NOTE: When engine = SQLServer, this attribute does not support to set.

hostReplacePolicy String

The policy based on which the system handles host failures. Valid values:Auto,Manual

memAllocationRatio Integer

The Memory Allocation Ratio of the Dedicated Host Group.

openPermission Boolean

Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: true and false. NOTE: The open_permission should be true when engine = "SQLServer"

engine string

Database Engine Type.The database engine of the dedicated cluster. Valid values:Redis, SQLServer, MySQL, PostgreSQL, MongoDB

vpcId string

The virtual private cloud (VPC) ID of the dedicated cluster.

allocationPolicy string

AThe policy that is used to allocate resources in the dedicated cluster. Valid values:Evenly,Intensively

cpuAllocationRatio number

The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.

dedicatedHostGroupDesc string

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

diskAllocationRatio number

The Disk Allocation Ratio of the Dedicated Host Group. NOTE: When engine = SQLServer, this attribute does not support to set.

hostReplacePolicy string

The policy based on which the system handles host failures. Valid values:Auto,Manual

memAllocationRatio number

The Memory Allocation Ratio of the Dedicated Host Group.

openPermission boolean

Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: true and false. NOTE: The open_permission should be true when engine = "SQLServer"

engine str

Database Engine Type.The database engine of the dedicated cluster. Valid values:Redis, SQLServer, MySQL, PostgreSQL, MongoDB

vpc_id str

The virtual private cloud (VPC) ID of the dedicated cluster.

allocation_policy str

AThe policy that is used to allocate resources in the dedicated cluster. Valid values:Evenly,Intensively

cpu_allocation_ratio int

The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.

dedicated_host_group_desc str

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

disk_allocation_ratio int

The Disk Allocation Ratio of the Dedicated Host Group. NOTE: When engine = SQLServer, this attribute does not support to set.

host_replace_policy str

The policy based on which the system handles host failures. Valid values:Auto,Manual

mem_allocation_ratio int

The Memory Allocation Ratio of the Dedicated Host Group.

open_permission bool

Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: true and false. NOTE: The open_permission should be true when engine = "SQLServer"

engine String

Database Engine Type.The database engine of the dedicated cluster. Valid values:Redis, SQLServer, MySQL, PostgreSQL, MongoDB

vpcId String

The virtual private cloud (VPC) ID of the dedicated cluster.

allocationPolicy String

AThe policy that is used to allocate resources in the dedicated cluster. Valid values:Evenly,Intensively

cpuAllocationRatio Number

The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.

dedicatedHostGroupDesc String

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

diskAllocationRatio Number

The Disk Allocation Ratio of the Dedicated Host Group. NOTE: When engine = SQLServer, this attribute does not support to set.

hostReplacePolicy String

The policy based on which the system handles host failures. Valid values:Auto,Manual

memAllocationRatio Number

The Memory Allocation Ratio of the Dedicated Host Group.

openPermission Boolean

Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: true and false. NOTE: The open_permission should be true when engine = "SQLServer"

Outputs

All input properties are implicitly available as output properties. Additionally, the DedicatedHostGroup 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 DedicatedHostGroup Resource

Get an existing DedicatedHostGroup 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?: DedicatedHostGroupState, opts?: CustomResourceOptions): DedicatedHostGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allocation_policy: Optional[str] = None,
        cpu_allocation_ratio: Optional[int] = None,
        dedicated_host_group_desc: Optional[str] = None,
        disk_allocation_ratio: Optional[int] = None,
        engine: Optional[str] = None,
        host_replace_policy: Optional[str] = None,
        mem_allocation_ratio: Optional[int] = None,
        open_permission: Optional[bool] = None,
        vpc_id: Optional[str] = None) -> DedicatedHostGroup
func GetDedicatedHostGroup(ctx *Context, name string, id IDInput, state *DedicatedHostGroupState, opts ...ResourceOption) (*DedicatedHostGroup, error)
public static DedicatedHostGroup Get(string name, Input<string> id, DedicatedHostGroupState? state, CustomResourceOptions? opts = null)
public static DedicatedHostGroup get(String name, Output<String> id, DedicatedHostGroupState 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.
The following state arguments are supported:
AllocationPolicy string

AThe policy that is used to allocate resources in the dedicated cluster. Valid values:Evenly,Intensively

CpuAllocationRatio int

The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.

DedicatedHostGroupDesc string

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

DiskAllocationRatio int

The Disk Allocation Ratio of the Dedicated Host Group. NOTE: When engine = SQLServer, this attribute does not support to set.

Engine string

Database Engine Type.The database engine of the dedicated cluster. Valid values:Redis, SQLServer, MySQL, PostgreSQL, MongoDB

HostReplacePolicy string

The policy based on which the system handles host failures. Valid values:Auto,Manual

MemAllocationRatio int

The Memory Allocation Ratio of the Dedicated Host Group.

OpenPermission bool

Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: true and false. NOTE: The open_permission should be true when engine = "SQLServer"

VpcId string

The virtual private cloud (VPC) ID of the dedicated cluster.

AllocationPolicy string

AThe policy that is used to allocate resources in the dedicated cluster. Valid values:Evenly,Intensively

CpuAllocationRatio int

The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.

DedicatedHostGroupDesc string

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

DiskAllocationRatio int

The Disk Allocation Ratio of the Dedicated Host Group. NOTE: When engine = SQLServer, this attribute does not support to set.

Engine string

Database Engine Type.The database engine of the dedicated cluster. Valid values:Redis, SQLServer, MySQL, PostgreSQL, MongoDB

HostReplacePolicy string

The policy based on which the system handles host failures. Valid values:Auto,Manual

MemAllocationRatio int

The Memory Allocation Ratio of the Dedicated Host Group.

OpenPermission bool

Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: true and false. NOTE: The open_permission should be true when engine = "SQLServer"

VpcId string

The virtual private cloud (VPC) ID of the dedicated cluster.

allocationPolicy String

AThe policy that is used to allocate resources in the dedicated cluster. Valid values:Evenly,Intensively

cpuAllocationRatio Integer

The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.

dedicatedHostGroupDesc String

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

diskAllocationRatio Integer

The Disk Allocation Ratio of the Dedicated Host Group. NOTE: When engine = SQLServer, this attribute does not support to set.

engine String

Database Engine Type.The database engine of the dedicated cluster. Valid values:Redis, SQLServer, MySQL, PostgreSQL, MongoDB

hostReplacePolicy String

The policy based on which the system handles host failures. Valid values:Auto,Manual

memAllocationRatio Integer

The Memory Allocation Ratio of the Dedicated Host Group.

openPermission Boolean

Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: true and false. NOTE: The open_permission should be true when engine = "SQLServer"

vpcId String

The virtual private cloud (VPC) ID of the dedicated cluster.

allocationPolicy string

AThe policy that is used to allocate resources in the dedicated cluster. Valid values:Evenly,Intensively

cpuAllocationRatio number

The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.

dedicatedHostGroupDesc string

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

diskAllocationRatio number

The Disk Allocation Ratio of the Dedicated Host Group. NOTE: When engine = SQLServer, this attribute does not support to set.

engine string

Database Engine Type.The database engine of the dedicated cluster. Valid values:Redis, SQLServer, MySQL, PostgreSQL, MongoDB

hostReplacePolicy string

The policy based on which the system handles host failures. Valid values:Auto,Manual

memAllocationRatio number

The Memory Allocation Ratio of the Dedicated Host Group.

openPermission boolean

Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: true and false. NOTE: The open_permission should be true when engine = "SQLServer"

vpcId string

The virtual private cloud (VPC) ID of the dedicated cluster.

allocation_policy str

AThe policy that is used to allocate resources in the dedicated cluster. Valid values:Evenly,Intensively

cpu_allocation_ratio int

The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.

dedicated_host_group_desc str

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

disk_allocation_ratio int

The Disk Allocation Ratio of the Dedicated Host Group. NOTE: When engine = SQLServer, this attribute does not support to set.

engine str

Database Engine Type.The database engine of the dedicated cluster. Valid values:Redis, SQLServer, MySQL, PostgreSQL, MongoDB

host_replace_policy str

The policy based on which the system handles host failures. Valid values:Auto,Manual

mem_allocation_ratio int

The Memory Allocation Ratio of the Dedicated Host Group.

open_permission bool

Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: true and false. NOTE: The open_permission should be true when engine = "SQLServer"

vpc_id str

The virtual private cloud (VPC) ID of the dedicated cluster.

allocationPolicy String

AThe policy that is used to allocate resources in the dedicated cluster. Valid values:Evenly,Intensively

cpuAllocationRatio Number

The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.

dedicatedHostGroupDesc String

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

diskAllocationRatio Number

The Disk Allocation Ratio of the Dedicated Host Group. NOTE: When engine = SQLServer, this attribute does not support to set.

engine String

Database Engine Type.The database engine of the dedicated cluster. Valid values:Redis, SQLServer, MySQL, PostgreSQL, MongoDB

hostReplacePolicy String

The policy based on which the system handles host failures. Valid values:Auto,Manual

memAllocationRatio Number

The Memory Allocation Ratio of the Dedicated Host Group.

openPermission Boolean

Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: true and false. NOTE: The open_permission should be true when engine = "SQLServer"

vpcId String

The virtual private cloud (VPC) ID of the dedicated cluster.

Import

ApsaraDB for MyBase Dedicated Host Group can be imported using the id, e.g.

 $ pulumi import alicloud:cddc/dedicatedHostGroup:DedicatedHostGroup example <id>

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.