Skip to content

Commit 03773d1

Browse files
author
awstools
committed
feat(client-service-catalog-appregistry): This release adds a new API ListAttributeGroupsForApplication that returns associated attribute groups of an application. In addition, the UpdateApplication and UpdateAttributeGroup APIs will not allow users to update the 'Name' attribute.
1 parent 57980bd commit 03773d1

File tree

9 files changed

+600
-25
lines changed

9 files changed

+600
-25
lines changed

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

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ import {
7676
ListAttributeGroupsCommandInput,
7777
ListAttributeGroupsCommandOutput,
7878
} from "./commands/ListAttributeGroupsCommand";
79+
import {
80+
ListAttributeGroupsForApplicationCommand,
81+
ListAttributeGroupsForApplicationCommandInput,
82+
ListAttributeGroupsForApplicationCommandOutput,
83+
} from "./commands/ListAttributeGroupsForApplicationCommand";
7984
import {
8085
ListTagsForResourceCommand,
8186
ListTagsForResourceCommandInput,
@@ -593,6 +598,38 @@ export class ServiceCatalogAppRegistry extends ServiceCatalogAppRegistryClient {
593598
}
594599
}
595600

601+
/**
602+
* <p>Lists the details of all attribute groups associated with a specific application. The results display in pages.</p>
603+
*/
604+
public listAttributeGroupsForApplication(
605+
args: ListAttributeGroupsForApplicationCommandInput,
606+
options?: __HttpHandlerOptions
607+
): Promise<ListAttributeGroupsForApplicationCommandOutput>;
608+
public listAttributeGroupsForApplication(
609+
args: ListAttributeGroupsForApplicationCommandInput,
610+
cb: (err: any, data?: ListAttributeGroupsForApplicationCommandOutput) => void
611+
): void;
612+
public listAttributeGroupsForApplication(
613+
args: ListAttributeGroupsForApplicationCommandInput,
614+
options: __HttpHandlerOptions,
615+
cb: (err: any, data?: ListAttributeGroupsForApplicationCommandOutput) => void
616+
): void;
617+
public listAttributeGroupsForApplication(
618+
args: ListAttributeGroupsForApplicationCommandInput,
619+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListAttributeGroupsForApplicationCommandOutput) => void),
620+
cb?: (err: any, data?: ListAttributeGroupsForApplicationCommandOutput) => void
621+
): Promise<ListAttributeGroupsForApplicationCommandOutput> | void {
622+
const command = new ListAttributeGroupsForApplicationCommand(args);
623+
if (typeof optionsOrCb === "function") {
624+
this.send(command, optionsOrCb);
625+
} else if (typeof cb === "function") {
626+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
627+
this.send(command, optionsOrCb || {}, cb);
628+
} else {
629+
return this.send(command, optionsOrCb);
630+
}
631+
}
632+
596633
/**
597634
* <p>Lists all of the tags on the resource.</p>
598635
*/

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ import {
9595
ListAttributeGroupsCommandInput,
9696
ListAttributeGroupsCommandOutput,
9797
} from "./commands/ListAttributeGroupsCommand";
98+
import {
99+
ListAttributeGroupsForApplicationCommandInput,
100+
ListAttributeGroupsForApplicationCommandOutput,
101+
} from "./commands/ListAttributeGroupsForApplicationCommand";
98102
import {
99103
ListTagsForResourceCommandInput,
100104
ListTagsForResourceCommandOutput,
@@ -125,6 +129,7 @@ export type ServiceInputTypes =
125129
| ListAssociatedAttributeGroupsCommandInput
126130
| ListAssociatedResourcesCommandInput
127131
| ListAttributeGroupsCommandInput
132+
| ListAttributeGroupsForApplicationCommandInput
128133
| ListTagsForResourceCommandInput
129134
| SyncResourceCommandInput
130135
| TagResourceCommandInput
@@ -148,6 +153,7 @@ export type ServiceOutputTypes =
148153
| ListAssociatedAttributeGroupsCommandOutput
149154
| ListAssociatedResourcesCommandOutput
150155
| ListAttributeGroupsCommandOutput
156+
| ListAttributeGroupsForApplicationCommandOutput
151157
| ListTagsForResourceCommandOutput
152158
| SyncResourceCommandOutput
153159
| TagResourceCommandOutput
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
// smithy-typescript generated code
2+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import {
16+
ListAttributeGroupsForApplicationRequest,
17+
ListAttributeGroupsForApplicationResponse,
18+
} from "../models/models_0";
19+
import {
20+
deserializeAws_restJson1ListAttributeGroupsForApplicationCommand,
21+
serializeAws_restJson1ListAttributeGroupsForApplicationCommand,
22+
} from "../protocols/Aws_restJson1";
23+
import {
24+
ServiceCatalogAppRegistryClientResolvedConfig,
25+
ServiceInputTypes,
26+
ServiceOutputTypes,
27+
} from "../ServiceCatalogAppRegistryClient";
28+
29+
export interface ListAttributeGroupsForApplicationCommandInput extends ListAttributeGroupsForApplicationRequest {}
30+
export interface ListAttributeGroupsForApplicationCommandOutput
31+
extends ListAttributeGroupsForApplicationResponse,
32+
__MetadataBearer {}
33+
34+
/**
35+
* <p>Lists the details of all attribute groups associated with a specific application. The results display in pages.</p>
36+
* @example
37+
* Use a bare-bones client and the command you need to make an API call.
38+
* ```javascript
39+
* import { ServiceCatalogAppRegistryClient, ListAttributeGroupsForApplicationCommand } from "@aws-sdk/client-service-catalog-appregistry"; // ES Modules import
40+
* // const { ServiceCatalogAppRegistryClient, ListAttributeGroupsForApplicationCommand } = require("@aws-sdk/client-service-catalog-appregistry"); // CommonJS import
41+
* const client = new ServiceCatalogAppRegistryClient(config);
42+
* const command = new ListAttributeGroupsForApplicationCommand(input);
43+
* const response = await client.send(command);
44+
* ```
45+
*
46+
* @see {@link ListAttributeGroupsForApplicationCommandInput} for command's `input` shape.
47+
* @see {@link ListAttributeGroupsForApplicationCommandOutput} for command's `response` shape.
48+
* @see {@link ServiceCatalogAppRegistryClientResolvedConfig | config} for ServiceCatalogAppRegistryClient's `config` shape.
49+
*
50+
*/
51+
export class ListAttributeGroupsForApplicationCommand extends $Command<
52+
ListAttributeGroupsForApplicationCommandInput,
53+
ListAttributeGroupsForApplicationCommandOutput,
54+
ServiceCatalogAppRegistryClientResolvedConfig
55+
> {
56+
// Start section: command_properties
57+
// End section: command_properties
58+
59+
constructor(readonly input: ListAttributeGroupsForApplicationCommandInput) {
60+
// Start section: command_constructor
61+
super();
62+
// End section: command_constructor
63+
}
64+
65+
/**
66+
* @internal
67+
*/
68+
resolveMiddleware(
69+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
70+
configuration: ServiceCatalogAppRegistryClientResolvedConfig,
71+
options?: __HttpHandlerOptions
72+
): Handler<ListAttributeGroupsForApplicationCommandInput, ListAttributeGroupsForApplicationCommandOutput> {
73+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
74+
75+
const stack = clientStack.concat(this.middlewareStack);
76+
77+
const { logger } = configuration;
78+
const clientName = "ServiceCatalogAppRegistryClient";
79+
const commandName = "ListAttributeGroupsForApplicationCommand";
80+
const handlerExecutionContext: HandlerExecutionContext = {
81+
logger,
82+
clientName,
83+
commandName,
84+
inputFilterSensitiveLog: ListAttributeGroupsForApplicationRequest.filterSensitiveLog,
85+
outputFilterSensitiveLog: ListAttributeGroupsForApplicationResponse.filterSensitiveLog,
86+
};
87+
const { requestHandler } = configuration;
88+
return stack.resolve(
89+
(request: FinalizeHandlerArguments<any>) =>
90+
requestHandler.handle(request.request as __HttpRequest, options || {}),
91+
handlerExecutionContext
92+
);
93+
}
94+
95+
private serialize(
96+
input: ListAttributeGroupsForApplicationCommandInput,
97+
context: __SerdeContext
98+
): Promise<__HttpRequest> {
99+
return serializeAws_restJson1ListAttributeGroupsForApplicationCommand(input, context);
100+
}
101+
102+
private deserialize(
103+
output: __HttpResponse,
104+
context: __SerdeContext
105+
): Promise<ListAttributeGroupsForApplicationCommandOutput> {
106+
return deserializeAws_restJson1ListAttributeGroupsForApplicationCommand(output, context);
107+
}
108+
109+
// Start section: command_body_extra
110+
// End section: command_body_extra
111+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export * from "./ListApplicationsCommand";
1414
export * from "./ListAssociatedAttributeGroupsCommand";
1515
export * from "./ListAssociatedResourcesCommand";
1616
export * from "./ListAttributeGroupsCommand";
17+
export * from "./ListAttributeGroupsForApplicationCommand";
1718
export * from "./ListTagsForResourceCommand";
1819
export * from "./SyncResourceCommand";
1920
export * from "./TagResourceCommand";

clients/client-service-catalog-appregistry/src/models/models_0.ts

Lines changed: 100 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,26 @@ export namespace AssociateAttributeGroupResponse {
139139
});
140140
}
141141

