1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. FileStorage
  5. FilesystemSnapshotPolicy
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

oci.FileStorage.FilesystemSnapshotPolicy

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

    This resource provides the Filesystem Snapshot Policy resource in Oracle Cloud Infrastructure File Storage service.

    Creates a new file system snapshot policy in the specified compartment and availability domain.

    After you create a file system snapshot policy, you can associate it with file systems.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testFilesystemSnapshotPolicy = new oci.filestorage.FilesystemSnapshotPolicy("testFilesystemSnapshotPolicy", {
        availabilityDomain: _var.filesystem_snapshot_policy_availability_domain,
        compartmentId: _var.compartment_id,
        definedTags: {
            "Operations.CostCenter": "42",
        },
        displayName: _var.filesystem_snapshot_policy_display_name,
        freeformTags: {
            Department: "Finance",
        },
        policyPrefix: _var.filesystem_snapshot_policy_policy_prefix,
        schedules: [{
            period: _var.filesystem_snapshot_policy_schedules_period,
            timeZone: _var.filesystem_snapshot_policy_schedules_time_zone,
            dayOfMonth: _var.filesystem_snapshot_policy_schedules_day_of_month,
            dayOfWeek: _var.filesystem_snapshot_policy_schedules_day_of_week,
            hourOfDay: _var.filesystem_snapshot_policy_schedules_hour_of_day,
            month: _var.filesystem_snapshot_policy_schedules_month,
            retentionDurationInSeconds: _var.filesystem_snapshot_policy_schedules_retention_duration_in_seconds,
            schedulePrefix: _var.filesystem_snapshot_policy_schedules_schedule_prefix,
            timeScheduleStart: _var.filesystem_snapshot_policy_schedules_time_schedule_start,
        }],
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_filesystem_snapshot_policy = oci.file_storage.FilesystemSnapshotPolicy("testFilesystemSnapshotPolicy",
        availability_domain=var["filesystem_snapshot_policy_availability_domain"],
        compartment_id=var["compartment_id"],
        defined_tags={
            "Operations.CostCenter": "42",
        },
        display_name=var["filesystem_snapshot_policy_display_name"],
        freeform_tags={
            "Department": "Finance",
        },
        policy_prefix=var["filesystem_snapshot_policy_policy_prefix"],
        schedules=[oci.file_storage.FilesystemSnapshotPolicyScheduleArgs(
            period=var["filesystem_snapshot_policy_schedules_period"],
            time_zone=var["filesystem_snapshot_policy_schedules_time_zone"],
            day_of_month=var["filesystem_snapshot_policy_schedules_day_of_month"],
            day_of_week=var["filesystem_snapshot_policy_schedules_day_of_week"],
            hour_of_day=var["filesystem_snapshot_policy_schedules_hour_of_day"],
            month=var["filesystem_snapshot_policy_schedules_month"],
            retention_duration_in_seconds=var["filesystem_snapshot_policy_schedules_retention_duration_in_seconds"],
            schedule_prefix=var["filesystem_snapshot_policy_schedules_schedule_prefix"],
            time_schedule_start=var["filesystem_snapshot_policy_schedules_time_schedule_start"],
        )])
    
    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.NewFilesystemSnapshotPolicy(ctx, "testFilesystemSnapshotPolicy", &FileStorage.FilesystemSnapshotPolicyArgs{
    			AvailabilityDomain: pulumi.Any(_var.Filesystem_snapshot_policy_availability_domain),
    			CompartmentId:      pulumi.Any(_var.Compartment_id),
    			DefinedTags: pulumi.Map{
    				"Operations.CostCenter": pulumi.Any("42"),
    			},
    			DisplayName: pulumi.Any(_var.Filesystem_snapshot_policy_display_name),
    			FreeformTags: pulumi.Map{
    				"Department": pulumi.Any("Finance"),
    			},
    			PolicyPrefix: pulumi.Any(_var.Filesystem_snapshot_policy_policy_prefix),
    			Schedules: filestorage.FilesystemSnapshotPolicyScheduleArray{
    				&filestorage.FilesystemSnapshotPolicyScheduleArgs{
    					Period:                     pulumi.Any(_var.Filesystem_snapshot_policy_schedules_period),
    					TimeZone:                   pulumi.Any(_var.Filesystem_snapshot_policy_schedules_time_zone),
    					DayOfMonth:                 pulumi.Any(_var.Filesystem_snapshot_policy_schedules_day_of_month),
    					DayOfWeek:                  pulumi.Any(_var.Filesystem_snapshot_policy_schedules_day_of_week),
    					HourOfDay:                  pulumi.Any(_var.Filesystem_snapshot_policy_schedules_hour_of_day),
    					Month:                      pulumi.Any(_var.Filesystem_snapshot_policy_schedules_month),
    					RetentionDurationInSeconds: pulumi.Any(_var.Filesystem_snapshot_policy_schedules_retention_duration_in_seconds),
    					SchedulePrefix:             pulumi.Any(_var.Filesystem_snapshot_policy_schedules_schedule_prefix),
    					TimeScheduleStart:          pulumi.Any(_var.Filesystem_snapshot_policy_schedules_time_schedule_start),
    				},
    			},
    		})
    		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 = new Oci.FileStorage.FilesystemSnapshotPolicy("testFilesystemSnapshotPolicy", new()
        {
            AvailabilityDomain = @var.Filesystem_snapshot_policy_availability_domain,
            CompartmentId = @var.Compartment_id,
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            DisplayName = @var.Filesystem_snapshot_policy_display_name,
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
            PolicyPrefix = @var.Filesystem_snapshot_policy_policy_prefix,
            Schedules = new[]
            {
                new Oci.FileStorage.Inputs.FilesystemSnapshotPolicyScheduleArgs
                {
                    Period = @var.Filesystem_snapshot_policy_schedules_period,
                    TimeZone = @var.Filesystem_snapshot_policy_schedules_time_zone,
                    DayOfMonth = @var.Filesystem_snapshot_policy_schedules_day_of_month,
                    DayOfWeek = @var.Filesystem_snapshot_policy_schedules_day_of_week,
                    HourOfDay = @var.Filesystem_snapshot_policy_schedules_hour_of_day,
                    Month = @var.Filesystem_snapshot_policy_schedules_month,
                    RetentionDurationInSeconds = @var.Filesystem_snapshot_policy_schedules_retention_duration_in_seconds,
                    SchedulePrefix = @var.Filesystem_snapshot_policy_schedules_schedule_prefix,
                    TimeScheduleStart = @var.Filesystem_snapshot_policy_schedules_time_schedule_start,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.FileStorage.FilesystemSnapshotPolicy;
    import com.pulumi.oci.FileStorage.FilesystemSnapshotPolicyArgs;
    import com.pulumi.oci.FileStorage.inputs.FilesystemSnapshotPolicyScheduleArgs;
    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 testFilesystemSnapshotPolicy = new FilesystemSnapshotPolicy("testFilesystemSnapshotPolicy", FilesystemSnapshotPolicyArgs.builder()        
                .availabilityDomain(var_.filesystem_snapshot_policy_availability_domain())
                .compartmentId(var_.compartment_id())
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .displayName(var_.filesystem_snapshot_policy_display_name())
                .freeformTags(Map.of("Department", "Finance"))
                .policyPrefix(var_.filesystem_snapshot_policy_policy_prefix())
                .schedules(FilesystemSnapshotPolicyScheduleArgs.builder()
                    .period(var_.filesystem_snapshot_policy_schedules_period())
                    .timeZone(var_.filesystem_snapshot_policy_schedules_time_zone())
                    .dayOfMonth(var_.filesystem_snapshot_policy_schedules_day_of_month())
                    .dayOfWeek(var_.filesystem_snapshot_policy_schedules_day_of_week())
                    .hourOfDay(var_.filesystem_snapshot_policy_schedules_hour_of_day())
                    .month(var_.filesystem_snapshot_policy_schedules_month())
                    .retentionDurationInSeconds(var_.filesystem_snapshot_policy_schedules_retention_duration_in_seconds())
                    .schedulePrefix(var_.filesystem_snapshot_policy_schedules_schedule_prefix())
                    .timeScheduleStart(var_.filesystem_snapshot_policy_schedules_time_schedule_start())
                    .build())
                .build());
    
        }
    }
    
    resources:
      testFilesystemSnapshotPolicy:
        type: oci:FileStorage:FilesystemSnapshotPolicy
        properties:
          #Required
          availabilityDomain: ${var.filesystem_snapshot_policy_availability_domain}
          compartmentId: ${var.compartment_id}
          #Optional
          definedTags:
            Operations.CostCenter: '42'
          displayName: ${var.filesystem_snapshot_policy_display_name}
          freeformTags:
            Department: Finance
          policyPrefix: ${var.filesystem_snapshot_policy_policy_prefix}
          schedules:
            - period: ${var.filesystem_snapshot_policy_schedules_period}
              timeZone: ${var.filesystem_snapshot_policy_schedules_time_zone}
              dayOfMonth: ${var.filesystem_snapshot_policy_schedules_day_of_month}
              dayOfWeek: ${var.filesystem_snapshot_policy_schedules_day_of_week}
              hourOfDay: ${var.filesystem_snapshot_policy_schedules_hour_of_day}
              month: ${var.filesystem_snapshot_policy_schedules_month}
              retentionDurationInSeconds: ${var.filesystem_snapshot_policy_schedules_retention_duration_in_seconds}
              schedulePrefix: ${var.filesystem_snapshot_policy_schedules_schedule_prefix}
              timeScheduleStart: ${var.filesystem_snapshot_policy_schedules_time_schedule_start}
    

    Create FilesystemSnapshotPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FilesystemSnapshotPolicy(name: string, args: FilesystemSnapshotPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def FilesystemSnapshotPolicy(resource_name: str,
                                 args: FilesystemSnapshotPolicyArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def FilesystemSnapshotPolicy(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 availability_domain: Optional[str] = None,
                                 compartment_id: Optional[str] = None,
                                 defined_tags: Optional[Mapping[str, Any]] = None,
                                 display_name: Optional[str] = None,
                                 freeform_tags: Optional[Mapping[str, Any]] = None,
                                 policy_prefix: Optional[str] = None,
                                 schedules: Optional[Sequence[_filestorage.FilesystemSnapshotPolicyScheduleArgs]] = None,
                                 state: Optional[str] = None)
    func NewFilesystemSnapshotPolicy(ctx *Context, name string, args FilesystemSnapshotPolicyArgs, opts ...ResourceOption) (*FilesystemSnapshotPolicy, error)
    public FilesystemSnapshotPolicy(string name, FilesystemSnapshotPolicyArgs args, CustomResourceOptions? opts = null)
    public FilesystemSnapshotPolicy(String name, FilesystemSnapshotPolicyArgs args)
    public FilesystemSnapshotPolicy(String name, FilesystemSnapshotPolicyArgs args, CustomResourceOptions options)
    
    type: oci:FileStorage:FilesystemSnapshotPolicy
    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 FilesystemSnapshotPolicyArgs
    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 FilesystemSnapshotPolicyArgs
    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 FilesystemSnapshotPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FilesystemSnapshotPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FilesystemSnapshotPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var filesystemSnapshotPolicyResource = new Oci.FileStorage.FilesystemSnapshotPolicy("filesystemSnapshotPolicyResource", new()
    {
        AvailabilityDomain = "string",
        CompartmentId = "string",
        DefinedTags = 
        {
            { "string", "any" },
        },
        DisplayName = "string",
        FreeformTags = 
        {
            { "string", "any" },
        },
        PolicyPrefix = "string",
        Schedules = new[]
        {
            new Oci.FileStorage.Inputs.FilesystemSnapshotPolicyScheduleArgs
            {
                Period = "string",
                TimeZone = "string",
                DayOfMonth = 0,
                DayOfWeek = "string",
                HourOfDay = 0,
                Month = "string",
                RetentionDurationInSeconds = "string",
                SchedulePrefix = "string",
                TimeScheduleStart = "string",
            },
        },
        State = "string",
    });
    
    example, err := FileStorage.NewFilesystemSnapshotPolicy(ctx, "filesystemSnapshotPolicyResource", &FileStorage.FilesystemSnapshotPolicyArgs{
    	AvailabilityDomain: pulumi.String("string"),
    	CompartmentId:      pulumi.String("string"),
    	DefinedTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	DisplayName: pulumi.String("string"),
    	FreeformTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	PolicyPrefix: pulumi.String("string"),
    	Schedules: filestorage.FilesystemSnapshotPolicyScheduleArray{
    		&filestorage.FilesystemSnapshotPolicyScheduleArgs{
    			Period:                     pulumi.String("string"),
    			TimeZone:                   pulumi.String("string"),
    			DayOfMonth:                 pulumi.Int(0),
    			DayOfWeek:                  pulumi.String("string"),
    			HourOfDay:                  pulumi.Int(0),
    			Month:                      pulumi.String("string"),
    			RetentionDurationInSeconds: pulumi.String("string"),
    			SchedulePrefix:             pulumi.String("string"),
    			TimeScheduleStart:          pulumi.String("string"),
    		},
    	},
    	State: pulumi.String("string"),
    })
    
    var filesystemSnapshotPolicyResource = new FilesystemSnapshotPolicy("filesystemSnapshotPolicyResource", FilesystemSnapshotPolicyArgs.builder()        
        .availabilityDomain("string")
        .compartmentId("string")
        .definedTags(Map.of("string", "any"))
        .displayName("string")
        .freeformTags(Map.of("string", "any"))
        .policyPrefix("string")
        .schedules(FilesystemSnapshotPolicyScheduleArgs.builder()
            .period("string")
            .timeZone("string")
            .dayOfMonth(0)
            .dayOfWeek("string")
            .hourOfDay(0)
            .month("string")
            .retentionDurationInSeconds("string")
            .schedulePrefix("string")
            .timeScheduleStart("string")
            .build())
        .state("string")
        .build());
    
    filesystem_snapshot_policy_resource = oci.file_storage.FilesystemSnapshotPolicy("filesystemSnapshotPolicyResource",
        availability_domain="string",
        compartment_id="string",
        defined_tags={
            "string": "any",
        },
        display_name="string",
        freeform_tags={
            "string": "any",
        },
        policy_prefix="string",
        schedules=[oci.file_storage.FilesystemSnapshotPolicyScheduleArgs(
            period="string",
            time_zone="string",
            day_of_month=0,
            day_of_week="string",
            hour_of_day=0,
            month="string",
            retention_duration_in_seconds="string",
            schedule_prefix="string",
            time_schedule_start="string",
        )],
        state="string")
    
    const filesystemSnapshotPolicyResource = new oci.filestorage.FilesystemSnapshotPolicy("filesystemSnapshotPolicyResource", {
        availabilityDomain: "string",
        compartmentId: "string",
        definedTags: {
            string: "any",
        },
        displayName: "string",
        freeformTags: {
            string: "any",
        },
        policyPrefix: "string",
        schedules: [{
            period: "string",
            timeZone: "string",
            dayOfMonth: 0,
            dayOfWeek: "string",
            hourOfDay: 0,
            month: "string",
            retentionDurationInSeconds: "string",
            schedulePrefix: "string",
            timeScheduleStart: "string",
        }],
        state: "string",
    });
    
    type: oci:FileStorage:FilesystemSnapshotPolicy
    properties:
        availabilityDomain: string
        compartmentId: string
        definedTags:
            string: any
        displayName: string
        freeformTags:
            string: any
        policyPrefix: string
        schedules:
            - dayOfMonth: 0
              dayOfWeek: string
              hourOfDay: 0
              month: string
              period: string
              retentionDurationInSeconds: string
              schedulePrefix: string
              timeScheduleStart: string
              timeZone: string
        state: string
    

    FilesystemSnapshotPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The FilesystemSnapshotPolicy resource accepts the following input properties:

    AvailabilityDomain string
    The availability domain that the file system snapshot policy is in. Example: Uocm:PHX-AD-1
    CompartmentId string
    (Updatable) The OCID of the compartment that contains the file system snapshot policy.
    DefinedTags Dictionary<string, object>
    (Updatable) 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
    (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: policy1
    FreeformTags Dictionary<string, object>
    (Updatable) 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"}
    PolicyPrefix string
    (Updatable) The prefix to apply to all snapshots created by this policy. Example: acme
    Schedules List<FilesystemSnapshotPolicySchedule>

    (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.

    If using the CLI, provide the schedule as a list of JSON strings, with the list wrapped in quotation marks, i.e. --schedules '[{"timeZone":"UTC","period":"DAILY","hourOfDay":18},{"timeZone":"UTC","period":"HOURLY"}]'

    State string

    (Updatable) The target state for the Filesystem Snapshot Policy. Could be set to ACTIVE or INACTIVE.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    AvailabilityDomain string
    The availability domain that the file system snapshot policy is in. Example: Uocm:PHX-AD-1
    CompartmentId string
    (Updatable) The OCID of the compartment that contains the file system snapshot policy.
    DefinedTags map[string]interface{}
    (Updatable) 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
    (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: policy1
    FreeformTags map[string]interface{}
    (Updatable) 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"}
    PolicyPrefix string
    (Updatable) The prefix to apply to all snapshots created by this policy. Example: acme
    Schedules []FilesystemSnapshotPolicyScheduleArgs

    (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.

    If using the CLI, provide the schedule as a list of JSON strings, with the list wrapped in quotation marks, i.e. --schedules '[{"timeZone":"UTC","period":"DAILY","hourOfDay":18},{"timeZone":"UTC","period":"HOURLY"}]'

    State string

    (Updatable) The target state for the Filesystem Snapshot Policy. Could be set to ACTIVE or INACTIVE.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    availabilityDomain String
    The availability domain that the file system snapshot policy is in. Example: Uocm:PHX-AD-1
    compartmentId String
    (Updatable) The OCID of the compartment that contains the file system snapshot policy.
    definedTags Map<String,Object>
    (Updatable) 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
    (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: policy1
    freeformTags Map<String,Object>
    (Updatable) 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"}
    policyPrefix String
    (Updatable) The prefix to apply to all snapshots created by this policy. Example: acme
    schedules List<FilesystemSnapshotPolicySchedule>

    (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.

    If using the CLI, provide the schedule as a list of JSON strings, with the list wrapped in quotation marks, i.e. --schedules '[{"timeZone":"UTC","period":"DAILY","hourOfDay":18},{"timeZone":"UTC","period":"HOURLY"}]'

    state String

    (Updatable) The target state for the Filesystem Snapshot Policy. Could be set to ACTIVE or INACTIVE.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    availabilityDomain string
    The availability domain that the file system snapshot policy is in. Example: Uocm:PHX-AD-1
    compartmentId string
    (Updatable) The OCID of the compartment that contains the file system snapshot policy.
    definedTags {[key: string]: any}
    (Updatable) 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
    (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: policy1
    freeformTags {[key: string]: any}
    (Updatable) 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"}
    policyPrefix string
    (Updatable) The prefix to apply to all snapshots created by this policy. Example: acme
    schedules FilesystemSnapshotPolicySchedule[]

    (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.

    If using the CLI, provide the schedule as a list of JSON strings, with the list wrapped in quotation marks, i.e. --schedules '[{"timeZone":"UTC","period":"DAILY","hourOfDay":18},{"timeZone":"UTC","period":"HOURLY"}]'

    state string

    (Updatable) The target state for the Filesystem Snapshot Policy. Could be set to ACTIVE or INACTIVE.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    availability_domain str
    The availability domain that the file system snapshot policy is in. Example: Uocm:PHX-AD-1
    compartment_id str
    (Updatable) The OCID of the compartment that contains the file system snapshot policy.
    defined_tags Mapping[str, Any]
    (Updatable) 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
    (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: policy1
    freeform_tags Mapping[str, Any]
    (Updatable) 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"}
    policy_prefix str
    (Updatable) The prefix to apply to all snapshots created by this policy. Example: acme
    schedules Sequence[filestorage.FilesystemSnapshotPolicyScheduleArgs]

    (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.

    If using the CLI, provide the schedule as a list of JSON strings, with the list wrapped in quotation marks, i.e. --schedules '[{"timeZone":"UTC","period":"DAILY","hourOfDay":18},{"timeZone":"UTC","period":"HOURLY"}]'

    state str

    (Updatable) The target state for the Filesystem Snapshot Policy. Could be set to ACTIVE or INACTIVE.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    availabilityDomain String
    The availability domain that the file system snapshot policy is in. Example: Uocm:PHX-AD-1
    compartmentId String
    (Updatable) The OCID of the compartment that contains the file system snapshot policy.
    definedTags Map<Any>
    (Updatable) 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
    (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: policy1
    freeformTags Map<Any>
    (Updatable) 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"}
    policyPrefix String
    (Updatable) The prefix to apply to all snapshots created by this policy. Example: acme
    schedules List<Property Map>

    (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.

    If using the CLI, provide the schedule as a list of JSON strings, with the list wrapped in quotation marks, i.e. --schedules '[{"timeZone":"UTC","period":"DAILY","hourOfDay":18},{"timeZone":"UTC","period":"HOURLY"}]'

    state String

    (Updatable) The target state for the Filesystem Snapshot Policy. Could be set to ACTIVE or INACTIVE.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FilesystemSnapshotPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    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
    Id string
    The provider-assigned unique ID for this managed resource.
    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
    id String
    The provider-assigned unique ID for this managed resource.
    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
    id string
    The provider-assigned unique ID for this managed resource.
    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
    id str
    The provider-assigned unique ID for this managed resource.
    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
    id String
    The provider-assigned unique ID for this managed resource.
    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

    Look up Existing FilesystemSnapshotPolicy Resource

    Get an existing FilesystemSnapshotPolicy 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?: FilesystemSnapshotPolicyState, opts?: CustomResourceOptions): FilesystemSnapshotPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            availability_domain: Optional[str] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            policy_prefix: Optional[str] = None,
            schedules: Optional[Sequence[_filestorage.FilesystemSnapshotPolicyScheduleArgs]] = None,
            state: Optional[str] = None,
            time_created: Optional[str] = None) -> FilesystemSnapshotPolicy
    func GetFilesystemSnapshotPolicy(ctx *Context, name string, id IDInput, state *FilesystemSnapshotPolicyState, opts ...ResourceOption) (*FilesystemSnapshotPolicy, error)
    public static FilesystemSnapshotPolicy Get(string name, Input<string> id, FilesystemSnapshotPolicyState? state, CustomResourceOptions? opts = null)
    public static FilesystemSnapshotPolicy get(String name, Output<String> id, FilesystemSnapshotPolicyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AvailabilityDomain string
    The availability domain that the file system snapshot policy is in. Example: Uocm:PHX-AD-1
    CompartmentId string
    (Updatable) The OCID of the compartment that contains the file system snapshot policy.
    DefinedTags Dictionary<string, object>
    (Updatable) 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
    (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: policy1
    FreeformTags Dictionary<string, object>
    (Updatable) 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"}
    PolicyPrefix string
    (Updatable) The prefix to apply to all snapshots created by this policy. Example: acme
    Schedules List<FilesystemSnapshotPolicySchedule>

    (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.

    If using the CLI, provide the schedule as a list of JSON strings, with the list wrapped in quotation marks, i.e. --schedules '[{"timeZone":"UTC","period":"DAILY","hourOfDay":18},{"timeZone":"UTC","period":"HOURLY"}]'

    State string

    (Updatable) The target state for the Filesystem Snapshot Policy. Could be set to ACTIVE or INACTIVE.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    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. Example: Uocm:PHX-AD-1
    CompartmentId string
    (Updatable) The OCID of the compartment that contains the file system snapshot policy.
    DefinedTags map[string]interface{}
    (Updatable) 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
    (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: policy1
    FreeformTags map[string]interface{}
    (Updatable) 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"}
    PolicyPrefix string
    (Updatable) The prefix to apply to all snapshots created by this policy. Example: acme
    Schedules []FilesystemSnapshotPolicyScheduleArgs

    (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.

    If using the CLI, provide the schedule as a list of JSON strings, with the list wrapped in quotation marks, i.e. --schedules '[{"timeZone":"UTC","period":"DAILY","hourOfDay":18},{"timeZone":"UTC","period":"HOURLY"}]'

    State string

    (Updatable) The target state for the Filesystem Snapshot Policy. Could be set to ACTIVE or INACTIVE.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    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. Example: Uocm:PHX-AD-1
    compartmentId String
    (Updatable) The OCID of the compartment that contains the file system snapshot policy.
    definedTags Map<String,Object>
    (Updatable) 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
    (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: policy1
    freeformTags Map<String,Object>
    (Updatable) 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"}
    policyPrefix String
    (Updatable) The prefix to apply to all snapshots created by this policy. Example: acme
    schedules List<FilesystemSnapshotPolicySchedule>

    (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.

    If using the CLI, provide the schedule as a list of JSON strings, with the list wrapped in quotation marks, i.e. --schedules '[{"timeZone":"UTC","period":"DAILY","hourOfDay":18},{"timeZone":"UTC","period":"HOURLY"}]'

    state String

    (Updatable) The target state for the Filesystem Snapshot Policy. Could be set to ACTIVE or INACTIVE.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    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. Example: Uocm:PHX-AD-1
    compartmentId string
    (Updatable) The OCID of the compartment that contains the file system snapshot policy.
    definedTags {[key: string]: any}
    (Updatable) 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
    (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: policy1
    freeformTags {[key: string]: any}
    (Updatable) 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"}
    policyPrefix string
    (Updatable) The prefix to apply to all snapshots created by this policy. Example: acme
    schedules FilesystemSnapshotPolicySchedule[]

    (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.

    If using the CLI, provide the schedule as a list of JSON strings, with the list wrapped in quotation marks, i.e. --schedules '[{"timeZone":"UTC","period":"DAILY","hourOfDay":18},{"timeZone":"UTC","period":"HOURLY"}]'

    state string

    (Updatable) The target state for the Filesystem Snapshot Policy. Could be set to ACTIVE or INACTIVE.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    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. Example: Uocm:PHX-AD-1
    compartment_id str
    (Updatable) The OCID of the compartment that contains the file system snapshot policy.
    defined_tags Mapping[str, Any]
    (Updatable) 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
    (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: policy1
    freeform_tags Mapping[str, Any]
    (Updatable) 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"}
    policy_prefix str
    (Updatable) The prefix to apply to all snapshots created by this policy. Example: acme
    schedules Sequence[filestorage.FilesystemSnapshotPolicyScheduleArgs]

    (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.

    If using the CLI, provide the schedule as a list of JSON strings, with the list wrapped in quotation marks, i.e. --schedules '[{"timeZone":"UTC","period":"DAILY","hourOfDay":18},{"timeZone":"UTC","period":"HOURLY"}]'

    state str

    (Updatable) The target state for the Filesystem Snapshot Policy. Could be set to ACTIVE or INACTIVE.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    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. Example: Uocm:PHX-AD-1
    compartmentId String
    (Updatable) The OCID of the compartment that contains the file system snapshot policy.
    definedTags Map<Any>
    (Updatable) 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
    (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: policy1
    freeformTags Map<Any>
    (Updatable) 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"}
    policyPrefix String
    (Updatable) The prefix to apply to all snapshots created by this policy. Example: acme
    schedules List<Property Map>

    (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.

    If using the CLI, provide the schedule as a list of JSON strings, with the list wrapped in quotation marks, i.e. --schedules '[{"timeZone":"UTC","period":"DAILY","hourOfDay":18},{"timeZone":"UTC","period":"HOURLY"}]'

    state String

    (Updatable) The target state for the Filesystem Snapshot Policy. Could be set to ACTIVE or INACTIVE.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    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

    FilesystemSnapshotPolicySchedule, FilesystemSnapshotPolicyScheduleArgs

    Period string
    (Updatable) The frequency of scheduled snapshots.
    TimeZone string
    (Updatable) Time zone used for scheduling the snapshot.
    DayOfMonth int
    (Updatable) 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
    (Updatable) The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
    HourOfDay int
    (Updatable) 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
    (Updatable) The month to create a scheduled snapshot. Used only for YEARLY snapshot schedules.
    RetentionDurationInSeconds string
    (Updatable) 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
    (Updatable) A name prefix to be applied to snapshots created by this schedule. Example: compliance1
    TimeScheduleStart string
    (Updatable) 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.
    Period string
    (Updatable) The frequency of scheduled snapshots.
    TimeZone string
    (Updatable) Time zone used for scheduling the snapshot.
    DayOfMonth int
    (Updatable) 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
    (Updatable) The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
    HourOfDay int
    (Updatable) 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
    (Updatable) The month to create a scheduled snapshot. Used only for YEARLY snapshot schedules.
    RetentionDurationInSeconds string
    (Updatable) 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
    (Updatable) A name prefix to be applied to snapshots created by this schedule. Example: compliance1
    TimeScheduleStart string
    (Updatable) 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.
    period String
    (Updatable) The frequency of scheduled snapshots.
    timeZone String
    (Updatable) Time zone used for scheduling the snapshot.
    dayOfMonth Integer
    (Updatable) 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
    (Updatable) The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
    hourOfDay Integer
    (Updatable) 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
    (Updatable) The month to create a scheduled snapshot. Used only for YEARLY snapshot schedules.
    retentionDurationInSeconds String
    (Updatable) 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
    (Updatable) A name prefix to be applied to snapshots created by this schedule. Example: compliance1
    timeScheduleStart String
    (Updatable) 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.
    period string
    (Updatable) The frequency of scheduled snapshots.
    timeZone string
    (Updatable) Time zone used for scheduling the snapshot.
    dayOfMonth number
    (Updatable) 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
    (Updatable) The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
    hourOfDay number
    (Updatable) 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
    (Updatable) The month to create a scheduled snapshot. Used only for YEARLY snapshot schedules.
    retentionDurationInSeconds string
    (Updatable) 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
    (Updatable) A name prefix to be applied to snapshots created by this schedule. Example: compliance1
    timeScheduleStart string
    (Updatable) 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.
    period str
    (Updatable) The frequency of scheduled snapshots.
    time_zone str
    (Updatable) Time zone used for scheduling the snapshot.
    day_of_month int
    (Updatable) 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
    (Updatable) The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
    hour_of_day int
    (Updatable) 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
    (Updatable) The month to create a scheduled snapshot. Used only for YEARLY snapshot schedules.
    retention_duration_in_seconds str
    (Updatable) 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
    (Updatable) A name prefix to be applied to snapshots created by this schedule. Example: compliance1
    time_schedule_start str
    (Updatable) 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.
    period String
    (Updatable) The frequency of scheduled snapshots.
    timeZone String
    (Updatable) Time zone used for scheduling the snapshot.
    dayOfMonth Number
    (Updatable) 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
    (Updatable) The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
    hourOfDay Number
    (Updatable) 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
    (Updatable) The month to create a scheduled snapshot. Used only for YEARLY snapshot schedules.
    retentionDurationInSeconds String
    (Updatable) 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
    (Updatable) A name prefix to be applied to snapshots created by this schedule. Example: compliance1
    timeScheduleStart String
    (Updatable) 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.

    Import

    FilesystemSnapshotPolicies can be imported using the id, e.g.

    $ pulumi import oci:FileStorage/filesystemSnapshotPolicy:FilesystemSnapshotPolicy test_filesystem_snapshot_policy "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.31.0 published on Wednesday, Apr 10, 2024 by Pulumi