File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
dotnetv3/STS/AssumeRole/AssumeRoleExample Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ class AssumeRole
26
26
/// for help in working with roles.
27
27
/// </summary>
28
28
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.
29
31
private static readonly RegionEndpoint REGION = RegionEndpoint . USWest2 ;
30
32
31
33
static async Task Main ( )
@@ -52,7 +54,7 @@ static async Task Main()
52
54
var assumeRoleRes = await client . AssumeRoleAsync ( assumeRoleReq ) ;
53
55
54
56
// 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 ) ;
56
58
57
59
// Get and display information about the caller that has assumed the defined role.
58
60
var caller2 = await client2 . GetCallerIdentityAsync ( callerIdRequest ) ;
You can’t perform that action at this time.
0 commit comments