tencentcloud.PlacementGroup
Explore with Pulumi AI
Provide a resource to create a placement group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const foo = new tencentcloud.PlacementGroup("foo", {
affinity: 2,
tags: {
createBy: "terraform",
},
type: "HOST",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
foo = tencentcloud.PlacementGroup("foo",
affinity=2,
tags={
"createBy": "terraform",
},
type="HOST")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewPlacementGroup(ctx, "foo", &tencentcloud.PlacementGroupArgs{
Affinity: pulumi.Float64(2),
Tags: pulumi.StringMap{
"createBy": pulumi.String("terraform"),
},
Type: pulumi.String("HOST"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var foo = new Tencentcloud.PlacementGroup("foo", new()
{
Affinity = 2,
Tags =
{
{ "createBy", "terraform" },
},
Type = "HOST",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PlacementGroup;
import com.pulumi.tencentcloud.PlacementGroupArgs;
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 foo = new PlacementGroup("foo", PlacementGroupArgs.builder()
.affinity(2)
.tags(Map.of("createBy", "terraform"))
.type("HOST")
.build());
}
}
resources:
foo:
type: tencentcloud:PlacementGroup
properties:
affinity: 2
tags:
createBy: terraform
type: HOST
Create PlacementGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PlacementGroup(name: string, args: PlacementGroupArgs, opts?: CustomResourceOptions);
@overload
def PlacementGroup(resource_name: str,
args: PlacementGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PlacementGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
type: Optional[str] = None,
affinity: Optional[float] = None,
name: Optional[str] = None,
placement_group_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewPlacementGroup(ctx *Context, name string, args PlacementGroupArgs, opts ...ResourceOption) (*PlacementGroup, error)
public PlacementGroup(string name, PlacementGroupArgs args, CustomResourceOptions? opts = null)
public PlacementGroup(String name, PlacementGroupArgs args)
public PlacementGroup(String name, PlacementGroupArgs args, CustomResourceOptions options)
type: tencentcloud:PlacementGroup
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 PlacementGroupArgs
- 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 PlacementGroupArgs
- 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 PlacementGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PlacementGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PlacementGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PlacementGroup 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 PlacementGroup resource accepts the following input properties:
- Type string
- Type of the placement group. Valid values:
HOST
,SW
andRACK
. - Affinity double
- Affinity of the placement group.Valid values: 1~10, default is 1.
- Name string
- Name of the placement group, 1-60 characters in length.
- Placement
Group stringId - ID of the resource.
- Dictionary<string, string>
- Tags of the placement group.
- Type string
- Type of the placement group. Valid values:
HOST
,SW
andRACK
. - Affinity float64
- Affinity of the placement group.Valid values: 1~10, default is 1.
- Name string
- Name of the placement group, 1-60 characters in length.
- Placement
Group stringId - ID of the resource.
- map[string]string
- Tags of the placement group.
- type String
- Type of the placement group. Valid values:
HOST
,SW
andRACK
. - affinity Double
- Affinity of the placement group.Valid values: 1~10, default is 1.
- name String
- Name of the placement group, 1-60 characters in length.
- placement
Group StringId - ID of the resource.
- Map<String,String>
- Tags of the placement group.
- type string
- Type of the placement group. Valid values:
HOST
,SW
andRACK
. - affinity number
- Affinity of the placement group.Valid values: 1~10, default is 1.
- name string
- Name of the placement group, 1-60 characters in length.
- placement
Group stringId - ID of the resource.
- {[key: string]: string}
- Tags of the placement group.
- type str
- Type of the placement group. Valid values:
HOST
,SW
andRACK
. - affinity float
- Affinity of the placement group.Valid values: 1~10, default is 1.
- name str
- Name of the placement group, 1-60 characters in length.
- placement_
group_ strid - ID of the resource.
- Mapping[str, str]
- Tags of the placement group.
- type String
- Type of the placement group. Valid values:
HOST
,SW
andRACK
. - affinity Number
- Affinity of the placement group.Valid values: 1~10, default is 1.
- name String
- Name of the placement group, 1-60 characters in length.
- placement
Group StringId - ID of the resource.
- Map<String>
- Tags of the placement group.
Outputs
All input properties are implicitly available as output properties. Additionally, the PlacementGroup resource produces the following output properties:
- Create
Time string - Creation time of the placement group.
- Current
Num double - Number of hosts in the placement group.
- Cvm
Quota doubleTotal - Maximum number of hosts in the placement group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Create
Time string - Creation time of the placement group.
- Current
Num float64 - Number of hosts in the placement group.
- Cvm
Quota float64Total - Maximum number of hosts in the placement group.
- Id string
- The provider-assigned unique ID for this managed resource.
- create
Time String - Creation time of the placement group.
- current
Num Double - Number of hosts in the placement group.
- cvm
Quota DoubleTotal - Maximum number of hosts in the placement group.
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time string - Creation time of the placement group.
- current
Num number - Number of hosts in the placement group.
- cvm
Quota numberTotal - Maximum number of hosts in the placement group.
- id string
- The provider-assigned unique ID for this managed resource.
- create_
time str - Creation time of the placement group.
- current_
num float - Number of hosts in the placement group.
- cvm_
quota_ floattotal - Maximum number of hosts in the placement group.
- id str
- The provider-assigned unique ID for this managed resource.
- create
Time String - Creation time of the placement group.
- current
Num Number - Number of hosts in the placement group.
- cvm
Quota NumberTotal - Maximum number of hosts in the placement group.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PlacementGroup Resource
Get an existing PlacementGroup 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?: PlacementGroupState, opts?: CustomResourceOptions): PlacementGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
affinity: Optional[float] = None,
create_time: Optional[str] = None,
current_num: Optional[float] = None,
cvm_quota_total: Optional[float] = None,
name: Optional[str] = None,
placement_group_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
type: Optional[str] = None) -> PlacementGroup
func GetPlacementGroup(ctx *Context, name string, id IDInput, state *PlacementGroupState, opts ...ResourceOption) (*PlacementGroup, error)
public static PlacementGroup Get(string name, Input<string> id, PlacementGroupState? state, CustomResourceOptions? opts = null)
public static PlacementGroup get(String name, Output<String> id, PlacementGroupState state, CustomResourceOptions options)
resources: _: type: tencentcloud:PlacementGroup 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.
- Affinity double
- Affinity of the placement group.Valid values: 1~10, default is 1.
- Create
Time string - Creation time of the placement group.
- Current
Num double - Number of hosts in the placement group.
- Cvm
Quota doubleTotal - Maximum number of hosts in the placement group.
- Name string
- Name of the placement group, 1-60 characters in length.
- Placement
Group stringId - ID of the resource.
- Dictionary<string, string>
- Tags of the placement group.
- Type string
- Type of the placement group. Valid values:
HOST
,SW
andRACK
.
- Affinity float64
- Affinity of the placement group.Valid values: 1~10, default is 1.
- Create
Time string - Creation time of the placement group.
- Current
Num float64 - Number of hosts in the placement group.
- Cvm
Quota float64Total - Maximum number of hosts in the placement group.
- Name string
- Name of the placement group, 1-60 characters in length.
- Placement
Group stringId - ID of the resource.
- map[string]string
- Tags of the placement group.
- Type string
- Type of the placement group. Valid values:
HOST
,SW
andRACK
.
- affinity Double
- Affinity of the placement group.Valid values: 1~10, default is 1.
- create
Time String - Creation time of the placement group.
- current
Num Double - Number of hosts in the placement group.
- cvm
Quota DoubleTotal - Maximum number of hosts in the placement group.
- name String
- Name of the placement group, 1-60 characters in length.
- placement
Group StringId - ID of the resource.
- Map<String,String>
- Tags of the placement group.
- type String
- Type of the placement group. Valid values:
HOST
,SW
andRACK
.
- affinity number
- Affinity of the placement group.Valid values: 1~10, default is 1.
- create
Time string - Creation time of the placement group.
- current
Num number - Number of hosts in the placement group.
- cvm
Quota numberTotal - Maximum number of hosts in the placement group.
- name string
- Name of the placement group, 1-60 characters in length.
- placement
Group stringId - ID of the resource.
- {[key: string]: string}
- Tags of the placement group.
- type string
- Type of the placement group. Valid values:
HOST
,SW
andRACK
.
- affinity float
- Affinity of the placement group.Valid values: 1~10, default is 1.
- create_
time str - Creation time of the placement group.
- current_
num float - Number of hosts in the placement group.
- cvm_
quota_ floattotal - Maximum number of hosts in the placement group.
- name str
- Name of the placement group, 1-60 characters in length.
- placement_
group_ strid - ID of the resource.
- Mapping[str, str]
- Tags of the placement group.
- type str
- Type of the placement group. Valid values:
HOST
,SW
andRACK
.
- affinity Number
- Affinity of the placement group.Valid values: 1~10, default is 1.
- create
Time String - Creation time of the placement group.
- current
Num Number - Number of hosts in the placement group.
- cvm
Quota NumberTotal - Maximum number of hosts in the placement group.
- name String
- Name of the placement group, 1-60 characters in length.
- placement
Group StringId - ID of the resource.
- Map<String>
- Tags of the placement group.
- type String
- Type of the placement group. Valid values:
HOST
,SW
andRACK
.
Import
Placement group can be imported using the id, e.g.
$ pulumi import tencentcloud:index/placementGroup:PlacementGroup foo ps-ilan8vjf
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.