Skip to content

Commit 8212786

Browse files
author
awstools
committed
feat(client-service-catalog-appregistry): This release adds support for tagged resource associations, which allows you to associate a group of resources with a defined resource tag key and value to the application.
1 parent 0528c9c commit 8212786

File tree

9 files changed

+1111
-258
lines changed

9 files changed

+1111
-258
lines changed

clients/client-service-catalog-appregistry/src/ServiceCatalogAppRegistry.ts

Lines changed: 101 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ import {
5656
GetAttributeGroupCommandInput,
5757
GetAttributeGroupCommandOutput,
5858
} from "./commands/GetAttributeGroupCommand";
59+
import {
60+
GetConfigurationCommand,
61+
GetConfigurationCommandInput,
62+
GetConfigurationCommandOutput,
63+
} from "./commands/GetConfigurationCommand";
5964
import {
6065
ListApplicationsCommand,
6166
ListApplicationsCommandInput,
@@ -86,6 +91,11 @@ import {
8691
ListTagsForResourceCommandInput,
8792
ListTagsForResourceCommandOutput,
8893
} from "./commands/ListTagsForResourceCommand";
94+
import {
95+
PutConfigurationCommand,
96+
PutConfigurationCommandInput,
97+
PutConfigurationCommandOutput,
98+
} from "./commands/PutConfigurationCommand";
8999
import {
90100
SyncResourceCommand,
91101
SyncResourceCommandInput,
@@ -470,6 +480,41 @@ export class ServiceCatalogAppRegistry extends ServiceCatalogAppRegistryClient {
470480
}
471481
}
472482

483+
/**
484+
* <p>
485+
* Retrieves a <code>TagKey</code> configuration
486+
* from an account.
487+
* </p>
488+
*/
489+
public getConfiguration(
490+
args: GetConfigurationCommandInput,
491+
options?: __HttpHandlerOptions
492+
): Promise<GetConfigurationCommandOutput>;
493+
public getConfiguration(
494+
args: GetConfigurationCommandInput,
495+
cb: (err: any, data?: GetConfigurationCommandOutput) => void
496+
): void;
497+
public getConfiguration(
498+
args: GetConfigurationCommandInput,
499+
options: __HttpHandlerOptions,
500+
cb: (err: any, data?: GetConfigurationCommandOutput) => void
501+
): void;
502+
public getConfiguration(
503+
args: GetConfigurationCommandInput,
504+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetConfigurationCommandOutput) => void),
505+
cb?: (err: any, data?: GetConfigurationCommandOutput) => void
506+
): Promise<GetConfigurationCommandOutput> | void {
507+
const command = new GetConfigurationCommand(args);
508+
if (typeof optionsOrCb === "function") {
509+
this.send(command, optionsOrCb);
510+
} else if (typeof cb === "function") {
511+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
512+
this.send(command, optionsOrCb || {}, cb);
513+
} else {
514+
return this.send(command, optionsOrCb);
515+
}
516+
}
517+
473518
/**
474519
* <p>Retrieves a list of all of your applications. Results are paginated.</p>
475520
*/
@@ -535,7 +580,27 @@ export class ServiceCatalogAppRegistry extends ServiceCatalogAppRegistryClient {
535580
}
536581

537582
/**
538-
* <p>Lists all resources that are associated with specified application. Results are paginated.</p>
583+
* <p>
584+
* Lists all
585+
* of the resources
586+
* that are associated
587+
* with the specified application.
588+
* Results are paginated.
589+
* </p>
590+
* <note>
591+
* <p>
592+
* If you share an application,
593+
* and a consumer account associates a tag query
594+
* to the application,
595+
* all of the users
596+
* who can access the application
597+
* can also view the tag values
598+
* in all accounts
599+
* that are associated
600+
* with it
601+
* using this API.
602+
* </p>
603+
* </note>
539604
*/
540605
public listAssociatedResources(
541606
args: ListAssociatedResourcesCommandInput,
@@ -662,6 +727,41 @@ export class ServiceCatalogAppRegistry extends ServiceCatalogAppRegistryClient {
662727
}
663728
}
664729

