Skip to content

Commit 2660570

Browse files
author
awstools
committed
feat(client-rolesanywhere): This release introduces the PutAttributeMapping and DeleteAttributeMapping APIs. IAM Roles Anywhere now provides the capability to define a set of mapping rules, allowing customers to specify which data is extracted from their X.509 end-entity certificates.
1 parent 0fa2ea7 commit 2660570

16 files changed

+930
-0
lines changed

clients/client-rolesanywhere/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,14 @@ CreateTrustAnchor
232232

233233
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/rolesanywhere/command/CreateTrustAnchorCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-rolesanywhere/Interface/CreateTrustAnchorCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-rolesanywhere/Interface/CreateTrustAnchorCommandOutput/)
234234

235+
</details>
236+
<details>
237+
<summary>
238+
DeleteAttributeMapping
239+
</summary>
240+
241+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/rolesanywhere/command/DeleteAttributeMappingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-rolesanywhere/Interface/DeleteAttributeMappingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-rolesanywhere/Interface/DeleteAttributeMappingCommandOutput/)
242+
235243
</details>
236244
<details>
237245
<summary>
@@ -384,6 +392,14 @@ ListTrustAnchors
384392

385393
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/rolesanywhere/command/ListTrustAnchorsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-rolesanywhere/Interface/ListTrustAnchorsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-rolesanywhere/Interface/ListTrustAnchorsCommandOutput/)
386394

395+
</details>
396+
<details>
397+
<summary>
398+
PutAttributeMapping
399+
</summary>
400+
401+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/rolesanywhere/command/PutAttributeMappingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-rolesanywhere/Interface/PutAttributeMappingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-rolesanywhere/Interface/PutAttributeMappingCommandOutput/)
402+
387403
</details>
388404
<details>
389405
<summary>

