ibm.IsBareMetalServerAction
Explore with Pulumi AI
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
- Bare
Metal stringServer - Bare metal server identifier.
- Is
Bare stringMetal Server Action Id - Stop
Type string - The type of stop for the
stop
action. [soft, hard]. By default itshard
- Timeouts
Is
Bare Metal Server Action Timeouts
- Action string
The type of action to perfrom on the Bare metal server.
Supported Action • start • stop • restart
- Bare
Metal stringServer - Bare metal server identifier.
- Is
Bare stringMetal Server Action Id - Stop
Type string - The type of stop for the
stop
action. [soft, hard]. By default itshard
- Timeouts
Is
Bare Metal Server Action Timeouts Args
- action String
The type of action to perfrom on the Bare metal server.
Supported Action • start • stop • restart
- bare
Metal StringServer - Bare metal server identifier.
- is
Bare StringMetal Server Action Id - stop
Type String - The type of stop for the
stop
action. [soft, hard]. By default itshard
- timeouts
Is
Bare Metal Server Action Timeouts
- action string
The type of action to perfrom on the Bare metal server.
Supported Action • start • stop • restart
- bare
Metal stringServer - Bare metal server identifier.
- is
Bare stringMetal Server Action Id - stop
Type string - The type of stop for the
stop
action. [soft, hard]. By default itshard
- timeouts
Is
Bare Metal Server Action Timeouts
- action str
The type of action to perfrom on the Bare metal server.
Supported Action • start • stop • restart
- bare_
metal_ strserver - Bare metal server identifier.
- is_
bare_ strmetal_ server_ action_ id - stop_
type str - The type of stop for the
stop
action. [soft, hard]. By default itshard
- timeouts
Is
Bare Metal Server Action Timeouts Args
- action String
The type of action to perfrom on the Bare metal server.
Supported Action • start • stop • restart
- bare
Metal StringServer - Bare metal server identifier.
- is
Bare StringMetal Server Action Id - stop
Type String - The type of stop for the
stop
action. [soft, hard]. By default itshard
- 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 ]
- Status
Reasons List<IsBare Metal Server Action Status Reason> - (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 ]
- Status
Reasons []IsBare Metal Server Action Status Reason - (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 ]
- status
Reasons List<IsBare Metal Server Action Status Reason> - (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 ]
- status
Reasons IsBare Metal Server Action Status Reason[] - (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[IsBare Metal Server Action Status Reason] - (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 ]
- status
Reasons 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.
- Action string
The type of action to perfrom on the Bare metal server.
Supported Action • start • stop • restart
- Bare
Metal stringServer - Bare metal server identifier.
- Is
Bare stringMetal Server Action Id - Status string
- (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
- Status
Reasons List<IsBare Metal Server Action Status Reason> - (List) Array of reasons for the current status (if any).
- Stop
Type string - The type of stop for the
stop
action. [soft, hard]. By default itshard
- Timeouts
Is
Bare Metal Server Action Timeouts
- Action string
The type of action to perfrom on the Bare metal server.
Supported Action • start • stop • restart
- Bare
Metal stringServer - Bare metal server identifier.
- Is
Bare stringMetal Server Action Id - Status string
- (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
- Status
Reasons []IsBare Metal Server Action Status Reason Args - (List) Array of reasons for the current status (if any).
- Stop
Type string - The type of stop for the
stop
action. [soft, hard]. By default itshard
- Timeouts
Is
Bare Metal Server Action Timeouts Args
- action String
The type of action to perfrom on the Bare metal server.
Supported Action • start • stop • restart
- bare
Metal StringServer - Bare metal server identifier.
- is
Bare StringMetal Server Action Id - status String
- (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
- status
Reasons List<IsBare Metal Server Action Status Reason> - (List) Array of reasons for the current status (if any).
- stop
Type String - The type of stop for the
stop
action. [soft, hard]. By default itshard
- timeouts
Is
Bare Metal Server Action Timeouts
- action string
The type of action to perfrom on the Bare metal server.
Supported Action • start • stop • restart
- bare
Metal stringServer - Bare metal server identifier.
- is
Bare stringMetal Server Action Id - status string
- (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
- status
Reasons IsBare Metal Server Action Status Reason[] - (List) Array of reasons for the current status (if any).
- stop
Type string - The type of stop for the
stop
action. [soft, hard]. By default itshard
- timeouts
Is
Bare Metal Server Action Timeouts
- action str
The type of action to perfrom on the Bare metal server.
Supported Action • start • stop • restart
- bare_
metal_ strserver - Bare metal server identifier.
- is_
bare_ strmetal_ server_ action_ id - status str
- (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
- status_
reasons Sequence[IsBare Metal Server Action Status Reason Args] - (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 itshard
- timeouts
Is
Bare Metal Server Action Timeouts Args
- action String
The type of action to perfrom on the Bare metal server.
Supported Action • start • stop • restart
- bare
Metal StringServer - Bare metal server identifier.
- is
Bare StringMetal Server Action Id - status String
- (String) The status of the bare metal server :[ failed, pending, restarting, running, starting, stopped, stopping ]
- status
Reasons List<Property Map> - (List) Array of reasons for the current status (if any).
- stop
Type String - The type of stop for the
stop
action. [soft, hard]. By default itshard
- timeouts Property Map
Supporting Types
IsBareMetalServerActionStatusReason, IsBareMetalServerActionStatusReasonArgs
IsBareMetalServerActionTimeouts, IsBareMetalServerActionTimeoutsArgs
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.