ApplicationArgs

data class ApplicationArgs(val autoConfigEnabled: Output<Boolean>? = null, val autoCreate: Output<Boolean>? = null, val cweMonitorEnabled: Output<Boolean>? = null, val groupingType: Output<String>? = null, val opsCenterEnabled: Output<Boolean>? = null, val opsItemSnsTopicArn: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ApplicationArgs>

Provides a ApplicationInsights Application resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleGroup = new aws.resourcegroups.Group("example", {
name: "example",
resourceQuery: {
query: JSON.stringify({
ResourceTypeFilters: ["AWS::EC2::Instance"],
TagFilters: [{
Key: "Stage",
Values: ["Test"],
}],
}),
},
});
const example = new aws.applicationinsights.Application("example", {resourceGroupName: exampleGroup.name});
import pulumi
import json
import pulumi_aws as aws
example_group = aws.resourcegroups.Group("example",
name="example",
resource_query={
"query": json.dumps({
"ResourceTypeFilters": ["AWS::EC2::Instance"],
"TagFilters": [{
"Key": "Stage",
"Values": ["Test"],
}],
}),
})
example = aws.applicationinsights.Application("example", resource_group_name=example_group.name)
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleGroup = new Aws.ResourceGroups.Group("example", new()
{
Name = "example",
ResourceQuery = new Aws.ResourceGroups.Inputs.GroupResourceQueryArgs
{
Query = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["ResourceTypeFilters"] = new[]
{
"AWS::EC2::Instance",
},
["TagFilters"] = new[]
{
new Dictionary<string, object?>
{
["Key"] = "Stage",
["Values"] = new[]
{
"Test",
},
},
},
}),
},
});
var example = new Aws.ApplicationInsights.Application("example", new()
{
ResourceGroupName = exampleGroup.Name,
});
});
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/applicationinsights"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroups"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"ResourceTypeFilters": []string{
"AWS::EC2::Instance",
},
"TagFilters": []map[string]interface{}{
map[string]interface{}{
"Key": "Stage",
"Values": []string{
"Test",
},
},
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
exampleGroup, err := resourcegroups.NewGroup(ctx, "example", &resourcegroups.GroupArgs{
Name: pulumi.String("example"),
ResourceQuery: &resourcegroups.GroupResourceQueryArgs{
Query: pulumi.String(json0),
},
})
if err != nil {
return err
}
_, err = applicationinsights.NewApplication(ctx, "example", &applicationinsights.ApplicationArgs{
ResourceGroupName: exampleGroup.Name,
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.resourcegroups.Group;
import com.pulumi.aws.resourcegroups.GroupArgs;
import com.pulumi.aws.resourcegroups.inputs.GroupResourceQueryArgs;
import com.pulumi.aws.applicationinsights.Application;
import com.pulumi.aws.applicationinsights.ApplicationArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.name("example")
.resourceQuery(GroupResourceQueryArgs.builder()
.query(serializeJson(
jsonObject(
jsonProperty("ResourceTypeFilters", jsonArray("AWS::EC2::Instance")),
jsonProperty("TagFilters", jsonArray(jsonObject(
jsonProperty("Key", "Stage"),
jsonProperty("Values", jsonArray("Test"))
)))
)))
.build())
.build());
var example = new Application("example", ApplicationArgs.builder()
.resourceGroupName(exampleGroup.name())
.build());
}
}
resources:
example:
type: aws:applicationinsights:Application
properties:
resourceGroupName: ${exampleGroup.name}
exampleGroup:
type: aws:resourcegroups:Group
name: example
properties:
name: example
resourceQuery:
query:
fn::toJSON:
ResourceTypeFilters:
- AWS::EC2::Instance
TagFilters:
- Key: Stage
Values:
- Test

Import

Using pulumi import, import ApplicationInsights Applications using the resource_group_name. For example:

$ pulumi import aws:applicationinsights/application:Application some some-application

Constructors

Link copied to clipboard
constructor(autoConfigEnabled: Output<Boolean>? = null, autoCreate: Output<Boolean>? = null, cweMonitorEnabled: Output<Boolean>? = null, groupingType: Output<String>? = null, opsCenterEnabled: Output<Boolean>? = null, opsItemSnsTopicArn: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val autoConfigEnabled: Output<Boolean>? = null

Indicates whether Application Insights automatically configures unmonitored resources in the resource group.

Link copied to clipboard
val autoCreate: Output<Boolean>? = null

Configures all of the resources in the resource group by applying the recommended configurations.

Link copied to clipboard
val cweMonitorEnabled: Output<Boolean>? = null

Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as instance terminated, failed deployment, and others.

Link copied to clipboard
val groupingType: Output<String>? = null

Application Insights can create applications based on a resource group or on an account. To create an account-based application using all of the resources in the account, set this parameter to ACCOUNT_BASED.

Link copied to clipboard
val opsCenterEnabled: Output<Boolean>? = null

When set to true, creates opsItems for any problems detected on an application.

Link copied to clipboard
val opsItemSnsTopicArn: Output<String>? = null

SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of the resource group. The following arguments are optional:

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): ApplicationArgs