tencentcloud.CvmRebootInstance
Explore with Pulumi AI
Provides a resource to create a cvm reboot_instance
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const rebootInstance = new tencentcloud.CvmRebootInstance("rebootInstance", {
instanceId: "ins-f9jr4bd2",
stopType: "SOFT_FIRST",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
reboot_instance = tencentcloud.CvmRebootInstance("rebootInstance",
instance_id="ins-f9jr4bd2",
stop_type="SOFT_FIRST")
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.NewCvmRebootInstance(ctx, "rebootInstance", &tencentcloud.CvmRebootInstanceArgs{
InstanceId: pulumi.String("ins-f9jr4bd2"),
StopType: pulumi.String("SOFT_FIRST"),
})
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 rebootInstance = new Tencentcloud.CvmRebootInstance("rebootInstance", new()
{
InstanceId = "ins-f9jr4bd2",
StopType = "SOFT_FIRST",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CvmRebootInstance;
import com.pulumi.tencentcloud.CvmRebootInstanceArgs;
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 rebootInstance = new CvmRebootInstance("rebootInstance", CvmRebootInstanceArgs.builder()
.instanceId("ins-f9jr4bd2")
.stopType("SOFT_FIRST")
.build());
}
}
resources:
rebootInstance:
type: tencentcloud:CvmRebootInstance
properties:
instanceId: ins-f9jr4bd2
stopType: SOFT_FIRST
Create CvmRebootInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CvmRebootInstance(name: string, args: CvmRebootInstanceArgs, opts?: CustomResourceOptions);
@overload
def CvmRebootInstance(resource_name: str,
args: CvmRebootInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CvmRebootInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
cvm_reboot_instance_id: Optional[str] = None,
force_reboot: Optional[bool] = None,
stop_type: Optional[str] = None)
func NewCvmRebootInstance(ctx *Context, name string, args CvmRebootInstanceArgs, opts ...ResourceOption) (*CvmRebootInstance, error)
public CvmRebootInstance(string name, CvmRebootInstanceArgs args, CustomResourceOptions? opts = null)
public CvmRebootInstance(String name, CvmRebootInstanceArgs args)
public CvmRebootInstance(String name, CvmRebootInstanceArgs args, CustomResourceOptions options)
type: tencentcloud:CvmRebootInstance
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 CvmRebootInstanceArgs
- 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 CvmRebootInstanceArgs
- 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 CvmRebootInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CvmRebootInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CvmRebootInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CvmRebootInstance 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 CvmRebootInstance resource accepts the following input properties:
- Instance
Id string - Instance ID.
- Cvm
Reboot stringInstance Id - ID of the resource.
- Force
Reboot bool - It has been deprecated from version 1.81.21. Please use
stop_type
instead. This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values areTRUE
andFALSE
. Default value: FALSE. - Stop
Type string - Shutdown type. Valid values:
SOFT
: soft shutdown;HARD
: hard shutdown;SOFT_FIRST
: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
- Instance
Id string - Instance ID.
- Cvm
Reboot stringInstance Id - ID of the resource.
- Force
Reboot bool - It has been deprecated from version 1.81.21. Please use
stop_type
instead. This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values areTRUE
andFALSE
. Default value: FALSE. - Stop
Type string - Shutdown type. Valid values:
SOFT
: soft shutdown;HARD
: hard shutdown;SOFT_FIRST
: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
- instance
Id String - Instance ID.
- cvm
Reboot StringInstance Id - ID of the resource.
- force
Reboot Boolean - It has been deprecated from version 1.81.21. Please use
stop_type
instead. This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values areTRUE
andFALSE
. Default value: FALSE. - stop
Type String - Shutdown type. Valid values:
SOFT
: soft shutdown;HARD
: hard shutdown;SOFT_FIRST
: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
- instance
Id string - Instance ID.
- cvm
Reboot stringInstance Id - ID of the resource.
- force
Reboot boolean - It has been deprecated from version 1.81.21. Please use
stop_type
instead. This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values areTRUE
andFALSE
. Default value: FALSE. - stop
Type string - Shutdown type. Valid values:
SOFT
: soft shutdown;HARD
: hard shutdown;SOFT_FIRST
: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
- instance_
id str - Instance ID.
- cvm_
reboot_ strinstance_ id - ID of the resource.
- force_
reboot bool - It has been deprecated from version 1.81.21. Please use
stop_type
instead. This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values areTRUE
andFALSE
. Default value: FALSE. - stop_
type str - Shutdown type. Valid values:
SOFT
: soft shutdown;HARD
: hard shutdown;SOFT_FIRST
: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
- instance
Id String - Instance ID.
- cvm
Reboot StringInstance Id - ID of the resource.
- force
Reboot Boolean - It has been deprecated from version 1.81.21. Please use
stop_type
instead. This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values areTRUE
andFALSE
. Default value: FALSE. - stop
Type String - Shutdown type. Valid values:
SOFT
: soft shutdown;HARD
: hard shutdown;SOFT_FIRST
: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
Outputs
All input properties are implicitly available as output properties. Additionally, the CvmRebootInstance resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing CvmRebootInstance Resource
Get an existing CvmRebootInstance 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?: CvmRebootInstanceState, opts?: CustomResourceOptions): CvmRebootInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cvm_reboot_instance_id: Optional[str] = None,
force_reboot: Optional[bool] = None,
instance_id: Optional[str] = None,
stop_type: Optional[str] = None) -> CvmRebootInstance
func GetCvmRebootInstance(ctx *Context, name string, id IDInput, state *CvmRebootInstanceState, opts ...ResourceOption) (*CvmRebootInstance, error)
public static CvmRebootInstance Get(string name, Input<string> id, CvmRebootInstanceState? state, CustomResourceOptions? opts = null)
public static CvmRebootInstance get(String name, Output<String> id, CvmRebootInstanceState state, CustomResourceOptions options)
resources: _: type: tencentcloud:CvmRebootInstance 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.
- Cvm
Reboot stringInstance Id - ID of the resource.
- Force
Reboot bool - It has been deprecated from version 1.81.21. Please use
stop_type
instead. This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values areTRUE
andFALSE
. Default value: FALSE. - Instance
Id string - Instance ID.
- Stop
Type string - Shutdown type. Valid values:
SOFT
: soft shutdown;HARD
: hard shutdown;SOFT_FIRST
: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
- Cvm
Reboot stringInstance Id - ID of the resource.
- Force
Reboot bool - It has been deprecated from version 1.81.21. Please use
stop_type
instead. This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values areTRUE
andFALSE
. Default value: FALSE. - Instance
Id string - Instance ID.
- Stop
Type string - Shutdown type. Valid values:
SOFT
: soft shutdown;HARD
: hard shutdown;SOFT_FIRST
: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
- cvm
Reboot StringInstance Id - ID of the resource.
- force
Reboot Boolean - It has been deprecated from version 1.81.21. Please use
stop_type
instead. This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values areTRUE
andFALSE
. Default value: FALSE. - instance
Id String - Instance ID.
- stop
Type String - Shutdown type. Valid values:
SOFT
: soft shutdown;HARD
: hard shutdown;SOFT_FIRST
: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
- cvm
Reboot stringInstance Id - ID of the resource.
- force
Reboot boolean - It has been deprecated from version 1.81.21. Please use
stop_type
instead. This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values areTRUE
andFALSE
. Default value: FALSE. - instance
Id string - Instance ID.
- stop
Type string - Shutdown type. Valid values:
SOFT
: soft shutdown;HARD
: hard shutdown;SOFT_FIRST
: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
- cvm_
reboot_ strinstance_ id - ID of the resource.
- force_
reboot bool - It has been deprecated from version 1.81.21. Please use
stop_type
instead. This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values areTRUE
andFALSE
. Default value: FALSE. - instance_
id str - Instance ID.
- stop_
type str - Shutdown type. Valid values:
SOFT
: soft shutdown;HARD
: hard shutdown;SOFT_FIRST
: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
- cvm
Reboot StringInstance Id - ID of the resource.
- force
Reboot Boolean - It has been deprecated from version 1.81.21. Please use
stop_type
instead. This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values areTRUE
andFALSE
. Default value: FALSE. - instance
Id String - Instance ID.
- stop
Type String - Shutdown type. Valid values:
SOFT
: soft shutdown;HARD
: hard shutdown;SOFT_FIRST
: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.