Skip to content

Commit

Permalink
feat(client-application-insights): Automate attaching managed policies
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Oct 31, 2023
1 parent df2f16b commit 2320c7c
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
* AutoConfigEnabled: true || false,
* AutoCreate: true || false,
* GroupingType: "ACCOUNT_BASED",
* AttachMissingPermission: true || false,
* };
* const command = new CreateApplicationCommand(input);
* const response = await client.send(command);
Expand All @@ -76,6 +77,7 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
* // Remarks: "STRING_VALUE",
* // AutoConfigEnabled: true || false,
* // DiscoveryType: "RESOURCE_GROUP_BASED" || "ACCOUNT_BASED",
* // AttachMissingPermission: true || false,
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export interface DescribeApplicationCommandOutput extends DescribeApplicationRes
* // Remarks: "STRING_VALUE",
* // AutoConfigEnabled: true || false,
* // DiscoveryType: "RESOURCE_GROUP_BASED" || "ACCOUNT_BASED",
* // AttachMissingPermission: true || false,
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface DescribeComponentConfigurationRecommendationCommandOutput
* ResourceGroupName: "STRING_VALUE", // required
* ComponentName: "STRING_VALUE", // required
* 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
* WorkloadName: "STRING_VALUE",
* RecommendationType: "INFRA_ONLY" || "WORKLOAD_ONLY" || "ALL",
* };
* const command = new DescribeComponentConfigurationRecommendationCommand(input);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface ListApplicationsCommandOutput extends ListApplicationsResponse,
* // Remarks: "STRING_VALUE",
* // AutoConfigEnabled: true || false,
* // DiscoveryType: "RESOURCE_GROUP_BASED" || "ACCOUNT_BASED",
* // AttachMissingPermission: true || false,
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export interface UpdateApplicationCommandOutput extends UpdateApplicationRespons
* OpsItemSNSTopicArn: "STRING_VALUE",
* RemoveSNSTopic: true || false,
* AutoConfigEnabled: true || false,
* AttachMissingPermission: true || false,
* };
* const command = new UpdateApplicationCommand(input);
* const response = await client.send(command);
Expand All @@ -69,6 +70,7 @@ export interface UpdateApplicationCommandOutput extends UpdateApplicationRespons
* // Remarks: "STRING_VALUE",
* // AutoConfigEnabled: true || false,
* // DiscoveryType: "RESOURCE_GROUP_BASED" || "ACCOUNT_BASED",
* // AttachMissingPermission: true || false,
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export interface UpdateComponentConfigurationCommandOutput
* @throws {@link InternalServerException} (server fault)
* <p>The server encountered an internal error and is unable to complete the request.</p>
*
* @throws {@link ResourceInUseException} (client fault)
* <p>The resource is already created or in use.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The resource does not exist in the customer account.</p>
*
Expand Down
24 changes: 24 additions & 0 deletions clients/client-application-insights/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ export interface ApplicationInfo {
* <p> The method used by Application Insights to onboard your resources. </p>
*/
DiscoveryType?: DiscoveryType;

/**
* @public
* <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
*/
AttachMissingPermission?: boolean;
}

/**
Expand Down Expand Up @@ -607,6 +613,12 @@ export interface CreateApplicationRequest {
* parameter to <code>ACCOUNT_BASED</code>. </p>
*/
GroupingType?: GroupingType;

/**
* @public
* <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
*/
AttachMissingPermission?: boolean;
}

/**
Expand Down Expand Up @@ -1000,6 +1012,12 @@ export interface DescribeComponentConfigurationRecommendationRequest {
*/
Tier: Tier | undefined;

/**
* @public
* <p>The name of the workload.</p>
*/
WorkloadName?: string;

/**
* @public
* <p>The recommended configuration type.</p>
Expand Down Expand Up @@ -2358,6 +2376,12 @@ export interface UpdateApplicationRequest {
* <p> Turns auto-configuration on or off. </p>
*/
AutoConfigEnabled?: boolean;

/**
* @public
* <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
*/
AttachMissingPermission?: boolean;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,9 @@ const de_UpdateComponentConfigurationCommandError = async (
case "InternalServerException":
case "com.amazonaws.applicationinsights#InternalServerException":
throw await de_InternalServerExceptionRes(parsedOutput, context);
case "ResourceInUseException":
case "com.amazonaws.applicationinsights#ResourceInUseException":
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
case "ResourceNotFoundException":
case "com.amazonaws.applicationinsights#ResourceNotFoundException":
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
Expand Down
30 changes: 30 additions & 0 deletions codegen/sdk-codegen/aws-models/application-insights.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@
"traits": {
"smithy.api#documentation": "<p> The method used by Application Insights to onboard your resources. </p>"
}
},
"AttachMissingPermission": {
"target": "com.amazonaws.applicationinsights#AttachMissingPermission",
"traits": {
"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>"
}
}
},
"traits": {
Expand All @@ -268,6 +274,9 @@
"target": "com.amazonaws.applicationinsights#ApplicationInfo"
}
},
"com.amazonaws.applicationinsights#AttachMissingPermission": {
"type": "boolean"
},
"com.amazonaws.applicationinsights#AutoConfigEnabled": {
"type": "boolean"
},
Expand Down Expand Up @@ -572,6 +581,12 @@
"traits": {
"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>"
}
},
"AttachMissingPermission": {
"target": "com.amazonaws.applicationinsights#AttachMissingPermission",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down Expand Up @@ -1067,6 +1082,12 @@
"smithy.api#required": {}
}
},
"WorkloadName": {
"target": "com.amazonaws.applicationinsights#WorkloadName",
"traits": {
"smithy.api#documentation": "<p>The name of the workload.</p>"
}
},
"RecommendationType": {
"target": "com.amazonaws.applicationinsights#RecommendationType",
"traits": {
Expand Down Expand Up @@ -4694,6 +4715,12 @@
"traits": {
"smithy.api#documentation": "<p> Turns auto-configuration on or off. </p>"
}
},
"AttachMissingPermission": {
"target": "com.amazonaws.applicationinsights#AttachMissingPermission",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down Expand Up @@ -4752,6 +4779,9 @@
{
"target": "com.amazonaws.applicationinsights#InternalServerException"
},
{
"target": "com.amazonaws.applicationinsights#ResourceInUseException"
},
{
"target": "com.amazonaws.applicationinsights#ResourceNotFoundException"
},
Expand Down

0 comments on commit 2320c7c

Please sign in to comment.