oci.FileStorage.FilesystemSnapshotPolicy
Explore with Pulumi AI
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("test_filesystem_snapshot_policy", {
availabilityDomain: filesystemSnapshotPolicyAvailabilityDomain,
compartmentId: compartmentId,
definedTags: {
"Operations.CostCenter": "42",
},
displayName: filesystemSnapshotPolicyDisplayName,
freeformTags: {
Department: "Finance",
},
policyPrefix: filesystemSnapshotPolicyPolicyPrefix,
schedules: [{
period: filesystemSnapshotPolicySchedulesPeriod,
timeZone: filesystemSnapshotPolicySchedulesTimeZone,
dayOfMonth: filesystemSnapshotPolicySchedulesDayOfMonth,
dayOfWeek: filesystemSnapshotPolicySchedulesDayOfWeek,
hourOfDay: filesystemSnapshotPolicySchedulesHourOfDay,
month: filesystemSnapshotPolicySchedulesMonth,
retentionDurationInSeconds: filesystemSnapshotPolicySchedulesRetentionDurationInSeconds,
schedulePrefix: filesystemSnapshotPolicySchedulesSchedulePrefix,
timeScheduleStart: filesystemSnapshotPolicySchedulesTimeScheduleStart,
}],
});
import pulumi
import pulumi_oci as oci
test_filesystem_snapshot_policy = oci.file_storage.FilesystemSnapshotPolicy("test_filesystem_snapshot_policy",
availability_domain=filesystem_snapshot_policy_availability_domain,
compartment_id=compartment_id,
defined_tags={
"Operations.CostCenter": "42",
},
display_name=filesystem_snapshot_policy_display_name,
freeform_tags={
"Department": "Finance",
},
policy_prefix=filesystem_snapshot_policy_policy_prefix,
schedules=[oci.file_storage.FilesystemSnapshotPolicyScheduleArgs(
period=filesystem_snapshot_policy_schedules_period,
time_zone=filesystem_snapshot_policy_schedules_time_zone,
day_of_month=filesystem_snapshot_policy_schedules_day_of_month,
day_of_week=filesystem_snapshot_policy_schedules_day_of_week,
hour_of_day=filesystem_snapshot_policy_schedules_hour_of_day,
month=filesystem_snapshot_policy_schedules_month,
retention_duration_in_seconds=filesystem_snapshot_policy_schedules_retention_duration_in_seconds,
schedule_prefix=filesystem_snapshot_policy_schedules_schedule_prefix,
time_schedule_start=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, "test_filesystem_snapshot_policy", &FileStorage.FilesystemSnapshotPolicyArgs{
AvailabilityDomain: pulumi.Any(filesystemSnapshotPolicyAvailabilityDomain),
CompartmentId: pulumi.Any(compartmentId),
DefinedTags: pulumi.Map{
"Operations.CostCenter": pulumi.Any("42"),
},
DisplayName: pulumi.Any(filesystemSnapshotPolicyDisplayName),
FreeformTags: pulumi.Map{
"Department": pulumi.Any("Finance"),
},
PolicyPrefix: pulumi.Any(filesystemSnapshotPolicyPolicyPrefix),
Schedules: filestorage.FilesystemSnapshotPolicyScheduleArray{
&filestorage.FilesystemSnapshotPolicyScheduleArgs{
Period: pulumi.Any(filesystemSnapshotPolicySchedulesPeriod),
TimeZone: pulumi.Any(filesystemSnapshotPolicySchedulesTimeZone),
DayOfMonth: pulumi.Any(filesystemSnapshotPolicySchedulesDayOfMonth),
DayOfWeek: pulumi.Any(filesystemSnapshotPolicySchedulesDayOfWeek),
HourOfDay: pulumi.Any(filesystemSnapshotPolicySchedulesHourOfDay),
Month: pulumi.Any(filesystemSnapshotPolicySchedulesMonth),
RetentionDurationInSeconds: pulumi.Any(filesystemSnapshotPolicySchedulesRetentionDurationInSeconds),
SchedulePrefix: pulumi.Any(filesystemSnapshotPolicySchedulesSchedulePrefix),
TimeScheduleStart: pulumi.Any(filesystemSnapshotPolicySchedulesTimeScheduleStart),
},
},
})
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("test_filesystem_snapshot_policy", new()
{
AvailabilityDomain = filesystemSnapshotPolicyAvailabilityDomain,
CompartmentId = compartmentId,
DefinedTags =
{
{ "Operations.CostCenter", "42" },
},
DisplayName = filesystemSnapshotPolicyDisplayName,
FreeformTags =
{
{ "Department", "Finance" },
},
PolicyPrefix = filesystemSnapshotPolicyPolicyPrefix,
Schedules = new[]
{
new Oci.FileStorage.Inputs.FilesystemSnapshotPolicyScheduleArgs
{
Period = filesystemSnapshotPolicySchedulesPeriod,
TimeZone = filesystemSnapshotPolicySchedulesTimeZone,
DayOfMonth = filesystemSnapshotPolicySchedulesDayOfMonth,
DayOfWeek = filesystemSnapshotPolicySchedulesDayOfWeek,
HourOfDay = filesystemSnapshotPolicySchedulesHourOfDay,
Month = filesystemSnapshotPolicySchedulesMonth,
RetentionDurationInSeconds = filesystemSnapshotPolicySchedulesRetentionDurationInSeconds,
SchedulePrefix = filesystemSnapshotPolicySchedulesSchedulePrefix,
TimeScheduleStart = filesystemSnapshotPolicySchedulesTimeScheduleStart,
},
},
});
});
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(filesystemSnapshotPolicyAvailabilityDomain)
.compartmentId(compartmentId)
.definedTags(Map.of("Operations.CostCenter", "42"))
.displayName(filesystemSnapshotPolicyDisplayName)
.freeformTags(Map.of("Department", "Finance"))
.policyPrefix(filesystemSnapshotPolicyPolicyPrefix)
.schedules(FilesystemSnapshotPolicyScheduleArgs.builder()
.period(filesystemSnapshotPolicySchedulesPeriod)
.timeZone(filesystemSnapshotPolicySchedulesTimeZone)
.dayOfMonth(filesystemSnapshotPolicySchedulesDayOfMonth)
.dayOfWeek(filesystemSnapshotPolicySchedulesDayOfWeek)
.hourOfDay(filesystemSnapshotPolicySchedulesHourOfDay)
.month(filesystemSnapshotPolicySchedulesMonth)
.retentionDurationInSeconds(filesystemSnapshotPolicySchedulesRetentionDurationInSeconds)
.schedulePrefix(filesystemSnapshotPolicySchedulesSchedulePrefix)
.timeScheduleStart(filesystemSnapshotPolicySchedulesTimeScheduleStart)
.build())
.build());
}
}
resources:
testFilesystemSnapshotPolicy:
type: oci:FileStorage:FilesystemSnapshotPolicy
name: test_filesystem_snapshot_policy
properties:
availabilityDomain: ${filesystemSnapshotPolicyAvailabilityDomain}
compartmentId: ${compartmentId}
definedTags:
Operations.CostCenter: '42'
displayName: ${filesystemSnapshotPolicyDisplayName}
freeformTags:
Department: Finance
policyPrefix: ${filesystemSnapshotPolicyPolicyPrefix}
schedules:
- period: ${filesystemSnapshotPolicySchedulesPeriod}
timeZone: ${filesystemSnapshotPolicySchedulesTimeZone}
dayOfMonth: ${filesystemSnapshotPolicySchedulesDayOfMonth}
dayOfWeek: ${filesystemSnapshotPolicySchedulesDayOfWeek}
hourOfDay: ${filesystemSnapshotPolicySchedulesHourOfDay}
month: ${filesystemSnapshotPolicySchedulesMonth}
retentionDurationInSeconds: ${filesystemSnapshotPolicySchedulesRetentionDurationInSeconds}
schedulePrefix: ${filesystemSnapshotPolicySchedulesSchedulePrefix}
timeScheduleStart: ${filesystemSnapshotPolicySchedulesTimeScheduleStart}
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.
Constructor 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:
- Availability
Domain string - The availability domain that the file system snapshot policy is in. Example:
Uocm:PHX-AD-1
- Compartment
Id string - (Updatable) The OCID of the compartment that contains the file system snapshot policy.
- 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"}
- Display
Name string - (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
policy1
- 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"}
- Policy
Prefix string - (Updatable) The prefix to apply to all snapshots created by this policy. Example:
acme
- Schedules
List<Filesystem
Snapshot Policy Schedule> (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
orINACTIVE
.** 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 string - The availability domain that the file system snapshot policy is in. Example:
Uocm:PHX-AD-1
- Compartment
Id string - (Updatable) The OCID of the compartment that contains the file system snapshot policy.
- 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"}
- Display
Name string - (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
policy1
- 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"}
- Policy
Prefix string - (Updatable) The prefix to apply to all snapshots created by this policy. Example:
acme
- Schedules
[]Filesystem
Snapshot Policy Schedule Args (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
orINACTIVE
.** 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 String - The availability domain that the file system snapshot policy is in. Example:
Uocm:PHX-AD-1
- compartment
Id String - (Updatable) The OCID of the compartment that contains the file system snapshot policy.
- 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"}
- display
Name String - (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
policy1
- 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"}
- policy
Prefix String - (Updatable) The prefix to apply to all snapshots created by this policy. Example:
acme
- schedules
List<Filesystem
Snapshot Policy Schedule> (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
orINACTIVE
.** 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 string - The availability domain that the file system snapshot policy is in. Example:
Uocm:PHX-AD-1
- compartment
Id string - (Updatable) The OCID of the compartment that contains the file system snapshot policy.
- {[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"}
- display
Name string - (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
policy1
- {[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"}
- policy
Prefix string - (Updatable) The prefix to apply to all snapshots created by this policy. Example:
acme
- schedules
Filesystem
Snapshot Policy Schedule[] (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
orINACTIVE
.** 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.
- 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
- 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.
Filesystem Snapshot Policy Schedule Args] (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
orINACTIVE
.** 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 String - The availability domain that the file system snapshot policy is in. Example:
Uocm:PHX-AD-1
- compartment
Id String - (Updatable) The OCID of the compartment that contains the file system snapshot policy.
- 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"}
- display
Name String - (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
policy1
- 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"}
- policy
Prefix 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
orINACTIVE
.** 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.
- Time
Created 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.
- Time
Created 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.
- time
Created 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.
- time
Created 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.
- time
Created 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.
- Availability
Domain string - The availability domain that the file system snapshot policy is in. Example:
Uocm:PHX-AD-1
- Compartment
Id string - (Updatable) The OCID of the compartment that contains the file system snapshot policy.
- 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"}
- Display
Name string - (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
policy1
- 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"}
- Policy
Prefix string - (Updatable) The prefix to apply to all snapshots created by this policy. Example:
acme
- Schedules
List<Filesystem
Snapshot Policy Schedule> (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
orINACTIVE
.** 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 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 string - The availability domain that the file system snapshot policy is in. Example:
Uocm:PHX-AD-1
- Compartment
Id string - (Updatable) The OCID of the compartment that contains the file system snapshot policy.
- 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"}
- Display
Name string - (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
policy1
- 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"}
- Policy
Prefix string - (Updatable) The prefix to apply to all snapshots created by this policy. Example:
acme
- Schedules
[]Filesystem
Snapshot Policy Schedule Args (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
orINACTIVE
.** 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 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 String - The availability domain that the file system snapshot policy is in. Example:
Uocm:PHX-AD-1
- compartment
Id String - (Updatable) The OCID of the compartment that contains the file system snapshot policy.
- 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"}
- display
Name String - (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
policy1
- 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"}
- policy
Prefix String - (Updatable) The prefix to apply to all snapshots created by this policy. Example:
acme
- schedules
List<Filesystem
Snapshot Policy Schedule> (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
orINACTIVE
.** 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 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 string - The availability domain that the file system snapshot policy is in. Example:
Uocm:PHX-AD-1
- compartment
Id string - (Updatable) The OCID of the compartment that contains the file system snapshot policy.
- {[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"}
- display
Name string - (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
policy1
- {[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"}
- policy
Prefix string - (Updatable) The prefix to apply to all snapshots created by this policy. Example:
acme
- schedules
Filesystem
Snapshot Policy Schedule[] (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
orINACTIVE
.** 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 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.
- 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
- 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.
Filesystem Snapshot Policy Schedule Args] (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
orINACTIVE
.** 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
- availability
Domain String - The availability domain that the file system snapshot policy is in. Example:
Uocm:PHX-AD-1
- compartment
Id String - (Updatable) The OCID of the compartment that contains the file system snapshot policy.
- 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"}
- display
Name String - (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
policy1
- 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"}
- policy
Prefix 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
orINACTIVE
.** 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 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.
- Time
Zone string - (Updatable) Time zone used for scheduling the snapshot.
- Day
Of intMonth - (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 stringWeek - (Updatable) The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
- Hour
Of intDay - (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.
- Retention
Duration stringIn Seconds - (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 string - (Updatable) A name prefix to be applied to snapshots created by this schedule. Example:
compliance1
- Time
Schedule stringStart - (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.
- Time
Zone string - (Updatable) Time zone used for scheduling the snapshot.
- Day
Of intMonth - (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 stringWeek - (Updatable) The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
- Hour
Of intDay - (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.
- Retention
Duration stringIn Seconds - (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 string - (Updatable) A name prefix to be applied to snapshots created by this schedule. Example:
compliance1
- Time
Schedule stringStart - (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.
- time
Zone String - (Updatable) Time zone used for scheduling the snapshot.
- day
Of IntegerMonth - (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 StringWeek - (Updatable) The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
- hour
Of IntegerDay - (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.
- retention
Duration StringIn Seconds - (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 String - (Updatable) A name prefix to be applied to snapshots created by this schedule. Example:
compliance1
- time
Schedule StringStart - (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.
- time
Zone string - (Updatable) Time zone used for scheduling the snapshot.
- day
Of numberMonth - (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 stringWeek - (Updatable) The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
- hour
Of numberDay - (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.
- retention
Duration stringIn Seconds - (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 string - (Updatable) A name prefix to be applied to snapshots created by this schedule. Example:
compliance1
- time
Schedule stringStart - (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_ intmonth - (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_ strweek - (Updatable) The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
- hour_
of_ intday - (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_ strin_ seconds - (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_ strstart - (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.
- time
Zone String - (Updatable) Time zone used for scheduling the snapshot.
- day
Of NumberMonth - (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 StringWeek - (Updatable) The day of the week to create a scheduled snapshot. Used for WEEKLY snapshot schedules.
- hour
Of NumberDay - (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.
- retention
Duration StringIn Seconds - (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 String - (Updatable) A name prefix to be applied to snapshots created by this schedule. Example:
compliance1
- time
Schedule StringStart - (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.