nutanix.SelfServiceAppRestore
Explore with Pulumi AI
Run restore action in application to restore from recovery point.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pierskarsenbarg/nutanix";
import * as nutanix from "@pulumi/nutanix";
const testSelfServiceAppRecoveryPoint = new nutanix.SelfServiceAppRecoveryPoint("testSelfServiceAppRecoveryPoint", {
appName: "NAME OF APPLICATION",
actionName: "SNAPSHOT ACTION NAME",
recoveryPointName: "RECOVERY POINT NAME",
});
const snapshots = nutanix.getSelfServiceAppSnapshots({
appName: "NAME OF APPLICATION",
length: 250,
offset: 0,
});
const snapshotUuid = snapshots.then(snapshots => .filter(snapshot => snapshot.name == "SNAPSHOT ACTION NAME").map(snapshot => (snapshot.uuid))[0]);
// Restore from recovery point
const testSelfServiceAppRestore = new nutanix.SelfServiceAppRestore("testSelfServiceAppRestore", {
restoreActionName: "RESTORE ACTION NAME",
appName: "NAME OF APPLICATION",
snapshotUuid: snapshotUuid,
});
import pulumi
import pulumi_nutanix as nutanix
test_self_service_app_recovery_point = nutanix.SelfServiceAppRecoveryPoint("testSelfServiceAppRecoveryPoint",
app_name="NAME OF APPLICATION",
action_name="SNAPSHOT ACTION NAME",
recovery_point_name="RECOVERY POINT NAME")
snapshots = nutanix.get_self_service_app_snapshots(app_name="NAME OF APPLICATION",
length=250,
offset=0)
snapshot_uuid = [snapshot.uuid for snapshot in snapshots.entities if snapshot.name == "SNAPSHOT ACTION NAME"][0]
# Restore from recovery point
test_self_service_app_restore = nutanix.SelfServiceAppRestore("testSelfServiceAppRestore",
restore_action_name="RESTORE ACTION NAME",
app_name="NAME OF APPLICATION",
snapshot_uuid=snapshot_uuid)
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 {
_, err := nutanix.NewSelfServiceAppRecoveryPoint(ctx, "testSelfServiceAppRecoveryPoint", &nutanix.SelfServiceAppRecoveryPointArgs{
AppName: pulumi.String("NAME OF APPLICATION"),
ActionName: pulumi.String("SNAPSHOT ACTION NAME"),
RecoveryPointName: pulumi.String("RECOVERY POINT NAME"),
})
if err != nil {
return err
}
snapshots, err := nutanix.GetSelfServiceAppSnapshots(ctx, &nutanix.GetSelfServiceAppSnapshotsArgs{
AppName: pulumi.StringRef("NAME OF APPLICATION"),
Length: 250,
Offset: 0,
}, nil)
if err != nil {
return err
}
snapshotUuid := "TODO: For expression"[0]
// Restore from recovery point
_, err = nutanix.NewSelfServiceAppRestore(ctx, "testSelfServiceAppRestore", &nutanix.SelfServiceAppRestoreArgs{
RestoreActionName: pulumi.String("RESTORE ACTION NAME"),
AppName: pulumi.String("NAME OF APPLICATION"),
SnapshotUuid: pulumi.String(snapshotUuid),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = PiersKarsenbarg.Nutanix;
using Nutanix = Pulumi.Nutanix;
return await Deployment.RunAsync(() =>
{
var testSelfServiceAppRecoveryPoint = new Nutanix.SelfServiceAppRecoveryPoint("testSelfServiceAppRecoveryPoint", new()
{
AppName = "NAME OF APPLICATION",
ActionName = "SNAPSHOT ACTION NAME",
RecoveryPointName = "RECOVERY POINT NAME",
});
var snapshots = Nutanix.GetSelfServiceAppSnapshots.Invoke(new()
{
AppName = "NAME OF APPLICATION",
Length = 250,
Offset = 0,
});
var snapshotUuid = .Where(snapshot => snapshot.Name == "SNAPSHOT ACTION NAME").Select(snapshot =>
{
return snapshot.Uuid;
}).ToList()[0];
// Restore from recovery point
var testSelfServiceAppRestore = new Nutanix.SelfServiceAppRestore("testSelfServiceAppRestore", new()
{
RestoreActionName = "RESTORE ACTION NAME",
AppName = "NAME OF APPLICATION",
SnapshotUuid = snapshotUuid,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.SelfServiceAppRecoveryPoint;
import com.pulumi.nutanix.SelfServiceAppRecoveryPointArgs;
import com.pulumi.nutanix.NutanixFunctions;
import com.pulumi.nutanix.inputs.GetSelfServiceAppSnapshotsArgs;
import com.pulumi.nutanix.SelfServiceAppRestore;
import com.pulumi.nutanix.SelfServiceAppRestoreArgs;
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 testSelfServiceAppRecoveryPoint = new SelfServiceAppRecoveryPoint("testSelfServiceAppRecoveryPoint", SelfServiceAppRecoveryPointArgs.builder()
.appName("NAME OF APPLICATION")
.actionName("SNAPSHOT ACTION NAME")
.recoveryPointName("RECOVERY POINT NAME")
.build());
final var snapshots = NutanixFunctions.getSelfServiceAppSnapshots(GetSelfServiceAppSnapshotsArgs.builder()
.appName("NAME OF APPLICATION")
.length(250)
.offset(0)
.build());
final var snapshotUuid = "TODO: ForExpression"[0];
// Restore from recovery point
var testSelfServiceAppRestore = new SelfServiceAppRestore("testSelfServiceAppRestore", SelfServiceAppRestoreArgs.builder()
.restoreActionName("RESTORE ACTION NAME")
.appName("NAME OF APPLICATION")
.snapshotUuid(snapshotUuid)
.build());
}
}
Coming soon!
Create SelfServiceAppRestore Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SelfServiceAppRestore(name: string, args: SelfServiceAppRestoreArgs, opts?: CustomResourceOptions);
@overload
def SelfServiceAppRestore(resource_name: str,
args: SelfServiceAppRestoreArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SelfServiceAppRestore(resource_name: str,
opts: Optional[ResourceOptions] = None,
restore_action_name: Optional[str] = None,
snapshot_uuid: Optional[str] = None,
app_name: Optional[str] = None,
app_uuid: Optional[str] = None)
func NewSelfServiceAppRestore(ctx *Context, name string, args SelfServiceAppRestoreArgs, opts ...ResourceOption) (*SelfServiceAppRestore, error)
public SelfServiceAppRestore(string name, SelfServiceAppRestoreArgs args, CustomResourceOptions? opts = null)
public SelfServiceAppRestore(String name, SelfServiceAppRestoreArgs args)
public SelfServiceAppRestore(String name, SelfServiceAppRestoreArgs args, CustomResourceOptions options)
type: nutanix:SelfServiceAppRestore
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 SelfServiceAppRestoreArgs
- 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 SelfServiceAppRestoreArgs
- 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 SelfServiceAppRestoreArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SelfServiceAppRestoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SelfServiceAppRestoreArgs
- 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 selfServiceAppRestoreResource = new Nutanix.SelfServiceAppRestore("selfServiceAppRestoreResource", new()
{
RestoreActionName = "string",
SnapshotUuid = "string",
AppName = "string",
AppUuid = "string",
});
example, err := nutanix.NewSelfServiceAppRestore(ctx, "selfServiceAppRestoreResource", &nutanix.SelfServiceAppRestoreArgs{
RestoreActionName: pulumi.String("string"),
SnapshotUuid: pulumi.String("string"),
AppName: pulumi.String("string"),
AppUuid: pulumi.String("string"),
})
var selfServiceAppRestoreResource = new SelfServiceAppRestore("selfServiceAppRestoreResource", SelfServiceAppRestoreArgs.builder()
.restoreActionName("string")
.snapshotUuid("string")
.appName("string")
.appUuid("string")
.build());
self_service_app_restore_resource = nutanix.SelfServiceAppRestore("selfServiceAppRestoreResource",
restore_action_name="string",
snapshot_uuid="string",
app_name="string",
app_uuid="string")
const selfServiceAppRestoreResource = new nutanix.SelfServiceAppRestore("selfServiceAppRestoreResource", {
restoreActionName: "string",
snapshotUuid: "string",
appName: "string",
appUuid: "string",
});
type: nutanix:SelfServiceAppRestore
properties:
appName: string
appUuid: string
restoreActionName: string
snapshotUuid: string
SelfServiceAppRestore 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 SelfServiceAppRestore resource accepts the following input properties:
- Restore
Action stringName - (Required) The name of the restore action to be performed.
- Snapshot
Uuid string - (Required) The UUID of the snapshot to which the application will be restored.
Both (
app_name
andapp_uuid
) are optional but atleast one of them should be provided for resource to work.- App
Name string - (Optional) The name of the application
- App
Uuid string - (Optional) The UUID of the application.
- Restore
Action stringName - (Required) The name of the restore action to be performed.
- Snapshot
Uuid string - (Required) The UUID of the snapshot to which the application will be restored.
Both (
app_name
andapp_uuid
) are optional but atleast one of them should be provided for resource to work.- App
Name string - (Optional) The name of the application
- App
Uuid string - (Optional) The UUID of the application.
- restore
Action StringName - (Required) The name of the restore action to be performed.
- snapshot
Uuid String - (Required) The UUID of the snapshot to which the application will be restored.
Both (
app_name
andapp_uuid
) are optional but atleast one of them should be provided for resource to work.- app
Name String - (Optional) The name of the application
- app
Uuid String - (Optional) The UUID of the application.
- restore
Action stringName - (Required) The name of the restore action to be performed.
- snapshot
Uuid string - (Required) The UUID of the snapshot to which the application will be restored.
Both (
app_name
andapp_uuid
) are optional but atleast one of them should be provided for resource to work.- app
Name string - (Optional) The name of the application
- app
Uuid string - (Optional) The UUID of the application.
- restore_
action_ strname - (Required) The name of the restore action to be performed.
- snapshot_
uuid str - (Required) The UUID of the snapshot to which the application will be restored.
Both (
app_name
andapp_uuid
) are optional but atleast one of them should be provided for resource to work.- app_
name str - (Optional) The name of the application
- app_
uuid str - (Optional) The UUID of the application.
- restore
Action StringName - (Required) The name of the restore action to be performed.
- snapshot
Uuid String - (Required) The UUID of the snapshot to which the application will be restored.
Both (
app_name
andapp_uuid
) are optional but atleast one of them should be provided for resource to work.- app
Name String - (Optional) The name of the application
- app
Uuid String - (Optional) The UUID of the application.
Outputs
All input properties are implicitly available as output properties. Additionally, the SelfServiceAppRestore resource produces the following output properties:
Look up Existing SelfServiceAppRestore Resource
Get an existing SelfServiceAppRestore 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?: SelfServiceAppRestoreState, opts?: CustomResourceOptions): SelfServiceAppRestore
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app_name: Optional[str] = None,
app_uuid: Optional[str] = None,
restore_action_name: Optional[str] = None,
snapshot_uuid: Optional[str] = None,
state: Optional[str] = None) -> SelfServiceAppRestore
func GetSelfServiceAppRestore(ctx *Context, name string, id IDInput, state *SelfServiceAppRestoreState, opts ...ResourceOption) (*SelfServiceAppRestore, error)
public static SelfServiceAppRestore Get(string name, Input<string> id, SelfServiceAppRestoreState? state, CustomResourceOptions? opts = null)
public static SelfServiceAppRestore get(String name, Output<String> id, SelfServiceAppRestoreState state, CustomResourceOptions options)
resources: _: type: nutanix:SelfServiceAppRestore 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.
- App
Name string - (Optional) The name of the application
- App
Uuid string - (Optional) The UUID of the application.
- Restore
Action stringName - (Required) The name of the restore action to be performed.
- Snapshot
Uuid string - (Required) The UUID of the snapshot to which the application will be restored.
Both (
app_name
andapp_uuid
) are optional but atleast one of them should be provided for resource to work.- State string
- (Computed) This will be set after the restore action has been processed.
- App
Name string - (Optional) The name of the application
- App
Uuid string - (Optional) The UUID of the application.
- Restore
Action stringName - (Required) The name of the restore action to be performed.
- Snapshot
Uuid string - (Required) The UUID of the snapshot to which the application will be restored.
Both (
app_name
andapp_uuid
) are optional but atleast one of them should be provided for resource to work.- State string
- (Computed) This will be set after the restore action has been processed.
- app
Name String - (Optional) The name of the application
- app
Uuid String - (Optional) The UUID of the application.
- restore
Action StringName - (Required) The name of the restore action to be performed.
- snapshot
Uuid String - (Required) The UUID of the snapshot to which the application will be restored.
Both (
app_name
andapp_uuid
) are optional but atleast one of them should be provided for resource to work.- state String
- (Computed) This will be set after the restore action has been processed.
- app
Name string - (Optional) The name of the application
- app
Uuid string - (Optional) The UUID of the application.
- restore
Action stringName - (Required) The name of the restore action to be performed.
- snapshot
Uuid string - (Required) The UUID of the snapshot to which the application will be restored.
Both (
app_name
andapp_uuid
) are optional but atleast one of them should be provided for resource to work.- state string
- (Computed) This will be set after the restore action has been processed.
- app_
name str - (Optional) The name of the application
- app_
uuid str - (Optional) The UUID of the application.
- restore_
action_ strname - (Required) The name of the restore action to be performed.
- snapshot_
uuid str - (Required) The UUID of the snapshot to which the application will be restored.
Both (
app_name
andapp_uuid
) are optional but atleast one of them should be provided for resource to work.- state str
- (Computed) This will be set after the restore action has been processed.
- app
Name String - (Optional) The name of the application
- app
Uuid String - (Optional) The UUID of the application.
- restore
Action StringName - (Required) The name of the restore action to be performed.
- snapshot
Uuid String - (Required) The UUID of the snapshot to which the application will be restored.
Both (
app_name
andapp_uuid
) are optional but atleast one of them should be provided for resource to work.- state String
- (Computed) This will be set after the restore action has been processed.
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nutanix
Terraform Provider.