UNPKG

10.8 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class DLM extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: DLM.Types.ClientConfiguration)
13 config: Config & DLM.Types.ClientConfiguration;
14 /**
15 * Creates a policy to manage the lifecycle of the specified AWS resources. You can create up to 100 lifecycle policies.
16 */
17 createLifecyclePolicy(params: DLM.Types.CreateLifecyclePolicyRequest, callback?: (err: AWSError, data: DLM.Types.CreateLifecyclePolicyResponse) => void): Request<DLM.Types.CreateLifecyclePolicyResponse, AWSError>;
18 /**
19 * Creates a policy to manage the lifecycle of the specified AWS resources. You can create up to 100 lifecycle policies.
20 */
21 createLifecyclePolicy(callback?: (err: AWSError, data: DLM.Types.CreateLifecyclePolicyResponse) => void): Request<DLM.Types.CreateLifecyclePolicyResponse, AWSError>;
22 /**
23 * Deletes the specified lifecycle policy and halts the automated operations that the policy specified.
24 */
25 deleteLifecyclePolicy(params: DLM.Types.DeleteLifecyclePolicyRequest, callback?: (err: AWSError, data: DLM.Types.DeleteLifecyclePolicyResponse) => void): Request<DLM.Types.DeleteLifecyclePolicyResponse, AWSError>;
26 /**
27 * Deletes the specified lifecycle policy and halts the automated operations that the policy specified.
28 */
29 deleteLifecyclePolicy(callback?: (err: AWSError, data: DLM.Types.DeleteLifecyclePolicyResponse) => void): Request<DLM.Types.DeleteLifecyclePolicyResponse, AWSError>;
30 /**
31 * Gets summary information about all or the specified data lifecycle policies. To get complete information about a policy, use GetLifecyclePolicy.
32 */
33 getLifecyclePolicies(params: DLM.Types.GetLifecyclePoliciesRequest, callback?: (err: AWSError, data: DLM.Types.GetLifecyclePoliciesResponse) => void): Request<DLM.Types.GetLifecyclePoliciesResponse, AWSError>;
34 /**
35 * Gets summary information about all or the specified data lifecycle policies. To get complete information about a policy, use GetLifecyclePolicy.
36 */
37 getLifecyclePolicies(callback?: (err: AWSError, data: DLM.Types.GetLifecyclePoliciesResponse) => void): Request<DLM.Types.GetLifecyclePoliciesResponse, AWSError>;
38 /**
39 * Gets detailed information about the specified lifecycle policy.
40 */
41 getLifecyclePolicy(params: DLM.Types.GetLifecyclePolicyRequest, callback?: (err: AWSError, data: DLM.Types.GetLifecyclePolicyResponse) => void): Request<DLM.Types.GetLifecyclePolicyResponse, AWSError>;
42 /**
43 * Gets detailed information about the specified lifecycle policy.
44 */
45 getLifecyclePolicy(callback?: (err: AWSError, data: DLM.Types.GetLifecyclePolicyResponse) => void): Request<DLM.Types.GetLifecyclePolicyResponse, AWSError>;
46 /**
47 * Updates the specified lifecycle policy.
48 */
49 updateLifecyclePolicy(params: DLM.Types.UpdateLifecyclePolicyRequest, callback?: (err: AWSError, data: DLM.Types.UpdateLifecyclePolicyResponse) => void): Request<DLM.Types.UpdateLifecyclePolicyResponse, AWSError>;
50 /**
51 * Updates the specified lifecycle policy.
52 */
53 updateLifecyclePolicy(callback?: (err: AWSError, data: DLM.Types.UpdateLifecyclePolicyResponse) => void): Request<DLM.Types.UpdateLifecyclePolicyResponse, AWSError>;
54}
55declare namespace DLM {
56 export type CopyTags = boolean;
57 export type Count = number;
58 export interface CreateLifecyclePolicyRequest {
59 /**
60 * The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
61 */
62 ExecutionRoleArn: ExecutionRoleArn;
63 /**
64 * A description of the lifecycle policy. The characters ^[0-9A-Za-z _-]+$ are supported.
65 */
66 Description: PolicyDescription;
67 /**
68 * The desired activation state of the lifecycle policy after creation.
69 */
70 State: SettablePolicyStateValues;
71 /**
72 * The configuration details of the lifecycle policy. Target tags cannot be re-used across lifecycle policies.
73 */
74 PolicyDetails: PolicyDetails;
75 }
76 export interface CreateLifecyclePolicyResponse {
77 /**
78 * The identifier of the lifecycle policy.
79 */
80 PolicyId?: PolicyId;
81 }
82 export interface CreateRule {
83 /**
84 * The interval. The supported values are 12 and 24.
85 */
86 Interval: Interval;
87 /**
88 * The interval unit.
89 */
90 IntervalUnit: IntervalUnitValues;
91 /**
92 * The time, in UTC, to start the operation. The operation occurs within a one-hour window following the specified time.
93 */
94 Times?: TimesList;
95 }
96 export interface DeleteLifecyclePolicyRequest {
97 /**
98 * The identifier of the lifecycle policy.
99 */
100 PolicyId: PolicyId;
101 }
102 export interface DeleteLifecyclePolicyResponse {
103 }
104 export type ExecutionRoleArn = string;
105 export interface GetLifecyclePoliciesRequest {
106 /**
107 * The identifiers of the data lifecycle policies.
108 */
109 PolicyIds?: PolicyIdList;
110 /**
111 * The activation state.
112 */
113 State?: GettablePolicyStateValues;
114 /**
115 * The resource type.
116 */
117 ResourceTypes?: ResourceTypeValuesList;
118 /**
119 * The target tag for a policy. Tags are strings in the format key=value.
120 */
121 TargetTags?: TargetTagsFilterList;
122 /**
123 * The tags to add to objects created by the policy. Tags are strings in the format key=value. These user-defined tags are added in addition to the AWS-added lifecycle tags.
124 */
125 TagsToAdd?: TagsToAddFilterList;
126 }
127 export interface GetLifecyclePoliciesResponse {
128 /**
129 * Summary information about the lifecycle policies.
130 */
131 Policies?: LifecyclePolicySummaryList;
132 }
133 export interface GetLifecyclePolicyRequest {
134 /**
135 * The identifier of the lifecycle policy.
136 */
137 PolicyId: PolicyId;
138 }
139 export interface GetLifecyclePolicyResponse {
140 /**
141 * Detailed information about the lifecycle policy.
142 */
143 Policy?: LifecyclePolicy;
144 }
145 export type GettablePolicyStateValues = "ENABLED"|"DISABLED"|"ERROR"|string;
146 export type Interval = number;
147 export type IntervalUnitValues = "HOURS"|string;
148 export interface LifecyclePolicy {
149 /**
150 * The identifier of the lifecycle policy.
151 */
152 PolicyId?: PolicyId;
153 /**
154 * The description of the lifecycle policy.
155 */
156 Description?: PolicyDescription;
157 /**
158 * The activation state of the lifecycle policy.
159 */
160 State?: GettablePolicyStateValues;
161 /**
162 * The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
163 */
164 ExecutionRoleArn?: ExecutionRoleArn;
165 /**
166 * The local date and time when the lifecycle policy was created.
167 */
168 DateCreated?: Timestamp;
169 /**
170 * The local date and time when the lifecycle policy was last modified.
171 */
172 DateModified?: Timestamp;
173 /**
174 * The configuration of the lifecycle policy
175 */
176 PolicyDetails?: PolicyDetails;
177 }
178 export interface LifecyclePolicySummary {
179 /**
180 * The identifier of the lifecycle policy.
181 */
182 PolicyId?: PolicyId;
183 /**
184 * The description of the lifecycle policy.
185 */
186 Description?: PolicyDescription;
187 /**
188 * The activation state of the lifecycle policy.
189 */
190 State?: GettablePolicyStateValues;
191 }
192 export type LifecyclePolicySummaryList = LifecyclePolicySummary[];
193 export type PolicyDescription = string;
194 export interface PolicyDetails {
195 /**
196 * The resource type.
197 */
198 ResourceTypes?: ResourceTypeValuesList;
199 /**
200 * The single tag that identifies targeted resources for this policy.
201 */
202 TargetTags?: TargetTagList;
203 /**
204 * The schedule of policy-defined actions.
205 */
206 Schedules?: ScheduleList;
207 }
208 export type PolicyId = string;
209 export type PolicyIdList = PolicyId[];
210 export type ResourceTypeValues = "VOLUME"|string;
211 export type ResourceTypeValuesList = ResourceTypeValues[];
212 export interface RetainRule {
213 /**
214 * The number of snapshots to keep for each volume, up to a maximum of 1000.
215 */
216 Count: Count;
217 }
218 export interface Schedule {
219 /**
220 * The name of the schedule.
221 */
222 Name?: ScheduleName;
223 CopyTags?: CopyTags;
224 /**
225 * The tags to apply to policy-created resources. These user-defined tags are in addition to the AWS-added lifecycle tags.
226 */
227 TagsToAdd?: TagsToAddList;
228 /**
229 * The create rule.
230 */
231 CreateRule?: CreateRule;
232 /**
233 * The retain rule.
234 */
235 RetainRule?: RetainRule;
236 }
237 export type ScheduleList = Schedule[];
238 export type ScheduleName = string;
239 export type SettablePolicyStateValues = "ENABLED"|"DISABLED"|string;
240 export type String = string;
241 export interface Tag {
242 /**
243 * The tag key.
244 */
245 Key: String;
246 /**
247 * The tag value.
248 */
249 Value: String;
250 }
251 export type TagFilter = string;
252 export type TagsToAddFilterList = TagFilter[];
253 export type TagsToAddList = Tag[];
254 export type TargetTagList = Tag[];
255 export type TargetTagsFilterList = TagFilter[];
256 export type Time = string;
257 export type TimesList = Time[];
258 export type Timestamp = Date;
259 export interface UpdateLifecyclePolicyRequest {
260 /**
261 * The identifier of the lifecycle policy.
262 */
263 PolicyId: PolicyId;
264 /**
265 * The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
266 */
267 ExecutionRoleArn?: ExecutionRoleArn;
268 /**
269 * The desired activation state of the lifecycle policy after creation.
270 */
271 State?: SettablePolicyStateValues;
272 /**
273 * A description of the lifecycle policy.
274 */
275 Description?: PolicyDescription;
276 /**
277 * The configuration of the lifecycle policy. Target tags cannot be re-used across policies.
278 */
279 PolicyDetails?: PolicyDetails;
280 }
281 export interface UpdateLifecyclePolicyResponse {
282 }
283 /**
284 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
285 */
286 export type apiVersion = "2018-01-12"|"latest"|string;
287 export interface ClientApiVersions {
288 /**
289 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
290 */
291 apiVersion?: apiVersion;
292 }
293 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
294 /**
295 * Contains interfaces for use with the DLM client.
296 */
297 export import Types = DLM;
298}
299export = DLM;