1. Packages
  2. Ibm Provider
  3. API Docs
  4. IsBareMetalServerAction
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.IsBareMetalServerAction

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Start/Stop/Restart a Bare Metal Server for VPC. For more information, about managing VPC Bare Metal Server, see About Bare Metal Servers for VPC.

    Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

    provider.tf

    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) {
        }
    }
    
    {}
    

    Example Usage

    In the following example, you can update name of a Bare Metal Server disk:

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const bmsAction = new ibm.IsBareMetalServerAction("bmsAction", {
        bareMetalServer: ibm_is_bare_metal_server.bms.id,
        action: "stop",
        stopType: "hard",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    bms_action = ibm.IsBareMetalServerAction("bmsAction",
        bare_metal_server=ibm_is_bare_metal_server["bms"]["id"],
        action="stop",
        stop_type="hard")
    
    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.NewIsBareMetalServerAction(ctx, "bmsAction", &ibm.IsBareMetalServerActionArgs{
    			BareMetalServer: pulumi.Any(ibm_is_bare_metal_server.Bms.Id),
    			Action:          pulumi.String("stop"),
    			StopType:        pulumi.String("hard"),
    		})
    		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 bmsAction = new Ibm.IsBareMetalServerAction("bmsAction", new()
        {
            BareMetalServer = ibm_is_bare_metal_server.Bms.Id,
            Action = "stop",
            StopType = "hard",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IsBareMetalServerAction;
    import com.pulumi.ibm.IsBareMetalServerActionArgs;
    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 bmsAction = new IsBareMetalServerAction("bmsAction", IsBareMetalServerActionArgs.builder()
                .bareMetalServer(ibm_is_bare_metal_server.bms().id())
                .action("stop")
                .stopType("hard")
                .build());
    
        }
    }
    
    resources:
      bmsAction:
        type: ibm:IsBareMetalServerAction
        properties:
          bareMetalServer: ${ibm_is_bare_metal_server.bms.id}
          action: stop
          stopType: hard
    

    Create IsBareMetalServerAction Resource

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

    Constructor syntax

    new IsBareMetalServerAction(name: string, args: IsBareMetalServerActionArgs, opts?: CustomResourceOptions);
    @overload
    def IsBareMetalServerAction(resource_name: str,
                                args: IsBareMetalServerActionArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def IsBareMetalServerAction(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                action: Optional[str] = None,
                                bare_metal_server: Optional[str] = None,
                                is_bare_metal_server_action_id: Optional[str] = None,
                                stop_type: Optional[str] = None,
                                timeouts: Optional[IsBareMetalServerActionTimeoutsArgs] = None)
    func NewIsBareMetalServerAction(ctx *Context, name string, args IsBareMetalServerActionArgs, opts ...ResourceOption) (*IsBareMetalServerAction, error)
    public IsBareMetalServerAction(string name, IsBareMetalServerActionArgs args, CustomResourceOptions? opts = null)
    public IsBareMetalServerAction(String name, IsBareMetalServerActionArgs args)
    public IsBareMetalServerAction(String name, IsBareMetalServerActionArgs args, CustomResourceOptions options)
    
    type: ibm:IsBareMetalServerAction
    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 IsBareMetalServerActionArgs
    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 IsBareMetalServerActionArgs
    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 IsBareMetalServerActionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IsBareMetalServerActionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IsBareMetalServerActionArgs
    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 isBareMetalServerActionResource = new Ibm.IsBareMetalServerAction("isBareMetalServerActionResource", new()
    {
        Action = "string",
        BareMetalServer = "string",
        IsBareMetalServerActionId = "string",
        StopType = "string",
        Timeouts = new Ibm.Inputs.IsBareMetalServerActionTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := ibm.NewIsBareMetalServerAction(ctx, "isBareMetalServerActionResource", &ibm.IsBareMetalServerActionArgs{
    	Action:                    pulumi.String("string"),
    	BareMetalServer:           pulumi.String("string"),
    	IsBareMetalServerActionId: pulumi.String("string"),
    	StopType:                  pulumi.String("string"),
    	Timeouts: &ibm.IsBareMetalServerActionTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var isBareMetalServerActionResource = new IsBareMetalServerAction("isBareMetalServerActionResource", IsBareMetalServerActionArgs.builder()
        .action("string")
        .bareMetalServer("string")
        .isBareMetalServerActionId("string")
        .stopType("string")
        .timeouts(IsBareMetalServerActionTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    is_bare_metal_server_action_resource = ibm.IsBareMetalServerAction("isBareMetalServerActionResource",
        action="string",
        bare_metal_server="string",
        is_bare_metal_server_action_id="string",
        stop_type="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const isBareMetalServerActionResource = new ibm.IsBareMetalServerAction("isBareMetalServerActionResource", {
        action: "string",
        bareMetalServer: "string",
        isBareMetalServerActionId: "string",
        stopType: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: ibm:IsBareMetalServerAction
    properties:
        action: string
        bareMetalServer: string
        isBareMetalServerActionId: string
        stopType: string
        timeouts:
            create: string
            delete: string
            update: string
    

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

    Action string

    The type of action to perfrom on the Bare metal server.

    Supported Action • start • stop • restart

    BareMetalServer string
    Bare metal server identifier.
    IsBareMetalServerActionId string
    StopType string
    The type of stop for the stop action. [soft, hard]. By default its hard
    Timeouts IsBareMetalServerActionTimeouts
    Action string

    The type of action to perfrom on the Bare metal server.

    Supported Action • start • stop • restart

    BareMetalServer string
    Bare metal server identifier.
    IsBareMetalServerActionId string
    StopType string
    The type of stop for the stop action. [soft, hard]. By default its hard
    Timeouts IsBareMetalServerActionTimeoutsArgs
    action String

    The type of action to perfrom on the Bare metal server.

    Supported Action • start • stop • restart

    bareMetalServer String
    Bare metal server identifier.
    isBareMetalServerActionId String
    stopType String
    The type of stop for the stop action. [soft, hard]. By default its hard
    timeouts IsBareMetalServerActionTimeouts
    action string

    The type of action to perfrom on the Bare metal server.

    Supported Action • start • stop • restart

    bareMetalServer string
    Bare metal server identifier.
    isBareMetalServerActionId string
    stopType string
    The type of stop for the stop action. [soft, hard]. By default its hard
    timeouts IsBareMetalServerActionTimeouts
    action str

    The type of action to perfrom on the Bare metal server.

    Supported Action • start • stop • restart

    bare_metal_server str
    Bare metal server identifier.
    is_bare_metal_server_action_id str
    stop_type str
    The type of stop for the stop action. [soft, hard]. By default its hard
    timeouts IsBareMetalServerActionTimeoutsArgs
    action String

    The type of action to perfrom on the Bare metal server.

    Supported Action • start • stop • restart

    bareMetalServer String
    Bare metal server identifier.
    isBareMetalServerActionId String
    stopType String
    The type of stop for the stop action. [soft, hard]. By default its hard
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
    StatusReasons List<IsBareMetalServerActionStatusReason>
    (List) Array of reasons for the current status (if any).
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
    StatusReasons []IsBareMetalServerActionStatusReason
    (List) Array of reasons for the current status (if any).
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
    statusReasons List<IsBareMetalServerActionStatusReason>
    (List) Array of reasons for the current status (if any).
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
    statusReasons IsBareMetalServerActionStatusReason[]
    (List) Array of reasons for the current status (if any).
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
    status_reasons Sequence[IsBareMetalServerActionStatusReason]
    (List) Array of reasons for the current status (if any).
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
    statusReasons List<Property Map>
    (List) Array of reasons for the current status (if any).

    Look up Existing IsBareMetalServerAction Resource

    Get an existing IsBareMetalServerAction 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?: IsBareMetalServerActionState, opts?: CustomResourceOptions): IsBareMetalServerAction
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            bare_metal_server: Optional[str] = None,
            is_bare_metal_server_action_id: Optional[str] = None,
            status: Optional[str] = None,
            status_reasons: Optional[Sequence[IsBareMetalServerActionStatusReasonArgs]] = None,
            stop_type: Optional[str] = None,
            timeouts: Optional[IsBareMetalServerActionTimeoutsArgs] = None) -> IsBareMetalServerAction
    func GetIsBareMetalServerAction(ctx *Context, name string, id IDInput, state *IsBareMetalServerActionState, opts ...ResourceOption) (*IsBareMetalServerAction, error)
    public static IsBareMetalServerAction Get(string name, Input<string> id, IsBareMetalServerActionState? state, CustomResourceOptions? opts = null)
    public static IsBareMetalServerAction get(String name, Output<String> id, IsBareMetalServerActionState state, CustomResourceOptions options)
    resources:  _:    type: ibm:IsBareMetalServerAction    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:
    Action string

    The type of action to perfrom on the Bare metal server.

    Supported Action • start • stop • restart

    BareMetalServer string
    Bare metal server identifier.
    IsBareMetalServerActionId string
    Status string
    (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
    StatusReasons List<IsBareMetalServerActionStatusReason>
    (List) Array of reasons for the current status (if any).
    StopType string
    The type of stop for the stop action. [soft, hard]. By default its hard
    Timeouts IsBareMetalServerActionTimeouts
    Action string

    The type of action to perfrom on the Bare metal server.

    Supported Action • start • stop • restart

    BareMetalServer string
    Bare metal server identifier.
    IsBareMetalServerActionId string
    Status string
    (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
    StatusReasons []IsBareMetalServerActionStatusReasonArgs
    (List) Array of reasons for the current status (if any).
    StopType string
    The type of stop for the stop action. [soft, hard]. By default its hard
    Timeouts IsBareMetalServerActionTimeoutsArgs
    action String

    The type of action to perfrom on the Bare metal server.

    Supported Action • start • stop • restart

    bareMetalServer String
    Bare metal server identifier.
    isBareMetalServerActionId String
    status String
    (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
    statusReasons List<IsBareMetalServerActionStatusReason>
    (List) Array of reasons for the current status (if any).
    stopType String
    The type of stop for the stop action. [soft, hard]. By default its hard
    timeouts IsBareMetalServerActionTimeouts
    action string

    The type of action to perfrom on the Bare metal server.

    Supported Action • start • stop • restart

    bareMetalServer string
    Bare metal server identifier.
    isBareMetalServerActionId string
    status string
    (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
    statusReasons IsBareMetalServerActionStatusReason[]
    (List) Array of reasons for the current status (if any).
    stopType string
    The type of stop for the stop action. [soft, hard]. By default its hard
    timeouts IsBareMetalServerActionTimeouts
    action str

    The type of action to perfrom on the Bare metal server.

    Supported Action • start • stop • restart

    bare_metal_server str
    Bare metal server identifier.
    is_bare_metal_server_action_id str
    status str
    (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
    status_reasons Sequence[IsBareMetalServerActionStatusReasonArgs]
    (List) Array of reasons for the current status (if any).
    stop_type str
    The type of stop for the stop action. [soft, hard]. By default its hard
    timeouts IsBareMetalServerActionTimeoutsArgs
    action String

    The type of action to perfrom on the Bare metal server.

    Supported Action • start • stop • restart

    bareMetalServer String
    Bare metal server identifier.
    isBareMetalServerActionId String
    status String
    (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
    statusReasons List<Property Map>
    (List) Array of reasons for the current status (if any).
    stopType String
    The type of stop for the stop action. [soft, hard]. By default its hard
    timeouts Property Map

    Supporting Types

    IsBareMetalServerActionStatusReason, IsBareMetalServerActionStatusReasonArgs

    Code string
    (String) The status reason code
    Message string
    (String) An explanation of the status reason
    MoreInfo string
    (String) Link to documentation about this status reason
    Code string
    (String) The status reason code
    Message string
    (String) An explanation of the status reason
    MoreInfo string
    (String) Link to documentation about this status reason
    code String
    (String) The status reason code
    message String
    (String) An explanation of the status reason
    moreInfo String
    (String) Link to documentation about this status reason
    code string
    (String) The status reason code
    message string
    (String) An explanation of the status reason
    moreInfo string
    (String) Link to documentation about this status reason
    code str
    (String) The status reason code
    message str
    (String) An explanation of the status reason
    more_info str
    (String) Link to documentation about this status reason
    code String
    (String) The status reason code
    message String
    (String) An explanation of the status reason
    moreInfo String
    (String) Link to documentation about this status reason

    IsBareMetalServerActionTimeouts, IsBareMetalServerActionTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    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.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud