UNPKG

17.5 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 * Lists the tags for the specified resource.
48 */
49 listTagsForResource(params: DLM.Types.ListTagsForResourceRequest, callback?: (err: AWSError, data: DLM.Types.ListTagsForResourceResponse) => void): Request<DLM.Types.ListTagsForResourceResponse, AWSError>;
50 /**
51 * Lists the tags for the specified resource.
52 */
53 listTagsForResource(callback?: (err: AWSError, data: DLM.Types.ListTagsForResourceResponse) => void): Request<DLM.Types.ListTagsForResourceResponse, AWSError>;
54 /**
55 * Adds the specified tags to the specified resource.
56 */
57 tagResource(params: DLM.Types.TagResourceRequest, callback?: (err: AWSError, data: DLM.Types.TagResourceResponse) => void): Request<DLM.Types.TagResourceResponse, AWSError>;
58 /**
59 * Adds the specified tags to the specified resource.
60 */
61 tagResource(callback?: (err: AWSError, data: DLM.Types.TagResourceResponse) => void): Request<DLM.Types.TagResourceResponse, AWSError>;
62 /**
63 * Removes the specified tags from the specified resource.
64 */
65 untagResource(params: DLM.Types.UntagResourceRequest, callback?: (err: AWSError, data: DLM.Types.UntagResourceResponse) => void): Request<DLM.Types.UntagResourceResponse, AWSError>;
66 /**
67 * Removes the specified tags from the specified resource.
68 */
69 untagResource(callback?: (err: AWSError, data: DLM.Types.UntagResourceResponse) => void): Request<DLM.Types.UntagResourceResponse, AWSError>;
70 /**
71 * Updates the specified lifecycle policy.
72 */
73 updateLifecyclePolicy(params: DLM.Types.UpdateLifecyclePolicyRequest, callback?: (err: AWSError, data: DLM.Types.UpdateLifecyclePolicyResponse) => void): Request<DLM.Types.UpdateLifecyclePolicyResponse, AWSError>;
74 /**
75 * Updates the specified lifecycle policy.
76 */
77 updateLifecyclePolicy(callback?: (err: AWSError, data: DLM.Types.UpdateLifecyclePolicyResponse) => void): Request<DLM.Types.UpdateLifecyclePolicyResponse, AWSError>;
78}
79declare namespace DLM {
80 export type AvailabilityZone = string;
81 export type AvailabilityZoneList = AvailabilityZone[];
82 export type CmkArn = string;
83 export type CopyTags = boolean;
84 export type CopyTagsNullable = boolean;
85 export type Count = number;
86 export interface CreateLifecyclePolicyRequest {
87 /**
88 * The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
89 */
90 ExecutionRoleArn: ExecutionRoleArn;
91 /**
92 * A description of the lifecycle policy. The characters ^[0-9A-Za-z _-]+$ are supported.
93 */
94 Description: PolicyDescription;
95 /**
96 * The desired activation state of the lifecycle policy after creation.
97 */
98 State: SettablePolicyStateValues;
99 /**
100 * The configuration details of the lifecycle policy.
101 */
102 PolicyDetails: PolicyDetails;
103 /**
104 * The tags to apply to the lifecycle policy during creation.
105 */
106 Tags?: TagMap;
107 }
108 export interface CreateLifecyclePolicyResponse {
109 /**
110 * The identifier of the lifecycle policy.
111 */
112 PolicyId?: PolicyId;
113 }
114 export interface CreateRule {
115 /**
116 * The interval between snapshots. The supported values are 2, 3, 4, 6, 8, 12, and 24.
117 */
118 Interval: Interval;
119 /**
120 * The interval unit.
121 */
122 IntervalUnit: IntervalUnitValues;
123 /**
124 * The time, in UTC, to start the operation. The supported format is hh:mm. The operation occurs within a one-hour window following the specified time.
125 */
126 Times?: TimesList;
127 }
128 export interface CrossRegionCopyRetainRule {
129 /**
130 * The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.
131 */
132 Interval?: Interval;
133 /**
134 * The unit of time for time-based retention.
135 */
136 IntervalUnit?: RetentionIntervalUnitValues;
137 }
138 export interface CrossRegionCopyRule {
139 /**
140 * The target Region.
141 */
142 TargetRegion: TargetRegion;
143 /**
144 * To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or if encryption by default is not enabled.
145 */
146 Encrypted: Encrypted;
147 /**
148 * The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to use for EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used.
149 */
150 CmkArn?: CmkArn;
151 /**
152 * Copy all user-defined tags from the source snapshot to the copied snapshot.
153 */
154 CopyTags?: CopyTagsNullable;
155 /**
156 * The retention rule.
157 */
158 RetainRule?: CrossRegionCopyRetainRule;
159 }
160 export type CrossRegionCopyRules = CrossRegionCopyRule[];
161 export interface DeleteLifecyclePolicyRequest {
162 /**
163 * The identifier of the lifecycle policy.
164 */
165 PolicyId: PolicyId;
166 }
167 export interface DeleteLifecyclePolicyResponse {
168 }
169 export type Encrypted = boolean;
170 export type ExcludeBootVolume = boolean;
171 export type ExecutionRoleArn = string;
172 export interface FastRestoreRule {
173 /**
174 * The number of snapshots to be enabled with fast snapshot restore.
175 */
176 Count?: Count;
177 /**
178 * The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.
179 */
180 Interval?: Interval;
181 /**
182 * The unit of time for enabling fast snapshot restore.
183 */
184 IntervalUnit?: RetentionIntervalUnitValues;
185 /**
186 * The Availability Zones in which to enable fast snapshot restore.
187 */
188 AvailabilityZones: AvailabilityZoneList;
189 }
190 export interface GetLifecyclePoliciesRequest {
191 /**
192 * The identifiers of the data lifecycle policies.
193 */
194 PolicyIds?: PolicyIdList;
195 /**
196 * The activation state.
197 */
198 State?: GettablePolicyStateValues;
199 /**
200 * The resource type.
201 */
202 ResourceTypes?: ResourceTypeValuesList;
203 /**
204 * The target tag for a policy. Tags are strings in the format key=value.
205 */
206 TargetTags?: TargetTagsFilterList;
207 /**
208 * 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.
209 */
210 TagsToAdd?: TagsToAddFilterList;
211 }
212 export interface GetLifecyclePoliciesResponse {
213 /**
214 * Summary information about the lifecycle policies.
215 */
216 Policies?: LifecyclePolicySummaryList;
217 }
218 export interface GetLifecyclePolicyRequest {
219 /**
220 * The identifier of the lifecycle policy.
221 */
222 PolicyId: PolicyId;
223 }
224 export interface GetLifecyclePolicyResponse {
225 /**
226 * Detailed information about the lifecycle policy.
227 */
228 Policy?: LifecyclePolicy;
229 }
230 export type GettablePolicyStateValues = "ENABLED"|"DISABLED"|"ERROR"|string;
231 export type Interval = number;
232 export type IntervalUnitValues = "HOURS"|string;
233 export interface LifecyclePolicy {
234 /**
235 * The identifier of the lifecycle policy.
236 */
237 PolicyId?: PolicyId;
238 /**
239 * The description of the lifecycle policy.
240 */
241 Description?: PolicyDescription;
242 /**
243 * The activation state of the lifecycle policy.
244 */
245 State?: GettablePolicyStateValues;
246 /**
247 * The description of the status.
248 */
249 StatusMessage?: StatusMessage;
250 /**
251 * The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
252 */
253 ExecutionRoleArn?: ExecutionRoleArn;
254 /**
255 * The local date and time when the lifecycle policy was created.
256 */
257 DateCreated?: Timestamp;
258 /**
259 * The local date and time when the lifecycle policy was last modified.
260 */
261 DateModified?: Timestamp;
262 /**
263 * The configuration of the lifecycle policy
264 */
265 PolicyDetails?: PolicyDetails;
266 /**
267 * The tags.
268 */
269 Tags?: TagMap;
270 /**
271 * The Amazon Resource Name (ARN) of the policy.
272 */
273 PolicyArn?: PolicyArn;
274 }
275 export interface LifecyclePolicySummary {
276 /**
277 * The identifier of the lifecycle policy.
278 */
279 PolicyId?: PolicyId;
280 /**
281 * The description of the lifecycle policy.
282 */
283 Description?: PolicyDescription;
284 /**
285 * The activation state of the lifecycle policy.
286 */
287 State?: GettablePolicyStateValues;
288 /**
289 * The tags.
290 */
291 Tags?: TagMap;
292 }
293 export type LifecyclePolicySummaryList = LifecyclePolicySummary[];
294 export interface ListTagsForResourceRequest {
295 /**
296 * The Amazon Resource Name (ARN) of the resource.
297 */
298 ResourceArn: PolicyArn;
299 }
300 export interface ListTagsForResourceResponse {
301 /**
302 * Information about the tags.
303 */
304 Tags?: TagMap;
305 }
306 export interface Parameters {
307 /**
308 * [EBS Snapshot Management – Instance policies only] Indicates whether to exclude the root volume from snapshots created using CreateSnapshots. The default is false.
309 */
310 ExcludeBootVolume?: ExcludeBootVolume;
311 }
312 export type PolicyArn = string;
313 export type PolicyDescription = string;
314 export interface PolicyDetails {
315 /**
316 * The valid target resource types and actions a policy can manage. The default is EBS_SNAPSHOT_MANAGEMENT.
317 */
318 PolicyType?: PolicyTypeValues;
319 /**
320 * The resource type.
321 */
322 ResourceTypes?: ResourceTypeValuesList;
323 /**
324 * The single tag that identifies targeted resources for this policy.
325 */
326 TargetTags?: TargetTagList;
327 /**
328 * The schedule of policy-defined actions.
329 */
330 Schedules?: ScheduleList;
331 /**
332 * A set of optional parameters for the policy.
333 */
334 Parameters?: Parameters;
335 }
336 export type PolicyId = string;
337 export type PolicyIdList = PolicyId[];
338 export type PolicyTypeValues = "EBS_SNAPSHOT_MANAGEMENT"|string;
339 export type ResourceTypeValues = "VOLUME"|"INSTANCE"|string;
340 export type ResourceTypeValuesList = ResourceTypeValues[];
341 export interface RetainRule {
342 /**
343 * The number of snapshots to retain for each volume, up to a maximum of 1000.
344 */
345 Count?: Count;
346 /**
347 * The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.
348 */
349 Interval?: Interval;
350 /**
351 * The unit of time for time-based retention.
352 */
353 IntervalUnit?: RetentionIntervalUnitValues;
354 }
355 export type RetentionIntervalUnitValues = "DAYS"|"WEEKS"|"MONTHS"|"YEARS"|string;
356 export interface Schedule {
357 /**
358 * The name of the schedule.
359 */
360 Name?: ScheduleName;
361 /**
362 * Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
363 */
364 CopyTags?: CopyTags;
365 /**
366 * The tags to apply to policy-created resources. These user-defined tags are in addition to the AWS-added lifecycle tags.
367 */
368 TagsToAdd?: TagsToAddList;
369 /**
370 * A collection of key/value pairs with values determined dynamically when the policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in one of the two following formats: $(instance-id) or $(timestamp). Variable tags are only valid for EBS Snapshot Management – Instance policies.
371 */
372 VariableTags?: VariableTagsList;
373 /**
374 * The creation rule.
375 */
376 CreateRule?: CreateRule;
377 /**
378 * The retention rule.
379 */
380 RetainRule?: RetainRule;
381 /**
382 * The rule for enabling fast snapshot restore.
383 */
384 FastRestoreRule?: FastRestoreRule;
385 /**
386 * The rule for cross-Region snapshot copies.
387 */
388 CrossRegionCopyRules?: CrossRegionCopyRules;
389 }
390 export type ScheduleList = Schedule[];
391 export type ScheduleName = string;
392 export type SettablePolicyStateValues = "ENABLED"|"DISABLED"|string;
393 export type StatusMessage = string;
394 export type String = string;
395 export interface Tag {
396 /**
397 * The tag key.
398 */
399 Key: String;
400 /**
401 * The tag value.
402 */
403 Value: String;
404 }
405 export type TagFilter = string;
406 export type TagKey = string;
407 export type TagKeyList = TagKey[];
408 export type TagMap = {[key: string]: TagValue};
409 export interface TagResourceRequest {
410 /**
411 * The Amazon Resource Name (ARN) of the resource.
412 */
413 ResourceArn: PolicyArn;
414 /**
415 * One or more tags.
416 */
417 Tags: TagMap;
418 }
419 export interface TagResourceResponse {
420 }
421 export type TagValue = string;
422 export type TagsToAddFilterList = TagFilter[];
423 export type TagsToAddList = Tag[];
424 export type TargetRegion = string;
425 export type TargetTagList = Tag[];
426 export type TargetTagsFilterList = TagFilter[];
427 export type Time = string;
428 export type TimesList = Time[];
429 export type Timestamp = Date;
430 export interface UntagResourceRequest {
431 /**
432 * The Amazon Resource Name (ARN) of the resource.
433 */
434 ResourceArn: PolicyArn;
435 /**
436 * The tag keys.
437 */
438 TagKeys: TagKeyList;
439 }
440 export interface UntagResourceResponse {
441 }
442 export interface UpdateLifecyclePolicyRequest {
443 /**
444 * The identifier of the lifecycle policy.
445 */
446 PolicyId: PolicyId;
447 /**
448 * The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
449 */
450 ExecutionRoleArn?: ExecutionRoleArn;
451 /**
452 * The desired activation state of the lifecycle policy after creation.
453 */
454 State?: SettablePolicyStateValues;
455 /**
456 * A description of the lifecycle policy.
457 */
458 Description?: PolicyDescription;
459 /**
460 * The configuration of the lifecycle policy. You cannot update the policy type or the resource type.
461 */
462 PolicyDetails?: PolicyDetails;
463 }
464 export interface UpdateLifecyclePolicyResponse {
465 }
466 export type VariableTagsList = Tag[];
467 /**
468 * 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.
469 */
470 export type apiVersion = "2018-01-12"|"latest"|string;
471 export interface ClientApiVersions {
472 /**
473 * 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.
474 */
475 apiVersion?: apiVersion;
476 }
477 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
478 /**
479 * Contains interfaces for use with the DLM client.
480 */
481 export import Types = DLM;
482}
483export = DLM;