Skip to content

Commit 8855acd

Browse files
committed
Update to clarify use of a REGION parameter.
1 parent 1af453d commit 8855acd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dotnetv3/STS/AssumeRole/AssumeRoleExample/AssumeRole.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class AssumeRole
2626
/// for help in working with roles.
2727
/// </summary>
2828

29+
// A region property may be used if the profile or credentials loaded do not specify a region,
30+
// or to use a specific region.
2931
private static readonly RegionEndpoint REGION = RegionEndpoint.USWest2;
3032

3133
static async Task Main()
@@ -52,7 +54,7 @@ static async Task Main()
5254
var assumeRoleRes = await client.AssumeRoleAsync(assumeRoleReq);
5355

5456
// Now create a new client based on the credentials of the caller assuming the role.
55-
var client2 = new AmazonSecurityTokenServiceClient(credentials: assumeRoleRes.Credentials);
57+
var client2 = new AmazonSecurityTokenServiceClient(credentials: assumeRoleRes.Credentials, REGION);
5658

5759
// Get and display information about the caller that has assumed the defined role.
5860
var caller2 = await client2.GetCallerIdentityAsync(callerIdRequest);

0 commit comments

Comments
 (0)