Skip to content

Commit 28a1dee

Browse files
author
awstools
committed
feat(client-cognito-identity): This release adds sensitive trait to some required shapes.
1 parent e6cba69 commit 28a1dee

File tree

7 files changed

+111
-13
lines changed

7 files changed

+111
-13
lines changed

clients/client-cognito-identity/src/commands/GetCredentialsForIdentityCommand.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { GetCredentialsForIdentityInput, GetCredentialsForIdentityResponse } from "../models/models_0";
9+
import {
10+
GetCredentialsForIdentityInput,
11+
GetCredentialsForIdentityInputFilterSensitiveLog,
12+
GetCredentialsForIdentityResponse,
13+
GetCredentialsForIdentityResponseFilterSensitiveLog,
14+
} from "../models/models_0";
1015
import { de_GetCredentialsForIdentityCommand, se_GetCredentialsForIdentityCommand } from "../protocols/Aws_json1_1";
1116

1217
/**
@@ -118,7 +123,7 @@ export class GetCredentialsForIdentityCommand extends $Command
118123
})
119124
.s("AWSCognitoIdentityService", "GetCredentialsForIdentity", {})
120125
.n("CognitoIdentityClient", "GetCredentialsForIdentityCommand")
121-
.f(void 0, void 0)
126+
.f(GetCredentialsForIdentityInputFilterSensitiveLog, GetCredentialsForIdentityResponseFilterSensitiveLog)
122127
.ser(se_GetCredentialsForIdentityCommand)
123128
.de(de_GetCredentialsForIdentityCommand)
124129
.build() {}

clients/client-cognito-identity/src/commands/GetIdCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { GetIdInput, GetIdResponse } from "../models/models_0";
9+
import { GetIdInput, GetIdInputFilterSensitiveLog, GetIdResponse } from "../models/models_0";
1010
import { de_GetIdCommand, se_GetIdCommand } from "../protocols/Aws_json1_1";
1111

1212
/**
@@ -109,7 +109,7 @@ export class GetIdCommand extends $Command
109109
})
110110
.s("AWSCognitoIdentityService", "GetId", {})
111111
.n("CognitoIdentityClient", "GetIdCommand")
112-
.f(void 0, void 0)
112+
.f(GetIdInputFilterSensitiveLog, void 0)
113113
.ser(se_GetIdCommand)
114114
.de(de_GetIdCommand)
115115
.build() {}

clients/client-cognito-identity/src/commands/GetOpenIdTokenCommand.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { GetOpenIdTokenInput, GetOpenIdTokenResponse } from "../models/models_0";
9+
import {
10+
GetOpenIdTokenInput,
11+
GetOpenIdTokenInputFilterSensitiveLog,
12+
GetOpenIdTokenResponse,
13+
GetOpenIdTokenResponseFilterSensitiveLog,
14+
} from "../models/models_0";
1015
import { de_GetOpenIdTokenCommand, se_GetOpenIdTokenCommand } from "../protocols/Aws_json1_1";
1116

1217
/**
@@ -108,7 +113,7 @@ export class GetOpenIdTokenCommand extends $Command
108113
})
109114
.s("AWSCognitoIdentityService", "GetOpenIdToken", {})
110115
.n("CognitoIdentityClient", "GetOpenIdTokenCommand")
111-
.f(void 0, void 0)
116+
.f(GetOpenIdTokenInputFilterSensitiveLog, GetOpenIdTokenResponseFilterSensitiveLog)
112117
.ser(se_GetOpenIdTokenCommand)
113118
.de(de_GetOpenIdTokenCommand)
114119
.build() {}

clients/client-cognito-identity/src/commands/GetOpenIdTokenForDeveloperIdentityCommand.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTy
88
import { commonParams } from "../endpoint/EndpointParameters";
99
import {
1010
GetOpenIdTokenForDeveloperIdentityInput,
11+
GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog,
1112
GetOpenIdTokenForDeveloperIdentityResponse,
13+
GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog,
1214
} from "../models/models_0";
1315
import {
1416
de_GetOpenIdTokenForDeveloperIdentityCommand,
@@ -129,7 +131,10 @@ export class GetOpenIdTokenForDeveloperIdentityCommand extends $Command
129131
})
130132
.s("AWSCognitoIdentityService", "GetOpenIdTokenForDeveloperIdentity", {})
131133
.n("CognitoIdentityClient", "GetOpenIdTokenForDeveloperIdentityCommand")
132-
.f(void 0, void 0)
134+
.f(
135+
GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog,
136+
GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog
137+
)
133138
.ser(se_GetOpenIdTokenForDeveloperIdentityCommand)
134139
.de(de_GetOpenIdTokenForDeveloperIdentityCommand)
135140
.build() {}

clients/client-cognito-identity/src/commands/UnlinkIdentityCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { UnlinkIdentityInput } from "../models/models_0";
9+
import { UnlinkIdentityInput, UnlinkIdentityInputFilterSensitiveLog } from "../models/models_0";
1010
import { de_UnlinkIdentityCommand, se_UnlinkIdentityCommand } from "../protocols/Aws_json1_1";
1111

1212
/**
@@ -107,7 +107,7 @@ export class UnlinkIdentityCommand extends $Command
107107
})
108108
.s("AWSCognitoIdentityService", "UnlinkIdentity", {})
109109
.n("CognitoIdentityClient", "UnlinkIdentityCommand")
110-
.f(void 0, void 0)
110+
.f(UnlinkIdentityInputFilterSensitiveLog, void 0)
111111
.ser(se_UnlinkIdentityCommand)
112112
.de(de_UnlinkIdentityCommand)
113113
.build() {}

clients/client-cognito-identity/src/models/models_0.ts

+77-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// smithy-typescript generated code
2-
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
2+
import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@smithy/smithy-client";
33

44
import { CognitoIdentityServiceException as __BaseException } from "./CognitoIdentityServiceException";
55

@@ -1438,3 +1438,79 @@ export interface UntagResourceInput {
14381438
* @public
14391439
*/
14401440
export interface UntagResourceResponse {}
1441+
1442+
/**
1443+
* @internal
1444+
*/
1445+
export const GetCredentialsForIdentityInputFilterSensitiveLog = (obj: GetCredentialsForIdentityInput): any => ({
1446+
...obj,
1447+
...(obj.Logins && { Logins: SENSITIVE_STRING }),
1448+
});
1449+
1450+
/**
1451+
* @internal
1452+
*/
1453+
export const CredentialsFilterSensitiveLog = (obj: Credentials): any => ({
1454+
...obj,
1455+
...(obj.SecretKey && { SecretKey: SENSITIVE_STRING }),
1456+
});
1457+
1458+
/**
1459+
* @internal
1460+
*/
1461+
export const GetCredentialsForIdentityResponseFilterSensitiveLog = (obj: GetCredentialsForIdentityResponse): any => ({
1462+
...obj,
1463+
...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
1464+
});
1465+
1466+
/**
1467+
* @internal
1468+
*/
1469+
export const GetIdInputFilterSensitiveLog = (obj: GetIdInput): any => ({
1470+
...obj,
1471+
...(obj.Logins && { Logins: SENSITIVE_STRING }),
1472+
});
1473+
1474+
/**
1475+
* @internal
1476+
*/
1477+
export const GetOpenIdTokenInputFilterSensitiveLog = (obj: GetOpenIdTokenInput): any => ({
1478+
...obj,
1479+
...(obj.Logins && { Logins: SENSITIVE_STRING }),
1480+
});
1481+
1482+
/**
1483+
* @internal
1484+
*/
1485+
export const GetOpenIdTokenResponseFilterSensitiveLog = (obj: GetOpenIdTokenResponse): any => ({
1486+
...obj,
1487+
...(obj.Token && { Token: SENSITIVE_STRING }),
1488+
});
1489+
1490+
/**
1491+
* @internal
1492+
*/
1493+
export const GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog = (
1494+
obj: GetOpenIdTokenForDeveloperIdentityInput
1495+
): any => ({
1496+
...obj,
1497+
...(obj.Logins && { Logins: SENSITIVE_STRING }),
1498+
});
1499+
1500+
/**
1501+
* @internal
1502+
*/
1503+
export const GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog = (
1504+
obj: GetOpenIdTokenForDeveloperIdentityResponse
1505+
): any => ({
1506+
...obj,
1507+
...(obj.Token && { Token: SENSITIVE_STRING }),
1508+
});
1509+
1510+
/**
1511+
* @internal
1512+
*/
1513+
export const UnlinkIdentityInputFilterSensitiveLog = (obj: UnlinkIdentityInput): any => ({
1514+
...obj,
1515+
...(obj.Logins && { Logins: SENSITIVE_STRING }),
1516+
});

