applications
Creates, updates, deletes or gets an application resource or lists applications in a region
Overview
| Name | applications |
| Type | Resource |
| Description | Resource Type definition for AWS::ApplicationInsights::Application |
| Id | awscc.applicationinsights.applications |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the resource group. |
application_arn | string | The ARN of the ApplicationInsights application. |
cwe_monitor_enabled | boolean | Indicates whether Application Insights can listen to CloudWatch events for the application resources. |
ops_center_enabled | boolean | When set to true, creates opsItems for any problems detected on an application. |
ops_item_sns_topic_arn | string | The SNS topic provided to Application Insights that is associated to the created opsItem. |
sns_notification_arn | string | Application Insights sends notifications to this SNS topic whenever there is a problem update in the associated application. |
tags | array | The tags of Application Insights application. |
custom_components | array | The custom grouped components. |
log_pattern_sets | array | The log pattern sets. |
auto_configuration_enabled | boolean | If set to true, application will be configured with recommended monitoring configuration. |
component_monitoring_settings | array | The monitoring settings of the components. |
grouping_type | string | The grouping type of the application |
attach_missing_permission | boolean | If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
application_arn | string | The ARN of the ApplicationInsights application. |
region | string | AWS region. |
For more information, see AWS::ApplicationInsights::Application.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | applications | INSERT | ResourceGroupName, region |
delete_resource | applications | DELETE | Identifier, region |
update_resource | applications | UPDATE | Identifier, PatchDocument, region |
list_resources | applications_list_only | SELECT | region |
get_resource | applications | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual application.
SELECT
region,
resource_group_name,
application_arn,
cwe_monitor_enabled,
ops_center_enabled,
ops_item_sns_topic_arn,
sns_notification_arn,
tags,
custom_components,
log_pattern_sets,
auto_configuration_enabled,
component_monitoring_settings,
grouping_type,
attach_missing_permission
FROM awscc.applicationinsights.applications
WHERE
region = 'us-east-1' AND
Identifier = '{{ application_arn }}';
Lists all applications in a region.
SELECT
region,
application_arn
FROM awscc.applicationinsights.applications_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new application resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.applicationinsights.applications (
ResourceGroupName,
region
)
SELECT
'{{ resource_group_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.applicationinsights.applications (
ResourceGroupName,
CWEMonitorEnabled,
OpsCenterEnabled,
OpsItemSNSTopicArn,
SNSNotificationArn,
Tags,
CustomComponents,
LogPatternSets,
AutoConfigurationEnabled,
ComponentMonitoringSettings,
GroupingType,
AttachMissingPermission,
region
)
SELECT
'{{ resource_group_name }}',
'{{ cwe_monitor_enabled }}',
'{{ ops_center_enabled }}',
'{{ ops_item_sns_topic_arn }}',
'{{ sns_notification_arn }}',
'{{ tags }}',
'{{ custom_components }}',
'{{ log_pattern_sets }}',
'{{ auto_configuration_enabled }}',
'{{ component_monitoring_settings }}',
'{{ grouping_type }}',
'{{ attach_missing_permission }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: application
props:
- name: resource_group_name
value: '{{ resource_group_name }}'
- name: cwe_monitor_enabled
value: '{{ cwe_monitor_enabled }}'
- name: ops_center_enabled
value: '{{ ops_center_enabled }}'
- name: ops_item_sns_topic_arn
value: '{{ ops_item_sns_topic_arn }}'
- name: sns_notification_arn
value: '{{ sns_notification_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: custom_components
value:
- component_name: '{{ component_name }}'
resource_list:
- '{{ resource_list[0] }}'
- name: log_pattern_sets
value:
- pattern_set_name: '{{ pattern_set_name }}'
log_patterns:
- pattern_name: '{{ pattern_name }}'
pattern: '{{ pattern }}'
rank: '{{ rank }}'
- name: auto_configuration_enabled
value: '{{ auto_configuration_enabled }}'
- name: component_monitoring_settings
value:
- component_name: '{{ component_name }}'
component_arn: '{{ component_arn }}'
tier: '{{ tier }}'
component_configuration_mode: '{{ component_configuration_mode }}'
default_overwrite_component_configuration:
configuration_details:
alarm_metrics:
- alarm_metric_name: '{{ alarm_metric_name }}'
logs:
- log_group_name: '{{ log_group_name }}'
log_path: '{{ log_path }}'
log_type: '{{ log_type }}'
encoding: '{{ encoding }}'
pattern_set: '{{ pattern_set }}'
windows_events:
- log_group_name: '{{ log_group_name }}'
event_name: '{{ event_name }}'
event_levels:
- '{{ event_levels[0] }}'
pattern_set: '{{ pattern_set }}'
processes:
- process_name: '{{ process_name }}'
alarm_metrics:
- null
alarms:
- alarm_name: '{{ alarm_name }}'
severity: '{{ severity }}'
j_mx_prometheus_exporter:
j_mx_url: '{{ j_mx_url }}'
host_port: '{{ host_port }}'
prometheus_port: '{{ prometheus_port }}'
h_an_aprometheus_exporter:
h_an_as_id: '{{ h_an_as_id }}'
h_an_aport: '{{ h_an_aport }}'
h_an_asecret_name: '{{ h_an_asecret_name }}'
agree_to_install_ha_na_db_client: '{{ agree_to_install_ha_na_db_client }}'
prometheus_port: '{{ prometheus_port }}'
h_acluster_prometheus_exporter:
prometheus_port: '{{ prometheus_port }}'
net_weaver_prometheus_exporter:
s_ap_sid: '{{ s_ap_sid }}'
instance_numbers:
- '{{ instance_numbers[0] }}'
prometheus_port: '{{ prometheus_port }}'
sq_lserver_prometheus_exporter:
prometheus_port: '{{ prometheus_port }}'
sq_lsecret_name: '{{ sq_lsecret_name }}'
sub_component_type_configurations:
- sub_component_type: '{{ sub_component_type }}'
sub_component_configuration_details:
alarm_metrics:
- null
logs:
- null
windows_events:
- null
processes:
- null
custom_component_configuration: null
- name: grouping_type
value: '{{ grouping_type }}'
- name: attach_missing_permission
value: '{{ attach_missing_permission }}'
UPDATE example
Use the following StackQL query and manifest file to update a application resource, using stack-deploy.
/*+ update */
UPDATE awscc.applicationinsights.applications
SET PatchDocument = string('{{ {
"CWEMonitorEnabled": cwe_monitor_enabled,
"OpsCenterEnabled": ops_center_enabled,
"OpsItemSNSTopicArn": ops_item_sns_topic_arn,
"SNSNotificationArn": sns_notification_arn,
"Tags": tags,
"CustomComponents": custom_components,
"LogPatternSets": log_pattern_sets,
"AutoConfigurationEnabled": auto_configuration_enabled,
"ComponentMonitoringSettings": component_monitoring_settings,
"AttachMissingPermission": attach_missing_permission
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ application_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.applicationinsights.applications
WHERE
Identifier = '{{ application_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the applications resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
applicationinsights:CreateApplication,
applicationinsights:Describe*,
applicationinsights:CreateComponent,
applicationinsights:CreateLogPattern,
applicationinsights:UpdateComponentConfiguration,
applicationinsights:ListComponents,
applicationinsights:TagResource,
ec2:Describe*,
rds:Describe*,
sqs:ListQueues,
elasticloadbalancing:Describe*,
autoscaling:DescribeAutoScalingGroups,
lambda:ListFunctions,
dynamodb:ListTables,
s3:ListAllMyBuckets,
sns:ListTopics,
states:ListStateMachines,
apigateway:GET,
ecs:List*,
ecs:DescribeTaskDefinition,
eks:List*,
fsx:DescribeFileSystems,
route53:List*,
route53resolver:List*,
logs:DescribeLogGroups,
resource-explorer:ListResources,
elasticfilesystem:DescribeFileSystems
applicationinsights:Describe*,
applicationinsights:List*
applicationinsights:CreateApplication,
applicationinsights:Describe*,
applicationinsights:UpdateApplication,
applicationinsights:TagResource,
applicationinsights:UntagResource,
applicationinsights:List*,
applicationinsights:CreateComponent,
applicationinsights:DeleteComponent,
applicationinsights:CreateLogPattern,
applicationinsights:DeleteLogPattern,
applicationinsights:UpdateLogPattern,
applicationinsights:UpdateComponentConfiguration
applicationinsights:DeleteApplication,
applicationinsights:DescribeApplication
applicationinsights:List*,
applicationinsights:Describe*