generated from pulumi/pulumi-tf-provider-boilerplate
/
getFilesystemSnapshotPolicy.go
178 lines (153 loc) · 9.62 KB
/
getFilesystemSnapshotPolicy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package filestorage
import (
"context"
"reflect"
"github.com/pulumi/pulumi-oci/sdk/go/oci/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// This data source provides details about a specific Filesystem Snapshot Policy resource in Oracle Cloud Infrastructure File Storage service.
//
// Gets the specified file system snapshot policy's information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/FileStorage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := FileStorage.GetFilesystemSnapshotPolicy(ctx, &filestorage.GetFilesystemSnapshotPolicyArgs{
// FilesystemSnapshotPolicyId: testFilesystemSnapshotPolicyOciFileStorageFilesystemSnapshotPolicy.Id,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupFilesystemSnapshotPolicy(ctx *pulumi.Context, args *LookupFilesystemSnapshotPolicyArgs, opts ...pulumi.InvokeOption) (*LookupFilesystemSnapshotPolicyResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupFilesystemSnapshotPolicyResult
err := ctx.Invoke("oci:FileStorage/getFilesystemSnapshotPolicy:getFilesystemSnapshotPolicy", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getFilesystemSnapshotPolicy.
type LookupFilesystemSnapshotPolicyArgs struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system snapshot policy.
FilesystemSnapshotPolicyId string `pulumi:"filesystemSnapshotPolicyId"`
}
// A collection of values returned by getFilesystemSnapshotPolicy.
type LookupFilesystemSnapshotPolicyResult struct {
// The availability domain that the file system snapshot policy is in. May be unset using a blank or NULL value. Example: `Uocm:PHX-AD-2`
AvailabilityDomain string `pulumi:"availabilityDomain"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the file system snapshot policy.
CompartmentId string `pulumi:"compartmentId"`
// Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
DefinedTags map[string]interface{} `pulumi:"definedTags"`
// A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: `My Filesystem Snapshot Policy`
DisplayName string `pulumi:"displayName"`
FilesystemSnapshotPolicyId string `pulumi:"filesystemSnapshotPolicyId"`
// 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
FreeformTags map[string]interface{} `pulumi:"freeformTags"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system snapshot policy.
Id string `pulumi:"id"`
// The prefix to apply to all snapshots created by this policy. Example: `acme`
PolicyPrefix string `pulumi:"policyPrefix"`
// The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.
Schedules []GetFilesystemSnapshotPolicySchedule `pulumi:"schedules"`
// The current state of this file system snapshot policy.
State string `pulumi:"state"`
// The date and time the file system snapshot policy was created, expressed in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. Example: `2016-08-25T21:10:29.600Z`
TimeCreated string `pulumi:"timeCreated"`
}
func LookupFilesystemSnapshotPolicyOutput(ctx *pulumi.Context, args LookupFilesystemSnapshotPolicyOutputArgs, opts ...pulumi.InvokeOption) LookupFilesystemSnapshotPolicyResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupFilesystemSnapshotPolicyResult, error) {
args := v.(LookupFilesystemSnapshotPolicyArgs)
r, err := LookupFilesystemSnapshotPolicy(ctx, &args, opts...)
var s LookupFilesystemSnapshotPolicyResult
if r != nil {
s = *r
}
return s, err
}).(LookupFilesystemSnapshotPolicyResultOutput)
}
// A collection of arguments for invoking getFilesystemSnapshotPolicy.
type LookupFilesystemSnapshotPolicyOutputArgs struct {
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system snapshot policy.
FilesystemSnapshotPolicyId pulumi.StringInput `pulumi:"filesystemSnapshotPolicyId"`
}
func (LookupFilesystemSnapshotPolicyOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupFilesystemSnapshotPolicyArgs)(nil)).Elem()
}
// A collection of values returned by getFilesystemSnapshotPolicy.
type LookupFilesystemSnapshotPolicyResultOutput struct{ *pulumi.OutputState }
func (LookupFilesystemSnapshotPolicyResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupFilesystemSnapshotPolicyResult)(nil)).Elem()
}
func (o LookupFilesystemSnapshotPolicyResultOutput) ToLookupFilesystemSnapshotPolicyResultOutput() LookupFilesystemSnapshotPolicyResultOutput {
return o
}
func (o LookupFilesystemSnapshotPolicyResultOutput) ToLookupFilesystemSnapshotPolicyResultOutputWithContext(ctx context.Context) LookupFilesystemSnapshotPolicyResultOutput {
return o
}
// The availability domain that the file system snapshot policy is in. May be unset using a blank or NULL value. Example: `Uocm:PHX-AD-2`
func (o LookupFilesystemSnapshotPolicyResultOutput) AvailabilityDomain() pulumi.StringOutput {
return o.ApplyT(func(v LookupFilesystemSnapshotPolicyResult) string { return v.AvailabilityDomain }).(pulumi.StringOutput)
}
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the file system snapshot policy.
func (o LookupFilesystemSnapshotPolicyResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupFilesystemSnapshotPolicyResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
// Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
func (o LookupFilesystemSnapshotPolicyResultOutput) DefinedTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupFilesystemSnapshotPolicyResult) map[string]interface{} { return v.DefinedTags }).(pulumi.MapOutput)
}
// A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: `My Filesystem Snapshot Policy`
func (o LookupFilesystemSnapshotPolicyResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupFilesystemSnapshotPolicyResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
func (o LookupFilesystemSnapshotPolicyResultOutput) FilesystemSnapshotPolicyId() pulumi.StringOutput {
return o.ApplyT(func(v LookupFilesystemSnapshotPolicyResult) string { return v.FilesystemSnapshotPolicyId }).(pulumi.StringOutput)
}
// 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
func (o LookupFilesystemSnapshotPolicyResultOutput) FreeformTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupFilesystemSnapshotPolicyResult) map[string]interface{} { return v.FreeformTags }).(pulumi.MapOutput)
}
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system snapshot policy.
func (o LookupFilesystemSnapshotPolicyResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupFilesystemSnapshotPolicyResult) string { return v.Id }).(pulumi.StringOutput)
}
// The prefix to apply to all snapshots created by this policy. Example: `acme`
func (o LookupFilesystemSnapshotPolicyResultOutput) PolicyPrefix() pulumi.StringOutput {
return o.ApplyT(func(v LookupFilesystemSnapshotPolicyResult) string { return v.PolicyPrefix }).(pulumi.StringOutput)
}
// The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy.
func (o LookupFilesystemSnapshotPolicyResultOutput) Schedules() GetFilesystemSnapshotPolicyScheduleArrayOutput {
return o.ApplyT(func(v LookupFilesystemSnapshotPolicyResult) []GetFilesystemSnapshotPolicySchedule { return v.Schedules }).(GetFilesystemSnapshotPolicyScheduleArrayOutput)
}
// The current state of this file system snapshot policy.
func (o LookupFilesystemSnapshotPolicyResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupFilesystemSnapshotPolicyResult) string { return v.State }).(pulumi.StringOutput)
}
// The date and time the file system snapshot policy was created, expressed in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. Example: `2016-08-25T21:10:29.600Z`
func (o LookupFilesystemSnapshotPolicyResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v LookupFilesystemSnapshotPolicyResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupFilesystemSnapshotPolicyResultOutput{})
}