UNPKG

12.2 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 between snapshots. The supported values are 2, 3, 4, 6, 8, 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 supported format is hh:mm. 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 ExcludeBootVolume = boolean;
105 export type ExecutionRoleArn = string;
106 export interface GetLifecyclePoliciesRequest {
107 /**
108 * The identifiers of the data lifecycle policies.
109 */
110 PolicyIds?: PolicyIdList;
111 /**
112 * The activation state.
113 */
114 State?: GettablePolicyStateValues;
115 /**
116 * The resource type.
117 */
118 ResourceTypes?: ResourceTypeValuesList;
119 /**
120 * The target tag for a policy. Tags are strings in the format key=value.
121 */
122 TargetTags?: TargetTagsFilterList;
123 /**
124 * 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.
125 */
126 TagsToAdd?: TagsToAddFilterList;
127 }
128 export interface GetLifecyclePoliciesResponse {
129 /**
130 * Summary information about the lifecycle policies.
131 */
132 Policies?: LifecyclePolicySummaryList;
133 }
134 export interface GetLifecyclePolicyRequest {
135 /**
136 * The identifier of the lifecycle policy.
137 */
138 PolicyId: PolicyId;
139 }
140 export interface GetLifecyclePolicyResponse {
141 /**
142 * Detailed information about the lifecycle policy.
143 */
144 Policy?: LifecyclePolicy;
145 }
146 export type GettablePolicyStateValues = "ENABLED"|"DISABLED"|"ERROR"|string;
147 export type Interval = number;
148 export type IntervalUnitValues = "HOURS"|string;
149 export interface LifecyclePolicy {
150 /**
151 * The identifier of the lifecycle policy.
152 */
153 PolicyId?: PolicyId;
154 /**
155 * The description of the lifecycle policy.
156 */
157 Description?: PolicyDescription;
158 /**
159 * The activation state of the lifecycle policy.
160 */
161 State?: GettablePolicyStateValues;
162 /**
163 * The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
164 */
165 ExecutionRoleArn?: ExecutionRoleArn;
166 /**
167 * The local date and time when the lifecycle policy was created.
168 */
169 DateCreated?: Timestamp;
170 /**
171 * The local date and time when the lifecycle policy was last modified.
172 */
173 DateModified?: Timestamp;
174 /**
175 * The configuration of the lifecycle policy
176 */
177 PolicyDetails?: PolicyDetails;
178 }
179 export interface LifecyclePolicySummary {
180 /**
181 * The identifier of the lifecycle policy.
182 */
183 PolicyId?: PolicyId;
184 /**
185 * The description of the lifecycle policy.
186 */
187 Description?: PolicyDescription;
188 /**
189 * The activation state of the lifecycle policy.
190 */
191 State?: GettablePolicyStateValues;
192 }
193 export type LifecyclePolicySummaryList = LifecyclePolicySummary[];
194 export interface Parameters {
195 /**
196 * When executing an EBS Snapshot Management – Instance policy, execute all CreateSnapshots calls with the excludeBootVolume set to the supplied field. Defaults to false. Only valid for EBS Snapshot Management – Instance policies.
197 */
198 ExcludeBootVolume?: ExcludeBootVolume;
199 }
200 export type PolicyDescription = string;
201 export interface PolicyDetails {
202 /**
203 * This field determines the valid target resource types and actions a policy can manage. This field defaults to EBS_SNAPSHOT_MANAGEMENT if not present.
204 */
205 PolicyType?: PolicyTypeValues;
206 /**
207 * The resource type.
208 */
209 ResourceTypes?: ResourceTypeValuesList;
210 /**
211 * The single tag that identifies targeted resources for this policy.
212 */
213 TargetTags?: TargetTagList;
214 /**
215 * The schedule of policy-defined actions.
216 */
217 Schedules?: ScheduleList;
218 /**
219 * A set of optional parameters that can be provided by the policy.
220 */
221 Parameters?: Parameters;
222 }
223 export type PolicyId = string;
224 export type PolicyIdList = PolicyId[];
225 export type PolicyTypeValues = "EBS_SNAPSHOT_MANAGEMENT"|string;
226 export type ResourceTypeValues = "VOLUME"|"INSTANCE"|string;
227 export type ResourceTypeValuesList = ResourceTypeValues[];
228 export interface RetainRule {
229 /**
230 * The number of snapshots to keep for each volume, up to a maximum of 1000.
231 */
232 Count: Count;
233 }
234 export interface Schedule {
235 /**
236 * The name of the schedule.
237 */
238 Name?: ScheduleName;
239 /**
240 * Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
241 */
242 CopyTags?: CopyTags;
243 /**
244 * The tags to apply to policy-created resources. These user-defined tags are in addition to the AWS-added lifecycle tags.
245 */
246 TagsToAdd?: TagsToAddList;
247 /**
248 * 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.
249 */
250 VariableTags?: VariableTagsList;
251 /**
252 * The create rule.
253 */
254 CreateRule?: CreateRule;
255 /**
256 * The retain rule.
257 */
258 RetainRule?: RetainRule;
259 }
260 export type ScheduleList = Schedule[];
261 export type ScheduleName = string;
262 export type SettablePolicyStateValues = "ENABLED"|"DISABLED"|string;
263 export type String = string;
264 export interface Tag {
265 /**
266 * The tag key.
267 */
268 Key: String;
269 /**
270 * The tag value.
271 */
272 Value: String;
273 }
274 export type TagFilter = string;
275 export type TagsToAddFilterList = TagFilter[];
276 export type TagsToAddList = Tag[];
277 export type TargetTagList = Tag[];
278 export type TargetTagsFilterList = TagFilter[];
279 export type Time = string;
280 export type TimesList = Time[];
281 export type Timestamp = Date;
282 export interface UpdateLifecyclePolicyRequest {
283 /**
284 * The identifier of the lifecycle policy.
285 */
286 PolicyId: PolicyId;
287 /**
288 * The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
289 */
290 ExecutionRoleArn?: ExecutionRoleArn;
291 /**
292 * The desired activation state of the lifecycle policy after creation.
293 */
294 State?: SettablePolicyStateValues;
295 /**
296 * A description of the lifecycle policy.
297 */
298 Description?: PolicyDescription;
299 /**
300 * The configuration of the lifecycle policy. Target tags cannot be re-used across policies.
301 */
302 PolicyDetails?: PolicyDetails;
303 }
304 export interface UpdateLifecyclePolicyResponse {
305 }
306 export type VariableTagsList = Tag[];
307 /**
308 * 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.
309 */
310 export type apiVersion = "2018-01-12"|"latest"|string;
311 export interface ClientApiVersions {
312 /**
313 * 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.
314 */
315 apiVersion?: apiVersion;
316 }
317 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
318 /**
319 * Contains interfaces for use with the DLM client.
320 */
321 export import Types = DLM;
322}
323export = DLM;