1. Packages
  2. Linode
  3. API Docs
  4. getPlacementGroup
Linode v4.22.0 published on Tuesday, Jun 25, 2024 by Pulumi

linode.getPlacementGroup

Explore with Pulumi AI

linode logo
Linode v4.22.0 published on Tuesday, Jun 25, 2024 by Pulumi

    NOTE: Placement Groups may not currently be available to all users.

    linode.PlacementGroup provides details about a Linode placement group.

    Example Usage

    The following example shows how the resource might be used to obtain additional information about a Linode placement group.

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const pg = linode.getPlacementGroup({
        id: 12345,
    });
    
    import pulumi
    import pulumi_linode as linode
    
    pg = linode.get_placement_group(id=12345)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := linode.LookupPlacementGroup(ctx, &linode.LookupPlacementGroupArgs{
    			Id: 12345,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var pg = Linode.GetPlacementGroup.Invoke(new()
        {
            Id = 12345,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.LinodeFunctions;
    import com.pulumi.linode.inputs.GetPlacementGroupArgs;
    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 pg = LinodeFunctions.getPlacementGroup(GetPlacementGroupArgs.builder()
                .id(12345)
                .build());
    
        }
    }
    
    variables:
      pg:
        fn::invoke:
          Function: linode:getPlacementGroup
          Arguments:
            id: 12345
    

    Using getPlacementGroup

    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 getPlacementGroup(args: GetPlacementGroupArgs, opts?: InvokeOptions): Promise<GetPlacementGroupResult>
    function getPlacementGroupOutput(args: GetPlacementGroupOutputArgs, opts?: InvokeOptions): Output<GetPlacementGroupResult>
    def get_placement_group(id: Optional[int] = None,
                            members: Optional[Sequence[GetPlacementGroupMember]] = None,
                            opts: Optional[InvokeOptions] = None) -> GetPlacementGroupResult
    def get_placement_group_output(id: Optional[pulumi.Input[int]] = None,
                            members: Optional[pulumi.Input[Sequence[pulumi.Input[GetPlacementGroupMemberArgs]]]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetPlacementGroupResult]
    func LookupPlacementGroup(ctx *Context, args *LookupPlacementGroupArgs, opts ...InvokeOption) (*LookupPlacementGroupResult, error)
    func LookupPlacementGroupOutput(ctx *Context, args *LookupPlacementGroupOutputArgs, opts ...InvokeOption) LookupPlacementGroupResultOutput

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

    public static class GetPlacementGroup 
    {
        public static Task<GetPlacementGroupResult> InvokeAsync(GetPlacementGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetPlacementGroupResult> Invoke(GetPlacementGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPlacementGroupResult> getPlacementGroup(GetPlacementGroupArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: linode:index/getPlacementGroup:getPlacementGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id int
    The ID of the Placement Group.
    Members List<GetPlacementGroupMember>
    A set of Linodes currently assigned to this Placement Group.
    Id int
    The ID of the Placement Group.
    Members []GetPlacementGroupMember
    A set of Linodes currently assigned to this Placement Group.
    id Integer
    The ID of the Placement Group.
    members List<GetPlacementGroupMember>
    A set of Linodes currently assigned to this Placement Group.
    id number
    The ID of the Placement Group.
    members GetPlacementGroupMember[]
    A set of Linodes currently assigned to this Placement Group.
    id int
    The ID of the Placement Group.
    members Sequence[GetPlacementGroupMember]
    A set of Linodes currently assigned to this Placement Group.
    id Number
    The ID of the Placement Group.
    members List<Property Map>
    A set of Linodes currently assigned to this Placement Group.

    getPlacementGroup Result

    The following output properties are available:

    AffinityType string
    The affinity policy to use when placing Linodes in this group.
    Id int
    IsCompliant bool
    Whether this Linode is currently compliant with the group's affinity policy.
    IsStrict bool
    Whether Linodes must be able to become compliant during assignment. (Default true)
    Label string
    The label of the Placement Group. This field can only contain ASCII letters, digits and dashes.
    Region string
    The region of the Placement Group.
    Members List<GetPlacementGroupMember>
    A set of Linodes currently assigned to this Placement Group.
    AffinityType string
    The affinity policy to use when placing Linodes in this group.
    Id int
    IsCompliant bool
    Whether this Linode is currently compliant with the group's affinity policy.
    IsStrict bool
    Whether Linodes must be able to become compliant during assignment. (Default true)
    Label string
    The label of the Placement Group. This field can only contain ASCII letters, digits and dashes.
    Region string
    The region of the Placement Group.
    Members []GetPlacementGroupMember
    A set of Linodes currently assigned to this Placement Group.
    affinityType String
    The affinity policy to use when placing Linodes in this group.
    id Integer
    isCompliant Boolean
    Whether this Linode is currently compliant with the group's affinity policy.
    isStrict Boolean
    Whether Linodes must be able to become compliant during assignment. (Default true)
    label String
    The label of the Placement Group. This field can only contain ASCII letters, digits and dashes.
    region String
    The region of the Placement Group.
    members List<GetPlacementGroupMember>
    A set of Linodes currently assigned to this Placement Group.
    affinityType string
    The affinity policy to use when placing Linodes in this group.
    id number
    isCompliant boolean
    Whether this Linode is currently compliant with the group's affinity policy.
    isStrict boolean
    Whether Linodes must be able to become compliant during assignment. (Default true)
    label string
    The label of the Placement Group. This field can only contain ASCII letters, digits and dashes.
    region string
    The region of the Placement Group.
    members GetPlacementGroupMember[]
    A set of Linodes currently assigned to this Placement Group.
    affinity_type str
    The affinity policy to use when placing Linodes in this group.
    id int
    is_compliant bool
    Whether this Linode is currently compliant with the group's affinity policy.
    is_strict bool
    Whether Linodes must be able to become compliant during assignment. (Default true)
    label str
    The label of the Placement Group. This field can only contain ASCII letters, digits and dashes.
    region str
    The region of the Placement Group.
    members Sequence[GetPlacementGroupMember]
    A set of Linodes currently assigned to this Placement Group.
    affinityType String
    The affinity policy to use when placing Linodes in this group.
    id Number
    isCompliant Boolean
    Whether this Linode is currently compliant with the group's affinity policy.
    isStrict Boolean
    Whether Linodes must be able to become compliant during assignment. (Default true)
    label String
    The label of the Placement Group. This field can only contain ASCII letters, digits and dashes.
    region String
    The region of the Placement Group.
    members List<Property Map>
    A set of Linodes currently assigned to this Placement Group.

    Supporting Types

    GetPlacementGroupMember

    IsCompliant bool
    Whether this Linode is currently compliant with the group's affinity policy.
    LinodeId int
    The ID of the Linode.
    IsCompliant bool
    Whether this Linode is currently compliant with the group's affinity policy.
    LinodeId int
    The ID of the Linode.
    isCompliant Boolean
    Whether this Linode is currently compliant with the group's affinity policy.
    linodeId Integer
    The ID of the Linode.
    isCompliant boolean
    Whether this Linode is currently compliant with the group's affinity policy.
    linodeId number
    The ID of the Linode.
    is_compliant bool
    Whether this Linode is currently compliant with the group's affinity policy.
    linode_id int
    The ID of the Linode.
    isCompliant Boolean
    Whether this Linode is currently compliant with the group's affinity policy.
    linodeId Number
    The ID of the Linode.

    Package Details

    Repository
    Linode pulumi/pulumi-linode
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the linode Terraform Provider.
    linode logo
    Linode v4.22.0 published on Tuesday, Jun 25, 2024 by Pulumi