codegen/sdk-codegen/aws-models/cognito-identity.json

+10-3
Original file line numberDiff line numberDiff line change
@@ -2279,7 +2279,8 @@
22792279
"smithy.api#length": {
22802280
"min": 1,
22812281
"max": 50000
2282-
}
2282+
},
2283+
"smithy.api#sensitive": {}
22832284
}
22842285
},
22852286
"com.amazonaws.cognitoidentity#IdentityProviders": {
@@ -2907,7 +2908,10 @@
29072908
}
29082909
},
29092910
"com.amazonaws.cognitoidentity#OIDCToken": {
2910-
"type": "string"
2911+
"type": "string",
2912+
"traits": {
2913+
"smithy.api#sensitive": {}
2914+
}
29112915
},
29122916
"com.amazonaws.cognitoidentity#PaginationKey": {
29132917
"type": "string",
@@ -3099,7 +3103,10 @@
30993103
}
31003104
},
31013105
"com.amazonaws.cognitoidentity#SecretKeyString": {
3102-
"type": "string"
3106+
"type": "string",
3107+
"traits": {
3108+
"smithy.api#sensitive": {}
3109+
}
31033110
},
31043111
"com.amazonaws.cognitoidentity#SessionTokenString": {
31053112
"type": "string"

0 commit comments

Comments
 (0)