Skip to content

Commit 31c9785

Browse files
author
awstools
committed
feat(client-ec2): Marking fields as sensitive on BundleTask and GetPasswordData
1 parent 7d48fba commit 31c9785

File tree

8 files changed

+105
-11
lines changed

8 files changed

+105
-11
lines changed

clients/client-ec2/src/commands/BundleInstanceCommand.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ import {
1414
} from "@smithy/types";
1515

1616
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
17-
import { BundleInstanceRequest, BundleInstanceResult } from "../models/models_0";
17+
import {
18+
BundleInstanceRequest,
19+
BundleInstanceRequestFilterSensitiveLog,
20+
BundleInstanceResult,
21+
BundleInstanceResultFilterSensitiveLog,
22+
} from "../models/models_0";
1823
import { de_BundleInstanceCommand, se_BundleInstanceCommand } from "../protocols/Aws_ec2";
1924

2025
/**
@@ -146,8 +151,8 @@ export class BundleInstanceCommand extends $Command<
146151
logger,
147152
clientName,
148153
commandName,
149-
inputFilterSensitiveLog: (_: any) => _,
150-
outputFilterSensitiveLog: (_: any) => _,
154+
inputFilterSensitiveLog: BundleInstanceRequestFilterSensitiveLog,
155+
outputFilterSensitiveLog: BundleInstanceResultFilterSensitiveLog,
151156
};
152157
const { requestHandler } = configuration;
153158
return stack.resolve(

clients/client-ec2/src/commands/CancelBundleTaskCommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import {
1414
} from "@smithy/types";
1515

1616
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
17-
import { CancelBundleTaskRequest, CancelBundleTaskResult } from "../models/models_0";
17+
import {
18+
CancelBundleTaskRequest,
19+
CancelBundleTaskResult,
20+
CancelBundleTaskResultFilterSensitiveLog,
21+
} from "../models/models_0";
1822
import { de_CancelBundleTaskCommand, se_CancelBundleTaskCommand } from "../protocols/Aws_ec2";
1923

2024
/**
@@ -134,7 +138,7 @@ export class CancelBundleTaskCommand extends $Command<
134138
clientName,
135139
commandName,
136140
inputFilterSensitiveLog: (_: any) => _,
137-
outputFilterSensitiveLog: (_: any) => _,
141+
outputFilterSensitiveLog: CancelBundleTaskResultFilterSensitiveLog,
138142
};
139143
const { requestHandler } = configuration;
140144
return stack.resolve(

clients/client-ec2/src/commands/DescribeBundleTasksCommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import {
1414
} from "@smithy/types";
1515

1616
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
17-
import { DescribeBundleTasksRequest, DescribeBundleTasksResult } from "../models/models_3";
17+
import {
18+
DescribeBundleTasksRequest,
19+
DescribeBundleTasksResult,
20+
DescribeBundleTasksResultFilterSensitiveLog,
21+
} from "../models/models_3";
1822
import { de_DescribeBundleTasksCommand, se_DescribeBundleTasksCommand } from "../protocols/Aws_ec2";
1923

2024
/**
@@ -149,7 +153,7 @@ export class DescribeBundleTasksCommand extends $Command<
149153
clientName,
150154
commandName,
151155
inputFilterSensitiveLog: (_: any) => _,
152-
outputFilterSensitiveLog: (_: any) => _,
156+
outputFilterSensitiveLog: DescribeBundleTasksResultFilterSensitiveLog,
153157
};
154158
const { requestHandler } = configuration;
155159
return stack.resolve(

clients/client-ec2/src/commands/GetPasswordDataCommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import {
1414
} from "@smithy/types";
1515

1616
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
17-
import { GetPasswordDataRequest, GetPasswordDataResult } from "../models/models_5";
17+
import {
18+
GetPasswordDataRequest,
19+
GetPasswordDataResult,
20+
GetPasswordDataResultFilterSensitiveLog,
21+
} from "../models/models_5";
1822
import { de_GetPasswordDataCommand, se_GetPasswordDataCommand } from "../protocols/Aws_ec2";
1923

2024
/**
@@ -128,7 +132,7 @@ export class GetPasswordDataCommand extends $Command<
128132
clientName,
129133
commandName,
130134
inputFilterSensitiveLog: (_: any) => _,
131-
outputFilterSensitiveLog: (_: any) => _,
135+
outputFilterSensitiveLog: GetPasswordDataResultFilterSensitiveLog,
132136
};
133137
const { requestHandler } = configuration;
134138
return stack.resolve(

clients/client-ec2/src/models/models_0.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9542,6 +9542,54 @@ export const AttachVerifiedAccessTrustProviderResultFilterSensitiveLog = (
95429542
}),
95439543
});
95449544

9545+
/**
9546+
* @internal
9547+
*/
9548+
export const S3StorageFilterSensitiveLog = (obj: S3Storage): any => ({
9549+
...obj,
9550+
...(obj.UploadPolicySignature && { UploadPolicySignature: SENSITIVE_STRING }),
9551+
});
9552+
9553+
/**
9554+
* @internal
9555+
*/
9556+
export const StorageFilterSensitiveLog = (obj: Storage): any => ({
9557+
...obj,
9558+
...(obj.S3 && { S3: S3StorageFilterSensitiveLog(obj.S3) }),
9559+
});
9560+
9561+
/**
9562+
* @internal
9563+
*/
9564+
export const BundleInstanceRequestFilterSensitiveLog = (obj: BundleInstanceRequest): any => ({
9565+
...obj,
9566+
...(obj.Storage && { Storage: StorageFilterSensitiveLog(obj.Storage) }),
9567+
});
9568+
9569+
/**
9570+
* @internal
9571+
*/
9572+
export const BundleTaskFilterSensitiveLog = (obj: BundleTask): any => ({
9573+
...obj,
9574+
...(obj.Storage && { Storage: StorageFilterSensitiveLog(obj.Storage) }),
9575+
});
9576+
9577+
/**
9578+
* @internal
9579+
*/
9580+
export const BundleInstanceResultFilterSensitiveLog = (obj: BundleInstanceResult): any => ({
9581+
...obj,
9582+
...(obj.BundleTask && { BundleTask: BundleTaskFilterSensitiveLog(obj.BundleTask) }),
9583+
});
9584+
9585+
/**
9586+
* @internal
9587+
*/
9588+
export const CancelBundleTaskResultFilterSensitiveLog = (obj: CancelBundleTaskResult): any => ({
9589+
...obj,
9590+
...(obj.BundleTask && { BundleTask: BundleTaskFilterSensitiveLog(obj.BundleTask) }),
9591+
});
9592+
95459593
/**
95469594
* @internal
95479595
*/

