Skip to main content

applications

Creates, updates, deletes, gets or lists an applications resource.

Overview

Nameapplications
TypeResource
Idaws.application_insights.applications

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe Amazon Web Services account ID for the owner of the application. (pattern: <code>^\d{12}$</code>)
attach_missing_permissionbooleanIf set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.
auto_config_enabledbooleanIndicates whether auto-configuration is turned on for this application.
cwe_monitor_enabledbooleanIndicates whether Application Insights can listen to CloudWatch events for the application resources, such as instance terminated, failed deployment, and others.
discovery_typestringThe method used by Application Insights to onboard your resources. (RESOURCE_GROUP_BASED, ACCOUNT_BASED)
life_cyclestringThe lifecycle of the application.
ops_center_enabledbooleanIndicates whether Application Insights will create opsItems for any problem detected by Application Insights for an application.
ops_item_sns_topic_arnstringThe SNS topic provided to Application Insights that is associated to the created opsItems to receive SNS notifications for opsItem updates. (pattern: <code>^arn:aws(-\w+):[\w\d-]+:([\w\d-])?:[\w\d_-]([:/].+)$</code>)
remarksstringThe issues on the user side that block Application Insights from successfully monitoring an application. Example remarks include: “Configuring application, detected 1 Errors, 3 Warnings” “Configuring application, detected 1 Unconfigured Components”
resource_group_namestringThe name of the resource group used for the application. (pattern: <code>[a-zA-Z0-9.-_]*</code>)
sns_notification_arnstringThe SNS topic ARN that is associated with SNS notifications for updates or issues. (pattern: <code>^arn:aws(-\w+):[\w\d-]+:([\w\d-])?:[\w\d_-]([:/].+)$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_applicationselectregionDescribes the application.
list_applicationsselectregionLists the IDs of the applications that you are monitoring.
create_applicationinsertregionAdds an application that is created from a resource group.
update_applicationupdateregion, ResourceGroupNameUpdates the application.
delete_applicationdeleteregionRemoves the specified application from monitoring. Does not delete the application.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the application.

SELECT
account_id,
attach_missing_permission,
auto_config_enabled,
cwe_monitor_enabled,
discovery_type,
life_cycle,
ops_center_enabled,
ops_item_sns_topic_arn,
remarks,
resource_group_name,
sns_notification_arn
FROM aws.application_insights.applications
WHERE region = '{{ region }}' -- required
;

INSERT examples

Adds an application that is created from a resource group.

INSERT INTO aws.application_insights.applications (
ResourceGroupName,
OpsCenterEnabled,
CWEMonitorEnabled,
OpsItemSNSTopicArn,
SNSNotificationArn,
Tags,
AutoConfigEnabled,
AutoCreate,
GroupingType,
AttachMissingPermission,
region
)
SELECT
'{{ ResourceGroupName }}',
{{ OpsCenterEnabled }},
{{ CWEMonitorEnabled }},
'{{ OpsItemSNSTopicArn }}',
'{{ SNSNotificationArn }}',
'{{ Tags }}',
{{ AutoConfigEnabled }},
{{ AutoCreate }},
'{{ GroupingType }}',
{{ AttachMissingPermission }},
'{{ region }}'
RETURNING
application_info
;

UPDATE examples

Updates the application.

UPDATE aws.application_insights.applications
SET
ResourceGroupName = '{{ ResourceGroupName }}',
OpsCenterEnabled = {{ OpsCenterEnabled }},
CWEMonitorEnabled = {{ CWEMonitorEnabled }},
OpsItemSNSTopicArn = '{{ OpsItemSNSTopicArn }}',
SNSNotificationArn = '{{ SNSNotificationArn }}',
RemoveSNSTopic = {{ RemoveSNSTopic }},
AutoConfigEnabled = {{ AutoConfigEnabled }},
AttachMissingPermission = {{ AttachMissingPermission }}
WHERE
region = '{{ region }}' --required
AND ResourceGroupName = '{{ ResourceGroupName }}' --required
RETURNING
application_info;

DELETE examples

Removes the specified application from monitoring. Does not delete the application.

DELETE FROM aws.application_insights.applications
WHERE region = '{{ region }}' --required
;