Skip to content

Commit

Permalink
feat(client-rolesanywhere): IAM RolesAnywhere now supports custom rol…
Browse files Browse the repository at this point in the history
…e 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.
  • Loading branch information
awstools committed Jul 30, 2024
1 parent 88b6a41 commit 5bc3008
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface CreateProfileCommandOutput extends ProfileDetailResponse, __Met
* value: "STRING_VALUE", // required
* },
* ],
* acceptRoleSessionName: true || false,
* };
* const command = new CreateProfileCommand(input);
* const response = await client.send(command);
Expand All @@ -82,6 +83,7 @@ export interface CreateProfileCommandOutput extends ProfileDetailResponse, __Met
* // createdAt: new Date("TIMESTAMP"),
* // updatedAt: new Date("TIMESTAMP"),
* // durationSeconds: Number("int"),
* // acceptRoleSessionName: true || false,
* // attributeMappings: [ // AttributeMappings
* // { // AttributeMapping
* // certificateField: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface DeleteAttributeMappingCommandOutput extends DeleteAttributeMapp
* // createdAt: new Date("TIMESTAMP"),
* // updatedAt: new Date("TIMESTAMP"),
* // durationSeconds: Number("int"),
* // acceptRoleSessionName: true || false,
* // attributeMappings: [ // AttributeMappings
* // { // AttributeMapping
* // certificateField: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface DeleteProfileCommandOutput extends ProfileDetailResponse, __Met
* // createdAt: new Date("TIMESTAMP"),
* // updatedAt: new Date("TIMESTAMP"),
* // durationSeconds: Number("int"),
* // acceptRoleSessionName: true || false,
* // attributeMappings: [ // AttributeMappings
* // { // AttributeMapping
* // certificateField: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface DisableProfileCommandOutput extends ProfileDetailResponse, __Me
* // createdAt: new Date("TIMESTAMP"),
* // updatedAt: new Date("TIMESTAMP"),
* // durationSeconds: Number("int"),
* // acceptRoleSessionName: true || false,
* // attributeMappings: [ // AttributeMappings
* // { // AttributeMapping
* // certificateField: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface EnableProfileCommandOutput extends ProfileDetailResponse, __Met
* // createdAt: new Date("TIMESTAMP"),
* // updatedAt: new Date("TIMESTAMP"),
* // durationSeconds: Number("int"),
* // acceptRoleSessionName: true || false,
* // attributeMappings: [ // AttributeMappings
* // { // AttributeMapping
* // certificateField: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface GetProfileCommandOutput extends ProfileDetailResponse, __Metada
* // createdAt: new Date("TIMESTAMP"),
* // updatedAt: new Date("TIMESTAMP"),
* // durationSeconds: Number("int"),
* // acceptRoleSessionName: true || false,
* // attributeMappings: [ // AttributeMappings
* // { // AttributeMapping
* // certificateField: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export interface ListProfilesCommandOutput extends ListProfilesResponse, __Metad
* // createdAt: new Date("TIMESTAMP"),
* // updatedAt: new Date("TIMESTAMP"),
* // durationSeconds: Number("int"),
* // acceptRoleSessionName: true || false,
* // attributeMappings: [ // AttributeMappings
* // { // AttributeMapping
* // certificateField: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export interface PutAttributeMappingCommandOutput extends PutAttributeMappingRes
* // createdAt: new Date("TIMESTAMP"),
* // updatedAt: new Date("TIMESTAMP"),
* // durationSeconds: Number("int"),
* // acceptRoleSessionName: true || false,
* // attributeMappings: [ // AttributeMappings
* // { // AttributeMapping
* // certificateField: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export interface UpdateProfileCommandOutput extends ProfileDetailResponse, __Met
* "STRING_VALUE",
* ],
* durationSeconds: Number("int"),
* acceptRoleSessionName: true || false,
* };
* const command = new UpdateProfileCommand(input);
* const response = await client.send(command);
Expand All @@ -73,6 +74,7 @@ export interface UpdateProfileCommandOutput extends ProfileDetailResponse, __Met
* // createdAt: new Date("TIMESTAMP"),
* // updatedAt: new Date("TIMESTAMP"),
* // durationSeconds: Number("int"),
* // acceptRoleSessionName: true || false,
* // attributeMappings: [ // AttributeMappings
* // { // AttributeMapping
* // certificateField: "STRING_VALUE",
Expand Down
18 changes: 18 additions & 0 deletions clients/client-rolesanywhere/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ export interface CreateProfileRequest {
* @public
*/
tags?: Tag[];

/**
* <p>Used to determine if a custom role session name will be accepted in a temporary credential request.</p>
* @public
*/
acceptRoleSessionName?: boolean;
}

/**
Expand Down Expand Up @@ -220,6 +226,12 @@ export interface ProfileDetail {
*/
durationSeconds?: number;

/**
* <p>Used to determine if a custom role session name will be accepted in a temporary credential request.</p>
* @public
*/
acceptRoleSessionName?: boolean;

/**
* <p>A mapping applied to the authenticating end-entity certificate.</p>
* @public
Expand Down Expand Up @@ -1164,6 +1176,12 @@ export interface UpdateProfileRequest {
* @public
*/
durationSeconds?: number;

/**
* <p>Used to determine if a custom role session name will be accepted in a temporary credential request.</p>
* @public
*/
acceptRoleSessionName?: boolean;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions clients/client-rolesanywhere/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export const se_CreateProfileCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
acceptRoleSessionName: [],
durationSeconds: [],
enabled: [],
managedPolicyArns: (_) => _json(_),
Expand Down Expand Up @@ -646,6 +647,7 @@ export const se_UpdateProfileCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
acceptRoleSessionName: [],
durationSeconds: [],
managedPolicyArns: (_) => _json(_),
name: [],
Expand Down Expand Up @@ -1541,6 +1543,7 @@ const de_InstanceProperty = (output: any, context: __SerdeContext): InstanceProp
*/
const de_ProfileDetail = (output: any, context: __SerdeContext): ProfileDetail => {
return take(output, {
acceptRoleSessionName: __expectBoolean,
attributeMappings: _json,
createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
createdBy: __expectString,
Expand Down
20 changes: 20 additions & 0 deletions codegen/sdk-codegen/aws-models/rolesanywhere.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@
"traits": {
"smithy.api#documentation": "<p>The tags to attach to the profile.</p>"
}
},
"acceptRoleSessionName": {
"target": "smithy.api#Boolean",
"traits": {
"smithy.api#documentation": "<p>Used to determine if a custom role session name will be accepted in a temporary credential request.</p>"
}
}
}
},
Expand Down Expand Up @@ -403,6 +409,7 @@
},
"output": {
"profile": {
"acceptRoleSessionName": false,
"attributeMappings": [
{
"mappingRules": [
Expand Down Expand Up @@ -1529,6 +1536,12 @@
"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>"
}
},
"acceptRoleSessionName": {
"target": "smithy.api#Boolean",
"traits": {
"smithy.api#documentation": "<p>Used to determine if a custom role session name will be accepted in a temporary credential request.</p>"
}
},
"attributeMappings": {
"target": "com.amazonaws.rolesanywhere#AttributeMappings",
"traits": {
Expand Down Expand Up @@ -1592,6 +1605,7 @@
},
"output": {
"profile": {
"acceptRoleSessionName": false,
"attributeMappings": [
{
"mappingRules": [
Expand Down Expand Up @@ -3554,6 +3568,12 @@
"max": 43200
}
}
},
"acceptRoleSessionName": {
"target": "smithy.api#Boolean",
"traits": {
"smithy.api#documentation": "<p>Used to determine if a custom role session name will be accepted in a temporary credential request.</p>"
}
}
}
},
Expand Down

0 comments on commit 5bc3008

Please sign in to comment.