Skip to content

Commit 5bc3008

Browse files
author
awstools
committed
feat(client-rolesanywhere): IAM RolesAnywhere now supports custom role session name on the CreateSession. This release adds the acceptRoleSessionName option to a profile to control whether a role session name will be accepted in a session request with a given profile.
1 parent 88b6a41 commit 5bc3008

12 files changed

+52
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export interface CreateProfileCommandOutput extends ProfileDetailResponse, __Met
6161
* value: "STRING_VALUE", // required
6262
* },
6363
* ],
64+
* acceptRoleSessionName: true || false,
6465
* };
6566
* const command = new CreateProfileCommand(input);
6667
* const response = await client.send(command);
@@ -82,6 +83,7 @@ export interface CreateProfileCommandOutput extends ProfileDetailResponse, __Met
8283
* // createdAt: new Date("TIMESTAMP"),
8384
* // updatedAt: new Date("TIMESTAMP"),
8485
* // durationSeconds: Number("int"),
86+
* // acceptRoleSessionName: true || false,
8587
* // attributeMappings: [ // AttributeMappings
8688
* // { // AttributeMapping
8789
* // certificateField: "STRING_VALUE",

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

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export interface DeleteAttributeMappingCommandOutput extends DeleteAttributeMapp
6262
* // createdAt: new Date("TIMESTAMP"),
6363
* // updatedAt: new Date("TIMESTAMP"),
6464
* // durationSeconds: Number("int"),
65+
* // acceptRoleSessionName: true || false,
6566
* // attributeMappings: [ // AttributeMappings
6667
* // { // AttributeMapping
6768
* // certificateField: "STRING_VALUE",

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

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export interface DeleteProfileCommandOutput extends ProfileDetailResponse, __Met
6262
* // createdAt: new Date("TIMESTAMP"),
6363
* // updatedAt: new Date("TIMESTAMP"),
6464
* // durationSeconds: Number("int"),
65+
* // acceptRoleSessionName: true || false,
6566
* // attributeMappings: [ // AttributeMappings
6667
* // { // AttributeMapping
6768
* // certificateField: "STRING_VALUE",

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

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export interface DisableProfileCommandOutput extends ProfileDetailResponse, __Me
6262
* // createdAt: new Date("TIMESTAMP"),
6363
* // updatedAt: new Date("TIMESTAMP"),
6464
* // durationSeconds: Number("int"),
65+
* // acceptRoleSessionName: true || false,
6566
* // attributeMappings: [ // AttributeMappings
6667
* // { // AttributeMapping
6768
* // certificateField: "STRING_VALUE",

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

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export interface EnableProfileCommandOutput extends ProfileDetailResponse, __Met
6262
* // createdAt: new Date("TIMESTAMP"),
6363
* // updatedAt: new Date("TIMESTAMP"),
6464
* // durationSeconds: Number("int"),
65+
* // acceptRoleSessionName: true || false,
6566
* // attributeMappings: [ // AttributeMappings
6667
* // { // AttributeMapping
6768
* // certificateField: "STRING_VALUE",

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

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export interface GetProfileCommandOutput extends ProfileDetailResponse, __Metada
6262
* // createdAt: new Date("TIMESTAMP"),
6363
* // updatedAt: new Date("TIMESTAMP"),
6464
* // durationSeconds: Number("int"),
65+
* // acceptRoleSessionName: true || false,
6566
* // attributeMappings: [ // AttributeMappings
6667
* // { // AttributeMapping
6768
* // certificateField: "STRING_VALUE",

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

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface ListProfilesCommandOutput extends ListProfilesResponse, __Metad
6565
* // createdAt: new Date("TIMESTAMP"),
6666
* // updatedAt: new Date("TIMESTAMP"),
6767
* // durationSeconds: Number("int"),
68+
* // acceptRoleSessionName: true || false,
6869
* // attributeMappings: [ // AttributeMappings
6970
* // { // AttributeMapping
7071
* // certificateField: "STRING_VALUE",

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

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface PutAttributeMappingCommandOutput extends PutAttributeMappingRes
6565
* // createdAt: new Date("TIMESTAMP"),
6666
* // updatedAt: new Date("TIMESTAMP"),
6767
* // durationSeconds: Number("int"),
68+
* // acceptRoleSessionName: true || false,
6869
* // attributeMappings: [ // AttributeMappings
6970
* // { // AttributeMapping
7071
* // certificateField: "STRING_VALUE",

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

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export interface UpdateProfileCommandOutput extends ProfileDetailResponse, __Met
5252
* "STRING_VALUE",
5353
* ],
5454
* durationSeconds: Number("int"),
55+
* acceptRoleSessionName: true || false,
5556
* };
5657
* const command = new UpdateProfileCommand(input);
5758
* const response = await client.send(command);
@@ -73,6 +74,7 @@ export interface UpdateProfileCommandOutput extends ProfileDetailResponse, __Met
7374
* // createdAt: new Date("TIMESTAMP"),
7475
* // updatedAt: new Date("TIMESTAMP"),
7576
* // durationSeconds: Number("int"),
77+
* // acceptRoleSessionName: true || false,
7678
* // attributeMappings: [ // AttributeMappings
7779
* // { // AttributeMapping
7880
* // certificateField: "STRING_VALUE",

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

