1. Packages
  2. Ibm Provider
  3. API Docs
  4. PiSppPlacementGroup
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.PiSppPlacementGroup

Explore with Pulumi AI

ibm logo
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

    Create, update or delete a shared processor pool placement group.

    Example Usage

    The following example enables you to create a shared processor pool placement group with a group policy of affinity:

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const testaccPlacementGroup = new ibm.PiSppPlacementGroup("testaccPlacementGroup", {
        piCloudInstanceId: "<value of the cloud_instance_id>",
        piSppPlacementGroupName: "my_pg",
        piSppPlacementGroupPolicy: "affinity",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    testacc_placement_group = ibm.PiSppPlacementGroup("testaccPlacementGroup",
        pi_cloud_instance_id="<value of the cloud_instance_id>",
        pi_spp_placement_group_name="my_pg",
        pi_spp_placement_group_policy="affinity")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewPiSppPlacementGroup(ctx, "testaccPlacementGroup", &ibm.PiSppPlacementGroupArgs{
    			PiCloudInstanceId:         pulumi.String("<value of the cloud_instance_id>"),
    			PiSppPlacementGroupName:   pulumi.String("my_pg"),
    			PiSppPlacementGroupPolicy: pulumi.String("affinity"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var testaccPlacementGroup = new Ibm.PiSppPlacementGroup("testaccPlacementGroup", new()
        {
            PiCloudInstanceId = "<value of the cloud_instance_id>",
            PiSppPlacementGroupName = "my_pg",
            PiSppPlacementGroupPolicy = "affinity",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.PiSppPlacementGroup;
    import com.pulumi.ibm.PiSppPlacementGroupArgs;
    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 testaccPlacementGroup = new PiSppPlacementGroup("testaccPlacementGroup", PiSppPlacementGroupArgs.builder()
                .piCloudInstanceId("<value of the cloud_instance_id>")
                .piSppPlacementGroupName("my_pg")
                .piSppPlacementGroupPolicy("affinity")
                .build());
    
        }
    }
    
    resources:
      testaccPlacementGroup:
        type: ibm:PiSppPlacementGroup
        properties:
          piCloudInstanceId: <value of the cloud_instance_id>
          piSppPlacementGroupName: my_pg
          piSppPlacementGroupPolicy: affinity
    

    Notes

    • Please find supported Regions for endpoints.
    • If a Power cloud instance is provisioned at lon04, The provider level attributes should be as follows:
      • region - lon
      • zone - lon04

    Example usage:

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    Create PiSppPlacementGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PiSppPlacementGroup(name: string, args: PiSppPlacementGroupArgs, opts?: CustomResourceOptions);
    @overload
    def PiSppPlacementGroup(resource_name: str,
                            args: PiSppPlacementGroupArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def PiSppPlacementGroup(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            pi_cloud_instance_id: Optional[str] = None,
                            pi_spp_placement_group_name: Optional[str] = None,
                            pi_spp_placement_group_policy: Optional[str] = None,
                            pi_spp_placement_group_id: Optional[str] = None,
                            timeouts: Optional[PiSppPlacementGroupTimeoutsArgs] = None)
    func NewPiSppPlacementGroup(ctx *Context, name string, args PiSppPlacementGroupArgs, opts ...ResourceOption) (*PiSppPlacementGroup, error)
    public PiSppPlacementGroup(string name, PiSppPlacementGroupArgs args, CustomResourceOptions? opts = null)
    public PiSppPlacementGroup(String name, PiSppPlacementGroupArgs args)
    public PiSppPlacementGroup(String name, PiSppPlacementGroupArgs args, CustomResourceOptions options)
    
    type: ibm:PiSppPlacementGroup
    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 PiSppPlacementGroupArgs
    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 PiSppPlacementGroupArgs
    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 PiSppPlacementGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PiSppPlacementGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PiSppPlacementGroupArgs
    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 piSppPlacementGroupResource = new Ibm.PiSppPlacementGroup("piSppPlacementGroupResource", new()
    {
        PiCloudInstanceId = "string",
        PiSppPlacementGroupName = "string",
        PiSppPlacementGroupPolicy = "string",
        PiSppPlacementGroupId = "string",
        Timeouts = new Ibm.Inputs.PiSppPlacementGroupTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := ibm.NewPiSppPlacementGroup(ctx, "piSppPlacementGroupResource", &ibm.PiSppPlacementGroupArgs{
    PiCloudInstanceId: pulumi.String("string"),
    PiSppPlacementGroupName: pulumi.String("string"),
    PiSppPlacementGroupPolicy: pulumi.String("string"),
    PiSppPlacementGroupId: pulumi.String("string"),
    Timeouts: &.PiSppPlacementGroupTimeoutsArgs{
    Create: pulumi.String("string"),
    Delete: pulumi.String("string"),
    },
    })
    
    var piSppPlacementGroupResource = new PiSppPlacementGroup("piSppPlacementGroupResource", PiSppPlacementGroupArgs.builder()
        .piCloudInstanceId("string")
        .piSppPlacementGroupName("string")
        .piSppPlacementGroupPolicy("string")
        .piSppPlacementGroupId("string")
        .timeouts(PiSppPlacementGroupTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    pi_spp_placement_group_resource = ibm.PiSppPlacementGroup("piSppPlacementGroupResource",
        pi_cloud_instance_id="string",
        pi_spp_placement_group_name="string",
        pi_spp_placement_group_policy="string",
        pi_spp_placement_group_id="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const piSppPlacementGroupResource = new ibm.PiSppPlacementGroup("piSppPlacementGroupResource", {
        piCloudInstanceId: "string",
        piSppPlacementGroupName: "string",
        piSppPlacementGroupPolicy: "string",
        piSppPlacementGroupId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: ibm:PiSppPlacementGroup
    properties:
        piCloudInstanceId: string
        piSppPlacementGroupId: string
        piSppPlacementGroupName: string
        piSppPlacementGroupPolicy: string
        timeouts:
            create: string
            delete: string
    

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

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiSppPlacementGroupName string
    The name of the shared processor pool placement group.
    PiSppPlacementGroupPolicy string
    The value of the group's affinity policy. Valid values are affinity and anti-affinity.
    PiSppPlacementGroupId string
    (String) The unique identifier of the placement group.
    Timeouts PiSppPlacementGroupTimeouts
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiSppPlacementGroupName string
    The name of the shared processor pool placement group.
    PiSppPlacementGroupPolicy string
    The value of the group's affinity policy. Valid values are affinity and anti-affinity.
    PiSppPlacementGroupId string
    (String) The unique identifier of the placement group.
    Timeouts PiSppPlacementGroupTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piSppPlacementGroupName String
    The name of the shared processor pool placement group.
    piSppPlacementGroupPolicy String
    The value of the group's affinity policy. Valid values are affinity and anti-affinity.
    piSppPlacementGroupId String
    (String) The unique identifier of the placement group.
    timeouts PiSppPlacementGroupTimeouts
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piSppPlacementGroupName string
    The name of the shared processor pool placement group.
    piSppPlacementGroupPolicy string
    The value of the group's affinity policy. Valid values are affinity and anti-affinity.
    piSppPlacementGroupId string
    (String) The unique identifier of the placement group.
    timeouts PiSppPlacementGroupTimeouts
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_spp_placement_group_name str
    The name of the shared processor pool placement group.
    pi_spp_placement_group_policy str
    The value of the group's affinity policy. Valid values are affinity and anti-affinity.
    pi_spp_placement_group_id str
    (String) The unique identifier of the placement group.
    timeouts PiSppPlacementGroupTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piSppPlacementGroupName String
    The name of the shared processor pool placement group.
    piSppPlacementGroupPolicy String
    The value of the group's affinity policy. Valid values are affinity and anti-affinity.
    piSppPlacementGroupId String
    (String) The unique identifier of the placement group.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PiSppPlacementGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Members List<string>
    (List of strings) The list of server instances IDs that are members of the placement group.
    SppPlacementGroupId string
    (String) The placement group ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Members []string
    (List of strings) The list of server instances IDs that are members of the placement group.
    SppPlacementGroupId string
    (String) The placement group ID.
    id String
    The provider-assigned unique ID for this managed resource.
    members List<String>
    (List of strings) The list of server instances IDs that are members of the placement group.
    sppPlacementGroupId String
    (String) The placement group ID.
    id string
    The provider-assigned unique ID for this managed resource.
    members string[]
    (List of strings) The list of server instances IDs that are members of the placement group.
    sppPlacementGroupId string
    (String) The placement group ID.
    id str
    The provider-assigned unique ID for this managed resource.
    members Sequence[str]
    (List of strings) The list of server instances IDs that are members of the placement group.
    spp_placement_group_id str
    (String) The placement group ID.
    id String
    The provider-assigned unique ID for this managed resource.
    members List<String>
    (List of strings) The list of server instances IDs that are members of the placement group.
    sppPlacementGroupId String
    (String) The placement group ID.

    Look up Existing PiSppPlacementGroup Resource

    Get an existing PiSppPlacementGroup 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?: PiSppPlacementGroupState, opts?: CustomResourceOptions): PiSppPlacementGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            members: Optional[Sequence[str]] = None,
            pi_cloud_instance_id: Optional[str] = None,
            pi_spp_placement_group_id: Optional[str] = None,
            pi_spp_placement_group_name: Optional[str] = None,
            pi_spp_placement_group_policy: Optional[str] = None,
            spp_placement_group_id: Optional[str] = None,
            timeouts: Optional[PiSppPlacementGroupTimeoutsArgs] = None) -> PiSppPlacementGroup
    func GetPiSppPlacementGroup(ctx *Context, name string, id IDInput, state *PiSppPlacementGroupState, opts ...ResourceOption) (*PiSppPlacementGroup, error)
    public static PiSppPlacementGroup Get(string name, Input<string> id, PiSppPlacementGroupState? state, CustomResourceOptions? opts = null)
    public static PiSppPlacementGroup get(String name, Output<String> id, PiSppPlacementGroupState state, CustomResourceOptions options)
    resources:  _:    type: ibm:PiSppPlacementGroup    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.
    The following state arguments are supported:
    Members List<string>
    (List of strings) The list of server instances IDs that are members of the placement group.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiSppPlacementGroupId string
    (String) The unique identifier of the placement group.
    PiSppPlacementGroupName string
    The name of the shared processor pool placement group.
    PiSppPlacementGroupPolicy string
    The value of the group's affinity policy. Valid values are affinity and anti-affinity.
    SppPlacementGroupId string
    (String) The placement group ID.
    Timeouts PiSppPlacementGroupTimeouts
    Members []string
    (List of strings) The list of server instances IDs that are members of the placement group.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiSppPlacementGroupId string
    (String) The unique identifier of the placement group.
    PiSppPlacementGroupName string
    The name of the shared processor pool placement group.
    PiSppPlacementGroupPolicy string
    The value of the group's affinity policy. Valid values are affinity and anti-affinity.
    SppPlacementGroupId string
    (String) The placement group ID.
    Timeouts PiSppPlacementGroupTimeoutsArgs
    members List<String>
    (List of strings) The list of server instances IDs that are members of the placement group.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piSppPlacementGroupId String
    (String) The unique identifier of the placement group.
    piSppPlacementGroupName String
    The name of the shared processor pool placement group.
    piSppPlacementGroupPolicy String
    The value of the group's affinity policy. Valid values are affinity and anti-affinity.
    sppPlacementGroupId String
    (String) The placement group ID.
    timeouts PiSppPlacementGroupTimeouts
    members string[]
    (List of strings) The list of server instances IDs that are members of the placement group.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piSppPlacementGroupId string
    (String) The unique identifier of the placement group.
    piSppPlacementGroupName string
    The name of the shared processor pool placement group.
    piSppPlacementGroupPolicy string
    The value of the group's affinity policy. Valid values are affinity and anti-affinity.
    sppPlacementGroupId string
    (String) The placement group ID.
    timeouts PiSppPlacementGroupTimeouts
    members Sequence[str]
    (List of strings) The list of server instances IDs that are members of the placement group.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_spp_placement_group_id str
    (String) The unique identifier of the placement group.
    pi_spp_placement_group_name str
    The name of the shared processor pool placement group.
    pi_spp_placement_group_policy str
    The value of the group's affinity policy. Valid values are affinity and anti-affinity.
    spp_placement_group_id str
    (String) The placement group ID.
    timeouts PiSppPlacementGroupTimeoutsArgs
    members List<String>
    (List of strings) The list of server instances IDs that are members of the placement group.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piSppPlacementGroupId String
    (String) The unique identifier of the placement group.
    piSppPlacementGroupName String
    The name of the shared processor pool placement group.
    piSppPlacementGroupPolicy String
    The value of the group's affinity policy. Valid values are affinity and anti-affinity.
    sppPlacementGroupId String
    (String) The placement group ID.
    timeouts Property Map

    Supporting Types

    PiSppPlacementGroupTimeouts, PiSppPlacementGroupTimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    Example

    bash

    $ pulumi import ibm:index/piSppPlacementGroup:PiSppPlacementGroup example d7bec597-4726-451f-8a63-e62e6f19c32c/b17a2b7f-77ab-491c-811e-495f8d4c8947
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud