From e4aa35f23986517ed1c00ab65ff972f4073114c7 Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 1 Nov 2023 18:21:05 +0000 Subject: [PATCH] feat(client-global-accelerator): Global Accelerator now support accelerators with cross account endpoints. --- clients/client-global-accelerator/README.md | 58 +- .../src/GlobalAccelerator.ts | 163 ++++- .../src/GlobalAcceleratorClient.ts | 44 +- .../AddCustomRoutingEndpointsCommand.ts | 1 + .../src/commands/AddEndpointsCommand.ts | 1 + .../CreateCrossAccountAttachmentCommand.ts | 212 ++++++ .../commands/CreateEndpointGroupCommand.ts | 1 + .../DeleteCrossAccountAttachmentCommand.ts | 187 +++++ .../DescribeCrossAccountAttachmentCommand.ts | 188 +++++ .../ListCrossAccountAttachmentsCommand.ts | 186 +++++ ...ListCrossAccountResourceAccountsCommand.ts | 168 +++++ .../ListCrossAccountResourcesCommand.ts | 178 +++++ .../UpdateCrossAccountAttachmentCommand.ts | 227 ++++++ .../commands/UpdateEndpointGroupCommand.ts | 1 + .../src/commands/index.ts | 7 + .../client-global-accelerator/src/index.ts | 2 +- .../src/models/models_0.ts | 368 +++++++++- .../ListCrossAccountAttachmentsPaginator.ts | 50 ++ .../ListCrossAccountResourcesPaginator.ts | 50 ++ .../src/pagination/index.ts | 2 + .../src/protocols/Aws_json1_1.ts | 667 +++++++++++++++++ .../aws-models/global-accelerator.json | 672 +++++++++++++++++- 22 files changed, 3422 insertions(+), 11 deletions(-) create mode 100644 clients/client-global-accelerator/src/commands/CreateCrossAccountAttachmentCommand.ts create mode 100644 clients/client-global-accelerator/src/commands/DeleteCrossAccountAttachmentCommand.ts create mode 100644 clients/client-global-accelerator/src/commands/DescribeCrossAccountAttachmentCommand.ts create mode 100644 clients/client-global-accelerator/src/commands/ListCrossAccountAttachmentsCommand.ts create mode 100644 clients/client-global-accelerator/src/commands/ListCrossAccountResourceAccountsCommand.ts create mode 100644 clients/client-global-accelerator/src/commands/ListCrossAccountResourcesCommand.ts create mode 100644 clients/client-global-accelerator/src/commands/UpdateCrossAccountAttachmentCommand.ts create mode 100644 clients/client-global-accelerator/src/pagination/ListCrossAccountAttachmentsPaginator.ts create mode 100644 clients/client-global-accelerator/src/pagination/ListCrossAccountResourcesPaginator.ts diff --git a/clients/client-global-accelerator/README.md b/clients/client-global-accelerator/README.md index 19235f4f55a5..9f176182f951 100644 --- a/clients/client-global-accelerator/README.md +++ b/clients/client-global-accelerator/README.md @@ -34,7 +34,7 @@ on Amazon Web Services CLI commands.

are anycast from the Amazon Web Services edge network. For IPv4, Global Accelerator provides two static IPv4 addresses. For dual-stack, Global Accelerator provides a total of four addresses: two static IPv4 addresses and two static IPv6 addresses. With a standard accelerator for IPv4, instead of using the addresses that Global Accelerator provides, you can configure -these entry points to be IPv4 addresses from your own IP address ranges that you bring toGlobal Accelerator (BYOIP).

+these entry points to be IPv4 addresses from your own IP address ranges that you bring to Global Accelerator (BYOIP).

For a standard accelerator, they distribute incoming application traffic across multiple endpoint resources in multiple Amazon Web Services Regions , which increases the availability of your applications. Endpoints for standard accelerators can be Network Load Balancers, Application Load Balancers, @@ -290,6 +290,14 @@ CreateAccelerator [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/classes/createacceleratorcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/createacceleratorcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/createacceleratorcommandoutput.html) + +

+ +CreateCrossAccountAttachment + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/classes/createcrossaccountattachmentcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/createcrossaccountattachmentcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/createcrossaccountattachmentcommandoutput.html) +
@@ -338,6 +346,14 @@ DeleteAccelerator [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/classes/deleteacceleratorcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/deleteacceleratorcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/deleteacceleratorcommandoutput.html) +
+
+ +DeleteCrossAccountAttachment + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/classes/deletecrossaccountattachmentcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/deletecrossaccountattachmentcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/deletecrossaccountattachmentcommandoutput.html) +
@@ -410,6 +426,14 @@ DescribeAcceleratorAttributes [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/classes/describeacceleratorattributescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/describeacceleratorattributescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/describeacceleratorattributescommandoutput.html) +
+
+ +DescribeCrossAccountAttachment + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/classes/describecrossaccountattachmentcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/describecrossaccountattachmentcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/describecrossaccountattachmentcommandoutput.html) +
@@ -474,6 +498,30 @@ ListByoipCidrs [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/classes/listbyoipcidrscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/listbyoipcidrscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/listbyoipcidrscommandoutput.html) +
+
+ +ListCrossAccountAttachments + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/classes/listcrossaccountattachmentscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/listcrossaccountattachmentscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/listcrossaccountattachmentscommandoutput.html) + +
+
+ +ListCrossAccountResourceAccounts + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/classes/listcrossaccountresourceaccountscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/listcrossaccountresourceaccountscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/listcrossaccountresourceaccountscommandoutput.html) + +
+
+ +ListCrossAccountResources + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/classes/listcrossaccountresourcescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/listcrossaccountresourcescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/listcrossaccountresourcescommandoutput.html) +
@@ -594,6 +642,14 @@ UpdateAcceleratorAttributes [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/classes/updateacceleratorattributescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/updateacceleratorattributescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/updateacceleratorattributescommandoutput.html) +
+
+ +UpdateCrossAccountAttachment + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/classes/updatecrossaccountattachmentcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/updatecrossaccountattachmentcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-global-accelerator/interfaces/updatecrossaccountattachmentcommandoutput.html) +
diff --git a/clients/client-global-accelerator/src/GlobalAccelerator.ts b/clients/client-global-accelerator/src/GlobalAccelerator.ts index 3cdb421904a4..5c2035591b80 100644 --- a/clients/client-global-accelerator/src/GlobalAccelerator.ts +++ b/clients/client-global-accelerator/src/GlobalAccelerator.ts @@ -27,6 +27,11 @@ import { CreateAcceleratorCommandInput, CreateAcceleratorCommandOutput, } from "./commands/CreateAcceleratorCommand"; +import { + CreateCrossAccountAttachmentCommand, + CreateCrossAccountAttachmentCommandInput, + CreateCrossAccountAttachmentCommandOutput, +} from "./commands/CreateCrossAccountAttachmentCommand"; import { CreateCustomRoutingAcceleratorCommand, CreateCustomRoutingAcceleratorCommandInput, @@ -57,6 +62,11 @@ import { DeleteAcceleratorCommandInput, DeleteAcceleratorCommandOutput, } from "./commands/DeleteAcceleratorCommand"; +import { + DeleteCrossAccountAttachmentCommand, + DeleteCrossAccountAttachmentCommandInput, + DeleteCrossAccountAttachmentCommandOutput, +} from "./commands/DeleteCrossAccountAttachmentCommand"; import { DeleteCustomRoutingAcceleratorCommand, DeleteCustomRoutingAcceleratorCommandInput, @@ -102,6 +112,11 @@ import { DescribeAcceleratorCommandInput, DescribeAcceleratorCommandOutput, } from "./commands/DescribeAcceleratorCommand"; +import { + DescribeCrossAccountAttachmentCommand, + DescribeCrossAccountAttachmentCommandInput, + DescribeCrossAccountAttachmentCommandOutput, +} from "./commands/DescribeCrossAccountAttachmentCommand"; import { DescribeCustomRoutingAcceleratorAttributesCommand, DescribeCustomRoutingAcceleratorAttributesCommandInput, @@ -142,6 +157,21 @@ import { ListByoipCidrsCommandInput, ListByoipCidrsCommandOutput, } from "./commands/ListByoipCidrsCommand"; +import { + ListCrossAccountAttachmentsCommand, + ListCrossAccountAttachmentsCommandInput, + ListCrossAccountAttachmentsCommandOutput, +} from "./commands/ListCrossAccountAttachmentsCommand"; +import { + ListCrossAccountResourceAccountsCommand, + ListCrossAccountResourceAccountsCommandInput, + ListCrossAccountResourceAccountsCommandOutput, +} from "./commands/ListCrossAccountResourceAccountsCommand"; +import { + ListCrossAccountResourcesCommand, + ListCrossAccountResourcesCommandInput, + ListCrossAccountResourcesCommandOutput, +} from "./commands/ListCrossAccountResourcesCommand"; import { ListCustomRoutingAcceleratorsCommand, ListCustomRoutingAcceleratorsCommandInput, @@ -213,6 +243,11 @@ import { UpdateAcceleratorCommandInput, UpdateAcceleratorCommandOutput, } from "./commands/UpdateAcceleratorCommand"; +import { + UpdateCrossAccountAttachmentCommand, + UpdateCrossAccountAttachmentCommandInput, + UpdateCrossAccountAttachmentCommandOutput, +} from "./commands/UpdateCrossAccountAttachmentCommand"; import { UpdateCustomRoutingAcceleratorAttributesCommand, UpdateCustomRoutingAcceleratorAttributesCommandInput, @@ -251,12 +286,14 @@ const commands = { AdvertiseByoipCidrCommand, AllowCustomRoutingTrafficCommand, CreateAcceleratorCommand, + CreateCrossAccountAttachmentCommand, CreateCustomRoutingAcceleratorCommand, CreateCustomRoutingEndpointGroupCommand, CreateCustomRoutingListenerCommand, CreateEndpointGroupCommand, CreateListenerCommand, DeleteAcceleratorCommand, + DeleteCrossAccountAttachmentCommand, DeleteCustomRoutingAcceleratorCommand, DeleteCustomRoutingEndpointGroupCommand, DeleteCustomRoutingListenerCommand, @@ -266,6 +303,7 @@ const commands = { DeprovisionByoipCidrCommand, DescribeAcceleratorCommand, DescribeAcceleratorAttributesCommand, + DescribeCrossAccountAttachmentCommand, DescribeCustomRoutingAcceleratorCommand, DescribeCustomRoutingAcceleratorAttributesCommand, DescribeCustomRoutingEndpointGroupCommand, @@ -274,6 +312,9 @@ const commands = { DescribeListenerCommand, ListAcceleratorsCommand, ListByoipCidrsCommand, + ListCrossAccountAttachmentsCommand, + ListCrossAccountResourceAccountsCommand, + ListCrossAccountResourcesCommand, ListCustomRoutingAcceleratorsCommand, ListCustomRoutingEndpointGroupsCommand, ListCustomRoutingListenersCommand, @@ -289,6 +330,7 @@ const commands = { UntagResourceCommand, UpdateAcceleratorCommand, UpdateAcceleratorAttributesCommand, + UpdateCrossAccountAttachmentCommand, UpdateCustomRoutingAcceleratorCommand, UpdateCustomRoutingAcceleratorAttributesCommand, UpdateCustomRoutingListenerCommand, @@ -377,6 +419,23 @@ export interface GlobalAccelerator { cb: (err: any, data?: CreateAcceleratorCommandOutput) => void ): void; + /** + * @see {@link CreateCrossAccountAttachmentCommand} + */ + createCrossAccountAttachment( + args: CreateCrossAccountAttachmentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createCrossAccountAttachment( + args: CreateCrossAccountAttachmentCommandInput, + cb: (err: any, data?: CreateCrossAccountAttachmentCommandOutput) => void + ): void; + createCrossAccountAttachment( + args: CreateCrossAccountAttachmentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateCrossAccountAttachmentCommandOutput) => void + ): void; + /** * @see {@link CreateCustomRoutingAcceleratorCommand} */ @@ -476,6 +535,23 @@ export interface GlobalAccelerator { cb: (err: any, data?: DeleteAcceleratorCommandOutput) => void ): void; + /** + * @see {@link DeleteCrossAccountAttachmentCommand} + */ + deleteCrossAccountAttachment( + args: DeleteCrossAccountAttachmentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteCrossAccountAttachment( + args: DeleteCrossAccountAttachmentCommandInput, + cb: (err: any, data?: DeleteCrossAccountAttachmentCommandOutput) => void + ): void; + deleteCrossAccountAttachment( + args: DeleteCrossAccountAttachmentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteCrossAccountAttachmentCommandOutput) => void + ): void; + /** * @see {@link DeleteCustomRoutingAcceleratorCommand} */ @@ -626,6 +702,23 @@ export interface GlobalAccelerator { cb: (err: any, data?: DescribeAcceleratorAttributesCommandOutput) => void ): void; + /** + * @see {@link DescribeCrossAccountAttachmentCommand} + */ + describeCrossAccountAttachment( + args: DescribeCrossAccountAttachmentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + describeCrossAccountAttachment( + args: DescribeCrossAccountAttachmentCommandInput, + cb: (err: any, data?: DescribeCrossAccountAttachmentCommandOutput) => void + ): void; + describeCrossAccountAttachment( + args: DescribeCrossAccountAttachmentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeCrossAccountAttachmentCommandOutput) => void + ): void; + /** * @see {@link DescribeCustomRoutingAcceleratorCommand} */ @@ -759,6 +852,57 @@ export interface GlobalAccelerator { cb: (err: any, data?: ListByoipCidrsCommandOutput) => void ): void; + /** + * @see {@link ListCrossAccountAttachmentsCommand} + */ + listCrossAccountAttachments( + args: ListCrossAccountAttachmentsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listCrossAccountAttachments( + args: ListCrossAccountAttachmentsCommandInput, + cb: (err: any, data?: ListCrossAccountAttachmentsCommandOutput) => void + ): void; + listCrossAccountAttachments( + args: ListCrossAccountAttachmentsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListCrossAccountAttachmentsCommandOutput) => void + ): void; + + /** + * @see {@link ListCrossAccountResourceAccountsCommand} + */ + listCrossAccountResourceAccounts( + args: ListCrossAccountResourceAccountsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listCrossAccountResourceAccounts( + args: ListCrossAccountResourceAccountsCommandInput, + cb: (err: any, data?: ListCrossAccountResourceAccountsCommandOutput) => void + ): void; + listCrossAccountResourceAccounts( + args: ListCrossAccountResourceAccountsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListCrossAccountResourceAccountsCommandOutput) => void + ): void; + + /** + * @see {@link ListCrossAccountResourcesCommand} + */ + listCrossAccountResources( + args: ListCrossAccountResourcesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listCrossAccountResources( + args: ListCrossAccountResourcesCommandInput, + cb: (err: any, data?: ListCrossAccountResourcesCommandOutput) => void + ): void; + listCrossAccountResources( + args: ListCrossAccountResourcesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListCrossAccountResourcesCommandOutput) => void + ): void; + /** * @see {@link ListCustomRoutingAcceleratorsCommand} */ @@ -993,6 +1137,23 @@ export interface GlobalAccelerator { cb: (err: any, data?: UpdateAcceleratorAttributesCommandOutput) => void ): void; + /** + * @see {@link UpdateCrossAccountAttachmentCommand} + */ + updateCrossAccountAttachment( + args: UpdateCrossAccountAttachmentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateCrossAccountAttachment( + args: UpdateCrossAccountAttachmentCommandInput, + cb: (err: any, data?: UpdateCrossAccountAttachmentCommandOutput) => void + ): void; + updateCrossAccountAttachment( + args: UpdateCrossAccountAttachmentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateCrossAccountAttachmentCommandOutput) => void + ): void; + /** * @see {@link UpdateCustomRoutingAcceleratorCommand} */ @@ -1122,7 +1283,7 @@ export interface GlobalAccelerator { * are anycast from the Amazon Web Services edge network. For IPv4, Global Accelerator provides two static IPv4 addresses. For dual-stack, * Global Accelerator provides a total of four addresses: two static IPv4 addresses and two static IPv6 addresses. * With a standard accelerator for IPv4, instead of using the addresses that Global Accelerator provides, you can configure - * these entry points to be IPv4 addresses from your own IP address ranges that you bring toGlobal Accelerator (BYOIP).

+ * these entry points to be IPv4 addresses from your own IP address ranges that you bring to Global Accelerator (BYOIP).

*

For a standard accelerator, * they distribute incoming application traffic across multiple endpoint resources in multiple Amazon Web Services Regions , which increases * the availability of your applications. Endpoints for standard accelerators can be Network Load Balancers, Application Load Balancers, diff --git a/clients/client-global-accelerator/src/GlobalAcceleratorClient.ts b/clients/client-global-accelerator/src/GlobalAcceleratorClient.ts index e408af01b45b..b5f004d46a05 100644 --- a/clients/client-global-accelerator/src/GlobalAcceleratorClient.ts +++ b/clients/client-global-accelerator/src/GlobalAcceleratorClient.ts @@ -61,6 +61,10 @@ import { AllowCustomRoutingTrafficCommandOutput, } from "./commands/AllowCustomRoutingTrafficCommand"; import { CreateAcceleratorCommandInput, CreateAcceleratorCommandOutput } from "./commands/CreateAcceleratorCommand"; +import { + CreateCrossAccountAttachmentCommandInput, + CreateCrossAccountAttachmentCommandOutput, +} from "./commands/CreateCrossAccountAttachmentCommand"; import { CreateCustomRoutingAcceleratorCommandInput, CreateCustomRoutingAcceleratorCommandOutput, @@ -79,6 +83,10 @@ import { } from "./commands/CreateEndpointGroupCommand"; import { CreateListenerCommandInput, CreateListenerCommandOutput } from "./commands/CreateListenerCommand"; import { DeleteAcceleratorCommandInput, DeleteAcceleratorCommandOutput } from "./commands/DeleteAcceleratorCommand"; +import { + DeleteCrossAccountAttachmentCommandInput, + DeleteCrossAccountAttachmentCommandOutput, +} from "./commands/DeleteCrossAccountAttachmentCommand"; import { DeleteCustomRoutingAcceleratorCommandInput, DeleteCustomRoutingAcceleratorCommandOutput, @@ -112,6 +120,10 @@ import { DescribeAcceleratorCommandInput, DescribeAcceleratorCommandOutput, } from "./commands/DescribeAcceleratorCommand"; +import { + DescribeCrossAccountAttachmentCommandInput, + DescribeCrossAccountAttachmentCommandOutput, +} from "./commands/DescribeCrossAccountAttachmentCommand"; import { DescribeCustomRoutingAcceleratorAttributesCommandInput, DescribeCustomRoutingAcceleratorAttributesCommandOutput, @@ -135,6 +147,18 @@ import { import { DescribeListenerCommandInput, DescribeListenerCommandOutput } from "./commands/DescribeListenerCommand"; import { ListAcceleratorsCommandInput, ListAcceleratorsCommandOutput } from "./commands/ListAcceleratorsCommand"; import { ListByoipCidrsCommandInput, ListByoipCidrsCommandOutput } from "./commands/ListByoipCidrsCommand"; +import { + ListCrossAccountAttachmentsCommandInput, + ListCrossAccountAttachmentsCommandOutput, +} from "./commands/ListCrossAccountAttachmentsCommand"; +import { + ListCrossAccountResourceAccountsCommandInput, + ListCrossAccountResourceAccountsCommandOutput, +} from "./commands/ListCrossAccountResourceAccountsCommand"; +import { + ListCrossAccountResourcesCommandInput, + ListCrossAccountResourcesCommandOutput, +} from "./commands/ListCrossAccountResourcesCommand"; import { ListCustomRoutingAcceleratorsCommandInput, ListCustomRoutingAcceleratorsCommandOutput, @@ -174,6 +198,10 @@ import { UpdateAcceleratorAttributesCommandOutput, } from "./commands/UpdateAcceleratorAttributesCommand"; import { UpdateAcceleratorCommandInput, UpdateAcceleratorCommandOutput } from "./commands/UpdateAcceleratorCommand"; +import { + UpdateCrossAccountAttachmentCommandInput, + UpdateCrossAccountAttachmentCommandOutput, +} from "./commands/UpdateCrossAccountAttachmentCommand"; import { UpdateCustomRoutingAcceleratorAttributesCommandInput, UpdateCustomRoutingAcceleratorAttributesCommandOutput, @@ -212,12 +240,14 @@ export type ServiceInputTypes = | AdvertiseByoipCidrCommandInput | AllowCustomRoutingTrafficCommandInput | CreateAcceleratorCommandInput + | CreateCrossAccountAttachmentCommandInput | CreateCustomRoutingAcceleratorCommandInput | CreateCustomRoutingEndpointGroupCommandInput | CreateCustomRoutingListenerCommandInput | CreateEndpointGroupCommandInput | CreateListenerCommandInput | DeleteAcceleratorCommandInput + | DeleteCrossAccountAttachmentCommandInput | DeleteCustomRoutingAcceleratorCommandInput | DeleteCustomRoutingEndpointGroupCommandInput | DeleteCustomRoutingListenerCommandInput @@ -227,6 +257,7 @@ export type ServiceInputTypes = | DeprovisionByoipCidrCommandInput | DescribeAcceleratorAttributesCommandInput | DescribeAcceleratorCommandInput + | DescribeCrossAccountAttachmentCommandInput | DescribeCustomRoutingAcceleratorAttributesCommandInput | DescribeCustomRoutingAcceleratorCommandInput | DescribeCustomRoutingEndpointGroupCommandInput @@ -235,6 +266,9 @@ export type ServiceInputTypes = | DescribeListenerCommandInput | ListAcceleratorsCommandInput | ListByoipCidrsCommandInput + | ListCrossAccountAttachmentsCommandInput + | ListCrossAccountResourceAccountsCommandInput + | ListCrossAccountResourcesCommandInput | ListCustomRoutingAcceleratorsCommandInput | ListCustomRoutingEndpointGroupsCommandInput | ListCustomRoutingListenersCommandInput @@ -250,6 +284,7 @@ export type ServiceInputTypes = | UntagResourceCommandInput | UpdateAcceleratorAttributesCommandInput | UpdateAcceleratorCommandInput + | UpdateCrossAccountAttachmentCommandInput | UpdateCustomRoutingAcceleratorAttributesCommandInput | UpdateCustomRoutingAcceleratorCommandInput | UpdateCustomRoutingListenerCommandInput @@ -266,12 +301,14 @@ export type ServiceOutputTypes = | AdvertiseByoipCidrCommandOutput | AllowCustomRoutingTrafficCommandOutput | CreateAcceleratorCommandOutput + | CreateCrossAccountAttachmentCommandOutput | CreateCustomRoutingAcceleratorCommandOutput | CreateCustomRoutingEndpointGroupCommandOutput | CreateCustomRoutingListenerCommandOutput | CreateEndpointGroupCommandOutput | CreateListenerCommandOutput | DeleteAcceleratorCommandOutput + | DeleteCrossAccountAttachmentCommandOutput | DeleteCustomRoutingAcceleratorCommandOutput | DeleteCustomRoutingEndpointGroupCommandOutput | DeleteCustomRoutingListenerCommandOutput @@ -281,6 +318,7 @@ export type ServiceOutputTypes = | DeprovisionByoipCidrCommandOutput | DescribeAcceleratorAttributesCommandOutput | DescribeAcceleratorCommandOutput + | DescribeCrossAccountAttachmentCommandOutput | DescribeCustomRoutingAcceleratorAttributesCommandOutput | DescribeCustomRoutingAcceleratorCommandOutput | DescribeCustomRoutingEndpointGroupCommandOutput @@ -289,6 +327,9 @@ export type ServiceOutputTypes = | DescribeListenerCommandOutput | ListAcceleratorsCommandOutput | ListByoipCidrsCommandOutput + | ListCrossAccountAttachmentsCommandOutput + | ListCrossAccountResourceAccountsCommandOutput + | ListCrossAccountResourcesCommandOutput | ListCustomRoutingAcceleratorsCommandOutput | ListCustomRoutingEndpointGroupsCommandOutput | ListCustomRoutingListenersCommandOutput @@ -304,6 +345,7 @@ export type ServiceOutputTypes = | UntagResourceCommandOutput | UpdateAcceleratorAttributesCommandOutput | UpdateAcceleratorCommandOutput + | UpdateCrossAccountAttachmentCommandOutput | UpdateCustomRoutingAcceleratorAttributesCommandOutput | UpdateCustomRoutingAcceleratorCommandOutput | UpdateCustomRoutingListenerCommandOutput @@ -510,7 +552,7 @@ export interface GlobalAcceleratorClientResolvedConfig extends GlobalAccelerator * are anycast from the Amazon Web Services edge network. For IPv4, Global Accelerator provides two static IPv4 addresses. For dual-stack, * Global Accelerator provides a total of four addresses: two static IPv4 addresses and two static IPv6 addresses. * With a standard accelerator for IPv4, instead of using the addresses that Global Accelerator provides, you can configure - * these entry points to be IPv4 addresses from your own IP address ranges that you bring toGlobal Accelerator (BYOIP).

+ * these entry points to be IPv4 addresses from your own IP address ranges that you bring to Global Accelerator (BYOIP).

*

For a standard accelerator, * they distribute incoming application traffic across multiple endpoint resources in multiple Amazon Web Services Regions , which increases * the availability of your applications. Endpoints for standard accelerators can be Network Load Balancers, Application Load Balancers, diff --git a/clients/client-global-accelerator/src/commands/AddCustomRoutingEndpointsCommand.ts b/clients/client-global-accelerator/src/commands/AddCustomRoutingEndpointsCommand.ts index f574224202fa..5026bb0618ac 100644 --- a/clients/client-global-accelerator/src/commands/AddCustomRoutingEndpointsCommand.ts +++ b/clients/client-global-accelerator/src/commands/AddCustomRoutingEndpointsCommand.ts @@ -62,6 +62,7 @@ export interface AddCustomRoutingEndpointsCommandOutput extends AddCustomRouting * EndpointConfigurations: [ // CustomRoutingEndpointConfigurations // required * { // CustomRoutingEndpointConfiguration * EndpointId: "STRING_VALUE", + * AttachmentArn: "STRING_VALUE", * }, * ], * EndpointGroupArn: "STRING_VALUE", // required diff --git a/clients/client-global-accelerator/src/commands/AddEndpointsCommand.ts b/clients/client-global-accelerator/src/commands/AddEndpointsCommand.ts index dff360bf1f73..5852925afb32 100644 --- a/clients/client-global-accelerator/src/commands/AddEndpointsCommand.ts +++ b/clients/client-global-accelerator/src/commands/AddEndpointsCommand.ts @@ -73,6 +73,7 @@ export interface AddEndpointsCommandOutput extends AddEndpointsResponse, __Metad * EndpointId: "STRING_VALUE", * Weight: Number("int"), * ClientIPPreservationEnabled: true || false, + * AttachmentArn: "STRING_VALUE", * }, * ], * EndpointGroupArn: "STRING_VALUE", // required diff --git a/clients/client-global-accelerator/src/commands/CreateCrossAccountAttachmentCommand.ts b/clients/client-global-accelerator/src/commands/CreateCrossAccountAttachmentCommand.ts new file mode 100644 index 000000000000..4b38686937d6 --- /dev/null +++ b/clients/client-global-accelerator/src/commands/CreateCrossAccountAttachmentCommand.ts @@ -0,0 +1,212 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + GlobalAcceleratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../GlobalAcceleratorClient"; +import { CreateCrossAccountAttachmentRequest, CreateCrossAccountAttachmentResponse } from "../models/models_0"; +import { + de_CreateCrossAccountAttachmentCommand, + se_CreateCrossAccountAttachmentCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateCrossAccountAttachmentCommand}. + */ +export interface CreateCrossAccountAttachmentCommandInput extends CreateCrossAccountAttachmentRequest {} +/** + * @public + * + * The output of {@link CreateCrossAccountAttachmentCommand}. + */ +export interface CreateCrossAccountAttachmentCommandOutput + extends CreateCrossAccountAttachmentResponse, + __MetadataBearer {} + +/** + * @public + *

Create a cross-account attachment in Global Accelerator. You create a cross-account attachment to + * specify the principals who have permission to add to accelerators in their own + * account the resources in your account that you also list in the attachment.

+ *

A principal can be an Amazon Web Services account number or the Amazon Resource Name (ARN) for an + * accelerator. For account numbers that are listed as principals, to add a resource listed in the attachment to an accelerator, + * you must sign in to an account specified as a principal. Then you can add the resources that are listed + * to any of your accelerators. If an accelerator ARN is listed in the cross-account attachment as a principal, + * anyone with permission to make updates to the accelerator can add as endpoints resources that are listed in the + * attachment.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GlobalAcceleratorClient, CreateCrossAccountAttachmentCommand } from "@aws-sdk/client-global-accelerator"; // ES Modules import + * // const { GlobalAcceleratorClient, CreateCrossAccountAttachmentCommand } = require("@aws-sdk/client-global-accelerator"); // CommonJS import + * const client = new GlobalAcceleratorClient(config); + * const input = { // CreateCrossAccountAttachmentRequest + * Name: "STRING_VALUE", // required + * Principals: [ // Principals + * "STRING_VALUE", + * ], + * Resources: [ // Resources + * { // Resource + * EndpointId: "STRING_VALUE", // required + * Region: "STRING_VALUE", + * }, + * ], + * IdempotencyToken: "STRING_VALUE", // required + * Tags: [ // Tags + * { // Tag + * Key: "STRING_VALUE", // required + * Value: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new CreateCrossAccountAttachmentCommand(input); + * const response = await client.send(command); + * // { // CreateCrossAccountAttachmentResponse + * // CrossAccountAttachment: { // Attachment + * // AttachmentArn: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // Principals: [ // Principals + * // "STRING_VALUE", + * // ], + * // Resources: [ // Resources + * // { // Resource + * // EndpointId: "STRING_VALUE", // required + * // Region: "STRING_VALUE", + * // }, + * // ], + * // LastModifiedTime: new Date("TIMESTAMP"), + * // CreatedTime: new Date("TIMESTAMP"), + * // }, + * // }; + * + * ``` + * + * @param CreateCrossAccountAttachmentCommandInput - {@link CreateCrossAccountAttachmentCommandInput} + * @returns {@link CreateCrossAccountAttachmentCommandOutput} + * @see {@link CreateCrossAccountAttachmentCommandInput} for command's `input` shape. + * @see {@link CreateCrossAccountAttachmentCommandOutput} for command's `response` shape. + * @see {@link GlobalAcceleratorClientResolvedConfig | config} for GlobalAcceleratorClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access permission.

+ * + * @throws {@link InternalServiceErrorException} (server fault) + *

There was an internal error for Global Accelerator.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

An argument that you specified is invalid.

+ * + * @throws {@link LimitExceededException} (client fault) + *

Processing your request would cause you to exceed an Global Accelerator limit.

+ * + * @throws {@link TransactionInProgressException} (client fault) + *

There's already a transaction in progress. Another transaction can't be processed.

+ * + * @throws {@link GlobalAcceleratorServiceException} + *

Base exception class for all service exceptions from GlobalAccelerator service.

+ * + */ +export class CreateCrossAccountAttachmentCommand extends $Command< + CreateCrossAccountAttachmentCommandInput, + CreateCrossAccountAttachmentCommandOutput, + GlobalAcceleratorClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateCrossAccountAttachmentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlobalAcceleratorClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateCrossAccountAttachmentCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlobalAcceleratorClient"; + const commandName = "CreateCrossAccountAttachmentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "GlobalAccelerator_V20180706", + operation: "CreateCrossAccountAttachment", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateCrossAccountAttachmentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateCrossAccountAttachmentCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_CreateCrossAccountAttachmentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-global-accelerator/src/commands/CreateEndpointGroupCommand.ts b/clients/client-global-accelerator/src/commands/CreateEndpointGroupCommand.ts index c24de757b78a..64ac424f6301 100644 --- a/clients/client-global-accelerator/src/commands/CreateEndpointGroupCommand.ts +++ b/clients/client-global-accelerator/src/commands/CreateEndpointGroupCommand.ts @@ -60,6 +60,7 @@ export interface CreateEndpointGroupCommandOutput extends CreateEndpointGroupRes * EndpointId: "STRING_VALUE", * Weight: Number("int"), * ClientIPPreservationEnabled: true || false, + * AttachmentArn: "STRING_VALUE", * }, * ], * TrafficDialPercentage: Number("float"), diff --git a/clients/client-global-accelerator/src/commands/DeleteCrossAccountAttachmentCommand.ts b/clients/client-global-accelerator/src/commands/DeleteCrossAccountAttachmentCommand.ts new file mode 100644 index 000000000000..a36bb1289771 --- /dev/null +++ b/clients/client-global-accelerator/src/commands/DeleteCrossAccountAttachmentCommand.ts @@ -0,0 +1,187 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + GlobalAcceleratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../GlobalAcceleratorClient"; +import { DeleteCrossAccountAttachmentRequest } from "../models/models_0"; +import { + de_DeleteCrossAccountAttachmentCommand, + se_DeleteCrossAccountAttachmentCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteCrossAccountAttachmentCommand}. + */ +export interface DeleteCrossAccountAttachmentCommandInput extends DeleteCrossAccountAttachmentRequest {} +/** + * @public + * + * The output of {@link DeleteCrossAccountAttachmentCommand}. + */ +export interface DeleteCrossAccountAttachmentCommandOutput extends __MetadataBearer {} + +/** + * @public + *

Delete a cross-account attachment. When you delete an attachment, Global Accelerator revokes the permission + * to use the resources in the attachment from all principals in the list of principals. Global Accelerator + * revokes the permission for specific resources by doing the following:

+ *
    + *
  • + *

    If the principal is an account ID, Global Accelerator reviews every accelerator in the account + * and removes cross-account endpoints from all accelerators.

    + *
  • + *
  • + *

    If the principal is an accelerator, Global Accelerator reviews just that accelerator + * and removes cross-account endpoints from it.

    + *
  • + *
+ *

If there are overlapping permissions provided by multiple cross-account attachments, + * Global Accelerator only removes endpoints if there are no current cross-account attachments that provide + * access permission. For example, if you delete a cross-account attachment that lists an + * accelerator as a principal, but another cross-account attachment includes the account ID + * that owns that accelerator, endpoints will not be removed from the accelerator.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GlobalAcceleratorClient, DeleteCrossAccountAttachmentCommand } from "@aws-sdk/client-global-accelerator"; // ES Modules import + * // const { GlobalAcceleratorClient, DeleteCrossAccountAttachmentCommand } = require("@aws-sdk/client-global-accelerator"); // CommonJS import + * const client = new GlobalAcceleratorClient(config); + * const input = { // DeleteCrossAccountAttachmentRequest + * AttachmentArn: "STRING_VALUE", // required + * }; + * const command = new DeleteCrossAccountAttachmentCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteCrossAccountAttachmentCommandInput - {@link DeleteCrossAccountAttachmentCommandInput} + * @returns {@link DeleteCrossAccountAttachmentCommandOutput} + * @see {@link DeleteCrossAccountAttachmentCommandInput} for command's `input` shape. + * @see {@link DeleteCrossAccountAttachmentCommandOutput} for command's `response` shape. + * @see {@link GlobalAcceleratorClientResolvedConfig | config} for GlobalAcceleratorClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access permission.

+ * + * @throws {@link AttachmentNotFoundException} (client fault) + *

No cross-account attachment was found.

+ * + * @throws {@link InternalServiceErrorException} (server fault) + *

There was an internal error for Global Accelerator.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

An argument that you specified is invalid.

+ * + * @throws {@link TransactionInProgressException} (client fault) + *

There's already a transaction in progress. Another transaction can't be processed.

+ * + * @throws {@link GlobalAcceleratorServiceException} + *

Base exception class for all service exceptions from GlobalAccelerator service.

+ * + */ +export class DeleteCrossAccountAttachmentCommand extends $Command< + DeleteCrossAccountAttachmentCommandInput, + DeleteCrossAccountAttachmentCommandOutput, + GlobalAcceleratorClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteCrossAccountAttachmentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlobalAcceleratorClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteCrossAccountAttachmentCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlobalAcceleratorClient"; + const commandName = "DeleteCrossAccountAttachmentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "GlobalAccelerator_V20180706", + operation: "DeleteCrossAccountAttachment", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteCrossAccountAttachmentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteCrossAccountAttachmentCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_DeleteCrossAccountAttachmentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-global-accelerator/src/commands/DescribeCrossAccountAttachmentCommand.ts b/clients/client-global-accelerator/src/commands/DescribeCrossAccountAttachmentCommand.ts new file mode 100644 index 000000000000..d0663df0d786 --- /dev/null +++ b/clients/client-global-accelerator/src/commands/DescribeCrossAccountAttachmentCommand.ts @@ -0,0 +1,188 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + GlobalAcceleratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../GlobalAcceleratorClient"; +import { DescribeCrossAccountAttachmentRequest, DescribeCrossAccountAttachmentResponse } from "../models/models_0"; +import { + de_DescribeCrossAccountAttachmentCommand, + se_DescribeCrossAccountAttachmentCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DescribeCrossAccountAttachmentCommand}. + */ +export interface DescribeCrossAccountAttachmentCommandInput extends DescribeCrossAccountAttachmentRequest {} +/** + * @public + * + * The output of {@link DescribeCrossAccountAttachmentCommand}. + */ +export interface DescribeCrossAccountAttachmentCommandOutput + extends DescribeCrossAccountAttachmentResponse, + __MetadataBearer {} + +/** + * @public + *

Gets configuration information about a cross-account attachment.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GlobalAcceleratorClient, DescribeCrossAccountAttachmentCommand } from "@aws-sdk/client-global-accelerator"; // ES Modules import + * // const { GlobalAcceleratorClient, DescribeCrossAccountAttachmentCommand } = require("@aws-sdk/client-global-accelerator"); // CommonJS import + * const client = new GlobalAcceleratorClient(config); + * const input = { // DescribeCrossAccountAttachmentRequest + * AttachmentArn: "STRING_VALUE", // required + * }; + * const command = new DescribeCrossAccountAttachmentCommand(input); + * const response = await client.send(command); + * // { // DescribeCrossAccountAttachmentResponse + * // CrossAccountAttachment: { // Attachment + * // AttachmentArn: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // Principals: [ // Principals + * // "STRING_VALUE", + * // ], + * // Resources: [ // Resources + * // { // Resource + * // EndpointId: "STRING_VALUE", // required + * // Region: "STRING_VALUE", + * // }, + * // ], + * // LastModifiedTime: new Date("TIMESTAMP"), + * // CreatedTime: new Date("TIMESTAMP"), + * // }, + * // }; + * + * ``` + * + * @param DescribeCrossAccountAttachmentCommandInput - {@link DescribeCrossAccountAttachmentCommandInput} + * @returns {@link DescribeCrossAccountAttachmentCommandOutput} + * @see {@link DescribeCrossAccountAttachmentCommandInput} for command's `input` shape. + * @see {@link DescribeCrossAccountAttachmentCommandOutput} for command's `response` shape. + * @see {@link GlobalAcceleratorClientResolvedConfig | config} for GlobalAcceleratorClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access permission.

+ * + * @throws {@link AttachmentNotFoundException} (client fault) + *

No cross-account attachment was found.

+ * + * @throws {@link InternalServiceErrorException} (server fault) + *

There was an internal error for Global Accelerator.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

An argument that you specified is invalid.

+ * + * @throws {@link GlobalAcceleratorServiceException} + *

Base exception class for all service exceptions from GlobalAccelerator service.

+ * + */ +export class DescribeCrossAccountAttachmentCommand extends $Command< + DescribeCrossAccountAttachmentCommandInput, + DescribeCrossAccountAttachmentCommandOutput, + GlobalAcceleratorClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DescribeCrossAccountAttachmentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlobalAcceleratorClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DescribeCrossAccountAttachmentCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlobalAcceleratorClient"; + const commandName = "DescribeCrossAccountAttachmentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "GlobalAccelerator_V20180706", + operation: "DescribeCrossAccountAttachment", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize( + input: DescribeCrossAccountAttachmentCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return se_DescribeCrossAccountAttachmentCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_DescribeCrossAccountAttachmentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-global-accelerator/src/commands/ListCrossAccountAttachmentsCommand.ts b/clients/client-global-accelerator/src/commands/ListCrossAccountAttachmentsCommand.ts new file mode 100644 index 000000000000..d5feb8a7bcbc --- /dev/null +++ b/clients/client-global-accelerator/src/commands/ListCrossAccountAttachmentsCommand.ts @@ -0,0 +1,186 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + GlobalAcceleratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../GlobalAcceleratorClient"; +import { ListCrossAccountAttachmentsRequest, ListCrossAccountAttachmentsResponse } from "../models/models_0"; +import { de_ListCrossAccountAttachmentsCommand, se_ListCrossAccountAttachmentsCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListCrossAccountAttachmentsCommand}. + */ +export interface ListCrossAccountAttachmentsCommandInput extends ListCrossAccountAttachmentsRequest {} +/** + * @public + * + * The output of {@link ListCrossAccountAttachmentsCommand}. + */ +export interface ListCrossAccountAttachmentsCommandOutput + extends ListCrossAccountAttachmentsResponse, + __MetadataBearer {} + +/** + * @public + *

List the cross-account attachments that have been created in Global Accelerator.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GlobalAcceleratorClient, ListCrossAccountAttachmentsCommand } from "@aws-sdk/client-global-accelerator"; // ES Modules import + * // const { GlobalAcceleratorClient, ListCrossAccountAttachmentsCommand } = require("@aws-sdk/client-global-accelerator"); // CommonJS import + * const client = new GlobalAcceleratorClient(config); + * const input = { // ListCrossAccountAttachmentsRequest + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new ListCrossAccountAttachmentsCommand(input); + * const response = await client.send(command); + * // { // ListCrossAccountAttachmentsResponse + * // CrossAccountAttachments: [ // Attachments + * // { // Attachment + * // AttachmentArn: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // Principals: [ // Principals + * // "STRING_VALUE", + * // ], + * // Resources: [ // Resources + * // { // Resource + * // EndpointId: "STRING_VALUE", // required + * // Region: "STRING_VALUE", + * // }, + * // ], + * // LastModifiedTime: new Date("TIMESTAMP"), + * // CreatedTime: new Date("TIMESTAMP"), + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListCrossAccountAttachmentsCommandInput - {@link ListCrossAccountAttachmentsCommandInput} + * @returns {@link ListCrossAccountAttachmentsCommandOutput} + * @see {@link ListCrossAccountAttachmentsCommandInput} for command's `input` shape. + * @see {@link ListCrossAccountAttachmentsCommandOutput} for command's `response` shape. + * @see {@link GlobalAcceleratorClientResolvedConfig | config} for GlobalAcceleratorClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access permission.

+ * + * @throws {@link InternalServiceErrorException} (server fault) + *

There was an internal error for Global Accelerator.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

An argument that you specified is invalid.

+ * + * @throws {@link InvalidNextTokenException} (client fault) + *

There isn't another item to return.

+ * + * @throws {@link GlobalAcceleratorServiceException} + *

Base exception class for all service exceptions from GlobalAccelerator service.

+ * + */ +export class ListCrossAccountAttachmentsCommand extends $Command< + ListCrossAccountAttachmentsCommandInput, + ListCrossAccountAttachmentsCommandOutput, + GlobalAcceleratorClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListCrossAccountAttachmentsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlobalAcceleratorClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListCrossAccountAttachmentsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlobalAcceleratorClient"; + const commandName = "ListCrossAccountAttachmentsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "GlobalAccelerator_V20180706", + operation: "ListCrossAccountAttachments", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListCrossAccountAttachmentsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListCrossAccountAttachmentsCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_ListCrossAccountAttachmentsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-global-accelerator/src/commands/ListCrossAccountResourceAccountsCommand.ts b/clients/client-global-accelerator/src/commands/ListCrossAccountResourceAccountsCommand.ts new file mode 100644 index 000000000000..72ca66f680dd --- /dev/null +++ b/clients/client-global-accelerator/src/commands/ListCrossAccountResourceAccountsCommand.ts @@ -0,0 +1,168 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + GlobalAcceleratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../GlobalAcceleratorClient"; +import { ListCrossAccountResourceAccountsRequest, ListCrossAccountResourceAccountsResponse } from "../models/models_0"; +import { + de_ListCrossAccountResourceAccountsCommand, + se_ListCrossAccountResourceAccountsCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListCrossAccountResourceAccountsCommand}. + */ +export interface ListCrossAccountResourceAccountsCommandInput extends ListCrossAccountResourceAccountsRequest {} +/** + * @public + * + * The output of {@link ListCrossAccountResourceAccountsCommand}. + */ +export interface ListCrossAccountResourceAccountsCommandOutput + extends ListCrossAccountResourceAccountsResponse, + __MetadataBearer {} + +/** + * @public + *

List the accounts that have cross-account endpoints.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GlobalAcceleratorClient, ListCrossAccountResourceAccountsCommand } from "@aws-sdk/client-global-accelerator"; // ES Modules import + * // const { GlobalAcceleratorClient, ListCrossAccountResourceAccountsCommand } = require("@aws-sdk/client-global-accelerator"); // CommonJS import + * const client = new GlobalAcceleratorClient(config); + * const input = {}; + * const command = new ListCrossAccountResourceAccountsCommand(input); + * const response = await client.send(command); + * // { // ListCrossAccountResourceAccountsResponse + * // ResourceOwnerAwsAccountIds: [ // AwsAccountIds + * // "STRING_VALUE", + * // ], + * // }; + * + * ``` + * + * @param ListCrossAccountResourceAccountsCommandInput - {@link ListCrossAccountResourceAccountsCommandInput} + * @returns {@link ListCrossAccountResourceAccountsCommandOutput} + * @see {@link ListCrossAccountResourceAccountsCommandInput} for command's `input` shape. + * @see {@link ListCrossAccountResourceAccountsCommandOutput} for command's `response` shape. + * @see {@link GlobalAcceleratorClientResolvedConfig | config} for GlobalAcceleratorClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access permission.

+ * + * @throws {@link InternalServiceErrorException} (server fault) + *

There was an internal error for Global Accelerator.

+ * + * @throws {@link GlobalAcceleratorServiceException} + *

Base exception class for all service exceptions from GlobalAccelerator service.

+ * + */ +export class ListCrossAccountResourceAccountsCommand extends $Command< + ListCrossAccountResourceAccountsCommandInput, + ListCrossAccountResourceAccountsCommandOutput, + GlobalAcceleratorClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListCrossAccountResourceAccountsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlobalAcceleratorClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListCrossAccountResourceAccountsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlobalAcceleratorClient"; + const commandName = "ListCrossAccountResourceAccountsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "GlobalAccelerator_V20180706", + operation: "ListCrossAccountResourceAccounts", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize( + input: ListCrossAccountResourceAccountsCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return se_ListCrossAccountResourceAccountsCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_ListCrossAccountResourceAccountsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-global-accelerator/src/commands/ListCrossAccountResourcesCommand.ts b/clients/client-global-accelerator/src/commands/ListCrossAccountResourcesCommand.ts new file mode 100644 index 000000000000..fe6f2f28d447 --- /dev/null +++ b/clients/client-global-accelerator/src/commands/ListCrossAccountResourcesCommand.ts @@ -0,0 +1,178 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + GlobalAcceleratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../GlobalAcceleratorClient"; +import { ListCrossAccountResourcesRequest, ListCrossAccountResourcesResponse } from "../models/models_0"; +import { de_ListCrossAccountResourcesCommand, se_ListCrossAccountResourcesCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListCrossAccountResourcesCommand}. + */ +export interface ListCrossAccountResourcesCommandInput extends ListCrossAccountResourcesRequest {} +/** + * @public + * + * The output of {@link ListCrossAccountResourcesCommand}. + */ +export interface ListCrossAccountResourcesCommandOutput extends ListCrossAccountResourcesResponse, __MetadataBearer {} + +/** + * @public + *

List the cross-account endpoints available to add to an accelerator.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GlobalAcceleratorClient, ListCrossAccountResourcesCommand } from "@aws-sdk/client-global-accelerator"; // ES Modules import + * // const { GlobalAcceleratorClient, ListCrossAccountResourcesCommand } = require("@aws-sdk/client-global-accelerator"); // CommonJS import + * const client = new GlobalAcceleratorClient(config); + * const input = { // ListCrossAccountResourcesRequest + * AcceleratorArn: "STRING_VALUE", + * ResourceOwnerAwsAccountId: "STRING_VALUE", // required + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new ListCrossAccountResourcesCommand(input); + * const response = await client.send(command); + * // { // ListCrossAccountResourcesResponse + * // CrossAccountResources: [ // CrossAccountResources + * // { // CrossAccountResource + * // EndpointId: "STRING_VALUE", + * // AttachmentArn: "STRING_VALUE", + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListCrossAccountResourcesCommandInput - {@link ListCrossAccountResourcesCommandInput} + * @returns {@link ListCrossAccountResourcesCommandOutput} + * @see {@link ListCrossAccountResourcesCommandInput} for command's `input` shape. + * @see {@link ListCrossAccountResourcesCommandOutput} for command's `response` shape. + * @see {@link GlobalAcceleratorClientResolvedConfig | config} for GlobalAcceleratorClient's `config` shape. + * + * @throws {@link AcceleratorNotFoundException} (client fault) + *

The accelerator that you specified doesn't exist.

+ * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access permission.

+ * + * @throws {@link InternalServiceErrorException} (server fault) + *

There was an internal error for Global Accelerator.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

An argument that you specified is invalid.

+ * + * @throws {@link InvalidNextTokenException} (client fault) + *

There isn't another item to return.

+ * + * @throws {@link GlobalAcceleratorServiceException} + *

Base exception class for all service exceptions from GlobalAccelerator service.

+ * + */ +export class ListCrossAccountResourcesCommand extends $Command< + ListCrossAccountResourcesCommandInput, + ListCrossAccountResourcesCommandOutput, + GlobalAcceleratorClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListCrossAccountResourcesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlobalAcceleratorClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListCrossAccountResourcesCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlobalAcceleratorClient"; + const commandName = "ListCrossAccountResourcesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "GlobalAccelerator_V20180706", + operation: "ListCrossAccountResources", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListCrossAccountResourcesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListCrossAccountResourcesCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_ListCrossAccountResourcesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-global-accelerator/src/commands/UpdateCrossAccountAttachmentCommand.ts b/clients/client-global-accelerator/src/commands/UpdateCrossAccountAttachmentCommand.ts new file mode 100644 index 000000000000..16add3956446 --- /dev/null +++ b/clients/client-global-accelerator/src/commands/UpdateCrossAccountAttachmentCommand.ts @@ -0,0 +1,227 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + GlobalAcceleratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../GlobalAcceleratorClient"; +import { UpdateCrossAccountAttachmentRequest, UpdateCrossAccountAttachmentResponse } from "../models/models_0"; +import { + de_UpdateCrossAccountAttachmentCommand, + se_UpdateCrossAccountAttachmentCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateCrossAccountAttachmentCommand}. + */ +export interface UpdateCrossAccountAttachmentCommandInput extends UpdateCrossAccountAttachmentRequest {} +/** + * @public + * + * The output of {@link UpdateCrossAccountAttachmentCommand}. + */ +export interface UpdateCrossAccountAttachmentCommandOutput + extends UpdateCrossAccountAttachmentResponse, + __MetadataBearer {} + +/** + * @public + *

Update a cross-account attachment to add or remove principals or resources. When you update + * an attachment to remove a principal (account ID or accelerator) or a resource, Global Accelerator + * revokes the permission for specific resources by doing the following:

+ *
    + *
  • + *

    If the principal is an account ID, Global Accelerator reviews every accelerator in the account + * and removes cross-account endpoints from all accelerators.

    + *
  • + *
  • + *

    If the principal is an accelerator, Global Accelerator reviews just that accelerator + * and removes cross-account endpoints from it.

    + *
  • + *
+ *

If there are overlapping permissions provided by multiple cross-account attachments, + * Global Accelerator only removes endpoints if there are no current cross-account attachments that provide + * access permission. For example, if you delete a cross-account attachment that lists an + * accelerator as a principal, but another cross-account attachment includes the account ID + * that owns that accelerator, endpoints will not be removed from the accelerator.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GlobalAcceleratorClient, UpdateCrossAccountAttachmentCommand } from "@aws-sdk/client-global-accelerator"; // ES Modules import + * // const { GlobalAcceleratorClient, UpdateCrossAccountAttachmentCommand } = require("@aws-sdk/client-global-accelerator"); // CommonJS import + * const client = new GlobalAcceleratorClient(config); + * const input = { // UpdateCrossAccountAttachmentRequest + * AttachmentArn: "STRING_VALUE", // required + * Name: "STRING_VALUE", + * AddPrincipals: [ // Principals + * "STRING_VALUE", + * ], + * RemovePrincipals: [ + * "STRING_VALUE", + * ], + * AddResources: [ // Resources + * { // Resource + * EndpointId: "STRING_VALUE", // required + * Region: "STRING_VALUE", + * }, + * ], + * RemoveResources: [ + * { + * EndpointId: "STRING_VALUE", // required + * Region: "STRING_VALUE", + * }, + * ], + * }; + * const command = new UpdateCrossAccountAttachmentCommand(input); + * const response = await client.send(command); + * // { // UpdateCrossAccountAttachmentResponse + * // CrossAccountAttachment: { // Attachment + * // AttachmentArn: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // Principals: [ // Principals + * // "STRING_VALUE", + * // ], + * // Resources: [ // Resources + * // { // Resource + * // EndpointId: "STRING_VALUE", // required + * // Region: "STRING_VALUE", + * // }, + * // ], + * // LastModifiedTime: new Date("TIMESTAMP"), + * // CreatedTime: new Date("TIMESTAMP"), + * // }, + * // }; + * + * ``` + * + * @param UpdateCrossAccountAttachmentCommandInput - {@link UpdateCrossAccountAttachmentCommandInput} + * @returns {@link UpdateCrossAccountAttachmentCommandOutput} + * @see {@link UpdateCrossAccountAttachmentCommandInput} for command's `input` shape. + * @see {@link UpdateCrossAccountAttachmentCommandOutput} for command's `response` shape. + * @see {@link GlobalAcceleratorClientResolvedConfig | config} for GlobalAcceleratorClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access permission.

+ * + * @throws {@link AttachmentNotFoundException} (client fault) + *

No cross-account attachment was found.

+ * + * @throws {@link InternalServiceErrorException} (server fault) + *

There was an internal error for Global Accelerator.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

An argument that you specified is invalid.

+ * + * @throws {@link LimitExceededException} (client fault) + *

Processing your request would cause you to exceed an Global Accelerator limit.

+ * + * @throws {@link TransactionInProgressException} (client fault) + *

There's already a transaction in progress. Another transaction can't be processed.

+ * + * @throws {@link GlobalAcceleratorServiceException} + *

Base exception class for all service exceptions from GlobalAccelerator service.

+ * + */ +export class UpdateCrossAccountAttachmentCommand extends $Command< + UpdateCrossAccountAttachmentCommandInput, + UpdateCrossAccountAttachmentCommandOutput, + GlobalAcceleratorClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateCrossAccountAttachmentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlobalAcceleratorClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, UpdateCrossAccountAttachmentCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlobalAcceleratorClient"; + const commandName = "UpdateCrossAccountAttachmentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "GlobalAccelerator_V20180706", + operation: "UpdateCrossAccountAttachment", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateCrossAccountAttachmentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateCrossAccountAttachmentCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_UpdateCrossAccountAttachmentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-global-accelerator/src/commands/UpdateEndpointGroupCommand.ts b/clients/client-global-accelerator/src/commands/UpdateEndpointGroupCommand.ts index dbc8b4e86f6b..220e9278020c 100644 --- a/clients/client-global-accelerator/src/commands/UpdateEndpointGroupCommand.ts +++ b/clients/client-global-accelerator/src/commands/UpdateEndpointGroupCommand.ts @@ -55,6 +55,7 @@ export interface UpdateEndpointGroupCommandOutput extends UpdateEndpointGroupRes * EndpointId: "STRING_VALUE", * Weight: Number("int"), * ClientIPPreservationEnabled: true || false, + * AttachmentArn: "STRING_VALUE", * }, * ], * TrafficDialPercentage: Number("float"), diff --git a/clients/client-global-accelerator/src/commands/index.ts b/clients/client-global-accelerator/src/commands/index.ts index 99b9da06b425..4abb207a05a3 100644 --- a/clients/client-global-accelerator/src/commands/index.ts +++ b/clients/client-global-accelerator/src/commands/index.ts @@ -4,12 +4,14 @@ export * from "./AddEndpointsCommand"; export * from "./AdvertiseByoipCidrCommand"; export * from "./AllowCustomRoutingTrafficCommand"; export * from "./CreateAcceleratorCommand"; +export * from "./CreateCrossAccountAttachmentCommand"; export * from "./CreateCustomRoutingAcceleratorCommand"; export * from "./CreateCustomRoutingEndpointGroupCommand"; export * from "./CreateCustomRoutingListenerCommand"; export * from "./CreateEndpointGroupCommand"; export * from "./CreateListenerCommand"; export * from "./DeleteAcceleratorCommand"; +export * from "./DeleteCrossAccountAttachmentCommand"; export * from "./DeleteCustomRoutingAcceleratorCommand"; export * from "./DeleteCustomRoutingEndpointGroupCommand"; export * from "./DeleteCustomRoutingListenerCommand"; @@ -19,6 +21,7 @@ export * from "./DenyCustomRoutingTrafficCommand"; export * from "./DeprovisionByoipCidrCommand"; export * from "./DescribeAcceleratorAttributesCommand"; export * from "./DescribeAcceleratorCommand"; +export * from "./DescribeCrossAccountAttachmentCommand"; export * from "./DescribeCustomRoutingAcceleratorAttributesCommand"; export * from "./DescribeCustomRoutingAcceleratorCommand"; export * from "./DescribeCustomRoutingEndpointGroupCommand"; @@ -27,6 +30,9 @@ export * from "./DescribeEndpointGroupCommand"; export * from "./DescribeListenerCommand"; export * from "./ListAcceleratorsCommand"; export * from "./ListByoipCidrsCommand"; +export * from "./ListCrossAccountAttachmentsCommand"; +export * from "./ListCrossAccountResourceAccountsCommand"; +export * from "./ListCrossAccountResourcesCommand"; export * from "./ListCustomRoutingAcceleratorsCommand"; export * from "./ListCustomRoutingEndpointGroupsCommand"; export * from "./ListCustomRoutingListenersCommand"; @@ -42,6 +48,7 @@ export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; export * from "./UpdateAcceleratorAttributesCommand"; export * from "./UpdateAcceleratorCommand"; +export * from "./UpdateCrossAccountAttachmentCommand"; export * from "./UpdateCustomRoutingAcceleratorAttributesCommand"; export * from "./UpdateCustomRoutingAcceleratorCommand"; export * from "./UpdateCustomRoutingListenerCommand"; diff --git a/clients/client-global-accelerator/src/index.ts b/clients/client-global-accelerator/src/index.ts index 1fae37dc136e..13d8afffb591 100644 --- a/clients/client-global-accelerator/src/index.ts +++ b/clients/client-global-accelerator/src/index.ts @@ -28,7 +28,7 @@ * are anycast from the Amazon Web Services edge network. For IPv4, Global Accelerator provides two static IPv4 addresses. For dual-stack, * Global Accelerator provides a total of four addresses: two static IPv4 addresses and two static IPv6 addresses. * With a standard accelerator for IPv4, instead of using the addresses that Global Accelerator provides, you can configure - * these entry points to be IPv4 addresses from your own IP address ranges that you bring toGlobal Accelerator (BYOIP).

+ * these entry points to be IPv4 addresses from your own IP address ranges that you bring to Global Accelerator (BYOIP).

*

For a standard accelerator, * they distribute incoming application traffic across multiple endpoint resources in multiple Amazon Web Services Regions , which increases * the availability of your applications. Endpoints for standard accelerators can be Network Load Balancers, Application Load Balancers, diff --git a/clients/client-global-accelerator/src/models/models_0.ts b/clients/client-global-accelerator/src/models/models_0.ts index 8a9072668972..e13337bde356 100644 --- a/clients/client-global-accelerator/src/models/models_0.ts +++ b/clients/client-global-accelerator/src/models/models_0.ts @@ -291,6 +291,13 @@ export interface CustomRoutingEndpointConfiguration { * subnet ID.

*/ EndpointId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the cross-account attachment that specifies the endpoints (resources) + * that can be added to accelerators and principals that have permission to add the endpoints to accelerators.

+ */ + AttachmentArn?: string; } /** @@ -501,16 +508,23 @@ export interface EndpointConfiguration { /** * @public *

Indicates whether client IP address preservation is enabled for an endpoint. - * The value is true or false. The default value is true for new accelerators.

+ * The value is true or false. The default value is true for Application Load Balancer endpoints.

*

If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request header as * traffic travels to applications on the endpoint fronted by the accelerator.

*

Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are Application Load - * Balancers, Amazon EC2 instances, and Network Load Balancers with Security Groups. IMPORTANT: You cannot use client IP address preservation + * Balancers, Amazon EC2 instances, and Network Load Balancers with security groups. IMPORTANT: You cannot use client IP address preservation * with Network Load Balancers with TLS listeners.

*

For more information, see * Preserve client IP addresses in Global Accelerator in the Global Accelerator Developer Guide.

*/ ClientIPPreservationEnabled?: boolean; + + /** + * @public + *

The Amazon Resource Name (ARN) of the cross-account attachment that specifies the endpoints (resources) + * that can be added to accelerators and principals that have permission to add the endpoints to accelerators.

+ */ + AttachmentArn?: string; } /** @@ -585,11 +599,11 @@ export interface EndpointDescription { /** * @public *

Indicates whether client IP address preservation is enabled for an endpoint. - * The value is true or false. The default value is true for new accelerators.

+ * The value is true or false. The default value is true for Application Load Balancers endpoints.

*

If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request header as * traffic travels to applications on the endpoint fronted by the accelerator.

*

Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are Application Load - * Balancers, Amazon EC2 instances, and Network Load Balancers with Security Groups. IMPORTANT: You cannot use client IP address preservation + * Balancers, Amazon EC2 instances, and Network Load Balancers with security groups. IMPORTANT: You cannot use client IP address preservation * with Network Load Balancers with TLS listeners.

*

For more information, see * Preserve client IP addresses in Global Accelerator in the Global Accelerator Developer Guide.

@@ -935,6 +949,90 @@ export class AssociatedListenerFoundException extends __BaseException { } } +/** + * @public + *

An Amazon Web Services resource that is supported by Global Accelerator and can be added as an endpoint for an accelerator.

+ */ +export interface Resource { + /** + * @public + *

The endpoint ID for the endpoint (Amazon Web Services resource).

+ */ + EndpointId: string | undefined; + + /** + * @public + *

The Amazon Web Services Region where a resource is located.

+ */ + Region?: string; +} + +/** + * @public + *

A cross-account attachment in Global Accelerator. A cross-account attachment + * specifies the principals who have permission to add to accelerators in their own + * account the resources in your account that you also list in the attachment.

+ */ +export interface Attachment { + /** + * @public + *

The Amazon Resource Name (ARN) of the cross-account attachment.

+ */ + AttachmentArn?: string; + + /** + * @public + *

The name of the cross-account attachment.

+ */ + Name?: string; + + /** + * @public + *

The principals included in the cross-account attachment.

+ */ + Principals?: string[]; + + /** + * @public + *

The resources included in the cross-account attachment.

+ */ + Resources?: Resource[]; + + /** + * @public + *

The date and time that the cross-account attachment was last modified.

+ */ + LastModifiedTime?: Date; + + /** + * @public + *

The date and time that the cross-account attachment was created.

+ */ + CreatedTime?: Date; +} + +/** + * @public + *

No cross-account attachment was found.

+ */ +export class AttachmentNotFoundException extends __BaseException { + readonly name: "AttachmentNotFoundException" = "AttachmentNotFoundException"; + readonly $fault: "client" = "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "AttachmentNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AttachmentNotFoundException.prototype); + this.Message = opts.Message; + } +} + /** * @public *

Provides authorization for Amazon to bring a specific IP address range to a specific Amazon Web Services @@ -1056,6 +1154,57 @@ export interface CreateAcceleratorResponse { Accelerator?: Accelerator; } +/** + * @public + */ +export interface CreateCrossAccountAttachmentRequest { + /** + * @public + *

The name of the cross-account attachment.

+ */ + Name: string | undefined; + + /** + * @public + *

The principals to list in the cross-account attachment. A principal can be an Amazon Web Services account + * number or the Amazon Resource Name (ARN) for an accelerator.

+ */ + Principals?: string[]; + + /** + * @public + *

The Amazon Resource Names (ARNs) for the resources to list in the cross-account attachment. A resource can + * be any supported Amazon Web Services resource type for Global Accelerator.

+ */ + Resources?: Resource[]; + + /** + * @public + *

A unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the + * uniqueness—of the request.

+ */ + IdempotencyToken?: string; + + /** + * @public + *

Create tags for cross-account attachment.

+ *

For more information, see Tagging + * in Global Accelerator in the Global Accelerator Developer Guide.

+ */ + Tags?: Tag[]; +} + +/** + * @public + */ +export interface CreateCrossAccountAttachmentResponse { + /** + * @public + *

Information about the cross-account attachment.

+ */ + CrossAccountAttachment?: Attachment; +} + /** * @public */ @@ -1819,6 +1968,27 @@ export interface CreateListenerResponse { Listener?: Listener; } +/** + * @public + *

An endpoint (Amazon Web Services resource) that is listed in a cross-account attachment and + * can be added to an accelerator by specified principals, that are also listed in the attachment.

+ */ +export interface CrossAccountResource { + /** + * @public + *

The endpoint ID for the endpoint that is listed in a cross-account attachment and + * can be added to an accelerator by specified principals.

+ */ + EndpointId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the cross-account attachment that specifies the endpoints (resources) + * that can be added to accelerators and principals that have permission to add the endpoints to accelerators.

+ */ + AttachmentArn?: string; +} + /** * @public *

Attributes of a custom routing accelerator.

@@ -1878,6 +2048,17 @@ export interface DeleteAcceleratorRequest { AcceleratorArn: string | undefined; } +/** + * @public + */ +export interface DeleteCrossAccountAttachmentRequest { + /** + * @public + *

The Amazon Resource Name (ARN) for the cross-account attachment to delete.

+ */ + AttachmentArn: string | undefined; +} + /** * @public */ @@ -2045,6 +2226,28 @@ export interface DescribeAcceleratorAttributesResponse { AcceleratorAttributes?: AcceleratorAttributes; } +/** + * @public + */ +export interface DescribeCrossAccountAttachmentRequest { + /** + * @public + *

The Amazon Resource Name (ARN) for the cross-account attachment to describe.

+ */ + AttachmentArn: string | undefined; +} + +/** + * @public + */ +export interface DescribeCrossAccountAttachmentResponse { + /** + * @public + *

Information about the cross-account attachment.

+ */ + CrossAccountAttachment?: Attachment; +} + /** * @public */ @@ -2388,6 +2591,103 @@ export interface ListByoipCidrsResponse { NextToken?: string; } +/** + * @public + */ +export interface ListCrossAccountAttachmentsRequest { + /** + * @public + *

The number of cross-account attachment objects that you want to return with this call. The default value is 10.

+ */ + MaxResults?: number; + + /** + * @public + *

The token for the next set of results. You receive this token from a previous call.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface ListCrossAccountAttachmentsResponse { + /** + * @public + *

Information about the cross-account attachments.

+ */ + CrossAccountAttachments?: Attachment[]; + + /** + * @public + *

The token for the next set of results. You receive this token from a previous call.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface ListCrossAccountResourceAccountsRequest {} + +/** + * @public + */ +export interface ListCrossAccountResourceAccountsResponse { + /** + * @public + *

The account IDs of principals (resource owners) in a cross-account attachment who can add endpoints (resources) listed + * in the same attachment.

+ */ + ResourceOwnerAwsAccountIds?: string[]; +} + +/** + * @public + */ +export interface ListCrossAccountResourcesRequest { + /** + * @public + *

The Amazon Resource Name (ARN) of an accelerator in a cross-account attachment.

+ */ + AcceleratorArn?: string; + + /** + * @public + *

The account ID of a resource owner in a cross-account attachment.

+ */ + ResourceOwnerAwsAccountId: string | undefined; + + /** + * @public + *

The number of cross-account endpoints objects that you want to return with this call. The default value is 10.

+ */ + MaxResults?: number; + + /** + * @public + *

The token for the next set of results. You receive this token from a previous call.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface ListCrossAccountResourcesResponse { + /** + * @public + *

The endpoints attached to an accelerator in a cross-account attachment.

+ */ + CrossAccountResources?: CrossAccountResource[]; + + /** + * @public + *

The token for the next set of results. You receive this token from a previous call.

+ */ + NextToken?: string; +} + /** * @public */ @@ -2945,6 +3245,66 @@ export interface UpdateAcceleratorAttributesResponse { AcceleratorAttributes?: AcceleratorAttributes; } +/** + * @public + */ +export interface UpdateCrossAccountAttachmentRequest { + /** + * @public + *

The Amazon Resource Name (ARN) of the cross-account attachment to update.

+ */ + AttachmentArn: string | undefined; + + /** + * @public + *

The name of the cross-account attachment.

+ */ + Name?: string; + + /** + * @public + *

The principals to add to the cross-account attachment. A principal is an account or the Amazon Resource Name (ARN) + * of an accelerator that the attachment gives permission to add the resources from another account, listed in the attachment.

+ *

To add more than one principal, separate the account numbers or accelerator ARNs, or both, with commas.

+ */ + AddPrincipals?: string[]; + + /** + * @public + *

The principals to remove from the cross-account attachment. A principal is an account or the Amazon Resource Name (ARN) + * of an accelerator that is given permission to add the resources from another account, listed in the cross-account attachment.

+ *

To remove more than one principal, separate the account numbers or accelerator ARNs, or both, with commas.

+ */ + RemovePrincipals?: string[]; + + /** + * @public + *

The resources to add to the cross-account attachment. A resource listed in a cross-account attachment can be added + * to an accelerator by the principals that are listed in the attachment.

+ *

To add more than one resource, separate the resource ARNs with commas.

+ */ + AddResources?: Resource[]; + + /** + * @public + *

The resources to remove from the cross-account attachment. A resource listed in a cross-account attachment can be added + * to an accelerator fy principals that are listed in the cross-account attachment.

+ *

To remove more than one resource, separate the resource ARNs with commas.

+ */ + RemoveResources?: Resource[]; +} + +/** + * @public + */ +export interface UpdateCrossAccountAttachmentResponse { + /** + * @public + *

Information about the updated cross-account attachment.

+ */ + CrossAccountAttachment?: Attachment; +} + /** * @public */ diff --git a/clients/client-global-accelerator/src/pagination/ListCrossAccountAttachmentsPaginator.ts b/clients/client-global-accelerator/src/pagination/ListCrossAccountAttachmentsPaginator.ts new file mode 100644 index 000000000000..2614bf3ee287 --- /dev/null +++ b/clients/client-global-accelerator/src/pagination/ListCrossAccountAttachmentsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListCrossAccountAttachmentsCommand, + ListCrossAccountAttachmentsCommandInput, + ListCrossAccountAttachmentsCommandOutput, +} from "../commands/ListCrossAccountAttachmentsCommand"; +import { GlobalAcceleratorClient } from "../GlobalAcceleratorClient"; +import { GlobalAcceleratorPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: GlobalAcceleratorClient, + input: ListCrossAccountAttachmentsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListCrossAccountAttachmentsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListCrossAccountAttachments( + config: GlobalAcceleratorPaginationConfiguration, + input: ListCrossAccountAttachmentsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListCrossAccountAttachmentsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof GlobalAcceleratorClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected GlobalAccelerator | GlobalAcceleratorClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-global-accelerator/src/pagination/ListCrossAccountResourcesPaginator.ts b/clients/client-global-accelerator/src/pagination/ListCrossAccountResourcesPaginator.ts new file mode 100644 index 000000000000..aadc1e08c799 --- /dev/null +++ b/clients/client-global-accelerator/src/pagination/ListCrossAccountResourcesPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListCrossAccountResourcesCommand, + ListCrossAccountResourcesCommandInput, + ListCrossAccountResourcesCommandOutput, +} from "../commands/ListCrossAccountResourcesCommand"; +import { GlobalAcceleratorClient } from "../GlobalAcceleratorClient"; +import { GlobalAcceleratorPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: GlobalAcceleratorClient, + input: ListCrossAccountResourcesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListCrossAccountResourcesCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListCrossAccountResources( + config: GlobalAcceleratorPaginationConfiguration, + input: ListCrossAccountResourcesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListCrossAccountResourcesCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof GlobalAcceleratorClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected GlobalAccelerator | GlobalAcceleratorClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-global-accelerator/src/pagination/index.ts b/clients/client-global-accelerator/src/pagination/index.ts index 3cd63d872be1..c3d026ae881f 100644 --- a/clients/client-global-accelerator/src/pagination/index.ts +++ b/clients/client-global-accelerator/src/pagination/index.ts @@ -2,6 +2,8 @@ export * from "./Interfaces"; export * from "./ListAcceleratorsPaginator"; export * from "./ListByoipCidrsPaginator"; +export * from "./ListCrossAccountAttachmentsPaginator"; +export * from "./ListCrossAccountResourcesPaginator"; export * from "./ListCustomRoutingAcceleratorsPaginator"; export * from "./ListCustomRoutingEndpointGroupsPaginator"; export * from "./ListCustomRoutingListenersPaginator"; diff --git a/clients/client-global-accelerator/src/protocols/Aws_json1_1.ts b/clients/client-global-accelerator/src/protocols/Aws_json1_1.ts index 73837d5fd212..c93912d9778b 100644 --- a/clients/client-global-accelerator/src/protocols/Aws_json1_1.ts +++ b/clients/client-global-accelerator/src/protocols/Aws_json1_1.ts @@ -34,6 +34,10 @@ import { AllowCustomRoutingTrafficCommandOutput, } from "../commands/AllowCustomRoutingTrafficCommand"; import { CreateAcceleratorCommandInput, CreateAcceleratorCommandOutput } from "../commands/CreateAcceleratorCommand"; +import { + CreateCrossAccountAttachmentCommandInput, + CreateCrossAccountAttachmentCommandOutput, +} from "../commands/CreateCrossAccountAttachmentCommand"; import { CreateCustomRoutingAcceleratorCommandInput, CreateCustomRoutingAcceleratorCommandOutput, @@ -52,6 +56,10 @@ import { } from "../commands/CreateEndpointGroupCommand"; import { CreateListenerCommandInput, CreateListenerCommandOutput } from "../commands/CreateListenerCommand"; import { DeleteAcceleratorCommandInput, DeleteAcceleratorCommandOutput } from "../commands/DeleteAcceleratorCommand"; +import { + DeleteCrossAccountAttachmentCommandInput, + DeleteCrossAccountAttachmentCommandOutput, +} from "../commands/DeleteCrossAccountAttachmentCommand"; import { DeleteCustomRoutingAcceleratorCommandInput, DeleteCustomRoutingAcceleratorCommandOutput, @@ -85,6 +93,10 @@ import { DescribeAcceleratorCommandInput, DescribeAcceleratorCommandOutput, } from "../commands/DescribeAcceleratorCommand"; +import { + DescribeCrossAccountAttachmentCommandInput, + DescribeCrossAccountAttachmentCommandOutput, +} from "../commands/DescribeCrossAccountAttachmentCommand"; import { DescribeCustomRoutingAcceleratorAttributesCommandInput, DescribeCustomRoutingAcceleratorAttributesCommandOutput, @@ -108,6 +120,18 @@ import { import { DescribeListenerCommandInput, DescribeListenerCommandOutput } from "../commands/DescribeListenerCommand"; import { ListAcceleratorsCommandInput, ListAcceleratorsCommandOutput } from "../commands/ListAcceleratorsCommand"; import { ListByoipCidrsCommandInput, ListByoipCidrsCommandOutput } from "../commands/ListByoipCidrsCommand"; +import { + ListCrossAccountAttachmentsCommandInput, + ListCrossAccountAttachmentsCommandOutput, +} from "../commands/ListCrossAccountAttachmentsCommand"; +import { + ListCrossAccountResourceAccountsCommandInput, + ListCrossAccountResourceAccountsCommandOutput, +} from "../commands/ListCrossAccountResourceAccountsCommand"; +import { + ListCrossAccountResourcesCommandInput, + ListCrossAccountResourcesCommandOutput, +} from "../commands/ListCrossAccountResourcesCommand"; import { ListCustomRoutingAcceleratorsCommandInput, ListCustomRoutingAcceleratorsCommandOutput, @@ -147,6 +171,10 @@ import { UpdateAcceleratorAttributesCommandOutput, } from "../commands/UpdateAcceleratorAttributesCommand"; import { UpdateAcceleratorCommandInput, UpdateAcceleratorCommandOutput } from "../commands/UpdateAcceleratorCommand"; +import { + UpdateCrossAccountAttachmentCommandInput, + UpdateCrossAccountAttachmentCommandOutput, +} from "../commands/UpdateCrossAccountAttachmentCommand"; import { UpdateCustomRoutingAcceleratorAttributesCommandInput, UpdateCustomRoutingAcceleratorAttributesCommandOutput, @@ -179,6 +207,8 @@ import { AllowCustomRoutingTrafficRequest, AssociatedEndpointGroupFoundException, AssociatedListenerFoundException, + Attachment, + AttachmentNotFoundException, ByoipCidr, ByoipCidrEvent, ByoipCidrNotFoundException, @@ -186,6 +216,8 @@ import { ConflictException, CreateAcceleratorRequest, CreateAcceleratorResponse, + CreateCrossAccountAttachmentRequest, + CreateCrossAccountAttachmentResponse, CreateCustomRoutingAcceleratorRequest, CreateCustomRoutingAcceleratorResponse, CreateCustomRoutingEndpointGroupRequest, @@ -198,6 +230,7 @@ import { CustomRoutingEndpointConfiguration, CustomRoutingProtocol, DeleteAcceleratorRequest, + DeleteCrossAccountAttachmentRequest, DeleteCustomRoutingAcceleratorRequest, DeleteCustomRoutingEndpointGroupRequest, DeleteCustomRoutingListenerRequest, @@ -209,6 +242,8 @@ import { DescribeAcceleratorAttributesRequest, DescribeAcceleratorRequest, DescribeAcceleratorResponse, + DescribeCrossAccountAttachmentRequest, + DescribeCrossAccountAttachmentResponse, DescribeCustomRoutingAcceleratorAttributesRequest, DescribeCustomRoutingAcceleratorRequest, DescribeCustomRoutingAcceleratorResponse, @@ -234,6 +269,10 @@ import { ListAcceleratorsResponse, ListByoipCidrsRequest, ListByoipCidrsResponse, + ListCrossAccountAttachmentsRequest, + ListCrossAccountAttachmentsResponse, + ListCrossAccountResourceAccountsRequest, + ListCrossAccountResourcesRequest, ListCustomRoutingAcceleratorsRequest, ListCustomRoutingAcceleratorsResponse, ListCustomRoutingEndpointGroupsRequest, @@ -251,6 +290,7 @@ import { ProvisionByoipCidrResponse, RemoveCustomRoutingEndpointsRequest, RemoveEndpointsRequest, + Resource, Tag, TagResourceRequest, TransactionInProgressException, @@ -258,6 +298,8 @@ import { UpdateAcceleratorAttributesRequest, UpdateAcceleratorRequest, UpdateAcceleratorResponse, + UpdateCrossAccountAttachmentRequest, + UpdateCrossAccountAttachmentResponse, UpdateCustomRoutingAcceleratorAttributesRequest, UpdateCustomRoutingAcceleratorRequest, UpdateCustomRoutingAcceleratorResponse, @@ -334,6 +376,19 @@ export const se_CreateAcceleratorCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1CreateCrossAccountAttachmentCommand + */ +export const se_CreateCrossAccountAttachmentCommand = async ( + input: CreateCrossAccountAttachmentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("CreateCrossAccountAttachment"); + let body: any; + body = JSON.stringify(se_CreateCrossAccountAttachmentRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1CreateCustomRoutingAcceleratorCommand */ @@ -412,6 +467,19 @@ export const se_DeleteAcceleratorCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1DeleteCrossAccountAttachmentCommand + */ +export const se_DeleteCrossAccountAttachmentCommand = async ( + input: DeleteCrossAccountAttachmentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteCrossAccountAttachment"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1DeleteCustomRoutingAcceleratorCommand */ @@ -529,6 +597,19 @@ export const se_DescribeAcceleratorAttributesCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1DescribeCrossAccountAttachmentCommand + */ +export const se_DescribeCrossAccountAttachmentCommand = async ( + input: DescribeCrossAccountAttachmentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DescribeCrossAccountAttachment"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1DescribeCustomRoutingAcceleratorCommand */ @@ -633,6 +714,45 @@ export const se_ListByoipCidrsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1ListCrossAccountAttachmentsCommand + */ +export const se_ListCrossAccountAttachmentsCommand = async ( + input: ListCrossAccountAttachmentsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListCrossAccountAttachments"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1ListCrossAccountResourceAccountsCommand + */ +export const se_ListCrossAccountResourceAccountsCommand = async ( + input: ListCrossAccountResourceAccountsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListCrossAccountResourceAccounts"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1ListCrossAccountResourcesCommand + */ +export const se_ListCrossAccountResourcesCommand = async ( + input: ListCrossAccountResourcesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListCrossAccountResources"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1ListCustomRoutingAcceleratorsCommand */ @@ -828,6 +948,19 @@ export const se_UpdateAcceleratorAttributesCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1UpdateCrossAccountAttachmentCommand + */ +export const se_UpdateCrossAccountAttachmentCommand = async ( + input: UpdateCrossAccountAttachmentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("UpdateCrossAccountAttachment"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1UpdateCustomRoutingAcceleratorCommand */ @@ -1190,6 +1323,64 @@ const de_CreateAcceleratorCommandError = async ( } }; +/** + * deserializeAws_json1_1CreateCrossAccountAttachmentCommand + */ +export const de_CreateCrossAccountAttachmentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CreateCrossAccountAttachmentCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_CreateCrossAccountAttachmentResponse(data, context); + const response: CreateCrossAccountAttachmentCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1CreateCrossAccountAttachmentCommandError + */ +const de_CreateCrossAccountAttachmentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.globalaccelerator#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServiceErrorException": + case "com.amazonaws.globalaccelerator#InternalServiceErrorException": + throw await de_InternalServiceErrorExceptionRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.globalaccelerator#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.globalaccelerator#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); + case "TransactionInProgressException": + case "com.amazonaws.globalaccelerator#TransactionInProgressException": + throw await de_TransactionInProgressExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1CreateCustomRoutingAcceleratorCommand */ @@ -1547,6 +1738,61 @@ const de_DeleteAcceleratorCommandError = async ( } }; +/** + * deserializeAws_json1_1DeleteCrossAccountAttachmentCommand + */ +export const de_DeleteCrossAccountAttachmentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DeleteCrossAccountAttachmentCommandError(output, context); + } + await collectBody(output.body, context); + const response: DeleteCrossAccountAttachmentCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_1DeleteCrossAccountAttachmentCommandError + */ +const de_DeleteCrossAccountAttachmentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.globalaccelerator#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "AttachmentNotFoundException": + case "com.amazonaws.globalaccelerator#AttachmentNotFoundException": + throw await de_AttachmentNotFoundExceptionRes(parsedOutput, context); + case "InternalServiceErrorException": + case "com.amazonaws.globalaccelerator#InternalServiceErrorException": + throw await de_InternalServiceErrorExceptionRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.globalaccelerator#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + case "TransactionInProgressException": + case "com.amazonaws.globalaccelerator#TransactionInProgressException": + throw await de_TransactionInProgressExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1DeleteCustomRoutingAcceleratorCommand */ @@ -2015,6 +2261,61 @@ const de_DescribeAcceleratorAttributesCommandError = async ( } }; +/** + * deserializeAws_json1_1DescribeCrossAccountAttachmentCommand + */ +export const de_DescribeCrossAccountAttachmentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DescribeCrossAccountAttachmentCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_DescribeCrossAccountAttachmentResponse(data, context); + const response: DescribeCrossAccountAttachmentCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1DescribeCrossAccountAttachmentCommandError + */ +const de_DescribeCrossAccountAttachmentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.globalaccelerator#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "AttachmentNotFoundException": + case "com.amazonaws.globalaccelerator#AttachmentNotFoundException": + throw await de_AttachmentNotFoundExceptionRes(parsedOutput, context); + case "InternalServiceErrorException": + case "com.amazonaws.globalaccelerator#InternalServiceErrorException": + throw await de_InternalServiceErrorExceptionRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.globalaccelerator#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1DescribeCustomRoutingAcceleratorCommand */ @@ -2434,6 +2735,168 @@ const de_ListByoipCidrsCommandError = async ( } }; +/** + * deserializeAws_json1_1ListCrossAccountAttachmentsCommand + */ +export const de_ListCrossAccountAttachmentsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListCrossAccountAttachmentsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListCrossAccountAttachmentsResponse(data, context); + const response: ListCrossAccountAttachmentsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListCrossAccountAttachmentsCommandError + */ +const de_ListCrossAccountAttachmentsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.globalaccelerator#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServiceErrorException": + case "com.amazonaws.globalaccelerator#InternalServiceErrorException": + throw await de_InternalServiceErrorExceptionRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.globalaccelerator#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + case "InvalidNextTokenException": + case "com.amazonaws.globalaccelerator#InvalidNextTokenException": + throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1ListCrossAccountResourceAccountsCommand + */ +export const de_ListCrossAccountResourceAccountsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListCrossAccountResourceAccountsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListCrossAccountResourceAccountsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListCrossAccountResourceAccountsCommandError + */ +const de_ListCrossAccountResourceAccountsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.globalaccelerator#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServiceErrorException": + case "com.amazonaws.globalaccelerator#InternalServiceErrorException": + throw await de_InternalServiceErrorExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1ListCrossAccountResourcesCommand + */ +export const de_ListCrossAccountResourcesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListCrossAccountResourcesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListCrossAccountResourcesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListCrossAccountResourcesCommandError + */ +const de_ListCrossAccountResourcesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AcceleratorNotFoundException": + case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException": + throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context); + case "AccessDeniedException": + case "com.amazonaws.globalaccelerator#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServiceErrorException": + case "com.amazonaws.globalaccelerator#InternalServiceErrorException": + throw await de_InternalServiceErrorExceptionRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.globalaccelerator#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + case "InvalidNextTokenException": + case "com.amazonaws.globalaccelerator#InvalidNextTokenException": + throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1ListCustomRoutingAcceleratorsCommand */ @@ -3256,6 +3719,67 @@ const de_UpdateAcceleratorAttributesCommandError = async ( } }; +/** + * deserializeAws_json1_1UpdateCrossAccountAttachmentCommand + */ +export const de_UpdateCrossAccountAttachmentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_UpdateCrossAccountAttachmentCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_UpdateCrossAccountAttachmentResponse(data, context); + const response: UpdateCrossAccountAttachmentCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1UpdateCrossAccountAttachmentCommandError + */ +const de_UpdateCrossAccountAttachmentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.globalaccelerator#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "AttachmentNotFoundException": + case "com.amazonaws.globalaccelerator#AttachmentNotFoundException": + throw await de_AttachmentNotFoundExceptionRes(parsedOutput, context); + case "InternalServiceErrorException": + case "com.amazonaws.globalaccelerator#InternalServiceErrorException": + throw await de_InternalServiceErrorExceptionRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.globalaccelerator#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.globalaccelerator#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); + case "TransactionInProgressException": + case "com.amazonaws.globalaccelerator#TransactionInProgressException": + throw await de_TransactionInProgressExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1UpdateCustomRoutingAcceleratorCommand */ @@ -3675,6 +4199,22 @@ const de_AssociatedListenerFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; +/** + * deserializeAws_json1_1AttachmentNotFoundExceptionRes + */ +const de_AttachmentNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new AttachmentNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + /** * deserializeAws_json1_1ByoipCidrNotFoundExceptionRes */ @@ -3920,6 +4460,22 @@ const se_CreateAcceleratorRequest = (input: CreateAcceleratorRequest, context: _ }); }; +/** + * serializeAws_json1_1CreateCrossAccountAttachmentRequest + */ +const se_CreateCrossAccountAttachmentRequest = ( + input: CreateCrossAccountAttachmentRequest, + context: __SerdeContext +): any => { + return take(input, { + IdempotencyToken: [true, (_) => _ ?? generateIdempotencyToken()], + Name: [], + Principals: _json, + Resources: _json, + Tags: _json, + }); +}; + /** * serializeAws_json1_1CreateCustomRoutingAcceleratorRequest */ @@ -4010,6 +4566,8 @@ const se_CreateListenerRequest = (input: CreateListenerRequest, context: __Serde // se_DeleteAcceleratorRequest omitted. +// se_DeleteCrossAccountAttachmentRequest omitted. + // se_DeleteCustomRoutingAcceleratorRequest omitted. // se_DeleteCustomRoutingEndpointGroupRequest omitted. @@ -4028,6 +4586,8 @@ const se_CreateListenerRequest = (input: CreateListenerRequest, context: __Serde // se_DescribeAcceleratorRequest omitted. +// se_DescribeCrossAccountAttachmentRequest omitted. + // se_DescribeCustomRoutingAcceleratorAttributesRequest omitted. // se_DescribeCustomRoutingAcceleratorRequest omitted. @@ -4060,6 +4620,12 @@ const se_CreateListenerRequest = (input: CreateListenerRequest, context: __Serde // se_ListByoipCidrsRequest omitted. +// se_ListCrossAccountAttachmentsRequest omitted. + +// se_ListCrossAccountResourceAccountsRequest omitted. + +// se_ListCrossAccountResourcesRequest omitted. + // se_ListCustomRoutingAcceleratorsRequest omitted. // se_ListCustomRoutingEndpointGroupsRequest omitted. @@ -4084,12 +4650,18 @@ const se_CreateListenerRequest = (input: CreateListenerRequest, context: __Serde // se_PortRanges omitted. +// se_Principals omitted. + // se_ProvisionByoipCidrRequest omitted. // se_RemoveCustomRoutingEndpointsRequest omitted. // se_RemoveEndpointsRequest omitted. +// se_Resource omitted. + +// se_Resources omitted. + // se_Tag omitted. // se_TagKeys omitted. @@ -4104,6 +4676,8 @@ const se_CreateListenerRequest = (input: CreateListenerRequest, context: __Serde // se_UpdateAcceleratorRequest omitted. +// se_UpdateCrossAccountAttachmentRequest omitted. + // se_UpdateCustomRoutingAcceleratorAttributesRequest omitted. // se_UpdateCustomRoutingAcceleratorRequest omitted. @@ -4209,6 +4783,36 @@ const de_AdvertiseByoipCidrResponse = (output: any, context: __SerdeContext): Ad // de_AssociatedListenerFoundException omitted. +/** + * deserializeAws_json1_1Attachment + */ +const de_Attachment = (output: any, context: __SerdeContext): Attachment => { + return take(output, { + AttachmentArn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Principals: _json, + Resources: _json, + }) as any; +}; + +// de_AttachmentNotFoundException omitted. + +/** + * deserializeAws_json1_1Attachments + */ +const de_Attachments = (output: any, context: __SerdeContext): Attachment[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Attachment(entry, context); + }); + return retVal; +}; + +// de_AwsAccountIds omitted. + /** * deserializeAws_json1_1ByoipCidr */ @@ -4267,6 +4871,18 @@ const de_CreateAcceleratorResponse = (output: any, context: __SerdeContext): Cre }) as any; }; +/** + * deserializeAws_json1_1CreateCrossAccountAttachmentResponse + */ +const de_CreateCrossAccountAttachmentResponse = ( + output: any, + context: __SerdeContext +): CreateCrossAccountAttachmentResponse => { + return take(output, { + CrossAccountAttachment: (_: any) => de_Attachment(_, context), + }) as any; +}; + /** * deserializeAws_json1_1CreateCustomRoutingAcceleratorResponse */ @@ -4294,6 +4910,10 @@ const de_CreateEndpointGroupResponse = (output: any, context: __SerdeContext): C // de_CreateListenerResponse omitted. +// de_CrossAccountResource omitted. + +// de_CrossAccountResources omitted. + /** * deserializeAws_json1_1CustomRoutingAccelerator */ @@ -4363,6 +4983,18 @@ const de_DescribeAcceleratorResponse = (output: any, context: __SerdeContext): D }) as any; }; +/** + * deserializeAws_json1_1DescribeCrossAccountAttachmentResponse + */ +const de_DescribeCrossAccountAttachmentResponse = ( + output: any, + context: __SerdeContext +): DescribeCrossAccountAttachmentResponse => { + return take(output, { + CrossAccountAttachment: (_: any) => de_Attachment(_, context), + }) as any; +}; + // de_DescribeCustomRoutingAcceleratorAttributesResponse omitted. /** @@ -4476,6 +5108,23 @@ const de_ListByoipCidrsResponse = (output: any, context: __SerdeContext): ListBy }) as any; }; +/** + * deserializeAws_json1_1ListCrossAccountAttachmentsResponse + */ +const de_ListCrossAccountAttachmentsResponse = ( + output: any, + context: __SerdeContext +): ListCrossAccountAttachmentsResponse => { + return take(output, { + CrossAccountAttachments: (_: any) => de_Attachments(_, context), + NextToken: __expectString, + }) as any; +}; + +// de_ListCrossAccountResourceAccountsResponse omitted. + +// de_ListCrossAccountResourcesResponse omitted. + /** * deserializeAws_json1_1ListCustomRoutingAcceleratorsResponse */ @@ -4529,6 +5178,8 @@ const de_ListEndpointGroupsResponse = (output: any, context: __SerdeContext): Li // de_PortRanges omitted. +// de_Principals omitted. + // de_Protocols omitted. /** @@ -4540,6 +5191,10 @@ const de_ProvisionByoipCidrResponse = (output: any, context: __SerdeContext): Pr }) as any; }; +// de_Resource omitted. + +// de_Resources omitted. + // de_SocketAddress omitted. // de_SocketAddresses omitted. @@ -4565,6 +5220,18 @@ const de_UpdateAcceleratorResponse = (output: any, context: __SerdeContext): Upd }) as any; }; +/** + * deserializeAws_json1_1UpdateCrossAccountAttachmentResponse + */ +const de_UpdateCrossAccountAttachmentResponse = ( + output: any, + context: __SerdeContext +): UpdateCrossAccountAttachmentResponse => { + return take(output, { + CrossAccountAttachment: (_: any) => de_Attachment(_, context), + }) as any; +}; + // de_UpdateCustomRoutingAcceleratorAttributesResponse omitted. /** diff --git a/codegen/sdk-codegen/aws-models/global-accelerator.json b/codegen/sdk-codegen/aws-models/global-accelerator.json index ed1ab0327998..646c161f2666 100644 --- a/codegen/sdk-codegen/aws-models/global-accelerator.json +++ b/codegen/sdk-codegen/aws-models/global-accelerator.json @@ -515,6 +515,95 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.globalaccelerator#Attachment": { + "type": "structure", + "members": { + "AttachmentArn": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the cross-account attachment.

" + } + }, + "Name": { + "target": "com.amazonaws.globalaccelerator#AttachmentName", + "traits": { + "smithy.api#documentation": "

The name of the cross-account attachment.

" + } + }, + "Principals": { + "target": "com.amazonaws.globalaccelerator#Principals", + "traits": { + "smithy.api#documentation": "

The principals included in the cross-account attachment.

" + } + }, + "Resources": { + "target": "com.amazonaws.globalaccelerator#Resources", + "traits": { + "smithy.api#documentation": "

The resources included in the cross-account attachment.

" + } + }, + "LastModifiedTime": { + "target": "com.amazonaws.globalaccelerator#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time that the cross-account attachment was last modified.

" + } + }, + "CreatedTime": { + "target": "com.amazonaws.globalaccelerator#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time that the cross-account attachment was created.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A cross-account attachment in Global Accelerator. A cross-account attachment\n\t\t\tspecifies the principals who have permission to add to accelerators in their own\n\t\t\taccount the resources in your account that you also list in the attachment.

" + } + }, + "com.amazonaws.globalaccelerator#AttachmentName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 64 + }, + "smithy.api#pattern": "^[\\S\\s]+$" + } + }, + "com.amazonaws.globalaccelerator#AttachmentNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.globalaccelerator#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

No cross-account attachment was found.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.globalaccelerator#Attachments": { + "type": "list", + "member": { + "target": "com.amazonaws.globalaccelerator#Attachment" + } + }, + "com.amazonaws.globalaccelerator#AwsAccountId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 12, + "max": 12 + }, + "smithy.api#pattern": "^\\d{12}$" + } + }, + "com.amazonaws.globalaccelerator#AwsAccountIds": { + "type": "list", + "member": { + "target": "com.amazonaws.globalaccelerator#AwsAccountId" + } + }, "com.amazonaws.globalaccelerator#ByoipCidr": { "type": "structure", "members": { @@ -793,6 +882,90 @@ "smithy.api#output": {} } }, + "com.amazonaws.globalaccelerator#CreateCrossAccountAttachment": { + "type": "operation", + "input": { + "target": "com.amazonaws.globalaccelerator#CreateCrossAccountAttachmentRequest" + }, + "output": { + "target": "com.amazonaws.globalaccelerator#CreateCrossAccountAttachmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.globalaccelerator#AccessDeniedException" + }, + { + "target": "com.amazonaws.globalaccelerator#InternalServiceErrorException" + }, + { + "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + }, + { + "target": "com.amazonaws.globalaccelerator#LimitExceededException" + }, + { + "target": "com.amazonaws.globalaccelerator#TransactionInProgressException" + } + ], + "traits": { + "smithy.api#documentation": "

Create a cross-account attachment in Global Accelerator. You create a cross-account attachment to\n\t\t\tspecify the principals who have permission to add to accelerators in their own\n\t\t\taccount the resources in your account that you also list in the attachment.

\n

A principal can be an Amazon Web Services account number or the Amazon Resource Name (ARN) for an \n\t\t\taccelerator. For account numbers that are listed as principals, to add a resource listed in the attachment to an accelerator,\n\t\t\tyou must sign in to an account specified as a principal. Then you can add the resources that are listed \n\t\t\tto any of your accelerators. If an accelerator ARN is listed in the cross-account attachment as a principal, \n\t\t\tanyone with permission to make updates to the accelerator can add as endpoints resources that are listed in the \n\t\t\tattachment.

" + } + }, + "com.amazonaws.globalaccelerator#CreateCrossAccountAttachmentRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.globalaccelerator#AttachmentName", + "traits": { + "smithy.api#documentation": "

The name of the cross-account attachment.

", + "smithy.api#required": {} + } + }, + "Principals": { + "target": "com.amazonaws.globalaccelerator#Principals", + "traits": { + "smithy.api#documentation": "

The principals to list in the cross-account attachment. A principal can be an Amazon Web Services account\n\t\t\tnumber or the Amazon Resource Name (ARN) for an accelerator.

" + } + }, + "Resources": { + "target": "com.amazonaws.globalaccelerator#Resources", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) for the resources to list in the cross-account attachment. A resource can\n\t\t\tbe any supported Amazon Web Services resource type for Global Accelerator.

" + } + }, + "IdempotencyToken": { + "target": "com.amazonaws.globalaccelerator#IdempotencyToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the\n\t\t\tuniqueness—of the request.

", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.globalaccelerator#Tags", + "traits": { + "smithy.api#documentation": "

Create tags for cross-account attachment.

\n

For more information, see Tagging\n\t\t\tin Global Accelerator in the Global Accelerator Developer Guide.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.globalaccelerator#CreateCrossAccountAttachmentResponse": { + "type": "structure", + "members": { + "CrossAccountAttachment": { + "target": "com.amazonaws.globalaccelerator#Attachment", + "traits": { + "smithy.api#documentation": "

Information about the cross-account attachment.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.globalaccelerator#CreateCustomRoutingAccelerator": { "type": "operation", "input": { @@ -1255,6 +1428,32 @@ "smithy.api#output": {} } }, + "com.amazonaws.globalaccelerator#CrossAccountResource": { + "type": "structure", + "members": { + "EndpointId": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The endpoint ID for the endpoint that is listed in a cross-account attachment and\n\t\t\tcan be added to an accelerator by specified principals.

" + } + }, + "AttachmentArn": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the cross-account attachment that specifies the endpoints (resources)\n\t\t\tthat can be added to accelerators and principals that have permission to add the endpoints to accelerators.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An endpoint (Amazon Web Services resource) that is listed in a cross-account attachment and\n\t\t\tcan be added to an accelerator by specified principals, that are also listed in the attachment.

" + } + }, + "com.amazonaws.globalaccelerator#CrossAccountResources": { + "type": "list", + "member": { + "target": "com.amazonaws.globalaccelerator#CrossAccountResource" + } + }, "com.amazonaws.globalaccelerator#CustomRoutingAccelerator": { "type": "structure", "members": { @@ -1464,6 +1663,12 @@ "traits": { "smithy.api#documentation": "

An ID for the endpoint. For custom routing accelerators, this is the virtual private cloud (VPC)\n\t\t\tsubnet ID.

" } + }, + "AttachmentArn": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the cross-account attachment that specifies the endpoints (resources)\n\t\t\tthat can be added to accelerators and principals that have permission to add the endpoints to accelerators.

" + } } }, "traits": { @@ -1639,6 +1844,50 @@ "smithy.api#input": {} } }, + "com.amazonaws.globalaccelerator#DeleteCrossAccountAttachment": { + "type": "operation", + "input": { + "target": "com.amazonaws.globalaccelerator#DeleteCrossAccountAttachmentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.globalaccelerator#AccessDeniedException" + }, + { + "target": "com.amazonaws.globalaccelerator#AttachmentNotFoundException" + }, + { + "target": "com.amazonaws.globalaccelerator#InternalServiceErrorException" + }, + { + "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + }, + { + "target": "com.amazonaws.globalaccelerator#TransactionInProgressException" + } + ], + "traits": { + "smithy.api#documentation": "

Delete a cross-account attachment. When you delete an attachment, Global Accelerator revokes the permission\n\t\t\tto use the resources in the attachment from all principals in the list of principals. Global Accelerator \n\t\t\trevokes the permission for specific resources by doing the following:

\n
    \n
  • \n

    If the principal is an account ID, Global Accelerator reviews every accelerator in the account\n\t\t\tand removes cross-account endpoints from all accelerators.

    \n
  • \n
  • \n

    If the principal is an accelerator, Global Accelerator reviews just that accelerator\n\t\t\tand removes cross-account endpoints from it.

    \n
  • \n
\n

If there are overlapping permissions provided by multiple cross-account attachments,\n\t\tGlobal Accelerator only removes endpoints if there are no current cross-account attachments that provide\n\t\taccess permission. For example, if you delete a cross-account attachment that lists an\n\t\taccelerator as a principal, but another cross-account attachment includes the account ID\n\t\tthat owns that accelerator, endpoints will not be removed from the accelerator.

" + } + }, + "com.amazonaws.globalaccelerator#DeleteCrossAccountAttachmentRequest": { + "type": "structure", + "members": { + "AttachmentArn": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the cross-account attachment to delete.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, "com.amazonaws.globalaccelerator#DeleteCustomRoutingAccelerator": { "type": "operation", "input": { @@ -2066,6 +2315,61 @@ "smithy.api#output": {} } }, + "com.amazonaws.globalaccelerator#DescribeCrossAccountAttachment": { + "type": "operation", + "input": { + "target": "com.amazonaws.globalaccelerator#DescribeCrossAccountAttachmentRequest" + }, + "output": { + "target": "com.amazonaws.globalaccelerator#DescribeCrossAccountAttachmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.globalaccelerator#AccessDeniedException" + }, + { + "target": "com.amazonaws.globalaccelerator#AttachmentNotFoundException" + }, + { + "target": "com.amazonaws.globalaccelerator#InternalServiceErrorException" + }, + { + "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets configuration information about a cross-account attachment.

" + } + }, + "com.amazonaws.globalaccelerator#DescribeCrossAccountAttachmentRequest": { + "type": "structure", + "members": { + "AttachmentArn": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the cross-account attachment to describe.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.globalaccelerator#DescribeCrossAccountAttachmentResponse": { + "type": "structure", + "members": { + "CrossAccountAttachment": { + "target": "com.amazonaws.globalaccelerator#Attachment", + "traits": { + "smithy.api#documentation": "

Information about the cross-account attachment.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.globalaccelerator#DescribeCustomRoutingAccelerator": { "type": "operation", "input": { @@ -2495,7 +2799,13 @@ "ClientIPPreservationEnabled": { "target": "com.amazonaws.globalaccelerator#GenericBoolean", "traits": { - "smithy.api#documentation": "

Indicates whether client IP address preservation is enabled for an endpoint. \n\t\t\tThe value is true or false. The default value is true for new accelerators.

\n

If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request header as \n\t\t\ttraffic travels to applications on the endpoint fronted by the accelerator.

\n

Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are Application Load \n\t\t\tBalancers, Amazon EC2 instances, and Network Load Balancers with Security Groups. IMPORTANT: You cannot use client IP address preservation\n\t\t\twith Network Load Balancers with TLS listeners.

\n

For more information, see \n\t\t\tPreserve client IP addresses in Global Accelerator in the Global Accelerator Developer Guide.

" + "smithy.api#documentation": "

Indicates whether client IP address preservation is enabled for an endpoint. \n\t\t\tThe value is true or false. The default value is true for Application Load Balancer endpoints.

\n

If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request header as \n\t\t\ttraffic travels to applications on the endpoint fronted by the accelerator.

\n

Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are Application Load \n\t\t\tBalancers, Amazon EC2 instances, and Network Load Balancers with security groups. IMPORTANT: You cannot use client IP address preservation\n\t\t\twith Network Load Balancers with TLS listeners.

\n

For more information, see \n\t\t\tPreserve client IP addresses in Global Accelerator in the Global Accelerator Developer Guide.

" + } + }, + "AttachmentArn": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the cross-account attachment that specifies the endpoints (resources)\n\t\t\tthat can be added to accelerators and principals that have permission to add the endpoints to accelerators.

" } } }, @@ -2545,7 +2855,7 @@ "ClientIPPreservationEnabled": { "target": "com.amazonaws.globalaccelerator#GenericBoolean", "traits": { - "smithy.api#documentation": "

Indicates whether client IP address preservation is enabled for an endpoint. \n\t\t\tThe value is true or false. The default value is true for new accelerators.

\n

If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request header as \n\t\t\ttraffic travels to applications on the endpoint fronted by the accelerator.

\n

Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are Application Load \n\t\t\tBalancers, Amazon EC2 instances, and Network Load Balancers with Security Groups. IMPORTANT: You cannot use client IP address preservation\n\t\t\twith Network Load Balancers with TLS listeners.

\n

For more information, see \n\t\t\tPreserve client IP addresses in Global Accelerator in the Global Accelerator Developer Guide.

" + "smithy.api#documentation": "

Indicates whether client IP address preservation is enabled for an endpoint. \n\t\t\tThe value is true or false. The default value is true for Application Load Balancers endpoints.

\n

If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request header as \n\t\t\ttraffic travels to applications on the endpoint fronted by the accelerator.

\n

Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are Application Load \n\t\t\tBalancers, Amazon EC2 instances, and Network Load Balancers with security groups. IMPORTANT: You cannot use client IP address preservation\n\t\t\twith Network Load Balancers with TLS listeners.

\n

For more information, see \n\t\t\tPreserve client IP addresses in Global Accelerator in the Global Accelerator Developer Guide.

" } } }, @@ -2754,6 +3064,9 @@ { "target": "com.amazonaws.globalaccelerator#CreateAccelerator" }, + { + "target": "com.amazonaws.globalaccelerator#CreateCrossAccountAttachment" + }, { "target": "com.amazonaws.globalaccelerator#CreateCustomRoutingAccelerator" }, @@ -2772,6 +3085,9 @@ { "target": "com.amazonaws.globalaccelerator#DeleteAccelerator" }, + { + "target": "com.amazonaws.globalaccelerator#DeleteCrossAccountAttachment" + }, { "target": "com.amazonaws.globalaccelerator#DeleteCustomRoutingAccelerator" }, @@ -2799,6 +3115,9 @@ { "target": "com.amazonaws.globalaccelerator#DescribeAcceleratorAttributes" }, + { + "target": "com.amazonaws.globalaccelerator#DescribeCrossAccountAttachment" + }, { "target": "com.amazonaws.globalaccelerator#DescribeCustomRoutingAccelerator" }, @@ -2823,6 +3142,15 @@ { "target": "com.amazonaws.globalaccelerator#ListByoipCidrs" }, + { + "target": "com.amazonaws.globalaccelerator#ListCrossAccountAttachments" + }, + { + "target": "com.amazonaws.globalaccelerator#ListCrossAccountResourceAccounts" + }, + { + "target": "com.amazonaws.globalaccelerator#ListCrossAccountResources" + }, { "target": "com.amazonaws.globalaccelerator#ListCustomRoutingAccelerators" }, @@ -2868,6 +3196,9 @@ { "target": "com.amazonaws.globalaccelerator#UpdateAcceleratorAttributes" }, + { + "target": "com.amazonaws.globalaccelerator#UpdateCrossAccountAttachment" + }, { "target": "com.amazonaws.globalaccelerator#UpdateCustomRoutingAccelerator" }, @@ -2900,7 +3231,7 @@ "name": "globalaccelerator" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "Global Accelerator\n

This is the Global Accelerator API Reference. This guide is for developers who need detailed information about\n\t\t Global Accelerator API actions, data types, and errors. For more information about Global Accelerator features, see the \n\t \tGlobal Accelerator Developer Guide.

\n

Global Accelerator is a service in which you create accelerators to improve the performance \n\t\t\tof your applications for local and global users. Depending on the type of accelerator you choose, you can\n\t\t\tgain additional benefits.

\n
    \n
  • \n

    By using a standard accelerator, you can improve availability of your internet applications \n\t\t\t that are used by a global audience. With a standard accelerator, Global Accelerator directs traffic to optimal endpoints over the Amazon Web Services \n\t\t\t\tglobal network.

    \n
  • \n
  • \n

    For other scenarios, you might choose a custom routing accelerator. With a custom routing accelerator, you \n\t\t\t\tcan use application logic to directly map one or more users to a specific endpoint among many endpoints.

    \n
  • \n
\n \n

Global Accelerator is a global service that supports endpoints in multiple Amazon Web Services Regions but you must specify the \n\t\t \tUS West (Oregon) Region to create, update, or otherwise work with accelerators. That is, for example, specify --region us-west-2\n\t\t \ton Amazon Web Services CLI commands.

\n
\n

By default, Global Accelerator provides you with static IP addresses that you associate with your accelerator. The static IP addresses \n\t\t\tare anycast from the Amazon Web Services edge network. For IPv4, Global Accelerator provides two static IPv4 addresses. For dual-stack,\n\t\t\tGlobal Accelerator provides a total of four addresses: two static IPv4 addresses and two static IPv6 addresses. \n\t\t\tWith a standard accelerator for IPv4, instead of using the addresses that Global Accelerator provides, you can configure \n\t\t\tthese entry points to be IPv4 addresses from your own IP address ranges that you bring toGlobal Accelerator (BYOIP).

\n

For a standard accelerator, \n\t they distribute incoming application traffic across multiple endpoint resources in multiple Amazon Web Services Regions , which increases \n\t\t\tthe availability of your applications. Endpoints for standard accelerators can be Network Load Balancers, Application Load Balancers, \n\t \tAmazon EC2 instances, or Elastic IP addresses that are located in one Amazon Web Services Region or multiple Amazon Web Services Regions. For custom routing\n\t accelerators, you map traffic that arrives to the static IP addresses to specific Amazon EC2 servers in endpoints that\n\t\t\tare virtual private cloud (VPC) subnets.

\n \n

The static IP addresses remain assigned to your accelerator for as long as it exists, even if you\n\t\t\t\tdisable the accelerator and it no longer accepts or routes traffic. However, when you\n\t\t\t\t\tdelete an accelerator, you lose the static IP addresses that\n\t\t\t\tare assigned to it, so you can no longer route traffic by using them. You can use\n\t\t\t\tIAM policies like tag-based permissions with Global Accelerator to limit the users who have\n\t\t\t\tpermissions to delete an accelerator. For more information, see Tag-based policies.

\n
\n

For standard accelerators, Global Accelerator uses the Amazon Web Services global network to route traffic to the optimal regional endpoint based\n\t\t\ton health, client location, and policies that you configure. The service reacts instantly to\n\t\t\tchanges in health or configuration to ensure that internet traffic from clients is always\n\t\t\tdirected to healthy endpoints.

\n

For more information about understanding and using Global Accelerator, see the\n\t\t\tGlobal Accelerator Developer Guide.

", + "smithy.api#documentation": "Global Accelerator\n

This is the Global Accelerator API Reference. This guide is for developers who need detailed information about\n\t\t Global Accelerator API actions, data types, and errors. For more information about Global Accelerator features, see the \n\t \tGlobal Accelerator Developer Guide.

\n

Global Accelerator is a service in which you create accelerators to improve the performance \n\t\t\tof your applications for local and global users. Depending on the type of accelerator you choose, you can\n\t\t\tgain additional benefits.

\n
    \n
  • \n

    By using a standard accelerator, you can improve availability of your internet applications \n\t\t\t that are used by a global audience. With a standard accelerator, Global Accelerator directs traffic to optimal endpoints over the Amazon Web Services \n\t\t\t\tglobal network.

    \n
  • \n
  • \n

    For other scenarios, you might choose a custom routing accelerator. With a custom routing accelerator, you \n\t\t\t\tcan use application logic to directly map one or more users to a specific endpoint among many endpoints.

    \n
  • \n
\n \n

Global Accelerator is a global service that supports endpoints in multiple Amazon Web Services Regions but you must specify the \n\t\t \tUS West (Oregon) Region to create, update, or otherwise work with accelerators. That is, for example, specify --region us-west-2\n\t\t \ton Amazon Web Services CLI commands.

\n
\n

By default, Global Accelerator provides you with static IP addresses that you associate with your accelerator. The static IP addresses \n\t\t\tare anycast from the Amazon Web Services edge network. For IPv4, Global Accelerator provides two static IPv4 addresses. For dual-stack,\n\t\t\tGlobal Accelerator provides a total of four addresses: two static IPv4 addresses and two static IPv6 addresses. \n\t\t\tWith a standard accelerator for IPv4, instead of using the addresses that Global Accelerator provides, you can configure \n\t\t\tthese entry points to be IPv4 addresses from your own IP address ranges that you bring to Global Accelerator (BYOIP).

\n

For a standard accelerator, \n\t they distribute incoming application traffic across multiple endpoint resources in multiple Amazon Web Services Regions , which increases \n\t\t\tthe availability of your applications. Endpoints for standard accelerators can be Network Load Balancers, Application Load Balancers, \n\t \tAmazon EC2 instances, or Elastic IP addresses that are located in one Amazon Web Services Region or multiple Amazon Web Services Regions. For custom routing\n\t accelerators, you map traffic that arrives to the static IP addresses to specific Amazon EC2 servers in endpoints that\n\t\t\tare virtual private cloud (VPC) subnets.

\n \n

The static IP addresses remain assigned to your accelerator for as long as it exists, even if you\n\t\t\t\tdisable the accelerator and it no longer accepts or routes traffic. However, when you\n\t\t\t\t\tdelete an accelerator, you lose the static IP addresses that\n\t\t\t\tare assigned to it, so you can no longer route traffic by using them. You can use\n\t\t\t\tIAM policies like tag-based permissions with Global Accelerator to limit the users who have\n\t\t\t\tpermissions to delete an accelerator. For more information, see Tag-based policies.

\n
\n

For standard accelerators, Global Accelerator uses the Amazon Web Services global network to route traffic to the optimal regional endpoint based\n\t\t\ton health, client location, and policies that you configure. The service reacts instantly to\n\t\t\tchanges in health or configuration to ensure that internet traffic from clients is always\n\t\t\tdirected to healthy endpoints.

\n

For more information about understanding and using Global Accelerator, see the\n\t\t\tGlobal Accelerator Developer Guide.

", "smithy.api#title": "AWS Global Accelerator", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -3924,6 +4255,207 @@ "smithy.api#output": {} } }, + "com.amazonaws.globalaccelerator#ListCrossAccountAttachments": { + "type": "operation", + "input": { + "target": "com.amazonaws.globalaccelerator#ListCrossAccountAttachmentsRequest" + }, + "output": { + "target": "com.amazonaws.globalaccelerator#ListCrossAccountAttachmentsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.globalaccelerator#AccessDeniedException" + }, + { + "target": "com.amazonaws.globalaccelerator#InternalServiceErrorException" + }, + { + "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + }, + { + "target": "com.amazonaws.globalaccelerator#InvalidNextTokenException" + } + ], + "traits": { + "smithy.api#documentation": "

List the cross-account attachments that have been created in Global Accelerator.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "CrossAccountAttachments", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.globalaccelerator#ListCrossAccountAttachmentsRequest": { + "type": "structure", + "members": { + "MaxResults": { + "target": "com.amazonaws.globalaccelerator#MaxResults", + "traits": { + "smithy.api#documentation": "

The number of cross-account attachment objects that you want to return with this call. The default value is 10.

" + } + }, + "NextToken": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. You receive this token from a previous call.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.globalaccelerator#ListCrossAccountAttachmentsResponse": { + "type": "structure", + "members": { + "CrossAccountAttachments": { + "target": "com.amazonaws.globalaccelerator#Attachments", + "traits": { + "smithy.api#documentation": "

Information about the cross-account attachments.

" + } + }, + "NextToken": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. You receive this token from a previous call.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.globalaccelerator#ListCrossAccountResourceAccounts": { + "type": "operation", + "input": { + "target": "com.amazonaws.globalaccelerator#ListCrossAccountResourceAccountsRequest" + }, + "output": { + "target": "com.amazonaws.globalaccelerator#ListCrossAccountResourceAccountsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.globalaccelerator#AccessDeniedException" + }, + { + "target": "com.amazonaws.globalaccelerator#InternalServiceErrorException" + } + ], + "traits": { + "smithy.api#documentation": "

List the accounts that have cross-account endpoints.

" + } + }, + "com.amazonaws.globalaccelerator#ListCrossAccountResourceAccountsRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.globalaccelerator#ListCrossAccountResourceAccountsResponse": { + "type": "structure", + "members": { + "ResourceOwnerAwsAccountIds": { + "target": "com.amazonaws.globalaccelerator#AwsAccountIds", + "traits": { + "smithy.api#documentation": "

The account IDs of principals (resource owners) in a cross-account attachment who can add endpoints (resources) listed\n\t\t\tin the same attachment.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.globalaccelerator#ListCrossAccountResources": { + "type": "operation", + "input": { + "target": "com.amazonaws.globalaccelerator#ListCrossAccountResourcesRequest" + }, + "output": { + "target": "com.amazonaws.globalaccelerator#ListCrossAccountResourcesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.globalaccelerator#AcceleratorNotFoundException" + }, + { + "target": "com.amazonaws.globalaccelerator#AccessDeniedException" + }, + { + "target": "com.amazonaws.globalaccelerator#InternalServiceErrorException" + }, + { + "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + }, + { + "target": "com.amazonaws.globalaccelerator#InvalidNextTokenException" + } + ], + "traits": { + "smithy.api#documentation": "

List the cross-account endpoints available to add to an accelerator.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "CrossAccountResources", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.globalaccelerator#ListCrossAccountResourcesRequest": { + "type": "structure", + "members": { + "AcceleratorArn": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an accelerator in a cross-account attachment.

" + } + }, + "ResourceOwnerAwsAccountId": { + "target": "com.amazonaws.globalaccelerator#AwsAccountId", + "traits": { + "smithy.api#documentation": "

The account ID of a resource owner in a cross-account attachment.

", + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.globalaccelerator#MaxResults", + "traits": { + "smithy.api#documentation": "

The number of cross-account endpoints objects that you want to return with this call. The default value is 10.

" + } + }, + "NextToken": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. You receive this token from a previous call.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.globalaccelerator#ListCrossAccountResourcesResponse": { + "type": "structure", + "members": { + "CrossAccountResources": { + "target": "com.amazonaws.globalaccelerator#CrossAccountResources", + "traits": { + "smithy.api#documentation": "

The endpoints attached to an accelerator in a cross-account attachment.

" + } + }, + "NextToken": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. You receive this token from a previous call.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.globalaccelerator#ListCustomRoutingAccelerators": { "type": "operation", "input": { @@ -4727,6 +5259,22 @@ } } }, + "com.amazonaws.globalaccelerator#Principal": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^(^\\d{12}$|arn:.*)$" + } + }, + "com.amazonaws.globalaccelerator#Principals": { + "type": "list", + "member": { + "target": "com.amazonaws.globalaccelerator#Principal" + } + }, "com.amazonaws.globalaccelerator#Protocol": { "type": "enum", "members": { @@ -4920,6 +5468,27 @@ "smithy.api#input": {} } }, + "com.amazonaws.globalaccelerator#Resource": { + "type": "structure", + "members": { + "EndpointId": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The endpoint ID for the endpoint (Amazon Web Services resource).

", + "smithy.api#required": {} + } + }, + "Region": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services Region where a resource is located.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An Amazon Web Services resource that is supported by Global Accelerator and can be added as an endpoint for an accelerator.

" + } + }, "com.amazonaws.globalaccelerator#ResourceArn": { "type": "string", "traits": { @@ -4929,6 +5498,12 @@ } } }, + "com.amazonaws.globalaccelerator#Resources": { + "type": "list", + "member": { + "target": "com.amazonaws.globalaccelerator#Resource" + } + }, "com.amazonaws.globalaccelerator#SocketAddress": { "type": "structure", "members": { @@ -5297,6 +5872,97 @@ "smithy.api#output": {} } }, + "com.amazonaws.globalaccelerator#UpdateCrossAccountAttachment": { + "type": "operation", + "input": { + "target": "com.amazonaws.globalaccelerator#UpdateCrossAccountAttachmentRequest" + }, + "output": { + "target": "com.amazonaws.globalaccelerator#UpdateCrossAccountAttachmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.globalaccelerator#AccessDeniedException" + }, + { + "target": "com.amazonaws.globalaccelerator#AttachmentNotFoundException" + }, + { + "target": "com.amazonaws.globalaccelerator#InternalServiceErrorException" + }, + { + "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + }, + { + "target": "com.amazonaws.globalaccelerator#LimitExceededException" + }, + { + "target": "com.amazonaws.globalaccelerator#TransactionInProgressException" + } + ], + "traits": { + "smithy.api#documentation": "

Update a cross-account attachment to add or remove principals or resources. When you update \n\t\t\tan attachment to remove a principal (account ID or accelerator) or a resource, Global Accelerator \n\t\t\trevokes the permission for specific resources by doing the following:

\n
    \n
  • \n

    If the principal is an account ID, Global Accelerator reviews every accelerator in the account\n\t\t\t\tand removes cross-account endpoints from all accelerators.

    \n
  • \n
  • \n

    If the principal is an accelerator, Global Accelerator reviews just that accelerator\n\t\t\t\tand removes cross-account endpoints from it.

    \n
  • \n
\n

If there are overlapping permissions provided by multiple cross-account attachments,\n\t\t\tGlobal Accelerator only removes endpoints if there are no current cross-account attachments that provide\n\t\t\taccess permission. For example, if you delete a cross-account attachment that lists an\n\t\t\taccelerator as a principal, but another cross-account attachment includes the account ID\n\t\t\tthat owns that accelerator, endpoints will not be removed from the accelerator.

" + } + }, + "com.amazonaws.globalaccelerator#UpdateCrossAccountAttachmentRequest": { + "type": "structure", + "members": { + "AttachmentArn": { + "target": "com.amazonaws.globalaccelerator#GenericString", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the cross-account attachment to update.

", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.globalaccelerator#AttachmentName", + "traits": { + "smithy.api#documentation": "

The name of the cross-account attachment.

" + } + }, + "AddPrincipals": { + "target": "com.amazonaws.globalaccelerator#Principals", + "traits": { + "smithy.api#documentation": "

The principals to add to the cross-account attachment. A principal is an account or the Amazon Resource Name (ARN)\n\t\t\tof an accelerator that the attachment gives permission to add the resources from another account, listed in the attachment.

\n

To add more than one principal, separate the account numbers or accelerator ARNs, or both, with commas.

" + } + }, + "RemovePrincipals": { + "target": "com.amazonaws.globalaccelerator#Principals", + "traits": { + "smithy.api#documentation": "

The principals to remove from the cross-account attachment. A principal is an account or the Amazon Resource Name (ARN)\n\t\t\tof an accelerator that is given permission to add the resources from another account, listed in the cross-account attachment.

\n

To remove more than one principal, separate the account numbers or accelerator ARNs, or both, with commas.

" + } + }, + "AddResources": { + "target": "com.amazonaws.globalaccelerator#Resources", + "traits": { + "smithy.api#documentation": "

The resources to add to the cross-account attachment. A resource listed in a cross-account attachment can be added\n\t\t\tto an accelerator by the principals that are listed in the attachment.

\n

To add more than one resource, separate the resource ARNs with commas.

" + } + }, + "RemoveResources": { + "target": "com.amazonaws.globalaccelerator#Resources", + "traits": { + "smithy.api#documentation": "

The resources to remove from the cross-account attachment. A resource listed in a cross-account attachment can be added\n\t\t\tto an accelerator fy principals that are listed in the cross-account attachment.

\n

To remove more than one resource, separate the resource ARNs with commas.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.globalaccelerator#UpdateCrossAccountAttachmentResponse": { + "type": "structure", + "members": { + "CrossAccountAttachment": { + "target": "com.amazonaws.globalaccelerator#Attachment", + "traits": { + "smithy.api#documentation": "

Information about the updated cross-account attachment.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.globalaccelerator#UpdateCustomRoutingAccelerator": { "type": "operation", "input": {