Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.FileStorage.getSnapshot
Explore with Pulumi AI
This data source provides details about a specific Snapshot resource in Oracle Cloud Infrastructure File Storage service.
Gets the specified snapshot’s information.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSnapshot = oci.FileStorage.getSnapshot({
snapshotId: testSnapshotOciFileStorageSnapshot.id,
});
import pulumi
import pulumi_oci as oci
test_snapshot = oci.FileStorage.get_snapshot(snapshot_id=test_snapshot_oci_file_storage_snapshot["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/FileStorage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := FileStorage.GetSnapshot(ctx, &filestorage.GetSnapshotArgs{
SnapshotId: testSnapshotOciFileStorageSnapshot.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testSnapshot = Oci.FileStorage.GetSnapshot.Invoke(new()
{
SnapshotId = testSnapshotOciFileStorageSnapshot.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.FileStorage.FileStorageFunctions;
import com.pulumi.oci.FileStorage.inputs.GetSnapshotArgs;
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) {
final var testSnapshot = FileStorageFunctions.getSnapshot(GetSnapshotArgs.builder()
.snapshotId(testSnapshotOciFileStorageSnapshot.id())
.build());
}
}
variables:
testSnapshot:
fn::invoke:
Function: oci:FileStorage:getSnapshot
Arguments:
snapshotId: ${testSnapshotOciFileStorageSnapshot.id}
Using getSnapshot
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getSnapshot(args: GetSnapshotArgs, opts?: InvokeOptions): Promise<GetSnapshotResult>
function getSnapshotOutput(args: GetSnapshotOutputArgs, opts?: InvokeOptions): Output<GetSnapshotResult>
def get_snapshot(snapshot_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSnapshotResult
def get_snapshot_output(snapshot_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSnapshotResult]
func GetSnapshot(ctx *Context, args *GetSnapshotArgs, opts ...InvokeOption) (*GetSnapshotResult, error)
func GetSnapshotOutput(ctx *Context, args *GetSnapshotOutputArgs, opts ...InvokeOption) GetSnapshotResultOutput
> Note: This function is named GetSnapshot
in the Go SDK.
public static class GetSnapshot
{
public static Task<GetSnapshotResult> InvokeAsync(GetSnapshotArgs args, InvokeOptions? opts = null)
public static Output<GetSnapshotResult> Invoke(GetSnapshotInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSnapshotResult> getSnapshot(GetSnapshotArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:FileStorage/getSnapshot:getSnapshot
arguments:
# arguments dictionary
The following arguments are supported:
- Snapshot
Id string - The OCID of the snapshot.
- Snapshot
Id string - The OCID of the snapshot.
- snapshot
Id String - The OCID of the snapshot.
- snapshot
Id string - The OCID of the snapshot.
- snapshot_
id str - The OCID of the snapshot.
- snapshot
Id String - The OCID of the snapshot.
getSnapshot Result
The following output properties are available:
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Expiration
Time string - The time when this snapshot will be deleted.
- File
System stringId - The OCID of the file system from which the snapshot was created.
- Filesystem
Snapshot stringPolicy Id - The OCID of the file system snapshot policy that created this snapshot.
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id string
- The OCID of the snapshot.
- Is
Clone boolSource - Specifies whether the snapshot has been cloned. See Cloning a File System.
- Lifecycle
Details string - Additional information about the current
lifecycleState
. - Name string
- Name of the snapshot. This value is immutable.
- Provenance
Id string - An OCID identifying the parent from which this snapshot was cloned. If this snapshot was not cloned, then the
provenanceId
is the same as the snapshotid
value. If this snapshot was cloned, then theprovenanceId
value is the parent'sprovenanceId
. See Cloning a File System. - Snapshot
Id string - Snapshot
Time string - The date and time the snapshot was taken, expressed in RFC 3339 timestamp format. This value might be the same or different from
timeCreated
depending on the following factors:- If the snapshot is created in the original file system directory.
- If the snapshot is cloned from a file system.
- If the snapshot is replicated from a file system.
- Snapshot
Type string - Specifies the generation type of the snapshot.
- State string
- The current state of the snapshot.
- Time
Created string - The date and time the snapshot was created, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Expiration
Time string - The time when this snapshot will be deleted.
- File
System stringId - The OCID of the file system from which the snapshot was created.
- Filesystem
Snapshot stringPolicy Id - The OCID of the file system snapshot policy that created this snapshot.
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id string
- The OCID of the snapshot.
- Is
Clone boolSource - Specifies whether the snapshot has been cloned. See Cloning a File System.
- Lifecycle
Details string - Additional information about the current
lifecycleState
. - Name string
- Name of the snapshot. This value is immutable.
- Provenance
Id string - An OCID identifying the parent from which this snapshot was cloned. If this snapshot was not cloned, then the
provenanceId
is the same as the snapshotid
value. If this snapshot was cloned, then theprovenanceId
value is the parent'sprovenanceId
. See Cloning a File System. - Snapshot
Id string - Snapshot
Time string - The date and time the snapshot was taken, expressed in RFC 3339 timestamp format. This value might be the same or different from
timeCreated
depending on the following factors:- If the snapshot is created in the original file system directory.
- If the snapshot is cloned from a file system.
- If the snapshot is replicated from a file system.
- Snapshot
Type string - Specifies the generation type of the snapshot.
- State string
- The current state of the snapshot.
- Time
Created string - The date and time the snapshot was created, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- expiration
Time String - The time when this snapshot will be deleted.
- file
System StringId - The OCID of the file system from which the snapshot was created.
- filesystem
Snapshot StringPolicy Id - The OCID of the file system snapshot policy that created this snapshot.
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id String
- The OCID of the snapshot.
- is
Clone BooleanSource - Specifies whether the snapshot has been cloned. See Cloning a File System.
- lifecycle
Details String - Additional information about the current
lifecycleState
. - name String
- Name of the snapshot. This value is immutable.
- provenance
Id String - An OCID identifying the parent from which this snapshot was cloned. If this snapshot was not cloned, then the
provenanceId
is the same as the snapshotid
value. If this snapshot was cloned, then theprovenanceId
value is the parent'sprovenanceId
. See Cloning a File System. - snapshot
Id String - snapshot
Time String - The date and time the snapshot was taken, expressed in RFC 3339 timestamp format. This value might be the same or different from
timeCreated
depending on the following factors:- If the snapshot is created in the original file system directory.
- If the snapshot is cloned from a file system.
- If the snapshot is replicated from a file system.
- snapshot
Type String - Specifies the generation type of the snapshot.
- state String
- The current state of the snapshot.
- time
Created String - The date and time the snapshot was created, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- expiration
Time string - The time when this snapshot will be deleted.
- file
System stringId - The OCID of the file system from which the snapshot was created.
- filesystem
Snapshot stringPolicy Id - The OCID of the file system snapshot policy that created this snapshot.
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id string
- The OCID of the snapshot.
- is
Clone booleanSource - Specifies whether the snapshot has been cloned. See Cloning a File System.
- lifecycle
Details string - Additional information about the current
lifecycleState
. - name string
- Name of the snapshot. This value is immutable.
- provenance
Id string - An OCID identifying the parent from which this snapshot was cloned. If this snapshot was not cloned, then the
provenanceId
is the same as the snapshotid
value. If this snapshot was cloned, then theprovenanceId
value is the parent'sprovenanceId
. See Cloning a File System. - snapshot
Id string - snapshot
Time string - The date and time the snapshot was taken, expressed in RFC 3339 timestamp format. This value might be the same or different from
timeCreated
depending on the following factors:- If the snapshot is created in the original file system directory.
- If the snapshot is cloned from a file system.
- If the snapshot is replicated from a file system.
- snapshot
Type string - Specifies the generation type of the snapshot.
- state string
- The current state of the snapshot.
- time
Created string - The date and time the snapshot was created, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- expiration_
time str - The time when this snapshot will be deleted.
- file_
system_ strid - The OCID of the file system from which the snapshot was created.
- filesystem_
snapshot_ strpolicy_ id - The OCID of the file system snapshot policy that created this snapshot.
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id str
- The OCID of the snapshot.
- is_
clone_ boolsource - Specifies whether the snapshot has been cloned. See Cloning a File System.
- lifecycle_
details str - Additional information about the current
lifecycleState
. - name str
- Name of the snapshot. This value is immutable.
- provenance_
id str - An OCID identifying the parent from which this snapshot was cloned. If this snapshot was not cloned, then the
provenanceId
is the same as the snapshotid
value. If this snapshot was cloned, then theprovenanceId
value is the parent'sprovenanceId
. See Cloning a File System. - snapshot_
id str - snapshot_
time str - The date and time the snapshot was taken, expressed in RFC 3339 timestamp format. This value might be the same or different from
timeCreated
depending on the following factors:- If the snapshot is created in the original file system directory.
- If the snapshot is cloned from a file system.
- If the snapshot is replicated from a file system.
- snapshot_
type str - Specifies the generation type of the snapshot.
- state str
- The current state of the snapshot.
- time_
created str - The date and time the snapshot was created, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- expiration
Time String - The time when this snapshot will be deleted.
- file
System StringId - The OCID of the file system from which the snapshot was created.
- filesystem
Snapshot StringPolicy Id - The OCID of the file system snapshot policy that created this snapshot.
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id String
- The OCID of the snapshot.
- is
Clone BooleanSource - Specifies whether the snapshot has been cloned. See Cloning a File System.
- lifecycle
Details String - Additional information about the current
lifecycleState
. - name String
- Name of the snapshot. This value is immutable.
- provenance
Id String - An OCID identifying the parent from which this snapshot was cloned. If this snapshot was not cloned, then the
provenanceId
is the same as the snapshotid
value. If this snapshot was cloned, then theprovenanceId
value is the parent'sprovenanceId
. See Cloning a File System. - snapshot
Id String - snapshot
Time String - The date and time the snapshot was taken, expressed in RFC 3339 timestamp format. This value might be the same or different from
timeCreated
depending on the following factors:- If the snapshot is created in the original file system directory.
- If the snapshot is cloned from a file system.
- If the snapshot is replicated from a file system.
- snapshot
Type String - Specifies the generation type of the snapshot.
- state String
- The current state of the snapshot.
- time
Created String - The date and time the snapshot was created, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.