142+
/**
143+
* <p>There was a conflict when processing the request (for example, a resource with the given name already
144+
* exists within the account).</p>
145+
*/
146+
export class ConflictException extends __BaseException {
147+
readonly name: "ConflictException" = "ConflictException";
148+
readonly $fault: "client" = "client";
149+
/**
150+
* @internal
151+
*/
152+
constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>) {
153+
super({
154+
name: "ConflictException",
155+
$fault: "client",
156+
...opts,
157+
});
158+
Object.setPrototypeOf(this, ConflictException.prototype);
159+
}
160+
}
161+
142162
/**
143163
* <p>The service is experiencing internal problems.</p>
144164
*/
@@ -266,26 +286,6 @@ export namespace AssociateResourceResponse {
266286
});
267287
}
268288

269-
/**
270-
* <p>There was a conflict when processing the request (for example, a resource with the given name already
271-
* exists within the account).</p>
272-
*/
273-
export class ConflictException extends __BaseException {
274-
readonly name: "ConflictException" = "ConflictException";
275-
readonly $fault: "client" = "client";
276-
/**
277-
* @internal
278-
*/
279-
constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>) {
280-
super({
281-
name: "ConflictException",
282-
$fault: "client",
283-
...opts,
284-
});
285-
Object.setPrototypeOf(this, ConflictException.prototype);
286-
}
287-
}
288-
289289
/**
290290
* <p>Represents a Amazon Web Services Service Catalog AppRegistry attribute group that is rich metadata which describes an application and its components.</p>
291291
*/
@@ -335,6 +335,35 @@ export namespace AttributeGroup {
335335
});
336336
}
337337

338+
/**
339+
* <p> The details related to a specific AttributeGroup. </p>
340+
*/
341+
export interface AttributeGroupDetails {
342+
/**
343+
* <p>The unique identifier of the attribute group.</p>
344+
*/
345+
id?: string;
346+
347+
/**
348+
* <p>The Amazon resource name (ARN) that specifies the attribute group.</p>
349+
*/
350+
arn?: string;
351+
352+
/**
353+
* <p>The name of the attribute group. </p>
354+
*/
355+
name?: string;
356+
}
357+
358+
export namespace AttributeGroupDetails {
359+
/**
360+
* @internal
361+
*/
362+
export const filterSensitiveLog = (obj: AttributeGroupDetails): any => ({
363+
...obj,
364+
});
365+
}
366+
338367
/**
339368
* <p>Summary of a Amazon Web Services Service Catalog AppRegistry attribute group.</p>
340369
*/
@@ -1143,6 +1172,53 @@ export namespace ListAttributeGroupsResponse {
11431172
});
11441173
}
11451174

1175+
export interface ListAttributeGroupsForApplicationRequest {
1176+
/**
1177+
* <p>The name or ID of the application.</p>
1178+
*/
1179+
application: string | undefined;
1180+
1181+
/**
1182+
* <p>This token retrieves the next page of results after a previous API call.</p>
1183+
*/
1184+
nextToken?: string;
1185+
1186+
/**
1187+
* <p>The upper bound of the number of results to return. The value cannot exceed 25. If you omit this parameter, it defaults to 25. This value is optional.</p>
1188+
*/
1189+
maxResults?: number;
1190+
}
1191+
1192+
export namespace ListAttributeGroupsForApplicationRequest {
1193+
/**
1194+
* @internal
1195+
*/
1196+
export const filterSensitiveLog = (obj: ListAttributeGroupsForApplicationRequest): any => ({
1197+
...obj,
1198+
});
1199+
}
1200+
1201+
export interface ListAttributeGroupsForApplicationResponse {
1202+
/**
1203+
* <p> The details related to a specific AttributeGroup. </p>
1204+
*/
1205+
attributeGroupsDetails?: AttributeGroupDetails[];
1206+
1207+
/**
1208+
* <p>The token to use to get the next page of results after a previous API call.</p>
1209+
*/
1210+
nextToken?: string;
1211+
}
1212+
1213+
export namespace ListAttributeGroupsForApplicationResponse {
1214+
/**
1215+
* @internal
1216+
*/
1217+
export const filterSensitiveLog = (obj: ListAttributeGroupsForApplicationResponse): any => ({
1218+
...obj,
1219+
});
1220+
}
1221+
11461222
export interface ListTagsForResourceRequest {
11471223
/**
11481224
* <p>The Amazon resource name (ARN) that specifies the resource.</p>
@@ -1300,7 +1376,8 @@ export interface UpdateApplicationRequest {
13001376
/**
13011377
* @deprecated
13021378
*
1303-
* <p>The new name of the application. The name must be unique in the region in which you are updating the application.</p>
1379+
* <p>Deprecated: The new name of the application. The name must be unique in the region in which you are
1380+
* updating the application. Please do not use this field as we have stopped supporting name updates.</p>
13041381
*/
13051382
name?: string;
13061383

@@ -1344,8 +1421,8 @@ export interface UpdateAttributeGroupRequest {
13441421
/**
13451422
* @deprecated
13461423
*
1347-
* <p>The new name of the attribute group. The name must be unique in the region in which you are
1348-
* updating the attribute group.</p>
1424+
* <p>Deprecated: The new name of the attribute group. The name must be unique in the region in which you are
1425+
* updating the attribute group. Please do not use this field as we have stopped supporting name updates.</p>
13491426
*/
13501427
name?: string;
13511428

0 commit comments

Comments
 (0)