@@ -45,11 +45,12 @@ final class AssumeRoleRequest extends Input
45
45
private $ policy ;
46
46
47
47
/**
48
- * The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum
49
- * session duration setting for the role. This setting can have a value from 1 hour to 12 hours. If you specify a value
50
- * higher than this setting, the operation fails. For example, if you specify a session duration of 12 hours, but your
51
- * administrator set the maximum session duration to 6 hours, your operation fails. To learn how to view the maximum
52
- * value for your role, see View the Maximum Session Duration Setting for a Role in the *IAM User Guide*.
48
+ * The duration, in seconds, of the role session. The value specified can can range from 900 seconds (15 minutes) up to
49
+ * the maximum session duration that is set for the role. The maximum session duration setting can have a value from 1
50
+ * hour to 12 hours. If you specify a value higher than this setting or the administrator setting (whichever is lower),
51
+ * the operation fails. For example, if you specify a session duration of 12 hours, but your administrator set the
52
+ * maximum session duration to 6 hours, your operation fails. To learn how to view the maximum value for your role, see
53
+ * View the Maximum Session Duration Setting for a Role in the *IAM User Guide*.
53
54
*
54
55
* @see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
55
56
*
@@ -104,14 +105,21 @@ final class AssumeRoleRequest extends Input
104
105
private $ serialNumber ;
105
106
106
107
/**
107
- * The value provided by the MFA device, if the trust policy of the role being assumed requires MFA (that is , if the
108
- * policy includes a condition that tests for MFA). If the role being assumed requires MFA and if the `TokenCode` value
109
- * is missing or expired, the `AssumeRole` call returns an "access denied" error.
108
+ * The value provided by the MFA device, if the trust policy of the role being assumed requires MFA. (In other words , if
109
+ * the policy includes a condition that tests for MFA). If the role being assumed requires MFA and if the `TokenCode`
110
+ * value is missing or expired, the `AssumeRole` call returns an "access denied" error.
110
111
*
111
112
* @var string|null
112
113
*/
113
114
private $ tokenCode ;
114
115
116
+ /**
117
+ * The source identity specified by the principal that is calling the `AssumeRole` operation.
118
+ *
119
+ * @var string|null
120
+ */
121
+ private $ sourceIdentity ;
122
+
115
123
/**
116
124
* @param array{
117
125
* RoleArn?: string,
@@ -124,6 +132,7 @@ final class AssumeRoleRequest extends Input
124
132
* ExternalId?: string,
125
133
* SerialNumber?: string,
126
134
* TokenCode?: string,
135
+ * SourceIdentity?: string,
127
136
* @region?: string,
128
137
* } $input
129
138
*/
@@ -139,6 +148,7 @@ public function __construct(array $input = [])
139
148
$ this ->externalId = $ input ['ExternalId ' ] ?? null ;
140
149
$ this ->serialNumber = $ input ['SerialNumber ' ] ?? null ;
141
150
$ this ->tokenCode = $ input ['TokenCode ' ] ?? null ;
151
+ $ this ->sourceIdentity = $ input ['SourceIdentity ' ] ?? null ;
142
152
parent ::__construct ($ input );
143
153
}
144
154
@@ -185,6 +195,11 @@ public function getSerialNumber(): ?string
185
195
return $ this ->serialNumber ;
186
196
}
187
197
198
+ public function getSourceIdentity (): ?string
199
+ {
200
+ return $ this ->sourceIdentity ;
201
+ }
202
+
188
203
/**
189
204
* @return Tag[]
190
205
*/
@@ -279,6 +294,13 @@ public function setSerialNumber(?string $value): self
279
294
return $ this ;
280
295
}
281
296
297
+ public function setSourceIdentity (?string $ value ): self
298
+ {
299
+ $ this ->sourceIdentity = $ value ;
300
+
301
+ return $ this ;
302
+ }
303
+
282
304
/**
283
305
* @param Tag[] $value
284
306
*/
@@ -357,6 +379,9 @@ private function requestBody(): array
357
379
if (null !== $ v = $ this ->tokenCode ) {
358
380
$ payload ['TokenCode ' ] = $ v ;
359
381
}
382
+ if (null !== $ v = $ this ->sourceIdentity ) {
383
+ $ payload ['SourceIdentity ' ] = $ v ;
384
+ }
360
385
361
386
return $ payload ;
362
387
}
0 commit comments