clients/client-ec2/src/models/models_3.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
AttachmentStatus,
1717
AutoPlacement,
1818
BundleTask,
19+
BundleTaskFilterSensitiveLog,
1920
ByoipCidr,
2021
CapacityReservation,
2122
CapacityReservationFleetState,
@@ -10278,6 +10279,14 @@ export const DeleteVerifiedAccessTrustProviderResultFilterSensitiveLog = (
1027810279
}),
1027910280
});
1028010281

10282+
/**
10283+
* @internal
10284+
*/
10285+
export const DescribeBundleTasksResultFilterSensitiveLog = (obj: DescribeBundleTasksResult): any => ({
10286+
...obj,
10287+
...(obj.BundleTasks && { BundleTasks: obj.BundleTasks.map((item) => BundleTaskFilterSensitiveLog(item)) }),
10288+
});
10289+
1028110290
/**
1028210291
* @internal
1028310292
*/

clients/client-ec2/src/models/models_5.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8616,6 +8616,14 @@ export const GetLaunchTemplateDataResultFilterSensitiveLog = (obj: GetLaunchTemp
86168616
}),
86178617
});
86188618

8619+
/**
8620+
* @internal
8621+
*/
8622+
export const GetPasswordDataResultFilterSensitiveLog = (obj: GetPasswordDataResult): any => ({
8623+
...obj,
8624+
...(obj.PasswordData && { PasswordData: SENSITIVE_STRING }),
8625+
});
8626+
86198627
/**
86208628
* @internal
86218629
*/

codegen/sdk-codegen/aws-models/ec2.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51641,7 +51641,7 @@
5164151641
}
5164251642
},
5164351643
"PasswordData": {
51644-
"target": "com.amazonaws.ec2#String",
51644+
"target": "com.amazonaws.ec2#PasswordData",
5164551645
"traits": {
5164651646
"aws.protocols#ec2QueryName": "PasswordData",
5164751647
"smithy.api#documentation": "<p>The password of the instance. Returns an empty string if the password is not\n available.</p>",
@@ -79119,6 +79119,12 @@
7911979119
}
7912079120
}
7912179121
},
79122+
"com.amazonaws.ec2#PasswordData": {
79123+
"type": "string",
79124+
"traits": {
79125+
"smithy.api#sensitive": {}
79126+
}
79127+
},
7912279128
"com.amazonaws.ec2#PathComponent": {
7912379129
"type": "structure",
7912479130
"members": {
@@ -88883,7 +88889,7 @@
8888388889
}
8888488890
},
8888588891
"UploadPolicySignature": {
88886-
"target": "com.amazonaws.ec2#String",
88892+
"target": "com.amazonaws.ec2#S3StorageUploadPolicySignature",
8888788893
"traits": {
8888888894
"aws.protocols#ec2QueryName": "UploadPolicySignature",
8888988895
"smithy.api#documentation": "<p>The signature of the JSON document.</p>",
@@ -88895,6 +88901,12 @@
8889588901
"smithy.api#documentation": "<p>Describes the storage parameters for Amazon S3 and Amazon S3 buckets for an instance store-backed AMI.</p>"
8889688902
}
8889788903
},
88904+
"com.amazonaws.ec2#S3StorageUploadPolicySignature": {
88905+
"type": "string",
88906+
"traits": {
88907+
"smithy.api#sensitive": {}
88908+
}
88909+
},
8889888910
"com.amazonaws.ec2#SSEType": {
8889988911
"type": "enum",
8890088912
"members": {

0 commit comments

Comments
 (0)