/
storage_accounts_management_policy_spec_arm_types_gen.go
166 lines (129 loc) · 7.39 KB
/
storage_accounts_management_policy_spec_arm_types_gen.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
// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package v1api20210401
import "github.com/Azure/azure-service-operator/v2/pkg/genruntime"
type StorageAccounts_ManagementPolicy_Spec_ARM struct {
Name string `json:"name,omitempty"`
// Properties: Returns the Storage Account Data Policies Rules.
Properties *ManagementPolicyProperties_ARM `json:"properties,omitempty"`
}
var _ genruntime.ARMResourceSpec = &StorageAccounts_ManagementPolicy_Spec_ARM{}
// GetAPIVersion returns the ARM API version of the resource. This is always "2021-04-01"
func (policy StorageAccounts_ManagementPolicy_Spec_ARM) GetAPIVersion() string {
return string(APIVersion_Value)
}
// GetName returns the Name of the resource
func (policy *StorageAccounts_ManagementPolicy_Spec_ARM) GetName() string {
return policy.Name
}
// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts/managementPolicies"
func (policy *StorageAccounts_ManagementPolicy_Spec_ARM) GetType() string {
return "Microsoft.Storage/storageAccounts/managementPolicies"
}
// The Storage Account ManagementPolicy properties.
type ManagementPolicyProperties_ARM struct {
// Policy: The Storage Account ManagementPolicy, in JSON format. See more details in:
// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
Policy *ManagementPolicySchema_ARM `json:"policy,omitempty"`
}
// The Storage Account ManagementPolicies Rules. See more details in:
// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
type ManagementPolicySchema_ARM struct {
// Rules: The Storage Account ManagementPolicies Rules. See more details in:
// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
Rules []ManagementPolicyRule_ARM `json:"rules"`
}
// An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.
type ManagementPolicyRule_ARM struct {
// Definition: An object that defines the Lifecycle rule.
Definition *ManagementPolicyDefinition_ARM `json:"definition,omitempty"`
// Enabled: Rule is enabled if set to true.
Enabled *bool `json:"enabled,omitempty"`
// Name: A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be
// unique within a policy.
Name *string `json:"name,omitempty"`
// Type: The valid value is Lifecycle
Type *ManagementPolicyRule_Type `json:"type,omitempty"`
}
// An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set.
type ManagementPolicyDefinition_ARM struct {
// Actions: An object that defines the action set.
Actions *ManagementPolicyAction_ARM `json:"actions,omitempty"`
// Filters: An object that defines the filter set.
Filters *ManagementPolicyFilter_ARM `json:"filters,omitempty"`
}
// Actions are applied to the filtered blobs when the execution condition is met.
type ManagementPolicyAction_ARM struct {
// BaseBlob: The management policy action for base blob
BaseBlob *ManagementPolicyBaseBlob_ARM `json:"baseBlob,omitempty"`
// Snapshot: The management policy action for snapshot
Snapshot *ManagementPolicySnapShot_ARM `json:"snapshot,omitempty"`
// Version: The management policy action for version
Version *ManagementPolicyVersion_ARM `json:"version,omitempty"`
}
// Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical
// AND is performed on all filters.
type ManagementPolicyFilter_ARM struct {
// BlobIndexMatch: An array of blob index tag based filters, there can be at most 10 tag filters
BlobIndexMatch []TagFilter_ARM `json:"blobIndexMatch"`
// BlobTypes: An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete
// actions are supported for appendBlob.
BlobTypes []string `json:"blobTypes"`
// PrefixMatch: An array of strings for prefixes to be match.
PrefixMatch []string `json:"prefixMatch"`
}
// Management policy action for base blob.
type ManagementPolicyBaseBlob_ARM struct {
// Delete: The function to delete the blob
Delete *DateAfterModification_ARM `json:"delete,omitempty"`
// EnableAutoTierToHotFromCool: This property enables auto tiering of a blob from cool to hot on a blob access. This
// property requires tierToCool.daysAfterLastAccessTimeGreaterThan.
EnableAutoTierToHotFromCool *bool `json:"enableAutoTierToHotFromCool,omitempty"`
// TierToArchive: The function to tier blobs to archive storage. Support blobs currently at Hot or Cool tier
TierToArchive *DateAfterModification_ARM `json:"tierToArchive,omitempty"`
// TierToCool: The function to tier blobs to cool storage. Support blobs currently at Hot tier
TierToCool *DateAfterModification_ARM `json:"tierToCool,omitempty"`
}
// Management policy action for snapshot.
type ManagementPolicySnapShot_ARM struct {
// Delete: The function to delete the blob snapshot
Delete *DateAfterCreation_ARM `json:"delete,omitempty"`
// TierToArchive: The function to tier blob snapshot to archive storage. Support blob snapshot currently at Hot or Cool tier
TierToArchive *DateAfterCreation_ARM `json:"tierToArchive,omitempty"`
// TierToCool: The function to tier blob snapshot to cool storage. Support blob snapshot currently at Hot tier
TierToCool *DateAfterCreation_ARM `json:"tierToCool,omitempty"`
}
// Management policy action for blob version.
type ManagementPolicyVersion_ARM struct {
// Delete: The function to delete the blob version
Delete *DateAfterCreation_ARM `json:"delete,omitempty"`
// TierToArchive: The function to tier blob version to archive storage. Support blob version currently at Hot or Cool tier
TierToArchive *DateAfterCreation_ARM `json:"tierToArchive,omitempty"`
// TierToCool: The function to tier blob version to cool storage. Support blob version currently at Hot tier
TierToCool *DateAfterCreation_ARM `json:"tierToCool,omitempty"`
}
// Blob index tag based filtering for blob objects
type TagFilter_ARM struct {
// Name: This is the filter tag name, it can have 1 - 128 characters
Name *string `json:"name,omitempty"`
// Op: This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is
// currently supported
Op *string `json:"op,omitempty"`
// Value: This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters
Value *string `json:"value,omitempty"`
}
// Object to define the number of days after creation.
type DateAfterCreation_ARM struct {
// DaysAfterCreationGreaterThan: Value indicating the age in days after creation
DaysAfterCreationGreaterThan *int `json:"daysAfterCreationGreaterThan,omitempty"`
}
// Object to define the number of days after object last modification Or last access. Properties
// daysAfterModificationGreaterThan and daysAfterLastAccessTimeGreaterThan are mutually exclusive.
type DateAfterModification_ARM struct {
// DaysAfterLastAccessTimeGreaterThan: Value indicating the age in days after last blob access. This property can only be
// used in conjunction with last access time tracking policy
DaysAfterLastAccessTimeGreaterThan *int `json:"daysAfterLastAccessTimeGreaterThan,omitempty"`
// DaysAfterModificationGreaterThan: Value indicating the age in days after last modification
DaysAfterModificationGreaterThan *int `json:"daysAfterModificationGreaterThan,omitempty"`
}