1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. FileStorage
  5. getFilesystemSnapshotPolicy
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.FileStorage.getFilesystemSnapshotPolicy

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    This data source provides details about a specific Filesystem Snapshot Policy resource in Oracle Cloud Infrastructure File Storage service.

    Gets the specified file system snapshot policy’s information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testFilesystemSnapshotPolicy = oci.FileStorage.getFilesystemSnapshotPolicy({
        filesystemSnapshotPolicyId: oci_file_storage_filesystem_snapshot_policy.test_filesystem_snapshot_policy.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_filesystem_snapshot_policy = oci.FileStorage.get_filesystem_snapshot_policy(filesystem_snapshot_policy_id=oci_file_storage_filesystem_snapshot_policy["test_filesystem_snapshot_policy"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/FileStorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := FileStorage.GetFilesystemSnapshotPolicy(ctx, &filestorage.GetFilesystemSnapshotPolicyArgs{
    			FilesystemSnapshotPolicyId: oci_file_storage_filesystem_snapshot_policy.Test_filesystem_snapshot_policy.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 testFilesystemSnapshotPolicy = Oci.FileStorage.GetFilesystemSnapshotPolicy.Invoke(new()
        {
            FilesystemSnapshotPolicyId = oci_file_storage_filesystem_snapshot_policy.Test_filesystem_snapshot_policy.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.GetFilesystemSnapshotPolicyArgs;
    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 testFilesystemSnapshotPolicy = FileStorageFunctions.getFilesystemSnapshotPolicy(GetFilesystemSnapshotPolicyArgs.builder()
                .filesystemSnapshotPolicyId(oci_file_storage_filesystem_snapshot_policy.test_filesystem_snapshot_policy().id())
                .build());
    
        }
    }
    
    variables:
      testFilesystemSnapshotPolicy:
        fn::invoke:
          Function: oci:FileStorage:getFilesystemSnapshotPolicy
          Arguments:
            filesystemSnapshotPolicyId: ${oci_file_storage_filesystem_snapshot_policy.test_filesystem_snapshot_policy.id}
    

    Using getFilesystemSnapshotPolicy

    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 getFilesystemSnapshotPolicy(args: GetFilesystemSnapshotPolicyArgs, opts?: InvokeOptions): Promise<GetFilesystemSnapshotPolicyResult>
    function getFilesystemSnapshotPolicyOutput(args: GetFilesystemSnapshotPolicyOutputArgs, opts?: InvokeOptions): Output<GetFilesystemSnapshotPolicyResult>
    def get_filesystem_snapshot_policy(filesystem_snapshot_policy_id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetFilesystemSnapshotPolicyResult
    def get_filesystem_snapshot_policy_output(filesystem_snapshot_policy_id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetFilesystemSnapshotPolicyResult]
    func GetFilesystemSnapshotPolicy(ctx *Context, args *GetFilesystemSnapshotPolicyArgs, opts ...InvokeOption) (*GetFilesystemSnapshotPolicyResult, error)
    func GetFilesystemSnapshotPolicyOutput(ctx *Context, args *GetFilesystemSnapshotPolicyOutputArgs, opts ...InvokeOption) GetFilesystemSnapshotPolicyResultOutput

    > Note: This function is named GetFilesystemSnapshotPolicy in the Go SDK.

    public static class GetFilesystemSnapshotPolicy 
    {
        public static Task<GetFilesystemSnapshotPolicyResult> InvokeAsync(GetFilesystemSnapshotPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetFilesystemSnapshotPolicyResult> Invoke(GetFilesystemSnapshotPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFilesystemSnapshotPolicyResult> getFilesystemSnapshotPolicy(GetFilesystemSnapshotPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:FileStorage/getFilesystemSnapshotPolicy:getFilesystemSnapshotPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FilesystemSnapshotPolicyId string
    The OCID of the file system snapshot policy.
    FilesystemSnapshotPolicyId string
    The OCID of the file system snapshot policy.
    filesystemSnapshotPolicyId String
    The OCID of the file system snapshot policy.
    filesystemSnapshotPolicyId string
    The OCID of the file system snapshot policy.
    filesystem_snapshot_policy_id str
    The OCID of the file system snapshot policy.
    filesystemSnapshotPolicyId String
    The OCID of the file system snapshot policy.

    getFilesystemSnapshotPolicy Result

    The following output properties are available:

    AvailabilityDomain string
    The availability domain that the file system snapshot policy is in. May be unset using a blank or NULL value. Example: Uocm:PHX-AD-2
    CompartmentId string
    The OCID of the compartment that contains the file system snapshot policy.
    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: My Filesystem Snapshot Policy
    FilesystemSnapshotPolicyId string
    FreeformTags Dictionary<string, object>
    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 file system snapshot policy.
    PolicyPrefix string
    The prefix to apply to all snapshots created by this policy. Example: acme
    Schedules List<GetFilesystemSnapshotPolicySchedule>
    The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.
    State string
    The current state of this file system snapshot policy.
    TimeCreated string
    The date and time the file system snapshot policy was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
    AvailabilityDomain string
    The availability domain that the file system snapshot policy is in. May be unset using a blank or NULL value. Example: Uocm:PHX-AD-2
    CompartmentId string
    The OCID of the compartment that contains the file system snapshot policy.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: My Filesystem Snapshot Policy
    FilesystemSnapshotPolicyId string
    FreeformTags map[string]interface{}
    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 file system snapshot policy.
    PolicyPrefix string
    The prefix to apply to all snapshots created by this policy. Example: acme
    Schedules []GetFilesystemSnapshotPolicySchedule
    The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.
    State string
    The current state of this file system snapshot policy.
    TimeCreated string
    The date and time the file system snapshot policy was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
    availabilityDomain String
    The availability domain that the file system snapshot policy is in. May be unset using a blank or NULL value. Example: Uocm:PHX-AD-2
    compartmentId String
    The OCID of the compartment that contains the file system snapshot policy.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: My Filesystem Snapshot Policy
    filesystemSnapshotPolicyId String
    freeformTags Map<String,Object>
    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 file system snapshot policy.
    policyPrefix String
    The prefix to apply to all snapshots created by this policy. Example: acme
    schedules List<GetFilesystemSnapshotPolicySchedule>
    The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.
    state String
    The current state of this file system snapshot policy.
    timeCreated String
    The date and time the file system snapshot policy was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
    availabilityDomain string
    The availability domain that the file system snapshot policy is in. May be unset using a blank or NULL value. Example: Uocm:PHX-AD-2
    compartmentId string
    The OCID of the compartment that contains the file system snapshot policy.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: My Filesystem Snapshot Policy
    filesystemSnapshotPolicyId string
    freeformTags {[key: string]: any}
    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 file system snapshot policy.
    policyPrefix string
    The prefix to apply to all snapshots created by this policy. Example: acme
    schedules GetFilesystemSnapshotPolicySchedule[]
    The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.
    state string
    The current state of this file system snapshot policy.
    timeCreated string
    The date and time the file system snapshot policy was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
    availability_domain str
    The availability domain that the file system snapshot policy is in. May be unset using a blank or NULL value. Example: Uocm:PHX-AD-2
    compartment_id str
    The OCID of the compartment that contains the file system snapshot policy.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: My Filesystem Snapshot Policy
    filesystem_snapshot_policy_id str
    freeform_tags Mapping[str, Any]
    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 file system snapshot policy.
    policy_prefix str
    The prefix to apply to all snapshots created by this policy. Example: acme
    schedules Sequence[filestorage.GetFilesystemSnapshotPolicySchedule]
    The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.
    state str
    The current state of this file system snapshot policy.
    time_created str
    The date and time the file system snapshot policy was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
    availabilityDomain String
    The availability domain that the file system snapshot policy is in. May be unset using a blank or NULL value. Example: Uocm:PHX-AD-2
    compartmentId String
    The OCID of the compartment that contains the file system snapshot policy.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: My Filesystem Snapshot Policy
    filesystemSnapshotPolicyId String
    freeformTags Map<Any>
    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 file system snapshot policy.
    policyPrefix String
    The prefix to apply to all snapshots created by this policy. Example: acme
    schedules List<Property Map>
    The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.
    state String
    The current state of this file system snapshot policy.
    timeCreated String
    The date and time the file system snapshot policy was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z

    Supporting Types

    GetFilesystemSnapshotPolicySchedule

    DayOfMonth int
    The day of the month to create a scheduled snapshot. If the day does not exist for the month, snapshot creation will be skipped. Used for MONTHLY and YEARLY snapshot schedules.
    DayOfWeek string
    The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
    HourOfDay int
    The hour of the day to create a DAILY, WEEKLY, MONTHLY, or YEARLY snapshot. If not set, a value will be chosen at creation time.
    Month string
    The month to create a scheduled snapshot. Used only for YEARLY snapshot schedules.
    Period string
    The frequency of scheduled snapshots.
    RetentionDurationInSeconds string
    The number of seconds to retain snapshots created with this schedule. Snapshot expiration time will not be set if this value is empty.
    SchedulePrefix string
    A name prefix to be applied to snapshots created by this schedule. Example: compliance1
    TimeScheduleStart string
    The starting point used to begin the scheduling of the snapshots based upon recurrence string in RFC 3339 timestamp format. If no timeScheduleStart is provided, the value will be set to the time when the schedule was created.
    TimeZone string
    Time zone used for scheduling the snapshot.
    DayOfMonth int
    The day of the month to create a scheduled snapshot. If the day does not exist for the month, snapshot creation will be skipped. Used for MONTHLY and YEARLY snapshot schedules.
    DayOfWeek string
    The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
    HourOfDay int
    The hour of the day to create a DAILY, WEEKLY, MONTHLY, or YEARLY snapshot. If not set, a value will be chosen at creation time.
    Month string
    The month to create a scheduled snapshot. Used only for YEARLY snapshot schedules.
    Period string
    The frequency of scheduled snapshots.
    RetentionDurationInSeconds string
    The number of seconds to retain snapshots created with this schedule. Snapshot expiration time will not be set if this value is empty.
    SchedulePrefix string
    A name prefix to be applied to snapshots created by this schedule. Example: compliance1
    TimeScheduleStart string
    The starting point used to begin the scheduling of the snapshots based upon recurrence string in RFC 3339 timestamp format. If no timeScheduleStart is provided, the value will be set to the time when the schedule was created.
    TimeZone string
    Time zone used for scheduling the snapshot.
    dayOfMonth Integer
    The day of the month to create a scheduled snapshot. If the day does not exist for the month, snapshot creation will be skipped. Used for MONTHLY and YEARLY snapshot schedules.
    dayOfWeek String
    The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
    hourOfDay Integer
    The hour of the day to create a DAILY, WEEKLY, MONTHLY, or YEARLY snapshot. If not set, a value will be chosen at creation time.
    month String
    The month to create a scheduled snapshot. Used only for YEARLY snapshot schedules.
    period String
    The frequency of scheduled snapshots.
    retentionDurationInSeconds String
    The number of seconds to retain snapshots created with this schedule. Snapshot expiration time will not be set if this value is empty.
    schedulePrefix String
    A name prefix to be applied to snapshots created by this schedule. Example: compliance1
    timeScheduleStart String
    The starting point used to begin the scheduling of the snapshots based upon recurrence string in RFC 3339 timestamp format. If no timeScheduleStart is provided, the value will be set to the time when the schedule was created.
    timeZone String
    Time zone used for scheduling the snapshot.
    dayOfMonth number
    The day of the month to create a scheduled snapshot. If the day does not exist for the month, snapshot creation will be skipped. Used for MONTHLY and YEARLY snapshot schedules.
    dayOfWeek string
    The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
    hourOfDay number
    The hour of the day to create a DAILY, WEEKLY, MONTHLY, or YEARLY snapshot. If not set, a value will be chosen at creation time.
    month string
    The month to create a scheduled snapshot. Used only for YEARLY snapshot schedules.
    period string
    The frequency of scheduled snapshots.
    retentionDurationInSeconds string
    The number of seconds to retain snapshots created with this schedule. Snapshot expiration time will not be set if this value is empty.
    schedulePrefix string
    A name prefix to be applied to snapshots created by this schedule. Example: compliance1
    timeScheduleStart string
    The starting point used to begin the scheduling of the snapshots based upon recurrence string in RFC 3339 timestamp format. If no timeScheduleStart is provided, the value will be set to the time when the schedule was created.
    timeZone string
    Time zone used for scheduling the snapshot.
    day_of_month int
    The day of the month to create a scheduled snapshot. If the day does not exist for the month, snapshot creation will be skipped. Used for MONTHLY and YEARLY snapshot schedules.
    day_of_week str
    The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
    hour_of_day int
    The hour of the day to create a DAILY, WEEKLY, MONTHLY, or YEARLY snapshot. If not set, a value will be chosen at creation time.
    month str
    The month to create a scheduled snapshot. Used only for YEARLY snapshot schedules.
    period str
    The frequency of scheduled snapshots.
    retention_duration_in_seconds str
    The number of seconds to retain snapshots created with this schedule. Snapshot expiration time will not be set if this value is empty.
    schedule_prefix str
    A name prefix to be applied to snapshots created by this schedule. Example: compliance1
    time_schedule_start str
    The starting point used to begin the scheduling of the snapshots based upon recurrence string in RFC 3339 timestamp format. If no timeScheduleStart is provided, the value will be set to the time when the schedule was created.
    time_zone str
    Time zone used for scheduling the snapshot.
    dayOfMonth Number
    The day of the month to create a scheduled snapshot. If the day does not exist for the month, snapshot creation will be skipped. Used for MONTHLY and YEARLY snapshot schedules.
    dayOfWeek String
    The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
    hourOfDay Number
    The hour of the day to create a DAILY, WEEKLY, MONTHLY, or YEARLY snapshot. If not set, a value will be chosen at creation time.
    month String
    The month to create a scheduled snapshot. Used only for YEARLY snapshot schedules.
    period String
    The frequency of scheduled snapshots.
    retentionDurationInSeconds String
    The number of seconds to retain snapshots created with this schedule. Snapshot expiration time will not be set if this value is empty.
    schedulePrefix String
    A name prefix to be applied to snapshots created by this schedule. Example: compliance1
    timeScheduleStart String
    The starting point used to begin the scheduling of the snapshots based upon recurrence string in RFC 3339 timestamp format. If no timeScheduleStart is provided, the value will be set to the time when the schedule was created.
    timeZone String
    Time zone used for scheduling the snapshot.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi