@aws-sdk/client-dlm 3.450.0 → 3.453.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GettablePolicyStateValues = exports.ResourceNotFoundException = exports.LimitExceededException = exports.InvalidRequestException = exports.InternalServerException = exports.SettablePolicyStateValues = exports.StageValues = exports.ExecutionHandlerServiceValues = exports.LocationValues = exports.IntervalUnitValues = exports.ResourceTypeValues = exports.ResourceLocationValues = exports.PolicyTypeValues = exports.EventSourceValues = exports.EventTypeValues = exports.RetentionIntervalUnitValues = void 0;
3
+ exports.GettablePolicyStateValues = exports.ResourceNotFoundException = exports.DefaultPoliciesTypeValues = exports.LimitExceededException = exports.InvalidRequestException = exports.InternalServerException = exports.SettablePolicyStateValues = exports.StageValues = exports.ExecutionHandlerServiceValues = exports.LocationValues = exports.IntervalUnitValues = exports.ResourceTypeValues = exports.ResourceLocationValues = exports.PolicyTypeValues = exports.PolicyLanguageValues = exports.EventSourceValues = exports.EventTypeValues = exports.DefaultPolicyTypeValues = exports.RetentionIntervalUnitValues = void 0;
4
4
  const DLMServiceException_1 = require("./DLMServiceException");
5
5
  exports.RetentionIntervalUnitValues = {
6
6
  DAYS: "DAYS",
@@ -8,12 +8,20 @@ exports.RetentionIntervalUnitValues = {
8
8
  WEEKS: "WEEKS",
9
9
  YEARS: "YEARS",
10
10
  };
11
+ exports.DefaultPolicyTypeValues = {
12
+ INSTANCE: "INSTANCE",
13
+ VOLUME: "VOLUME",
14
+ };
11
15
  exports.EventTypeValues = {
12
16
  SHARE_SNAPSHOT: "shareSnapshot",
13
17
  };
14
18
  exports.EventSourceValues = {
15
19
  MANAGED_CWE: "MANAGED_CWE",
16
20
  };
21
+ exports.PolicyLanguageValues = {
22
+ SIMPLIFIED: "SIMPLIFIED",
23
+ STANDARD: "STANDARD",
24
+ };
17
25
  exports.PolicyTypeValues = {
18
26
  EBS_SNAPSHOT_MANAGEMENT: "EBS_SNAPSHOT_MANAGEMENT",
19
27
  EVENT_BASED_POLICY: "EVENT_BASED_POLICY",
@@ -93,6 +101,11 @@ class LimitExceededException extends DLMServiceException_1.DLMServiceException {
93
101
  }
94
102
  }
95
103
  exports.LimitExceededException = LimitExceededException;
104
+ exports.DefaultPoliciesTypeValues = {
105
+ ALL: "ALL",
106
+ INSTANCE: "INSTANCE",
107
+ VOLUME: "VOLUME",
108
+ };
96
109
  class ResourceNotFoundException extends DLMServiceException_1.DLMServiceException {
97
110
  constructor(opts) {
98
111
  super({
@@ -13,9 +13,16 @@ const se_CreateLifecyclePolicyCommand = async (input, context) => {
13
13
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies";
14
14
  let body;
15
15
  body = JSON.stringify((0, smithy_client_1.take)(input, {
16
+ CopyTags: [],
17
+ CreateInterval: [],
18
+ CrossRegionCopyTargets: (_) => (0, smithy_client_1._json)(_),
19
+ DefaultPolicy: [],
16
20
  Description: [],
21
+ Exclusions: (_) => (0, smithy_client_1._json)(_),
17
22
  ExecutionRoleArn: [],
23
+ ExtendDeletion: [],
18
24
  PolicyDetails: (_) => (0, smithy_client_1._json)(_),
25
+ RetainInterval: [],
19
26
  State: [],
20
27
  Tags: (_) => (0, smithy_client_1._json)(_),
21
28
  }));
@@ -60,6 +67,7 @@ const se_GetLifecyclePoliciesCommand = async (input, context) => {
60
67
  ],
61
68
  targetTags: [() => input.TargetTags !== void 0, () => (input.TargetTags || []).map((_entry) => _entry)],
62
69
  tagsToAdd: [() => input.TagsToAdd !== void 0, () => (input.TagsToAdd || []).map((_entry) => _entry)],
70
+ defaultPolicyType: [, input.DefaultPolicyType],
63
71
  });
64
72
  let body;
65
73
  return new protocol_http_1.HttpRequest({
@@ -163,9 +171,15 @@ const se_UpdateLifecyclePolicyCommand = async (input, context) => {
163
171
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PolicyId", () => input.PolicyId, "{PolicyId}", false);
164
172
  let body;
165
173
  body = JSON.stringify((0, smithy_client_1.take)(input, {
174
+ CopyTags: [],
175
+ CreateInterval: [],
176
+ CrossRegionCopyTargets: (_) => (0, smithy_client_1._json)(_),
166
177
  Description: [],
178
+ Exclusions: (_) => (0, smithy_client_1._json)(_),
167
179
  ExecutionRoleArn: [],
180
+ ExtendDeletion: [],
168
181
  PolicyDetails: (_) => (0, smithy_client_1._json)(_),
182
+ RetainInterval: [],
169
183
  State: [],
170
184
  }));
171
185
  return new protocol_http_1.HttpRequest({
@@ -555,6 +569,7 @@ const de_LifecyclePolicy = (output, context) => {
555
569
  return (0, smithy_client_1.take)(output, {
556
570
  DateCreated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
557
571
  DateModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
572
+ DefaultPolicy: smithy_client_1.expectBoolean,
558
573
  Description: smithy_client_1.expectString,
559
574
  ExecutionRoleArn: smithy_client_1.expectString,
560
575
  PolicyArn: smithy_client_1.expectString,
@@ -5,12 +5,20 @@ export const RetentionIntervalUnitValues = {
5
5
  WEEKS: "WEEKS",
6
6
  YEARS: "YEARS",
7
7
  };
8
+ export const DefaultPolicyTypeValues = {
9
+ INSTANCE: "INSTANCE",
10
+ VOLUME: "VOLUME",
11
+ };
8
12
  export const EventTypeValues = {
9
13
  SHARE_SNAPSHOT: "shareSnapshot",
10
14
  };
11
15
  export const EventSourceValues = {
12
16
  MANAGED_CWE: "MANAGED_CWE",
13
17
  };
18
+ export const PolicyLanguageValues = {
19
+ SIMPLIFIED: "SIMPLIFIED",
20
+ STANDARD: "STANDARD",
21
+ };
14
22
  export const PolicyTypeValues = {
15
23
  EBS_SNAPSHOT_MANAGEMENT: "EBS_SNAPSHOT_MANAGEMENT",
16
24
  EVENT_BASED_POLICY: "EVENT_BASED_POLICY",
@@ -87,6 +95,11 @@ export class LimitExceededException extends __BaseException {
87
95
  this.ResourceType = opts.ResourceType;
88
96
  }
89
97
  }
98
+ export const DefaultPoliciesTypeValues = {
99
+ ALL: "ALL",
100
+ INSTANCE: "INSTANCE",
101
+ VOLUME: "VOLUME",
102
+ };
90
103
  export class ResourceNotFoundException extends __BaseException {
91
104
  constructor(opts) {
92
105
  super({
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { DLMServiceException as __BaseException } from "../models/DLMServiceException";
4
4
  import { InternalServerException, InvalidRequestException, LimitExceededException, ResourceNotFoundException, } from "../models/models_0";
5
5
  export const se_CreateLifecyclePolicyCommand = async (input, context) => {
@@ -10,9 +10,16 @@ export const se_CreateLifecyclePolicyCommand = async (input, context) => {
10
10
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies";
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
+ CopyTags: [],
14
+ CreateInterval: [],
15
+ CrossRegionCopyTargets: (_) => _json(_),
16
+ DefaultPolicy: [],
13
17
  Description: [],
18
+ Exclusions: (_) => _json(_),
14
19
  ExecutionRoleArn: [],
20
+ ExtendDeletion: [],
15
21
  PolicyDetails: (_) => _json(_),
22
+ RetainInterval: [],
16
23
  State: [],
17
24
  Tags: (_) => _json(_),
18
25
  }));
@@ -55,6 +62,7 @@ export const se_GetLifecyclePoliciesCommand = async (input, context) => {
55
62
  ],
56
63
  targetTags: [() => input.TargetTags !== void 0, () => (input.TargetTags || []).map((_entry) => _entry)],
57
64
  tagsToAdd: [() => input.TagsToAdd !== void 0, () => (input.TagsToAdd || []).map((_entry) => _entry)],
65
+ defaultPolicyType: [, input.DefaultPolicyType],
58
66
  });
59
67
  let body;
60
68
  return new __HttpRequest({
@@ -153,9 +161,15 @@ export const se_UpdateLifecyclePolicyCommand = async (input, context) => {
153
161
  resolvedPath = __resolvedPath(resolvedPath, input, "PolicyId", () => input.PolicyId, "{PolicyId}", false);
154
162
  let body;
155
163
  body = JSON.stringify(take(input, {
164
+ CopyTags: [],
165
+ CreateInterval: [],
166
+ CrossRegionCopyTargets: (_) => _json(_),
156
167
  Description: [],
168
+ Exclusions: (_) => _json(_),
157
169
  ExecutionRoleArn: [],
170
+ ExtendDeletion: [],
158
171
  PolicyDetails: (_) => _json(_),
172
+ RetainInterval: [],
159
173
  State: [],
160
174
  }));
161
175
  return new __HttpRequest({
@@ -536,6 +550,7 @@ const de_LifecyclePolicy = (output, context) => {
536
550
  return take(output, {
537
551
  DateCreated: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
538
552
  DateModified: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
553
+ DefaultPolicy: __expectBoolean,
539
554
  Description: __expectString,
540
555
  ExecutionRoleArn: __expectString,
541
556
  PolicyArn: __expectString,
@@ -23,8 +23,30 @@ export interface CreateLifecyclePolicyCommandOutput extends CreateLifecyclePolic
23
23
  }
24
24
  /**
25
25
  * @public
26
- * <p>Creates a policy to manage the lifecycle of the specified Amazon Web Services resources. You can
27
- * create up to 100 lifecycle policies.</p>
26
+ * <p>Creates an Amazon Data Lifecycle Manager lifecycle policy. Amazon Data Lifecycle Manager supports the following policy types:</p>
27
+ * <ul>
28
+ * <li>
29
+ * <p>Custom EBS snapshot policy</p>
30
+ * </li>
31
+ * <li>
32
+ * <p>Custom EBS-backed AMI policy</p>
33
+ * </li>
34
+ * <li>
35
+ * <p>Cross-account copy event policy</p>
36
+ * </li>
37
+ * <li>
38
+ * <p>Default policy for EBS snapshots</p>
39
+ * </li>
40
+ * <li>
41
+ * <p>Default policy for EBS-backed AMIs</p>
42
+ * </li>
43
+ * </ul>
44
+ * <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/policy-differences.html">
45
+ * Default policies vs custom policies</a>.</p>
46
+ * <important>
47
+ * <p>If you create a default policy, you can specify the request parameters either in
48
+ * the request body, or in the PolicyDetails request structure, but not both.</p>
49
+ * </important>
28
50
  * @example
29
51
  * Use a bare-bones client and the command you need to make an API call.
30
52
  * ```javascript
@@ -176,10 +198,49 @@ export interface CreateLifecyclePolicyCommandOutput extends CreateLifecyclePolic
176
198
  * ],
177
199
  * },
178
200
  * ],
201
+ * PolicyLanguage: "SIMPLIFIED" || "STANDARD",
202
+ * ResourceType: "VOLUME" || "INSTANCE",
203
+ * CreateInterval: Number("int"),
204
+ * RetainInterval: Number("int"),
205
+ * CopyTags: true || false,
206
+ * CrossRegionCopyTargets: [ // CrossRegionCopyTargetList
207
+ * { // CrossRegionCopyTarget
208
+ * TargetRegion: "STRING_VALUE",
209
+ * },
210
+ * ],
211
+ * ExtendDeletion: true || false,
212
+ * Exclusions: { // Exclusions
213
+ * ExcludeBootVolumes: true || false,
214
+ * ExcludeVolumeTypes: [ // ExcludeVolumeTypesList
215
+ * "STRING_VALUE",
216
+ * ],
217
+ * ExcludeTags: [ // ExcludeTagsList
218
+ * "<Tag>",
219
+ * ],
220
+ * },
179
221
  * },
180
222
  * Tags: { // TagMap
181
223
  * "<keys>": "STRING_VALUE",
182
224
  * },
225
+ * DefaultPolicy: "VOLUME" || "INSTANCE",
226
+ * CreateInterval: Number("int"),
227
+ * RetainInterval: Number("int"),
228
+ * CopyTags: true || false,
229
+ * ExtendDeletion: true || false,
230
+ * CrossRegionCopyTargets: [
231
+ * {
232
+ * TargetRegion: "STRING_VALUE",
233
+ * },
234
+ * ],
235
+ * Exclusions: {
236
+ * ExcludeBootVolumes: true || false,
237
+ * ExcludeVolumeTypes: [
238
+ * "STRING_VALUE",
239
+ * ],
240
+ * ExcludeTags: [
241
+ * "<Tag>",
242
+ * ],
243
+ * },
183
244
  * };
184
245
  * const command = new CreateLifecyclePolicyCommand(input);
185
246
  * const response = await client.send(command);
@@ -45,6 +45,7 @@ export interface GetLifecyclePoliciesCommandOutput extends GetLifecyclePoliciesR
45
45
  * TagsToAdd: [ // TagsToAddFilterList
46
46
  * "STRING_VALUE",
47
47
  * ],
48
+ * DefaultPolicyType: "VOLUME" || "INSTANCE" || "ALL",
48
49
  * };
49
50
  * const command = new GetLifecyclePoliciesCommand(input);
50
51
  * const response = await client.send(command);
@@ -58,6 +59,7 @@ export interface GetLifecyclePoliciesCommandOutput extends GetLifecyclePoliciesR
58
59
  * // "<keys>": "STRING_VALUE",
59
60
  * // },
60
61
  * // PolicyType: "EBS_SNAPSHOT_MANAGEMENT" || "IMAGE_MANAGEMENT" || "EVENT_BASED_POLICY",
62
+ * // DefaultPolicy: true || false,
61
63
  * // },
62
64
  * // ],
63
65
  * // };
@@ -185,11 +185,32 @@ export interface GetLifecyclePolicyCommandOutput extends GetLifecyclePolicyRespo
185
185
  * // ],
186
186
  * // },
187
187
  * // ],
188
+ * // PolicyLanguage: "SIMPLIFIED" || "STANDARD",
189
+ * // ResourceType: "VOLUME" || "INSTANCE",
190
+ * // CreateInterval: Number("int"),
191
+ * // RetainInterval: Number("int"),
192
+ * // CopyTags: true || false,
193
+ * // CrossRegionCopyTargets: [ // CrossRegionCopyTargetList
194
+ * // { // CrossRegionCopyTarget
195
+ * // TargetRegion: "STRING_VALUE",
196
+ * // },
197
+ * // ],
198
+ * // ExtendDeletion: true || false,
199
+ * // Exclusions: { // Exclusions
200
+ * // ExcludeBootVolumes: true || false,
201
+ * // ExcludeVolumeTypes: [ // ExcludeVolumeTypesList
202
+ * // "STRING_VALUE",
203
+ * // ],
204
+ * // ExcludeTags: [ // ExcludeTagsList
205
+ * // "<Tag>",
206
+ * // ],
207
+ * // },
188
208
  * // },
189
209
  * // Tags: { // TagMap
190
210
  * // "<keys>": "STRING_VALUE",
191
211
  * // },
192
212
  * // PolicyArn: "STRING_VALUE",
213
+ * // DefaultPolicy: true || false,
193
214
  * // },
194
215
  * // };
195
216
  *
@@ -178,6 +178,44 @@ export interface UpdateLifecyclePolicyCommandOutput extends UpdateLifecyclePolic
178
178
  * ],
179
179
  * },
180
180
  * ],
181
+ * PolicyLanguage: "SIMPLIFIED" || "STANDARD",
182
+ * ResourceType: "VOLUME" || "INSTANCE",
183
+ * CreateInterval: Number("int"),
184
+ * RetainInterval: Number("int"),
185
+ * CopyTags: true || false,
186
+ * CrossRegionCopyTargets: [ // CrossRegionCopyTargetList
187
+ * { // CrossRegionCopyTarget
188
+ * TargetRegion: "STRING_VALUE",
189
+ * },
190
+ * ],
191
+ * ExtendDeletion: true || false,
192
+ * Exclusions: { // Exclusions
193
+ * ExcludeBootVolumes: true || false,
194
+ * ExcludeVolumeTypes: [ // ExcludeVolumeTypesList
195
+ * "STRING_VALUE",
196
+ * ],
197
+ * ExcludeTags: [ // ExcludeTagsList
198
+ * "<Tag>",
199
+ * ],
200
+ * },
201
+ * },
202
+ * CreateInterval: Number("int"),
203
+ * RetainInterval: Number("int"),
204
+ * CopyTags: true || false,
205
+ * ExtendDeletion: true || false,
206
+ * CrossRegionCopyTargets: [
207
+ * {
208
+ * TargetRegion: "STRING_VALUE",
209
+ * },
210
+ * ],
211
+ * Exclusions: {
212
+ * ExcludeBootVolumes: true || false,
213
+ * ExcludeVolumeTypes: [
214
+ * "STRING_VALUE",
215
+ * ],
216
+ * ExcludeTags: [
217
+ * "<Tag>",
218
+ * ],
181
219
  * },
182
220
  * };
183
221
  * const command = new UpdateLifecyclePolicyCommand(input);