1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getPlacementGroups
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getPlacementGroups

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query placement groups.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getPlacementGroups({
        name: "tf_example",
        placementGroupId: "ps-bwvst92h",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_placement_groups(name="tf_example",
        placement_group_id="ps-bwvst92h")
    
    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.GetPlacementGroups(ctx, &tencentcloud.GetPlacementGroupsArgs{
    			Name:             pulumi.StringRef("tf_example"),
    			PlacementGroupId: pulumi.StringRef("ps-bwvst92h"),
    		}, nil)
    		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 example = Tencentcloud.GetPlacementGroups.Invoke(new()
        {
            Name = "tf_example",
            PlacementGroupId = "ps-bwvst92h",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetPlacementGroupsArgs;
    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 = TencentcloudFunctions.getPlacementGroups(GetPlacementGroupsArgs.builder()
                .name("tf_example")
                .placementGroupId("ps-bwvst92h")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getPlacementGroups
          arguments:
            name: tf_example
            placementGroupId: ps-bwvst92h
    

    Using getPlacementGroups

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getPlacementGroups(args: GetPlacementGroupsArgs, opts?: InvokeOptions): Promise<GetPlacementGroupsResult>
    function getPlacementGroupsOutput(args: GetPlacementGroupsOutputArgs, opts?: InvokeOptions): Output<GetPlacementGroupsResult>
    def get_placement_groups(id: Optional[str] = None,
                             name: Optional[str] = None,
                             placement_group_id: Optional[str] = None,
                             result_output_file: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetPlacementGroupsResult
    def get_placement_groups_output(id: Optional[pulumi.Input[str]] = None,
                             name: Optional[pulumi.Input[str]] = None,
                             placement_group_id: Optional[pulumi.Input[str]] = None,
                             result_output_file: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetPlacementGroupsResult]
    func GetPlacementGroups(ctx *Context, args *GetPlacementGroupsArgs, opts ...InvokeOption) (*GetPlacementGroupsResult, error)
    func GetPlacementGroupsOutput(ctx *Context, args *GetPlacementGroupsOutputArgs, opts ...InvokeOption) GetPlacementGroupsResultOutput

    > Note: This function is named GetPlacementGroups in the Go SDK.

    public static class GetPlacementGroups 
    {
        public static Task<GetPlacementGroupsResult> InvokeAsync(GetPlacementGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetPlacementGroupsResult> Invoke(GetPlacementGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPlacementGroupsResult> getPlacementGroups(GetPlacementGroupsArgs args, InvokeOptions options)
    public static Output<GetPlacementGroupsResult> getPlacementGroups(GetPlacementGroupsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getPlacementGroups:getPlacementGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Name string
    Name of the placement group to be queried.
    PlacementGroupId string
    ID of the placement group to be queried.
    ResultOutputFile string
    Used to save results.
    Id string
    Name string
    Name of the placement group to be queried.
    PlacementGroupId string
    ID of the placement group to be queried.
    ResultOutputFile string
    Used to save results.
    id String
    name String
    Name of the placement group to be queried.
    placementGroupId String
    ID of the placement group to be queried.
    resultOutputFile String
    Used to save results.
    id string
    name string
    Name of the placement group to be queried.
    placementGroupId string
    ID of the placement group to be queried.
    resultOutputFile string
    Used to save results.
    id str
    name str
    Name of the placement group to be queried.
    placement_group_id str
    ID of the placement group to be queried.
    result_output_file str
    Used to save results.
    id String
    name String
    Name of the placement group to be queried.
    placementGroupId String
    ID of the placement group to be queried.
    resultOutputFile String
    Used to save results.

    getPlacementGroups Result

    The following output properties are available:

    Id string
    PlacementGroupLists List<GetPlacementGroupsPlacementGroupList>
    An information list of placement group. Each element contains the following attributes:
    Name string
    Name of the placement group.
    PlacementGroupId string
    ID of the placement group.
    ResultOutputFile string
    Id string
    PlacementGroupLists []GetPlacementGroupsPlacementGroupList
    An information list of placement group. Each element contains the following attributes:
    Name string
    Name of the placement group.
    PlacementGroupId string
    ID of the placement group.
    ResultOutputFile string
    id String
    placementGroupLists List<GetPlacementGroupsPlacementGroupList>
    An information list of placement group. Each element contains the following attributes:
    name String
    Name of the placement group.
    placementGroupId String
    ID of the placement group.
    resultOutputFile String
    id string
    placementGroupLists GetPlacementGroupsPlacementGroupList[]
    An information list of placement group. Each element contains the following attributes:
    name string
    Name of the placement group.
    placementGroupId string
    ID of the placement group.
    resultOutputFile string
    id str
    placement_group_lists Sequence[GetPlacementGroupsPlacementGroupList]
    An information list of placement group. Each element contains the following attributes:
    name str
    Name of the placement group.
    placement_group_id str
    ID of the placement group.
    result_output_file str
    id String
    placementGroupLists List<Property Map>
    An information list of placement group. Each element contains the following attributes:
    name String
    Name of the placement group.
    placementGroupId String
    ID of the placement group.
    resultOutputFile String

    Supporting Types

    GetPlacementGroupsPlacementGroupList

    CreateTime string
    Creation time of the placement group.
    CurrentNum double
    Number of hosts in the placement group.
    CvmQuotaTotal double
    Maximum number of hosts in the placement group.
    InstanceIds List<string>
    Host IDs in the placement group.
    Name string
    Name of the placement group to be queried.
    PlacementGroupId string
    ID of the placement group to be queried.
    Type string
    Type of the placement group.
    CreateTime string
    Creation time of the placement group.
    CurrentNum float64
    Number of hosts in the placement group.
    CvmQuotaTotal float64
    Maximum number of hosts in the placement group.
    InstanceIds []string
    Host IDs in the placement group.
    Name string
    Name of the placement group to be queried.
    PlacementGroupId string
    ID of the placement group to be queried.
    Type string
    Type of the placement group.
    createTime String
    Creation time of the placement group.
    currentNum Double
    Number of hosts in the placement group.
    cvmQuotaTotal Double
    Maximum number of hosts in the placement group.
    instanceIds List<String>
    Host IDs in the placement group.
    name String
    Name of the placement group to be queried.
    placementGroupId String
    ID of the placement group to be queried.
    type String
    Type of the placement group.
    createTime string
    Creation time of the placement group.
    currentNum number
    Number of hosts in the placement group.
    cvmQuotaTotal number
    Maximum number of hosts in the placement group.
    instanceIds string[]
    Host IDs in the placement group.
    name string
    Name of the placement group to be queried.
    placementGroupId string
    ID of the placement group to be queried.
    type string
    Type of the placement group.
    create_time str
    Creation time of the placement group.
    current_num float
    Number of hosts in the placement group.
    cvm_quota_total float
    Maximum number of hosts in the placement group.
    instance_ids Sequence[str]
    Host IDs in the placement group.
    name str
    Name of the placement group to be queried.
    placement_group_id str
    ID of the placement group to be queried.
    type str
    Type of the placement group.
    createTime String
    Creation time of the placement group.
    currentNum Number
    Number of hosts in the placement group.
    cvmQuotaTotal Number
    Maximum number of hosts in the placement group.
    instanceIds List<String>
    Host IDs in the placement group.
    name String
    Name of the placement group to be queried.
    placementGroupId String
    ID of the placement group to be queried.
    type String
    Type of the placement group.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack