Skip to content

Commit 2320c7c

Browse files
author
awstools
committed
feat(client-application-insights): Automate attaching managed policies
1 parent df2f16b commit 2320c7c

9 files changed

+67
-0
lines changed

Diff for: clients/client-application-insights/src/commands/CreateApplicationCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
6262
* AutoConfigEnabled: true || false,
6363
* AutoCreate: true || false,
6464
* GroupingType: "ACCOUNT_BASED",
65+
* AttachMissingPermission: true || false,
6566
* };
6667
* const command = new CreateApplicationCommand(input);
6768
* const response = await client.send(command);
@@ -76,6 +77,7 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
7677
* // Remarks: "STRING_VALUE",
7778
* // AutoConfigEnabled: true || false,
7879
* // DiscoveryType: "RESOURCE_GROUP_BASED" || "ACCOUNT_BASED",
80+
* // AttachMissingPermission: true || false,
7981
* // },
8082
* // };
8183
*

Diff for: clients/client-application-insights/src/commands/DescribeApplicationCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface DescribeApplicationCommandOutput extends DescribeApplicationRes
6565
* // Remarks: "STRING_VALUE",
6666
* // AutoConfigEnabled: true || false,
6767
* // DiscoveryType: "RESOURCE_GROUP_BASED" || "ACCOUNT_BASED",
68+
* // AttachMissingPermission: true || false,
6869
* // },
6970
* // };
7071
*

Diff for: clients/client-application-insights/src/commands/DescribeComponentConfigurationRecommendationCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export interface DescribeComponentConfigurationRecommendationCommandOutput
6161
* ResourceGroupName: "STRING_VALUE", // required
6262
* ComponentName: "STRING_VALUE", // required
6363
* Tier: "CUSTOM" || "DEFAULT" || "DOT_NET_CORE" || "DOT_NET_WORKER" || "DOT_NET_WEB_TIER" || "DOT_NET_WEB" || "SQL_SERVER" || "SQL_SERVER_ALWAYSON_AVAILABILITY_GROUP" || "MYSQL" || "POSTGRESQL" || "JAVA_JMX" || "ORACLE" || "SAP_HANA_MULTI_NODE" || "SAP_HANA_SINGLE_NODE" || "SAP_HANA_HIGH_AVAILABILITY" || "SQL_SERVER_FAILOVER_CLUSTER_INSTANCE" || "SHAREPOINT" || "ACTIVE_DIRECTORY" || "SAP_NETWEAVER_STANDARD" || "SAP_NETWEAVER_DISTRIBUTED" || "SAP_NETWEAVER_HIGH_AVAILABILITY", // required
64+
* WorkloadName: "STRING_VALUE",
6465
* RecommendationType: "INFRA_ONLY" || "WORKLOAD_ONLY" || "ALL",
6566
* };
6667
* const command = new DescribeComponentConfigurationRecommendationCommand(input);

Diff for: clients/client-application-insights/src/commands/ListApplicationsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export interface ListApplicationsCommandOutput extends ListApplicationsResponse,
6767
* // Remarks: "STRING_VALUE",
6868
* // AutoConfigEnabled: true || false,
6969
* // DiscoveryType: "RESOURCE_GROUP_BASED" || "ACCOUNT_BASED",
70+
* // AttachMissingPermission: true || false,
7071
* // },
7172
* // ],
7273
* // NextToken: "STRING_VALUE",

Diff for: clients/client-application-insights/src/commands/UpdateApplicationCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export interface UpdateApplicationCommandOutput extends UpdateApplicationRespons
5555
* OpsItemSNSTopicArn: "STRING_VALUE",
5656
* RemoveSNSTopic: true || false,
5757
* AutoConfigEnabled: true || false,
58+
* AttachMissingPermission: true || false,
5859
* };
5960
* const command = new UpdateApplicationCommand(input);
6061
* const response = await client.send(command);
@@ -69,6 +70,7 @@ export interface UpdateApplicationCommandOutput extends UpdateApplicationRespons
6970
* // Remarks: "STRING_VALUE",
7071
* // AutoConfigEnabled: true || false,
7172
* // DiscoveryType: "RESOURCE_GROUP_BASED" || "ACCOUNT_BASED",
73+
* // AttachMissingPermission: true || false,
7274
* // },
7375
* // };
7476
*

Diff for: clients/client-application-insights/src/commands/UpdateComponentConfigurationCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ export interface UpdateComponentConfigurationCommandOutput
7878
* @throws {@link InternalServerException} (server fault)
7979
* <p>The server encountered an internal error and is unable to complete the request.</p>
8080
*
81+
* @throws {@link ResourceInUseException} (client fault)
82+
* <p>The resource is already created or in use.</p>
83+
*
8184
* @throws {@link ResourceNotFoundException} (client fault)
8285
* <p>The resource does not exist in the customer account.</p>
8386
*

Diff for: clients/client-application-insights/src/models/models_0.ts

+24
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,12 @@ export interface ApplicationInfo {
360360
* <p> The method used by Application Insights to onboard your resources. </p>
361361
*/
362362
DiscoveryType?: DiscoveryType;
363+
364+
/**
365+
* @public
366+
* <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
367+
*/
368+
AttachMissingPermission?: boolean;
363369
}
364370

365371
/**
@@ -607,6 +613,12 @@ export interface CreateApplicationRequest {
607613
* parameter to <code>ACCOUNT_BASED</code>. </p>
608614
*/
609615
GroupingType?: GroupingType;
616+
617+
/**
618+
* @public
619+
* <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
620+
*/
621+
AttachMissingPermission?: boolean;
610622
}
611623

612624
/**
@@ -1000,6 +1012,12 @@ export interface DescribeComponentConfigurationRecommendationRequest {
10001012
*/
10011013
Tier: Tier | undefined;
10021014

1015+
/**
1016+
* @public
1017+
* <p>The name of the workload.</p>
1018+
*/
1019+
WorkloadName?: string;
1020+
10031021
/**
10041022
* @public
10051023
* <p>The recommended configuration type.</p>
@@ -2358,6 +2376,12 @@ export interface UpdateApplicationRequest {
23582376
* <p> Turns auto-configuration on or off. </p>
23592377
*/
23602378
AutoConfigEnabled?: boolean;
2379+
2380+
/**
2381+
* @public
2382+
* <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
2383+
*/
2384+
AttachMissingPermission?: boolean;
23612385
}
23622386

23632387
/**

Diff for: clients/client-application-insights/src/protocols/Aws_json1_1.ts

+3
Original file line numberDiff line numberDiff line change
@@ -2125,6 +2125,9 @@ const de_UpdateComponentConfigurationCommandError = async (
21252125
case "InternalServerException":
21262126
case "com.amazonaws.applicationinsights#InternalServerException":
21272127
throw await de_InternalServerExceptionRes(parsedOutput, context);
2128+
case "ResourceInUseException":
2129+
case "com.amazonaws.applicationinsights#ResourceInUseException":
2130+
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
21282131
case "ResourceNotFoundException":
21292132
case "com.amazonaws.applicationinsights#ResourceNotFoundException":
21302133
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);

Diff for: codegen/sdk-codegen/aws-models/application-insights.json

+30
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,12 @@
256256
"traits": {
257257
"smithy.api#documentation": "<p> The method used by Application Insights to onboard your resources. </p>"
258258
}
259+
},
260+
"AttachMissingPermission": {
261+
"target": "com.amazonaws.applicationinsights#AttachMissingPermission",
262+
"traits": {
263+
"smithy.api#documentation": "<p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>"
264+
}
259265
}
260266
},
261267
"traits": {
@@ -268,6 +274,9 @@
268274
"target": "com.amazonaws.applicationinsights#ApplicationInfo"
269275
}
270276
},
277+
"com.amazonaws.applicationinsights#AttachMissingPermission": {
278+
"type": "boolean"
279+
},
271280
"com.amazonaws.applicationinsights#AutoConfigEnabled": {
272281
"type": "boolean"
273282
},
@@ -572,6 +581,12 @@
572581
"traits": {
573582
"smithy.api#documentation": "<p>Application Insights can create applications based on a resource group or on an account.\n To create an account-based application using all of the resources in the account, set this\n parameter to <code>ACCOUNT_BASED</code>. </p>"
574583
}
584+
},
585+
"AttachMissingPermission": {
586+
"target": "com.amazonaws.applicationinsights#AttachMissingPermission",
587+
"traits": {
588+
"smithy.api#documentation": "<p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>"
589+
}
575590
}
576591
},
577592
"traits": {
@@ -1067,6 +1082,12 @@
10671082
"smithy.api#required": {}
10681083
}
10691084
},
1085+
"WorkloadName": {
1086+
"target": "com.amazonaws.applicationinsights#WorkloadName",
1087+
"traits": {
1088+
"smithy.api#documentation": "<p>The name of the workload.</p>"
1089+
}
1090+
},
10701091
"RecommendationType": {
10711092
"target": "com.amazonaws.applicationinsights#RecommendationType",
10721093
"traits": {
@@ -4694,6 +4715,12 @@
46944715
"traits": {
46954716
"smithy.api#documentation": "<p> Turns auto-configuration on or off. </p>"
46964717
}
4718+
},
4719+
"AttachMissingPermission": {
4720+
"target": "com.amazonaws.applicationinsights#AttachMissingPermission",
4721+
"traits": {
4722+
"smithy.api#documentation": "<p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>"
4723+
}
46974724
}
46984725
},
46994726
"traits": {
@@ -4752,6 +4779,9 @@
47524779
{
47534780
"target": "com.amazonaws.applicationinsights#InternalServerException"
47544781
},
4782+
{
4783+
"target": "com.amazonaws.applicationinsights#ResourceInUseException"
4784+
},
47554785
{
47564786
"target": "com.amazonaws.applicationinsights#ResourceNotFoundException"
47574787
},

0 commit comments

Comments
 (0)