Restore the specified protected resource from its state at the given timestamp on the given cluster. This is only relevant if the entity is protected in a minutely schedule at the given timestamp.
Example 1: Restore Virtual Machine
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pierskarsenbarg/nutanix";
// create a category and a protection policy on the local site
// restore the protected virtual machine on the remote site
const rp_vm = new nutanix.RestoreProtectedResourceV2("rp-vm", {
extId: "d22529bb-f02d-4710-894b-d1de772d7832",
clusterExtId: "0005b6b1-1b16-4983-b5ff-204840f85e07",
});
import pulumi
import pulumi_nutanix as nutanix
# create a category and a protection policy on the local site
# restore the protected virtual machine on the remote site
rp_vm = nutanix.RestoreProtectedResourceV2("rp-vm",
ext_id="d22529bb-f02d-4710-894b-d1de772d7832",
cluster_ext_id="0005b6b1-1b16-4983-b5ff-204840f85e07")
package main
import (
"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// create a category and a protection policy on the local site
// restore the protected virtual machine on the remote site
_, err := nutanix.NewRestoreProtectedResourceV2(ctx, "rp-vm", &nutanix.RestoreProtectedResourceV2Args{
ExtId: pulumi.String("d22529bb-f02d-4710-894b-d1de772d7832"),
ClusterExtId: pulumi.String("0005b6b1-1b16-4983-b5ff-204840f85e07"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = PiersKarsenbarg.Nutanix;
return await Deployment.RunAsync(() =>
{
// create a category and a protection policy on the local site
// restore the protected virtual machine on the remote site
var rp_vm = new Nutanix.RestoreProtectedResourceV2("rp-vm", new()
{
ExtId = "d22529bb-f02d-4710-894b-d1de772d7832",
ClusterExtId = "0005b6b1-1b16-4983-b5ff-204840f85e07",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.RestoreProtectedResourceV2;
import com.pulumi.nutanix.RestoreProtectedResourceV2Args;
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 a category and a protection policy on the local site
// restore the protected virtual machine on the remote site
var rp_vm = new RestoreProtectedResourceV2("rp-vm", RestoreProtectedResourceV2Args.builder()
.extId("d22529bb-f02d-4710-894b-d1de772d7832")
.clusterExtId("0005b6b1-1b16-4983-b5ff-204840f85e07")
.build());
}
}
resources:
# create a category and a protection policy on the local site
# restore the protected virtual machine on the remote site
rp-vm:
type: nutanix:RestoreProtectedResourceV2
properties:
extId: d22529bb-f02d-4710-894b-d1de772d7832
clusterExtId: 0005b6b1-1b16-4983-b5ff-204840f85e07
Example 2: Restore Volume Group
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pierskarsenbarg/nutanix";
// create a category , a protection policy and VG on the local site
// restore the protected volume group on the remote site
const rp_vg = new nutanix.RestoreProtectedResourceV2("rp-vg", {
extId: "246c651a-1b16-4983-b5ff-204840f85e07",
clusterExtId: "0005b6b1-1b16-4983-b5ff-204840f85e07",
});
import pulumi
import pulumi_nutanix as nutanix
# create a category , a protection policy and VG on the local site
# restore the protected volume group on the remote site
rp_vg = nutanix.RestoreProtectedResourceV2("rp-vg",
ext_id="246c651a-1b16-4983-b5ff-204840f85e07",
cluster_ext_id="0005b6b1-1b16-4983-b5ff-204840f85e07")
package main
import (
"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// create a category , a protection policy and VG on the local site
// restore the protected volume group on the remote site
_, err := nutanix.NewRestoreProtectedResourceV2(ctx, "rp-vg", &nutanix.RestoreProtectedResourceV2Args{
ExtId: pulumi.String("246c651a-1b16-4983-b5ff-204840f85e07"),
ClusterExtId: pulumi.String("0005b6b1-1b16-4983-b5ff-204840f85e07"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = PiersKarsenbarg.Nutanix;
return await Deployment.RunAsync(() =>
{
// create a category , a protection policy and VG on the local site
// restore the protected volume group on the remote site
var rp_vg = new Nutanix.RestoreProtectedResourceV2("rp-vg", new()
{
ExtId = "246c651a-1b16-4983-b5ff-204840f85e07",
ClusterExtId = "0005b6b1-1b16-4983-b5ff-204840f85e07",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.RestoreProtectedResourceV2;
import com.pulumi.nutanix.RestoreProtectedResourceV2Args;
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 a category , a protection policy and VG on the local site
// restore the protected volume group on the remote site
var rp_vg = new RestoreProtectedResourceV2("rp-vg", RestoreProtectedResourceV2Args.builder()
.extId("246c651a-1b16-4983-b5ff-204840f85e07")
.clusterExtId("0005b6b1-1b16-4983-b5ff-204840f85e07")
.build());
}
}
resources:
# create a category , a protection policy and VG on the local site
# restore the protected volume group on the remote site
rp-vg:
type: nutanix:RestoreProtectedResourceV2
properties:
extId: 246c651a-1b16-4983-b5ff-204840f85e07
clusterExtId: 0005b6b1-1b16-4983-b5ff-204840f85e07
Create RestoreProtectedResourceV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RestoreProtectedResourceV2(name: string, args: RestoreProtectedResourceV2Args, opts?: CustomResourceOptions);@overload
def RestoreProtectedResourceV2(resource_name: str,
args: RestoreProtectedResourceV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def RestoreProtectedResourceV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_ext_id: Optional[str] = None,
ext_id: Optional[str] = None,
restore_time: Optional[str] = None)func NewRestoreProtectedResourceV2(ctx *Context, name string, args RestoreProtectedResourceV2Args, opts ...ResourceOption) (*RestoreProtectedResourceV2, error)public RestoreProtectedResourceV2(string name, RestoreProtectedResourceV2Args args, CustomResourceOptions? opts = null)
public RestoreProtectedResourceV2(String name, RestoreProtectedResourceV2Args args)
public RestoreProtectedResourceV2(String name, RestoreProtectedResourceV2Args args, CustomResourceOptions options)
type: nutanix:RestoreProtectedResourceV2
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 RestoreProtectedResourceV2Args
- 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 RestoreProtectedResourceV2Args
- 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 RestoreProtectedResourceV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RestoreProtectedResourceV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RestoreProtectedResourceV2Args
- 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 restoreProtectedResourceV2Resource = new Nutanix.RestoreProtectedResourceV2("restoreProtectedResourceV2Resource", new()
{
ClusterExtId = "string",
ExtId = "string",
RestoreTime = "string",
});
example, err := nutanix.NewRestoreProtectedResourceV2(ctx, "restoreProtectedResourceV2Resource", &nutanix.RestoreProtectedResourceV2Args{
ClusterExtId: pulumi.String("string"),
ExtId: pulumi.String("string"),
RestoreTime: pulumi.String("string"),
})
var restoreProtectedResourceV2Resource = new RestoreProtectedResourceV2("restoreProtectedResourceV2Resource", RestoreProtectedResourceV2Args.builder()
.clusterExtId("string")
.extId("string")
.restoreTime("string")
.build());
restore_protected_resource_v2_resource = nutanix.RestoreProtectedResourceV2("restoreProtectedResourceV2Resource",
cluster_ext_id="string",
ext_id="string",
restore_time="string")
const restoreProtectedResourceV2Resource = new nutanix.RestoreProtectedResourceV2("restoreProtectedResourceV2Resource", {
clusterExtId: "string",
extId: "string",
restoreTime: "string",
});
type: nutanix:RestoreProtectedResourceV2
properties:
clusterExtId: string
extId: string
restoreTime: string
RestoreProtectedResourceV2 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 RestoreProtectedResourceV2 resource accepts the following input properties:
- Cluster
Ext stringId - -(Required) The external identifier of the cluster on which the entity has valid restorable time ranges. The restored entity will be created on the same cluster.
- Ext
Id string - -(Required) The external identifier of a protected VM or volume group that can be used to retrieve the protected resource.
- Restore
Time string -(Optional) UTC date and time in ISO 8601 format representing the time from when the state of the entity should be restored. This needs to be a valid time within the restorable time range(s) for the protected resource.
See detailed information in Nutanix Restore Protected Resource v4.
- Cluster
Ext stringId - -(Required) The external identifier of the cluster on which the entity has valid restorable time ranges. The restored entity will be created on the same cluster.
- Ext
Id string - -(Required) The external identifier of a protected VM or volume group that can be used to retrieve the protected resource.
- Restore
Time string -(Optional) UTC date and time in ISO 8601 format representing the time from when the state of the entity should be restored. This needs to be a valid time within the restorable time range(s) for the protected resource.
See detailed information in Nutanix Restore Protected Resource v4.
- cluster
Ext StringId - -(Required) The external identifier of the cluster on which the entity has valid restorable time ranges. The restored entity will be created on the same cluster.
- ext
Id String - -(Required) The external identifier of a protected VM or volume group that can be used to retrieve the protected resource.
- restore
Time String -(Optional) UTC date and time in ISO 8601 format representing the time from when the state of the entity should be restored. This needs to be a valid time within the restorable time range(s) for the protected resource.
See detailed information in Nutanix Restore Protected Resource v4.
- cluster
Ext stringId - -(Required) The external identifier of the cluster on which the entity has valid restorable time ranges. The restored entity will be created on the same cluster.
- ext
Id string - -(Required) The external identifier of a protected VM or volume group that can be used to retrieve the protected resource.
- restore
Time string -(Optional) UTC date and time in ISO 8601 format representing the time from when the state of the entity should be restored. This needs to be a valid time within the restorable time range(s) for the protected resource.
See detailed information in Nutanix Restore Protected Resource v4.
- cluster_
ext_ strid - -(Required) The external identifier of the cluster on which the entity has valid restorable time ranges. The restored entity will be created on the same cluster.
- ext_
id str - -(Required) The external identifier of a protected VM or volume group that can be used to retrieve the protected resource.
- restore_
time str -(Optional) UTC date and time in ISO 8601 format representing the time from when the state of the entity should be restored. This needs to be a valid time within the restorable time range(s) for the protected resource.
See detailed information in Nutanix Restore Protected Resource v4.
- cluster
Ext StringId - -(Required) The external identifier of the cluster on which the entity has valid restorable time ranges. The restored entity will be created on the same cluster.
- ext
Id String - -(Required) The external identifier of a protected VM or volume group that can be used to retrieve the protected resource.
- restore
Time String -(Optional) UTC date and time in ISO 8601 format representing the time from when the state of the entity should be restored. This needs to be a valid time within the restorable time range(s) for the protected resource.
See detailed information in Nutanix Restore Protected Resource v4.
Outputs
All input properties are implicitly available as output properties. Additionally, the RestoreProtectedResourceV2 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 RestoreProtectedResourceV2 Resource
Get an existing RestoreProtectedResourceV2 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?: RestoreProtectedResourceV2State, opts?: CustomResourceOptions): RestoreProtectedResourceV2@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_ext_id: Optional[str] = None,
ext_id: Optional[str] = None,
restore_time: Optional[str] = None) -> RestoreProtectedResourceV2func GetRestoreProtectedResourceV2(ctx *Context, name string, id IDInput, state *RestoreProtectedResourceV2State, opts ...ResourceOption) (*RestoreProtectedResourceV2, error)public static RestoreProtectedResourceV2 Get(string name, Input<string> id, RestoreProtectedResourceV2State? state, CustomResourceOptions? opts = null)public static RestoreProtectedResourceV2 get(String name, Output<String> id, RestoreProtectedResourceV2State state, CustomResourceOptions options)resources: _: type: nutanix:RestoreProtectedResourceV2 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.
- Cluster
Ext stringId - -(Required) The external identifier of the cluster on which the entity has valid restorable time ranges. The restored entity will be created on the same cluster.
- Ext
Id string - -(Required) The external identifier of a protected VM or volume group that can be used to retrieve the protected resource.
- Restore
Time string -(Optional) UTC date and time in ISO 8601 format representing the time from when the state of the entity should be restored. This needs to be a valid time within the restorable time range(s) for the protected resource.
See detailed information in Nutanix Restore Protected Resource v4.
- Cluster
Ext stringId - -(Required) The external identifier of the cluster on which the entity has valid restorable time ranges. The restored entity will be created on the same cluster.
- Ext
Id string - -(Required) The external identifier of a protected VM or volume group that can be used to retrieve the protected resource.
- Restore
Time string -(Optional) UTC date and time in ISO 8601 format representing the time from when the state of the entity should be restored. This needs to be a valid time within the restorable time range(s) for the protected resource.
See detailed information in Nutanix Restore Protected Resource v4.
- cluster
Ext StringId - -(Required) The external identifier of the cluster on which the entity has valid restorable time ranges. The restored entity will be created on the same cluster.
- ext
Id String - -(Required) The external identifier of a protected VM or volume group that can be used to retrieve the protected resource.
- restore
Time String -(Optional) UTC date and time in ISO 8601 format representing the time from when the state of the entity should be restored. This needs to be a valid time within the restorable time range(s) for the protected resource.
See detailed information in Nutanix Restore Protected Resource v4.
- cluster
Ext stringId - -(Required) The external identifier of the cluster on which the entity has valid restorable time ranges. The restored entity will be created on the same cluster.
- ext
Id string - -(Required) The external identifier of a protected VM or volume group that can be used to retrieve the protected resource.
- restore
Time string -(Optional) UTC date and time in ISO 8601 format representing the time from when the state of the entity should be restored. This needs to be a valid time within the restorable time range(s) for the protected resource.
See detailed information in Nutanix Restore Protected Resource v4.
- cluster_
ext_ strid - -(Required) The external identifier of the cluster on which the entity has valid restorable time ranges. The restored entity will be created on the same cluster.
- ext_
id str - -(Required) The external identifier of a protected VM or volume group that can be used to retrieve the protected resource.
- restore_
time str -(Optional) UTC date and time in ISO 8601 format representing the time from when the state of the entity should be restored. This needs to be a valid time within the restorable time range(s) for the protected resource.
See detailed information in Nutanix Restore Protected Resource v4.
- cluster
Ext StringId - -(Required) The external identifier of the cluster on which the entity has valid restorable time ranges. The restored entity will be created on the same cluster.
- ext
Id String - -(Required) The external identifier of a protected VM or volume group that can be used to retrieve the protected resource.
- restore
Time String -(Optional) UTC date and time in ISO 8601 format representing the time from when the state of the entity should be restored. This needs to be a valid time within the restorable time range(s) for the protected resource.
See detailed information in Nutanix Restore Protected Resource v4.
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nutanixTerraform Provider.
