Skip to content

Commit 5774faa

Browse files
author
awstools
committed
feat(client-iam): Added the EnableOutboundWebIdentityFederation, DisableOutboundWebIdentityFederation and GetOutboundWebIdentityFederationInfo APIs for the IAM outbound federation feature.
1 parent ab1e44d commit 5774faa

14 files changed

+730
-63
lines changed

clients/client-iam/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,14 @@ DisableOrganizationsRootSessions
631631

632632
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iam/command/DisableOrganizationsRootSessionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Interface/DisableOrganizationsRootSessionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Interface/DisableOrganizationsRootSessionsCommandOutput/)
633633

634+
</details>
635+
<details>
636+
<summary>
637+
DisableOutboundWebIdentityFederation
638+
</summary>
639+
640+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iam/command/DisableOutboundWebIdentityFederationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Interface/DisableOutboundWebIdentityFederationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Interface/DisableOutboundWebIdentityFederationCommandOutput/)
641+
634642
</details>
635643
<details>
636644
<summary>
@@ -655,6 +663,14 @@ EnableOrganizationsRootSessions
655663

656664
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iam/command/EnableOrganizationsRootSessionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Interface/EnableOrganizationsRootSessionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Interface/EnableOrganizationsRootSessionsCommandOutput/)
657665

666+
</details>
667+
<details>
668+
<summary>
669+
EnableOutboundWebIdentityFederation
670+
</summary>
671+
672+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iam/command/EnableOutboundWebIdentityFederationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Interface/EnableOutboundWebIdentityFederationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Interface/EnableOutboundWebIdentityFederationCommandOutput/)
673+
658674
</details>
659675
<details>
660676
<summary>
@@ -807,6 +823,14 @@ GetOrganizationsAccessReport
807823

808824
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iam/command/GetOrganizationsAccessReportCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Interface/GetOrganizationsAccessReportCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Interface/GetOrganizationsAccessReportCommandOutput/)
809825

826+
</details>
827+
<details>
828+
<summary>
829+
GetOutboundWebIdentityFederationInfo
830+
</summary>
831+
832+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iam/command/GetOutboundWebIdentityFederationInfoCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Interface/GetOutboundWebIdentityFederationInfoCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Interface/GetOutboundWebIdentityFederationInfoCommandOutput/)
833+
810834
</details>
811835
<details>
812836
<summary>