730+
/**
731+
* <p>
732+
* Associates a <code>TagKey</code> configuration
733+
* to an account.
734+
* </p>
735+
*/
736+
public putConfiguration(
737+
args: PutConfigurationCommandInput,
738+
options?: __HttpHandlerOptions
739+
): Promise<PutConfigurationCommandOutput>;
740+
public putConfiguration(
741+
args: PutConfigurationCommandInput,
742+
cb: (err: any, data?: PutConfigurationCommandOutput) => void
743+
): void;
744+
public putConfiguration(
745+
args: PutConfigurationCommandInput,
746+
options: __HttpHandlerOptions,
747+
cb: (err: any, data?: PutConfigurationCommandOutput) => void
748+
): void;
749+
public putConfiguration(
750+
args: PutConfigurationCommandInput,
751+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutConfigurationCommandOutput) => void),
752+
cb?: (err: any, data?: PutConfigurationCommandOutput) => void
753+
): Promise<PutConfigurationCommandOutput> | void {
754+
const command = new PutConfigurationCommand(args);
755+
if (typeof optionsOrCb === "function") {
756+
this.send(command, optionsOrCb);
757+
} else if (typeof cb === "function") {
758+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
759+
this.send(command, optionsOrCb || {}, cb);
760+
} else {
761+
return this.send(command, optionsOrCb);
762+
}
763+
}
764+
665765
/**
666766
* <p>Syncs the resource with current AppRegistry records.</p>
667767
* <p>Specifically, the resource’s AppRegistry system tags sync with its associated application. We remove the resource's AppRegistry system tags if it does not associate with the application. The caller must have permissions to read and update the resource.</p>

clients/client-service-catalog-appregistry/src/ServiceCatalogAppRegistryClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ import {
7676
GetAssociatedResourceCommandOutput,
7777
} from "./commands/GetAssociatedResourceCommand";
7878
import { GetAttributeGroupCommandInput, GetAttributeGroupCommandOutput } from "./commands/GetAttributeGroupCommand";
79+
import { GetConfigurationCommandInput, GetConfigurationCommandOutput } from "./commands/GetConfigurationCommand";
7980
import { ListApplicationsCommandInput, ListApplicationsCommandOutput } from "./commands/ListApplicationsCommand";
8081
import {
8182
ListAssociatedAttributeGroupsCommandInput,
@@ -97,6 +98,7 @@ import {
9798
ListTagsForResourceCommandInput,
9899
ListTagsForResourceCommandOutput,
99100
} from "./commands/ListTagsForResourceCommand";
101+
import { PutConfigurationCommandInput, PutConfigurationCommandOutput } from "./commands/PutConfigurationCommand";
100102
import { SyncResourceCommandInput, SyncResourceCommandOutput } from "./commands/SyncResourceCommand";
101103
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
102104
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
@@ -125,12 +127,14 @@ export type ServiceInputTypes =
125127
| GetApplicationCommandInput
126128
| GetAssociatedResourceCommandInput
127129
| GetAttributeGroupCommandInput
130+
| GetConfigurationCommandInput
128131
| ListApplicationsCommandInput
129132
| ListAssociatedAttributeGroupsCommandInput
130133
| ListAssociatedResourcesCommandInput
131134
| ListAttributeGroupsCommandInput
132135
| ListAttributeGroupsForApplicationCommandInput
133136
| ListTagsForResourceCommandInput
137+
| PutConfigurationCommandInput
134138
| SyncResourceCommandInput
135139
| TagResourceCommandInput
136140
| UntagResourceCommandInput
@@ -149,12 +153,14 @@ export type ServiceOutputTypes =
149153
| GetApplicationCommandOutput
150154
| GetAssociatedResourceCommandOutput
151155
| GetAttributeGroupCommandOutput
156+
| GetConfigurationCommandOutput
152157
| ListApplicationsCommandOutput
153158
| ListAssociatedAttributeGroupsCommandOutput
154159
| ListAssociatedResourcesCommandOutput
155160
| ListAttributeGroupsCommandOutput
156161
| ListAttributeGroupsForApplicationCommandOutput
157162
| ListTagsForResourceCommandOutput
163+
| PutConfigurationCommandOutput
158164
| SyncResourceCommandOutput
159165
| TagResourceCommandOutput
160166
| UntagResourceCommandOutput
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
3+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
4+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
5+
import { Command as $Command } from "@aws-sdk/smithy-client";
6+
import {
7+
FinalizeHandlerArguments,
8+
Handler,
9+
HandlerExecutionContext,
10+
HttpHandlerOptions as __HttpHandlerOptions,
11+
MetadataBearer as __MetadataBearer,
12+
MiddlewareStack,
13+
SerdeContext as __SerdeContext,
14+
} from "@aws-sdk/types";
15+
16+
import { GetConfigurationResponse, GetConfigurationResponseFilterSensitiveLog } from "../models/models_0";
17+
import {
18+
deserializeAws_restJson1GetConfigurationCommand,
19+
serializeAws_restJson1GetConfigurationCommand,
20+
} from "../protocols/Aws_restJson1";
21+
import {
22+
ServiceCatalogAppRegistryClientResolvedConfig,
23+
ServiceInputTypes,
24+
ServiceOutputTypes,
25+
} from "../ServiceCatalogAppRegistryClient";
26+
27+
export interface GetConfigurationCommandInput {}
28+
export interface GetConfigurationCommandOutput extends GetConfigurationResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>
32+
* Retrieves a <code>TagKey</code> configuration
33+
* from an account.
34+
* </p>
35+
* @example
36+
* Use a bare-bones client and the command you need to make an API call.
37+
* ```javascript
38+
* import { ServiceCatalogAppRegistryClient, GetConfigurationCommand } from "@aws-sdk/client-service-catalog-appregistry"; // ES Modules import
39+
* // const { ServiceCatalogAppRegistryClient, GetConfigurationCommand } = require("@aws-sdk/client-service-catalog-appregistry"); // CommonJS import
40+
* const client = new ServiceCatalogAppRegistryClient(config);
41+
* const command = new GetConfigurationCommand(input);
42+
* const response = await client.send(command);
43+
* ```
44+
*
45+
* @see {@link GetConfigurationCommandInput} for command's `input` shape.
46+
* @see {@link GetConfigurationCommandOutput} for command's `response` shape.
47+
* @see {@link ServiceCatalogAppRegistryClientResolvedConfig | config} for ServiceCatalogAppRegistryClient's `config` shape.
48+
*
49+
*/
50+
export class GetConfigurationCommand extends $Command<
51+
GetConfigurationCommandInput,
52+
GetConfigurationCommandOutput,
53+
ServiceCatalogAppRegistryClientResolvedConfig
54+
> {
55+
// Start section: command_properties
56+
// End section: command_properties
57+
58+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
59+
return {
60+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
61+
Endpoint: { type: "builtInParams", name: "endpoint" },
62+
Region: { type: "builtInParams", name: "region" },
63+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
64+
};
65+
}
66+
67+
constructor(readonly input: GetConfigurationCommandInput) {
68+
// Start section: command_constructor
69+
super();
70+
// End section: command_constructor
71+
}
72+
73+
/**
74+
* @internal
75+
*/
76+
resolveMiddleware(
77+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
78+
configuration: ServiceCatalogAppRegistryClientResolvedConfig,
79+
options?: __HttpHandlerOptions
80+
): Handler<GetConfigurationCommandInput, GetConfigurationCommandOutput> {
81+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
82+
this.middlewareStack.use(
83+
getEndpointPlugin(configuration, GetConfigurationCommand.getEndpointParameterInstructions())
84+
);
85+
86+
const stack = clientStack.concat(this.middlewareStack);
87+
88+
const { logger } = configuration;
89+
const clientName = "ServiceCatalogAppRegistryClient";
90+
const commandName = "GetConfigurationCommand";
91+
const handlerExecutionContext: HandlerExecutionContext = {
92+
logger,
93+
clientName,
94+
commandName,
95+
inputFilterSensitiveLog: (input: any) => input,
96+
outputFilterSensitiveLog: GetConfigurationResponseFilterSensitiveLog,
97+
};
98+
const { requestHandler } = configuration;
99+
return stack.resolve(
100+
(request: FinalizeHandlerArguments<any>) =>
101+
requestHandler.handle(request.request as __HttpRequest, options || {}),
102+
handlerExecutionContext
103+
);
104+
}
105+
106+
private serialize(input: GetConfigurationCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
107+
return serializeAws_restJson1GetConfigurationCommand(input, context);
108+
}
109+
110+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetConfigurationCommandOutput> {
111+
return deserializeAws_restJson1GetConfigurationCommand(output, context);
112+
}
113+
114+
// Start section: command_body_extra
115+
// End section: command_body_extra
116+
}

clients/client-service-catalog-appregistry/src/commands/ListAssociatedResourcesCommand.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,27 @@ export interface ListAssociatedResourcesCommandInput extends ListAssociatedResou
3333
export interface ListAssociatedResourcesCommandOutput extends ListAssociatedResourcesResponse, __MetadataBearer {}
3434

3535
/**
36-
* <p>Lists all resources that are associated with specified application. Results are paginated.</p>
36+
* <p>
37+
* Lists all
38+
* of the resources
39+
* that are associated
40+
* with the specified application.
41+
* Results are paginated.
42+
* </p>
43+
* <note>
44+
* <p>
45+
* If you share an application,
46+
* and a consumer account associates a tag query
47+
* to the application,
48+
* all of the users
49+
* who can access the application
50+
* can also view the tag values
51+
* in all accounts
52+
* that are associated
53+
* with it
54+
* using this API.
55+
* </p>
56+
* </note>
3757
* @example
3858
* Use a bare-bones client and the command you need to make an API call.
3959
* ```javascript

0 commit comments

Comments
 (0)