powerscale.SnapshotRestore
Explore with Pulumi AI
This resource is used to restore the data from the snapshot of PowerScale Array. The restore is done using copy/clone/snaprevert job. We can Create, Update and Delete using this resource.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.powerscale.SnapshotRestore;
import com.pulumi.powerscale.SnapshotRestoreArgs;
import com.pulumi.powerscale.inputs.SnapshotRestoreCloneParamsArgs;
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) {
// Restore snapshot using clone operation
var test = new SnapshotRestore("test", SnapshotRestoreArgs.builder()
.cloneParams(SnapshotRestoreCloneParamsArgs.builder()
.destination("Path of the destination")
.snapshot_id("Snapshot ID")
.source("Path of the snapshot to copy")
.build())
.build());
}
}
resources:
# Restore snapshot using clone operation
test:
type: powerscale:SnapshotRestore
properties:
cloneParams:
destination: Path of the destination
snapshot_id: Snapshot ID
source: Path of the snapshot to copy
Create SnapshotRestore Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SnapshotRestore(name: string, args?: SnapshotRestoreArgs, opts?: CustomResourceOptions);
@overload
def SnapshotRestore(resource_name: str,
args: Optional[SnapshotRestoreArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def SnapshotRestore(resource_name: str,
opts: Optional[ResourceOptions] = None,
clone_params: Optional[SnapshotRestoreCloneParamsArgs] = None,
copy_params: Optional[SnapshotRestoreCopyParamsArgs] = None,
snaprevert_params: Optional[SnapshotRestoreSnaprevertParamsArgs] = None)
func NewSnapshotRestore(ctx *Context, name string, args *SnapshotRestoreArgs, opts ...ResourceOption) (*SnapshotRestore, error)
public SnapshotRestore(string name, SnapshotRestoreArgs? args = null, CustomResourceOptions? opts = null)
public SnapshotRestore(String name, SnapshotRestoreArgs args)
public SnapshotRestore(String name, SnapshotRestoreArgs args, CustomResourceOptions options)
type: powerscale:SnapshotRestore
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 SnapshotRestoreArgs
- 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 SnapshotRestoreArgs
- 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 SnapshotRestoreArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnapshotRestoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SnapshotRestoreArgs
- 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 snapshotRestoreResource = new Powerscale.SnapshotRestore("snapshotRestoreResource", new()
{
CloneParams = new Powerscale.Inputs.SnapshotRestoreCloneParamsArgs
{
Destination = "string",
SnapshotId = 0,
Source = "string",
Overwrite = false,
},
CopyParams = new Powerscale.Inputs.SnapshotRestoreCopyParamsArgs
{
Directory = new Powerscale.Inputs.SnapshotRestoreCopyParamsDirectoryArgs
{
Destination = "string",
Source = "string",
Continue = false,
Merge = false,
Overwrite = false,
},
File = new Powerscale.Inputs.SnapshotRestoreCopyParamsFileArgs
{
Destination = "string",
Source = "string",
Overwrite = false,
},
},
SnaprevertParams = new Powerscale.Inputs.SnapshotRestoreSnaprevertParamsArgs
{
SnapshotId = 0,
AllowDup = false,
JobId = 0,
},
});
example, err := powerscale.NewSnapshotRestore(ctx, "snapshotRestoreResource", &powerscale.SnapshotRestoreArgs{
CloneParams: &powerscale.SnapshotRestoreCloneParamsArgs{
Destination: pulumi.String("string"),
SnapshotId: pulumi.Float64(0),
Source: pulumi.String("string"),
Overwrite: pulumi.Bool(false),
},
CopyParams: &powerscale.SnapshotRestoreCopyParamsArgs{
Directory: &powerscale.SnapshotRestoreCopyParamsDirectoryArgs{
Destination: pulumi.String("string"),
Source: pulumi.String("string"),
Continue: pulumi.Bool(false),
Merge: pulumi.Bool(false),
Overwrite: pulumi.Bool(false),
},
File: &powerscale.SnapshotRestoreCopyParamsFileArgs{
Destination: pulumi.String("string"),
Source: pulumi.String("string"),
Overwrite: pulumi.Bool(false),
},
},
SnaprevertParams: &powerscale.SnapshotRestoreSnaprevertParamsArgs{
SnapshotId: pulumi.Float64(0),
AllowDup: pulumi.Bool(false),
JobId: pulumi.Float64(0),
},
})
var snapshotRestoreResource = new SnapshotRestore("snapshotRestoreResource", SnapshotRestoreArgs.builder()
.cloneParams(SnapshotRestoreCloneParamsArgs.builder()
.destination("string")
.snapshotId(0)
.source("string")
.overwrite(false)
.build())
.copyParams(SnapshotRestoreCopyParamsArgs.builder()
.directory(SnapshotRestoreCopyParamsDirectoryArgs.builder()
.destination("string")
.source("string")
.continue_(false)
.merge(false)
.overwrite(false)
.build())
.file(SnapshotRestoreCopyParamsFileArgs.builder()
.destination("string")
.source("string")
.overwrite(false)
.build())
.build())
.snaprevertParams(SnapshotRestoreSnaprevertParamsArgs.builder()
.snapshotId(0)
.allowDup(false)
.jobId(0)
.build())
.build());
snapshot_restore_resource = powerscale.SnapshotRestore("snapshotRestoreResource",
clone_params={
"destination": "string",
"snapshot_id": 0,
"source": "string",
"overwrite": False,
},
copy_params={
"directory": {
"destination": "string",
"source": "string",
"continue_": False,
"merge": False,
"overwrite": False,
},
"file": {
"destination": "string",
"source": "string",
"overwrite": False,
},
},
snaprevert_params={
"snapshot_id": 0,
"allow_dup": False,
"job_id": 0,
})
const snapshotRestoreResource = new powerscale.SnapshotRestore("snapshotRestoreResource", {
cloneParams: {
destination: "string",
snapshotId: 0,
source: "string",
overwrite: false,
},
copyParams: {
directory: {
destination: "string",
source: "string",
"continue": false,
merge: false,
overwrite: false,
},
file: {
destination: "string",
source: "string",
overwrite: false,
},
},
snaprevertParams: {
snapshotId: 0,
allowDup: false,
jobId: 0,
},
});
type: powerscale:SnapshotRestore
properties:
cloneParams:
destination: string
overwrite: false
snapshotId: 0
source: string
copyParams:
directory:
continue: false
destination: string
merge: false
overwrite: false
source: string
file:
destination: string
overwrite: false
source: string
snaprevertParams:
allowDup: false
jobId: 0
snapshotId: 0
SnapshotRestore 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 SnapshotRestore resource accepts the following input properties:
- Clone
Params SnapshotRestore Clone Params - Specifies properties for a clone operation.
- Copy
Params SnapshotRestore Copy Params - Specifies properties for a copy operation.
- Snaprevert
Params SnapshotRestore Snaprevert Params - Specifies properties for a snapshot revert job.
- Clone
Params SnapshotRestore Clone Params Args - Specifies properties for a clone operation.
- Copy
Params SnapshotRestore Copy Params Args - Specifies properties for a copy operation.
- Snaprevert
Params SnapshotRestore Snaprevert Params Args - Specifies properties for a snapshot revert job.
- clone
Params SnapshotRestore Clone Params - Specifies properties for a clone operation.
- copy
Params SnapshotRestore Copy Params - Specifies properties for a copy operation.
- snaprevert
Params SnapshotRestore Snaprevert Params - Specifies properties for a snapshot revert job.
- clone
Params SnapshotRestore Clone Params - Specifies properties for a clone operation.
- copy
Params SnapshotRestore Copy Params - Specifies properties for a copy operation.
- snaprevert
Params SnapshotRestore Snaprevert Params - Specifies properties for a snapshot revert job.
- clone_
params SnapshotRestore Clone Params Args - Specifies properties for a clone operation.
- copy_
params SnapshotRestore Copy Params Args - Specifies properties for a copy operation.
- snaprevert_
params SnapshotRestore Snaprevert Params Args - Specifies properties for a snapshot revert job.
- clone
Params Property Map - Specifies properties for a clone operation.
- copy
Params Property Map - Specifies properties for a copy operation.
- snaprevert
Params Property Map - Specifies properties for a snapshot revert job.
Outputs
All input properties are implicitly available as output properties. Additionally, the SnapshotRestore 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 SnapshotRestore Resource
Get an existing SnapshotRestore 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?: SnapshotRestoreState, opts?: CustomResourceOptions): SnapshotRestore
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
clone_params: Optional[SnapshotRestoreCloneParamsArgs] = None,
copy_params: Optional[SnapshotRestoreCopyParamsArgs] = None,
snaprevert_params: Optional[SnapshotRestoreSnaprevertParamsArgs] = None) -> SnapshotRestore
func GetSnapshotRestore(ctx *Context, name string, id IDInput, state *SnapshotRestoreState, opts ...ResourceOption) (*SnapshotRestore, error)
public static SnapshotRestore Get(string name, Input<string> id, SnapshotRestoreState? state, CustomResourceOptions? opts = null)
public static SnapshotRestore get(String name, Output<String> id, SnapshotRestoreState state, CustomResourceOptions options)
resources: _: type: powerscale:SnapshotRestore 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.
- Clone
Params SnapshotRestore Clone Params - Specifies properties for a clone operation.
- Copy
Params SnapshotRestore Copy Params - Specifies properties for a copy operation.
- Snaprevert
Params SnapshotRestore Snaprevert Params - Specifies properties for a snapshot revert job.
- Clone
Params SnapshotRestore Clone Params Args - Specifies properties for a clone operation.
- Copy
Params SnapshotRestore Copy Params Args - Specifies properties for a copy operation.
- Snaprevert
Params SnapshotRestore Snaprevert Params Args - Specifies properties for a snapshot revert job.
- clone
Params SnapshotRestore Clone Params - Specifies properties for a clone operation.
- copy
Params SnapshotRestore Copy Params - Specifies properties for a copy operation.
- snaprevert
Params SnapshotRestore Snaprevert Params - Specifies properties for a snapshot revert job.
- clone
Params SnapshotRestore Clone Params - Specifies properties for a clone operation.
- copy
Params SnapshotRestore Copy Params - Specifies properties for a copy operation.
- snaprevert
Params SnapshotRestore Snaprevert Params - Specifies properties for a snapshot revert job.
- clone_
params SnapshotRestore Clone Params Args - Specifies properties for a clone operation.
- copy_
params SnapshotRestore Copy Params Args - Specifies properties for a copy operation.
- snaprevert_
params SnapshotRestore Snaprevert Params Args - Specifies properties for a snapshot revert job.
- clone
Params Property Map - Specifies properties for a clone operation.
- copy
Params Property Map - Specifies properties for a copy operation.
- snaprevert
Params Property Map - Specifies properties for a snapshot revert job.
Supporting Types
SnapshotRestoreCloneParams, SnapshotRestoreCloneParamsArgs
- Destination string
- Destination of the snapshot, e.g. ifs/dest/test.txt .
- Snapshot
Id double - Snapshot ID.
- Source string
- Source of the snapshot.
- Overwrite bool
- Whether or not to overwrite the destination if it already exists.
- Destination string
- Destination of the snapshot, e.g. ifs/dest/test.txt .
- Snapshot
Id float64 - Snapshot ID.
- Source string
- Source of the snapshot.
- Overwrite bool
- Whether or not to overwrite the destination if it already exists.
- destination String
- Destination of the snapshot, e.g. ifs/dest/test.txt .
- snapshot
Id Double - Snapshot ID.
- source String
- Source of the snapshot.
- overwrite Boolean
- Whether or not to overwrite the destination if it already exists.
- destination string
- Destination of the snapshot, e.g. ifs/dest/test.txt .
- snapshot
Id number - Snapshot ID.
- source string
- Source of the snapshot.
- overwrite boolean
- Whether or not to overwrite the destination if it already exists.
- destination str
- Destination of the snapshot, e.g. ifs/dest/test.txt .
- snapshot_
id float - Snapshot ID.
- source str
- Source of the snapshot.
- overwrite bool
- Whether or not to overwrite the destination if it already exists.
- destination String
- Destination of the snapshot, e.g. ifs/dest/test.txt .
- snapshot
Id Number - Snapshot ID.
- source String
- Source of the snapshot.
- overwrite Boolean
- Whether or not to overwrite the destination if it already exists.
SnapshotRestoreCopyParams, SnapshotRestoreCopyParamsArgs
- Directory
Snapshot
Restore Copy Params Directory - Specifies properties for copying directory.
- File
Snapshot
Restore Copy Params File - Specifies properties for copying file.
- Directory
Snapshot
Restore Copy Params Directory - Specifies properties for copying directory.
- File
Snapshot
Restore Copy Params File - Specifies properties for copying file.
- directory
Snapshot
Restore Copy Params Directory - Specifies properties for copying directory.
- file
Snapshot
Restore Copy Params File - Specifies properties for copying file.
- directory
Snapshot
Restore Copy Params Directory - Specifies properties for copying directory.
- file
Snapshot
Restore Copy Params File - Specifies properties for copying file.
- directory
Snapshot
Restore Copy Params Directory - Specifies properties for copying directory.
- file
Snapshot
Restore Copy Params File - Specifies properties for copying file.
- directory Property Map
- Specifies properties for copying directory.
- file Property Map
- Specifies properties for copying file.
SnapshotRestoreCopyParamsDirectory, SnapshotRestoreCopyParamsDirectoryArgs
- Destination string
- Destination of the snapshot, e.g. ifs/dest.
- Source string
- Source of the snapshot.
- Continue bool
- Whether or not to continue if the destination already exists.
- Merge bool
- Whether or not to merge the destination if it already exists.
- Overwrite bool
- Whether or not to overwrite the destination if it already exists.
- Destination string
- Destination of the snapshot, e.g. ifs/dest.
- Source string
- Source of the snapshot.
- Continue bool
- Whether or not to continue if the destination already exists.
- Merge bool
- Whether or not to merge the destination if it already exists.
- Overwrite bool
- Whether or not to overwrite the destination if it already exists.
- destination String
- Destination of the snapshot, e.g. ifs/dest.
- source String
- Source of the snapshot.
- continue_ Boolean
- Whether or not to continue if the destination already exists.
- merge Boolean
- Whether or not to merge the destination if it already exists.
- overwrite Boolean
- Whether or not to overwrite the destination if it already exists.
- destination string
- Destination of the snapshot, e.g. ifs/dest.
- source string
- Source of the snapshot.
- continue boolean
- Whether or not to continue if the destination already exists.
- merge boolean
- Whether or not to merge the destination if it already exists.
- overwrite boolean
- Whether or not to overwrite the destination if it already exists.
- destination str
- Destination of the snapshot, e.g. ifs/dest.
- source str
- Source of the snapshot.
- continue_ bool
- Whether or not to continue if the destination already exists.
- merge bool
- Whether or not to merge the destination if it already exists.
- overwrite bool
- Whether or not to overwrite the destination if it already exists.
- destination String
- Destination of the snapshot, e.g. ifs/dest.
- source String
- Source of the snapshot.
- continue Boolean
- Whether or not to continue if the destination already exists.
- merge Boolean
- Whether or not to merge the destination if it already exists.
- overwrite Boolean
- Whether or not to overwrite the destination if it already exists.
SnapshotRestoreCopyParamsFile, SnapshotRestoreCopyParamsFileArgs
- Destination string
- Destination of the snapshot, e.g. ifs/dest/test.txt .
- Source string
- Source of the snapshot.
- Overwrite bool
- Whether or not to overwrite the destination if it already exists.
- Destination string
- Destination of the snapshot, e.g. ifs/dest/test.txt .
- Source string
- Source of the snapshot.
- Overwrite bool
- Whether or not to overwrite the destination if it already exists.
- destination String
- Destination of the snapshot, e.g. ifs/dest/test.txt .
- source String
- Source of the snapshot.
- overwrite Boolean
- Whether or not to overwrite the destination if it already exists.
- destination string
- Destination of the snapshot, e.g. ifs/dest/test.txt .
- source string
- Source of the snapshot.
- overwrite boolean
- Whether or not to overwrite the destination if it already exists.
- destination str
- Destination of the snapshot, e.g. ifs/dest/test.txt .
- source str
- Source of the snapshot.
- overwrite bool
- Whether or not to overwrite the destination if it already exists.
- destination String
- Destination of the snapshot, e.g. ifs/dest/test.txt .
- source String
- Source of the snapshot.
- overwrite Boolean
- Whether or not to overwrite the destination if it already exists.
SnapshotRestoreSnaprevertParams, SnapshotRestoreSnaprevertParamsArgs
- Snapshot
Id double - Snapshot ID.
- Allow
Dup bool - Whether or not to queue the job if one of the same type is already running or queued.
- Job
Id double - Job ID.
- Snapshot
Id float64 - Snapshot ID.
- Allow
Dup bool - Whether or not to queue the job if one of the same type is already running or queued.
- Job
Id float64 - Job ID.
- snapshot
Id Double - Snapshot ID.
- allow
Dup Boolean - Whether or not to queue the job if one of the same type is already running or queued.
- job
Id Double - Job ID.
- snapshot
Id number - Snapshot ID.
- allow
Dup boolean - Whether or not to queue the job if one of the same type is already running or queued.
- job
Id number - Job ID.
- snapshot_
id float - Snapshot ID.
- allow_
dup bool - Whether or not to queue the job if one of the same type is already running or queued.
- job_
id float - Job ID.
- snapshot
Id Number - Snapshot ID.
- allow
Dup Boolean - Whether or not to queue the job if one of the same type is already running or queued.
- job
Id Number - Job ID.
Package Details
- Repository
- powerscale dell/terraform-provider-powerscale
- License
- Notes
- This Pulumi package is based on the
powerscale
Terraform Provider.