clients/client-iam/src/IAM.ts

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ import {
243243
DisableOrganizationsRootSessionsCommandInput,
244244
DisableOrganizationsRootSessionsCommandOutput,
245245
} from "./commands/DisableOrganizationsRootSessionsCommand";
246+
import {
247+
DisableOutboundWebIdentityFederationCommand,
248+
DisableOutboundWebIdentityFederationCommandInput,
249+
DisableOutboundWebIdentityFederationCommandOutput,
250+
} from "./commands/DisableOutboundWebIdentityFederationCommand";
246251
import {
247252
EnableMFADeviceCommand,
248253
EnableMFADeviceCommandInput,
@@ -258,6 +263,11 @@ import {
258263
EnableOrganizationsRootSessionsCommandInput,
259264
EnableOrganizationsRootSessionsCommandOutput,
260265
} from "./commands/EnableOrganizationsRootSessionsCommand";
266+
import {
267+
EnableOutboundWebIdentityFederationCommand,
268+
EnableOutboundWebIdentityFederationCommandInput,
269+
EnableOutboundWebIdentityFederationCommandOutput,
270+
} from "./commands/EnableOutboundWebIdentityFederationCommand";
261271
import {
262272
GenerateCredentialReportCommand,
263273
GenerateCredentialReportCommandInput,
@@ -349,6 +359,11 @@ import {
349359
GetOrganizationsAccessReportCommandInput,
350360
GetOrganizationsAccessReportCommandOutput,
351361
} from "./commands/GetOrganizationsAccessReportCommand";
362+
import {
363+
GetOutboundWebIdentityFederationInfoCommand,
364+
GetOutboundWebIdentityFederationInfoCommandInput,
365+
GetOutboundWebIdentityFederationInfoCommandOutput,
366+
} from "./commands/GetOutboundWebIdentityFederationInfoCommand";
352367
import { GetPolicyCommand, GetPolicyCommandInput, GetPolicyCommandOutput } from "./commands/GetPolicyCommand";
353368
import {
354369
GetPolicyVersionCommand,
@@ -835,9 +850,11 @@ const commands = {
835850
DetachUserPolicyCommand,
836851
DisableOrganizationsRootCredentialsManagementCommand,
837852
DisableOrganizationsRootSessionsCommand,
853+
DisableOutboundWebIdentityFederationCommand,
838854
EnableMFADeviceCommand,
839855
EnableOrganizationsRootCredentialsManagementCommand,
840856
EnableOrganizationsRootSessionsCommand,
857+
EnableOutboundWebIdentityFederationCommand,
841858
GenerateCredentialReportCommand,
842859
GenerateOrganizationsAccessReportCommand,
843860
GenerateServiceLastAccessedDetailsCommand,
@@ -857,6 +874,7 @@ const commands = {
857874
GetMFADeviceCommand,
858875
GetOpenIDConnectProviderCommand,
859876
GetOrganizationsAccessReportCommand,
877+
GetOutboundWebIdentityFederationInfoCommand,
860878
GetPolicyCommand,
861879
GetPolicyVersionCommand,
862880
GetRoleCommand,
@@ -1805,6 +1823,24 @@ export interface IAM {
18051823
cb: (err: any, data?: DisableOrganizationsRootSessionsCommandOutput) => void
18061824
): void;
18071825

1826+
/**
1827+
* @see {@link DisableOutboundWebIdentityFederationCommand}
1828+
*/
1829+
disableOutboundWebIdentityFederation(): Promise<DisableOutboundWebIdentityFederationCommandOutput>;
1830+
disableOutboundWebIdentityFederation(
1831+
args: DisableOutboundWebIdentityFederationCommandInput,
1832+
options?: __HttpHandlerOptions
1833+
): Promise<DisableOutboundWebIdentityFederationCommandOutput>;
1834+
disableOutboundWebIdentityFederation(
1835+
args: DisableOutboundWebIdentityFederationCommandInput,
1836+
cb: (err: any, data?: DisableOutboundWebIdentityFederationCommandOutput) => void
1837+
): void;
1838+
disableOutboundWebIdentityFederation(
1839+
args: DisableOutboundWebIdentityFederationCommandInput,
1840+
options: __HttpHandlerOptions,
1841+
cb: (err: any, data?: DisableOutboundWebIdentityFederationCommandOutput) => void
1842+
): void;
1843+
18081844
/**
18091845
* @see {@link EnableMFADeviceCommand}
18101846
*/
@@ -1855,6 +1891,24 @@ export interface IAM {
18551891
cb: (err: any, data?: EnableOrganizationsRootSessionsCommandOutput) => void
18561892
): void;
18571893

1894+
/**
1895+
* @see {@link EnableOutboundWebIdentityFederationCommand}
1896+
*/
1897+
enableOutboundWebIdentityFederation(): Promise<EnableOutboundWebIdentityFederationCommandOutput>;
1898+
enableOutboundWebIdentityFederation(
1899+
args: EnableOutboundWebIdentityFederationCommandInput,
1900+
options?: __HttpHandlerOptions
1901+
): Promise<EnableOutboundWebIdentityFederationCommandOutput>;
1902+
enableOutboundWebIdentityFederation(
1903+
args: EnableOutboundWebIdentityFederationCommandInput,
1904+
cb: (err: any, data?: EnableOutboundWebIdentityFederationCommandOutput) => void
1905+
): void;
1906+
enableOutboundWebIdentityFederation(
1907+
args: EnableOutboundWebIdentityFederationCommandInput,
1908+
options: __HttpHandlerOptions,
1909+
cb: (err: any, data?: EnableOutboundWebIdentityFederationCommandOutput) => void
1910+
): void;
1911+
18581912
/**
18591913
* @see {@link GenerateCredentialReportCommand}
18601914
*/
@@ -2166,6 +2220,24 @@ export interface IAM {
21662220
cb: (err: any, data?: GetOrganizationsAccessReportCommandOutput) => void
21672221
): void;
21682222

2223+
/**
2224+
* @see {@link GetOutboundWebIdentityFederationInfoCommand}
2225+
*/
2226+
getOutboundWebIdentityFederationInfo(): Promise<GetOutboundWebIdentityFederationInfoCommandOutput>;
2227+
getOutboundWebIdentityFederationInfo(
2228+
args: GetOutboundWebIdentityFederationInfoCommandInput,
2229+
options?: __HttpHandlerOptions
2230+
): Promise<GetOutboundWebIdentityFederationInfoCommandOutput>;
2231+
getOutboundWebIdentityFederationInfo(
2232+
args: GetOutboundWebIdentityFederationInfoCommandInput,
2233+
cb: (err: any, data?: GetOutboundWebIdentityFederationInfoCommandOutput) => void
2234+
): void;
2235+
getOutboundWebIdentityFederationInfo(
2236+
args: GetOutboundWebIdentityFederationInfoCommandInput,
2237+
options: __HttpHandlerOptions,
2238+
cb: (err: any, data?: GetOutboundWebIdentityFederationInfoCommandOutput) => void
2239+
): void;
2240+
21692241
/**
21702242
* @see {@link GetPolicyCommand}
21712243
*/

clients/client-iam/src/IAMClient.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ import {
185185
DisableOrganizationsRootSessionsCommandInput,
186186
DisableOrganizationsRootSessionsCommandOutput,
187187
} from "./commands/DisableOrganizationsRootSessionsCommand";
188+
import {
189+
DisableOutboundWebIdentityFederationCommandInput,
190+
DisableOutboundWebIdentityFederationCommandOutput,
191+
} from "./commands/DisableOutboundWebIdentityFederationCommand";
188192
import { EnableMFADeviceCommandInput, EnableMFADeviceCommandOutput } from "./commands/EnableMFADeviceCommand";
189193
import {
190194
EnableOrganizationsRootCredentialsManagementCommandInput,
@@ -194,6 +198,10 @@ import {
194198
EnableOrganizationsRootSessionsCommandInput,
195199
EnableOrganizationsRootSessionsCommandOutput,
196200
} from "./commands/EnableOrganizationsRootSessionsCommand";
201+
import {
202+
EnableOutboundWebIdentityFederationCommandInput,
203+
EnableOutboundWebIdentityFederationCommandOutput,
204+
} from "./commands/EnableOutboundWebIdentityFederationCommand";
197205
import {
198206
GenerateCredentialReportCommandInput,
199207
GenerateCredentialReportCommandOutput,
@@ -252,6 +260,10 @@ import {
252260
GetOrganizationsAccessReportCommandInput,
253261
GetOrganizationsAccessReportCommandOutput,
254262
} from "./commands/GetOrganizationsAccessReportCommand";
263+
import {
264+
GetOutboundWebIdentityFederationInfoCommandInput,
265+
GetOutboundWebIdentityFederationInfoCommandOutput,
266+
} from "./commands/GetOutboundWebIdentityFederationInfoCommand";
255267
import { GetPolicyCommandInput, GetPolicyCommandOutput } from "./commands/GetPolicyCommand";
256268
import { GetPolicyVersionCommandInput, GetPolicyVersionCommandOutput } from "./commands/GetPolicyVersionCommand";
257269
import { GetRoleCommandInput, GetRoleCommandOutput } from "./commands/GetRoleCommand";
@@ -565,9 +577,11 @@ export type ServiceInputTypes =
565577
| DetachUserPolicyCommandInput
566578
| DisableOrganizationsRootCredentialsManagementCommandInput
567579
| DisableOrganizationsRootSessionsCommandInput
580+
| DisableOutboundWebIdentityFederationCommandInput
568581
| EnableMFADeviceCommandInput
569582
| EnableOrganizationsRootCredentialsManagementCommandInput
570583
| EnableOrganizationsRootSessionsCommandInput
584+
| EnableOutboundWebIdentityFederationCommandInput
571585
| GenerateCredentialReportCommandInput
572586
| GenerateOrganizationsAccessReportCommandInput
573587
| GenerateServiceLastAccessedDetailsCommandInput
@@ -587,6 +601,7 @@ export type ServiceInputTypes =
587601
| GetMFADeviceCommandInput
588602
| GetOpenIDConnectProviderCommandInput
589603
| GetOrganizationsAccessReportCommandInput
604+
| GetOutboundWebIdentityFederationInfoCommandInput
590605
| GetPolicyCommandInput
591606
| GetPolicyVersionCommandInput
592607
| GetRoleCommandInput
@@ -743,9 +758,11 @@ export type ServiceOutputTypes =
743758
| DetachUserPolicyCommandOutput
744759
| DisableOrganizationsRootCredentialsManagementCommandOutput
745760
| DisableOrganizationsRootSessionsCommandOutput
761+
| DisableOutboundWebIdentityFederationCommandOutput
746762
| EnableMFADeviceCommandOutput
747763
| EnableOrganizationsRootCredentialsManagementCommandOutput
748764
| EnableOrganizationsRootSessionsCommandOutput
765+
| EnableOutboundWebIdentityFederationCommandOutput
749766
| GenerateCredentialReportCommandOutput
750767
| GenerateOrganizationsAccessReportCommandOutput
751768
| GenerateServiceLastAccessedDetailsCommandOutput
@@ -765,6 +782,7 @@ export type ServiceOutputTypes =
765782
| GetMFADeviceCommandOutput
766783
| GetOpenIDConnectProviderCommandOutput
767784
| GetOrganizationsAccessReportCommandOutput
785+
| GetOutboundWebIdentityFederationInfoCommandOutput
768786
| GetPolicyCommandOutput
769787
| GetPolicyVersionCommandOutput
770788
| GetRoleCommandOutput
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { Command as $Command } from "@smithy/smithy-client";
4+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5+
6+
import { commonParams } from "../endpoint/EndpointParameters";
7+
import { IAMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IAMClient";
8+
import { DisableOutboundWebIdentityFederation } from "../schemas/schemas_0";
9+
10+
/**
11+
* @public
12+
*/
13+
export type { __MetadataBearer };
14+
export { $Command };
15+
/**
16+
* @public
17+
*
18+
* The input for {@link DisableOutboundWebIdentityFederationCommand}.
19+
*/
20+
export interface DisableOutboundWebIdentityFederationCommandInput {}
21+
/**
22+
* @public
23+
*
24+
* The output of {@link DisableOutboundWebIdentityFederationCommand}.
25+
*/
26+
export interface DisableOutboundWebIdentityFederationCommandOutput extends __MetadataBearer {}
27+
28+
/**
29+
* <p>Disables the outbound identity federation feature for your Amazon Web Services account. When disabled, IAM principals in the account cannot
30+
* use the <code>GetWebIdentityToken</code> API to obtain JSON Web Tokens (JWTs) for authentication with external services. This operation
31+
* does not affect tokens that were issued before the feature was disabled.</p>
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { IAMClient, DisableOutboundWebIdentityFederationCommand } from "@aws-sdk/client-iam"; // ES Modules import
36+
* // const { IAMClient, DisableOutboundWebIdentityFederationCommand } = require("@aws-sdk/client-iam"); // CommonJS import
37+
* // import type { IAMClientConfig } from "@aws-sdk/client-iam";
38+
* const config = {}; // type is IAMClientConfig
39+
* const client = new IAMClient(config);
40+
* const input = {};
41+
* const command = new DisableOutboundWebIdentityFederationCommand(input);
42+
* const response = await client.send(command);
43+
* // {};
44+
*
45+
* ```
46+
*
47+
* @param DisableOutboundWebIdentityFederationCommandInput - {@link DisableOutboundWebIdentityFederationCommandInput}
48+
* @returns {@link DisableOutboundWebIdentityFederationCommandOutput}
49+
* @see {@link DisableOutboundWebIdentityFederationCommandInput} for command's `input` shape.
50+
* @see {@link DisableOutboundWebIdentityFederationCommandOutput} for command's `response` shape.
51+
* @see {@link IAMClientResolvedConfig | config} for IAMClient's `config` shape.
52+
*
53+
* @throws {@link FeatureDisabledException} (client fault)
54+
* <p>The request failed because outbound identity federation is already disabled for your Amazon Web Services account. You cannot disable the feature multiple times</p>
55+
*
56+
* @throws {@link IAMServiceException}
57+
* <p>Base exception class for all service exceptions from IAM service.</p>
58+
*
59+
*
60+
* @public
61+
*/
62+
export class DisableOutboundWebIdentityFederationCommand extends $Command
63+
.classBuilder<
64+
DisableOutboundWebIdentityFederationCommandInput,
65+
DisableOutboundWebIdentityFederationCommandOutput,
66+
IAMClientResolvedConfig,
67+
ServiceInputTypes,
68+
ServiceOutputTypes
69+
>()
70+
.ep(commonParams)
71+
.m(function (this: any, Command: any, cs: any, config: IAMClientResolvedConfig, o: any) {
72+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
73+
})
74+
.s("AWSIdentityManagementV20100508", "DisableOutboundWebIdentityFederation", {})
75+
.n("IAMClient", "DisableOutboundWebIdentityFederationCommand")
76+
.sc(DisableOutboundWebIdentityFederation)
77+
.build() {
78+
/** @internal type navigation helper, not in runtime. */
79+
protected declare static __types: {
80+
api: {
81+
input: {};
82+
output: {};
83+
};
84+
sdk: {
85+
input: DisableOutboundWebIdentityFederationCommandInput;
86+
output: DisableOutboundWebIdentityFederationCommandOutput;
87+
};
88+
};
89+
}

0 commit comments

Comments
 (0)