+18
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ export interface CreateProfileRequest {
139139
* @public
140140
*/
141141
tags?: Tag[];
142+
143+
/**
144+
* <p>Used to determine if a custom role session name will be accepted in a temporary credential request.</p>
145+
* @public
146+
*/
147+
acceptRoleSessionName?: boolean;
142148
}
143149

144150
/**
@@ -220,6 +226,12 @@ export interface ProfileDetail {
220226
*/
221227
durationSeconds?: number;
222228

229+
/**
230+
* <p>Used to determine if a custom role session name will be accepted in a temporary credential request.</p>
231+
* @public
232+
*/
233+
acceptRoleSessionName?: boolean;
234+
223235
/**
224236
* <p>A mapping applied to the authenticating end-entity certificate.</p>
225237
* @public
@@ -1164,6 +1176,12 @@ export interface UpdateProfileRequest {
11641176
* @public
11651177
*/
11661178
durationSeconds?: number;
1179+
1180+
/**
1181+
* <p>Used to determine if a custom role session name will be accepted in a temporary credential request.</p>
1182+
* @public
1183+
*/
1184+
acceptRoleSessionName?: boolean;
11671185
}
11681186

11691187
/**

clients/client-rolesanywhere/src/protocols/Aws_restJson1.ts

+3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export const se_CreateProfileCommand = async (
105105
let body: any;
106106
body = JSON.stringify(
107107
take(input, {
108+
acceptRoleSessionName: [],
108109
durationSeconds: [],
109110
enabled: [],
110111
managedPolicyArns: (_) => _json(_),
@@ -646,6 +647,7 @@ export const se_UpdateProfileCommand = async (
646647
let body: any;
647648
body = JSON.stringify(
648649
take(input, {
650+
acceptRoleSessionName: [],
649651
durationSeconds: [],
650652
managedPolicyArns: (_) => _json(_),
651653
name: [],
@@ -1541,6 +1543,7 @@ const de_InstanceProperty = (output: any, context: __SerdeContext): InstanceProp
15411543
*/
15421544
const de_ProfileDetail = (output: any, context: __SerdeContext): ProfileDetail => {
15431545
return take(output, {
1546+
acceptRoleSessionName: __expectBoolean,
15441547
attributeMappings: _json,
15451548
createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
15461549
createdBy: __expectString,

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

+20
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@
149149
"traits": {
150150
"smithy.api#documentation": "<p>The tags to attach to the profile.</p>"
151151
}
152+
},
153+
"acceptRoleSessionName": {
154+
"target": "smithy.api#Boolean",
155+
"traits": {
156+
"smithy.api#documentation": "<p>Used to determine if a custom role session name will be accepted in a temporary credential request.</p>"
157+
}
152158
}
153159
}
154160
},
@@ -403,6 +409,7 @@
403409
},
404410
"output": {
405411
"profile": {
412+
"acceptRoleSessionName": false,
406413
"attributeMappings": [
407414
{
408415
"mappingRules": [
@@ -1529,6 +1536,12 @@
15291536
"smithy.api#documentation": "<p> Used to determine how long sessions vended using this profile are valid for. See the <code>Expiration</code> section of the \n<a href=\"https://docs.aws.amazon.com/rolesanywhere/latest/userguide/authentication-create-session.html#credentials-object\">CreateSession API documentation</a>\npage for more details. In requests, if this value is not provided, the default value will be 3600. </p>"
15301537
}
15311538
},
1539+
"acceptRoleSessionName": {
1540+
"target": "smithy.api#Boolean",
1541+
"traits": {
1542+
"smithy.api#documentation": "<p>Used to determine if a custom role session name will be accepted in a temporary credential request.</p>"
1543+
}
1544+
},
15321545
"attributeMappings": {
15331546
"target": "com.amazonaws.rolesanywhere#AttributeMappings",
15341547
"traits": {
@@ -1592,6 +1605,7 @@
15921605
},
15931606
"output": {
15941607
"profile": {
1608+
"acceptRoleSessionName": false,
15951609
"attributeMappings": [
15961610
{
15971611
"mappingRules": [
@@ -3554,6 +3568,12 @@
35543568
"max": 43200
35553569
}
35563570
}
3571+
},
3572+
"acceptRoleSessionName": {
3573+
"target": "smithy.api#Boolean",
3574+
"traits": {
3575+
"smithy.api#documentation": "<p>Used to determine if a custom role session name will be accepted in a temporary credential request.</p>"
3576+
}
35573577
}
35583578
}
35593579
},

0 commit comments

Comments
 (0)