clients/client-rolesanywhere/src/RolesAnywhere.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ import {
1212
CreateTrustAnchorCommandInput,
1313
CreateTrustAnchorCommandOutput,
1414
} from "./commands/CreateTrustAnchorCommand";
15+
import {
16+
DeleteAttributeMappingCommand,
17+
DeleteAttributeMappingCommandInput,
18+
DeleteAttributeMappingCommandOutput,
19+
} from "./commands/DeleteAttributeMappingCommand";
1520
import { DeleteCrlCommand, DeleteCrlCommandInput, DeleteCrlCommandOutput } from "./commands/DeleteCrlCommand";
1621
import {
1722
DeleteProfileCommand,
@@ -75,6 +80,11 @@ import {
7580
ListTrustAnchorsCommandInput,
7681
ListTrustAnchorsCommandOutput,
7782
} from "./commands/ListTrustAnchorsCommand";
83+
import {
84+
PutAttributeMappingCommand,
85+
PutAttributeMappingCommandInput,
86+
PutAttributeMappingCommandOutput,
87+
} from "./commands/PutAttributeMappingCommand";
7888
import {
7989
PutNotificationSettingsCommand,
8090
PutNotificationSettingsCommandInput,
@@ -107,6 +117,7 @@ import { RolesAnywhereClient, RolesAnywhereClientConfig } from "./RolesAnywhereC
107117
const commands = {
108118
CreateProfileCommand,
109119
CreateTrustAnchorCommand,
120+
DeleteAttributeMappingCommand,
110121
DeleteCrlCommand,
111122
DeleteProfileCommand,
112123
DeleteTrustAnchorCommand,
@@ -126,6 +137,7 @@ const commands = {
126137
ListSubjectsCommand,
127138
ListTagsForResourceCommand,
128139
ListTrustAnchorsCommand,
140+
PutAttributeMappingCommand,
129141
PutNotificationSettingsCommand,
130142
ResetNotificationSettingsCommand,
131143
TagResourceCommand,
@@ -164,6 +176,23 @@ export interface RolesAnywhere {
164176
cb: (err: any, data?: CreateTrustAnchorCommandOutput) => void
165177
): void;
166178

179+
/**
180+
* @see {@link DeleteAttributeMappingCommand}
181+
*/
182+
deleteAttributeMapping(
183+
args: DeleteAttributeMappingCommandInput,
184+
options?: __HttpHandlerOptions
185+
): Promise<DeleteAttributeMappingCommandOutput>;
186+
deleteAttributeMapping(
187+
args: DeleteAttributeMappingCommandInput,
188+
cb: (err: any, data?: DeleteAttributeMappingCommandOutput) => void
189+
): void;
190+
deleteAttributeMapping(
191+
args: DeleteAttributeMappingCommandInput,
192+
options: __HttpHandlerOptions,
193+
cb: (err: any, data?: DeleteAttributeMappingCommandOutput) => void
194+
): void;
195+
167196
/**
168197
* @see {@link DeleteCrlCommand}
169198
*/
@@ -413,6 +442,23 @@ export interface RolesAnywhere {
413442
cb: (err: any, data?: ListTrustAnchorsCommandOutput) => void
414443
): void;
415444

445+
/**
446+
* @see {@link PutAttributeMappingCommand}
447+
*/
448+
putAttributeMapping(
449+
args: PutAttributeMappingCommandInput,
450+
options?: __HttpHandlerOptions
451+
): Promise<PutAttributeMappingCommandOutput>;
452+
putAttributeMapping(
453+
args: PutAttributeMappingCommandInput,
454+
cb: (err: any, data?: PutAttributeMappingCommandOutput) => void
455+
): void;
456+
putAttributeMapping(
457+
args: PutAttributeMappingCommandInput,
458+
options: __HttpHandlerOptions,
459+
cb: (err: any, data?: PutAttributeMappingCommandOutput) => void
460+
): void;
461+
416462
/**
417463
* @see {@link PutNotificationSettingsCommand}
418464
*/

clients/client-rolesanywhere/src/RolesAnywhereClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ import {
5555
} from "./auth/httpAuthSchemeProvider";
5656
import { CreateProfileCommandInput, CreateProfileCommandOutput } from "./commands/CreateProfileCommand";
5757
import { CreateTrustAnchorCommandInput, CreateTrustAnchorCommandOutput } from "./commands/CreateTrustAnchorCommand";
58+
import {
59+
DeleteAttributeMappingCommandInput,
60+
DeleteAttributeMappingCommandOutput,
61+
} from "./commands/DeleteAttributeMappingCommand";
5862
import { DeleteCrlCommandInput, DeleteCrlCommandOutput } from "./commands/DeleteCrlCommand";
5963
import { DeleteProfileCommandInput, DeleteProfileCommandOutput } from "./commands/DeleteProfileCommand";
6064
import { DeleteTrustAnchorCommandInput, DeleteTrustAnchorCommandOutput } from "./commands/DeleteTrustAnchorCommand";
@@ -77,6 +81,10 @@ import {
7781
ListTagsForResourceCommandOutput,
7882
} from "./commands/ListTagsForResourceCommand";
7983
import { ListTrustAnchorsCommandInput, ListTrustAnchorsCommandOutput } from "./commands/ListTrustAnchorsCommand";
84+
import {
85+
PutAttributeMappingCommandInput,
86+
PutAttributeMappingCommandOutput,
87+
} from "./commands/PutAttributeMappingCommand";
8088
import {
8189
PutNotificationSettingsCommandInput,
8290
PutNotificationSettingsCommandOutput,
@@ -107,6 +115,7 @@ export { __Client };
107115
export type ServiceInputTypes =
108116
| CreateProfileCommandInput
109117
| CreateTrustAnchorCommandInput
118+
| DeleteAttributeMappingCommandInput
110119
| DeleteCrlCommandInput
111120
| DeleteProfileCommandInput
112121
| DeleteTrustAnchorCommandInput
@@ -126,6 +135,7 @@ export type ServiceInputTypes =
126135
| ListSubjectsCommandInput
127136
| ListTagsForResourceCommandInput
128137
| ListTrustAnchorsCommandInput
138+
| PutAttributeMappingCommandInput
129139
| PutNotificationSettingsCommandInput
130140
| ResetNotificationSettingsCommandInput
131141
| TagResourceCommandInput
@@ -140,6 +150,7 @@ export type ServiceInputTypes =
140150
export type ServiceOutputTypes =
141151
| CreateProfileCommandOutput
142152
| CreateTrustAnchorCommandOutput
153+
| DeleteAttributeMappingCommandOutput
143154
| DeleteCrlCommandOutput
144155
| DeleteProfileCommandOutput
145156
| DeleteTrustAnchorCommandOutput
@@ -159,6 +170,7 @@ export type ServiceOutputTypes =
159170
| ListSubjectsCommandOutput
160171
| ListTagsForResourceCommandOutput
161172
| ListTrustAnchorsCommandOutput
173+
| PutAttributeMappingCommandOutput
162174
| PutNotificationSettingsCommandOutput
163175
| ResetNotificationSettingsCommandOutput
164176
| TagResourceCommandOutput

clients/client-rolesanywhere/src/commands/CreateProfileCommand.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ export interface CreateProfileCommandOutput extends ProfileDetailResponse, __Met
8181
* // createdAt: new Date("TIMESTAMP"),
8282
* // updatedAt: new Date("TIMESTAMP"),
8383
* // durationSeconds: Number("int"),
84+
* // attributeMappings: [ // AttributeMappings
85+
* // { // AttributeMapping
86+
* // certificateField: "STRING_VALUE",
87+
* // mappingRules: [ // MappingRules
88+
* // { // MappingRule
89+
* // specifier: "STRING_VALUE", // required
90+
* // },
91+
* // ],
92+
* // },
93+
* // ],
8494
* // },
8595
* // };
8696
*
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { DeleteAttributeMappingRequest, DeleteAttributeMappingResponse } from "../models/models_0";
9+
import { de_DeleteAttributeMappingCommand, se_DeleteAttributeMappingCommand } from "../protocols/Aws_restJson1";
10+
import { RolesAnywhereClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RolesAnywhereClient";
11+
12+
/**
13+
* @public
14+
*/
15+
export { __MetadataBearer, $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link DeleteAttributeMappingCommand}.
20+
*/
21+
export interface DeleteAttributeMappingCommandInput extends DeleteAttributeMappingRequest {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link DeleteAttributeMappingCommand}.
26+
*/
27+
export interface DeleteAttributeMappingCommandOutput extends DeleteAttributeMappingResponse, __MetadataBearer {}
28+
29+
/**
30+
* <p>Delete an entry from the attribute mapping rules enforced by a given profile.</p>
31+
* @example
32+
* Use a bare-bones client and the command you need to make an API call.
33+
* ```javascript
34+
* import { RolesAnywhereClient, DeleteAttributeMappingCommand } from "@aws-sdk/client-rolesanywhere"; // ES Modules import
35+
* // const { RolesAnywhereClient, DeleteAttributeMappingCommand } = require("@aws-sdk/client-rolesanywhere"); // CommonJS import
36+
* const client = new RolesAnywhereClient(config);
37+
* const input = { // DeleteAttributeMappingRequest
38+
* profileId: "STRING_VALUE", // required
39+
* certificateField: "STRING_VALUE", // required
40+
* specifiers: [ // SpecifierList
41+
* "STRING_VALUE",
42+
* ],
43+
* };
44+
* const command = new DeleteAttributeMappingCommand(input);
45+
* const response = await client.send(command);
46+
* // { // DeleteAttributeMappingResponse
47+
* // profile: { // ProfileDetail
48+
* // profileId: "STRING_VALUE",
49+
* // profileArn: "STRING_VALUE",
50+
* // name: "STRING_VALUE",
51+
* // requireInstanceProperties: true || false,
52+
* // enabled: true || false,
53+
* // createdBy: "STRING_VALUE",
54+
* // sessionPolicy: "STRING_VALUE",
55+
* // roleArns: [ // RoleArnList
56+
* // "STRING_VALUE",
57+
* // ],
58+
* // managedPolicyArns: [ // ManagedPolicyList
59+
* // "STRING_VALUE",
60+
* // ],
61+
* // createdAt: new Date("TIMESTAMP"),
62+
* // updatedAt: new Date("TIMESTAMP"),
63+
* // durationSeconds: Number("int"),
64+
* // attributeMappings: [ // AttributeMappings
65+
* // { // AttributeMapping
66+
* // certificateField: "STRING_VALUE",
67+
* // mappingRules: [ // MappingRules
68+
* // { // MappingRule
69+
* // specifier: "STRING_VALUE", // required
70+
* // },
71+
* // ],
72+
* // },
73+
* // ],
74+
* // },
75+
* // };
76+
*
77+
* ```
78+
*
79+
* @param DeleteAttributeMappingCommandInput - {@link DeleteAttributeMappingCommandInput}
80+
* @returns {@link DeleteAttributeMappingCommandOutput}
81+
* @see {@link DeleteAttributeMappingCommandInput} for command's `input` shape.
82+
* @see {@link DeleteAttributeMappingCommandOutput} for command's `response` shape.
83+
* @see {@link RolesAnywhereClientResolvedConfig | config} for RolesAnywhereClient's `config` shape.
84+
*
85+
* @throws {@link AccessDeniedException} (client fault)
86+
* <p>You do not have sufficient access to perform this action.</p>
87+
*
88+
* @throws {@link ResourceNotFoundException} (client fault)
89+
* <p>The resource could not be found.</p>
90+
*
91+
* @throws {@link ValidationException} (client fault)
92+
* <p>Validation exception error.</p>
93+
*
94+
* @throws {@link RolesAnywhereServiceException}
95+
* <p>Base exception class for all service exceptions from RolesAnywhere service.</p>
96+
*
97+
* @public
98+
*/
99+
export class DeleteAttributeMappingCommand extends $Command
100+
.classBuilder<
101+
DeleteAttributeMappingCommandInput,
102+
DeleteAttributeMappingCommandOutput,
103+
RolesAnywhereClientResolvedConfig,
104+
ServiceInputTypes,
105+
ServiceOutputTypes
106+
>()
107+
.ep({
108+
...commonParams,
109+
})
110+
.m(function (this: any, Command: any, cs: any, config: RolesAnywhereClientResolvedConfig, o: any) {
111+
return [
112+
getSerdePlugin(config, this.serialize, this.deserialize),
113+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
114+
];
115+
})
116+
.s("RolesAnywhere", "DeleteAttributeMapping", {})
117+
.n("RolesAnywhereClient", "DeleteAttributeMappingCommand")
118+
.f(void 0, void 0)
119+
.ser(se_DeleteAttributeMappingCommand)
120+
.de(de_DeleteAttributeMappingCommand)
121+
.build() {}

clients/client-rolesanywhere/src/commands/DeleteProfileCommand.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ export interface DeleteProfileCommandOutput extends ProfileDetailResponse, __Met
6161
* // createdAt: new Date("TIMESTAMP"),
6262
* // updatedAt: new Date("TIMESTAMP"),
6363
* // durationSeconds: Number("int"),
64+
* // attributeMappings: [ // AttributeMappings
65+
* // { // AttributeMapping
66+
* // certificateField: "STRING_VALUE",
67+
* // mappingRules: [ // MappingRules
68+
* // { // MappingRule
69+
* // specifier: "STRING_VALUE", // required
70+
* // },
71+
* // ],
72+
* // },
73+
* // ],
6474
* // },
6575
* // };
6676
*

clients/client-rolesanywhere/src/commands/DisableProfileCommand.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ export interface DisableProfileCommandOutput extends ProfileDetailResponse, __Me
6161
* // createdAt: new Date("TIMESTAMP"),
6262
* // updatedAt: new Date("TIMESTAMP"),
6363
* // durationSeconds: Number("int"),
64+
* // attributeMappings: [ // AttributeMappings
65+
* // { // AttributeMapping
66+
* // certificateField: "STRING_VALUE",
67+
* // mappingRules: [ // MappingRules
68+
* // { // MappingRule
69+
* // specifier: "STRING_VALUE", // required
70+
* // },
71+
* // ],
72+
* // },
73+
* // ],
6474
* // },
6575
* // };
6676
*

clients/client-rolesanywhere/src/commands/EnableProfileCommand.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ export interface EnableProfileCommandOutput extends ProfileDetailResponse, __Met
6161
* // createdAt: new Date("TIMESTAMP"),
6262
* // updatedAt: new Date("TIMESTAMP"),
6363
* // durationSeconds: Number("int"),
64+
* // attributeMappings: [ // AttributeMappings
65+
* // { // AttributeMapping
66+
* // certificateField: "STRING_VALUE",
67+
* // mappingRules: [ // MappingRules
68+
* // { // MappingRule
69+
* // specifier: "STRING_VALUE", // required
70+
* // },
71+
* // ],
72+
* // },
73+
* // ],
6474
* // },
6575
* // };
6676
*

clients/client-rolesanywhere/src/commands/GetProfileCommand.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ export interface GetProfileCommandOutput extends ProfileDetailResponse, __Metada
6161
* // createdAt: new Date("TIMESTAMP"),
6262
* // updatedAt: new Date("TIMESTAMP"),
6363
* // durationSeconds: Number("int"),
64+
* // attributeMappings: [ // AttributeMappings
65+
* // { // AttributeMapping
66+
* // certificateField: "STRING_VALUE",
67+
* // mappingRules: [ // MappingRules
68+
* // { // MappingRule
69+
* // specifier: "STRING_VALUE", // required
70+
* // },
71+
* // ],
72+
* // },
73+
* // ],
6474
* // },
6575
* // };
6676
*

clients/client-rolesanywhere/src/commands/ListProfilesCommand.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ export interface ListProfilesCommandOutput extends ListProfilesResponse, __Metad
6464
* // createdAt: new Date("TIMESTAMP"),
6565
* // updatedAt: new Date("TIMESTAMP"),
6666
* // durationSeconds: Number("int"),
67+
* // attributeMappings: [ // AttributeMappings
68+
* // { // AttributeMapping
69+
* // certificateField: "STRING_VALUE",
70+
* // mappingRules: [ // MappingRules
71+
* // { // MappingRule
72+
* // specifier: "STRING_VALUE", // required
73+
* // },
74+
* // ],
75+
* // },
76+
* // ],
6777
* // },
6878
* // ],
6979
* // };

0 commit comments

Comments
 (0)