Application class

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", {
    resourceQuery: {
        query: JSON.stringify({
            ResourceTypeFilters: ["AWS::EC2::Instance"],
            TagFilters: [{
                Key: "Stage",
                Values: ["Test"],
            }],
        }),
    },
    name: "example",
});
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",
    resource_query={
        "query": json.dumps({
            "ResourceTypeFilters": ["AWS::EC2::Instance"],
            "TagFilters": [{
                "Key": "Stage",
                "Values": ["Test"],
            }],
        }),
    },
    name="example")
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()
    {
        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",
                        },
                    },
                },
            }),
        },
        Name = "example",
    });

    var example = new Aws.ApplicationInsights.Application("example", new()
    {
        ResourceGroupName = exampleGroup.Name,
    });

});
package main

import (
	"encoding/json"

	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/applicationinsights"
	"github.com/pulumi/pulumi-aws/sdk/v7/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{
			ResourceQuery: &resourcegroups.GroupResourceQueryArgs{
				Query: pulumi.String(json0),
			},
			Name: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		_, err = applicationinsights.NewApplication(ctx, "example", &applicationinsights.ApplicationArgs{
			ResourceGroupName: exampleGroup.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_applicationinsights_application" "example" {
  resource_group_name = aws_resourcegroups_group.example.name
}
resource "aws_resourcegroups_group" "example" {
  resource_query = {
    query = jsonencode({
      "ResourceTypeFilters" = ["AWS::EC2::Instance"]
      "TagFilters" = [{
        "Key"    = "Stage"
        "Values" = ["Test"]
      }]
    })
  }
  name = "example"
}
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.ArrayList;
import java.util.Arrays;
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()
            .resourceQuery(GroupResourceQueryArgs.builder()
                .query(serializeJson(
                    jsonObject(
                        jsonProperty("ResourceTypeFilters", jsonArray("AWS::EC2::Instance")),
                        jsonProperty("TagFilters", jsonArray(jsonObject(
                            jsonProperty("Key", "Stage"),
                            jsonProperty("Values", jsonArray("Test"))
                        )))
                    )))
                .build())
            .name("example")
            .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:
      resourceQuery:
        query:
          fn::toJSON:
            ResourceTypeFilters:
              - AWS::EC2::Instance
            TagFilters:
              - Key: Stage
                Values:
                  - Test
      name: example

Import

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

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

Constructors

Application(String name, {ApplicationArgs? args, CustomResourceOptions? options})
Creates a new Application. name The Pulumi resource name. args Arguments used to configure this Application. The set of arguments for Application. options Resource options controlling this resource's behavior.
Application.reference(String urn)
Creates a typed reference to an existing Application resource.

Properties

arn ↔ Output<String>
ARN of the Application.
latefinal
autoConfigEnabled ↔ Output<bool?>
Whether to automatically configure unmonitored resources in the resource group.
latefinal
autoCreate ↔ Output<bool?>
Configures all of the resources in the resource group by applying the recommended configurations.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
cweMonitorEnabled ↔ Output<bool?>
Whether to enable Application Insights to listen to CloudWatch events for the application resources, such as instance terminated, failed deployment, and others.
latefinal
groupingType ↔ Output<String?>
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.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
opsCenterEnabled ↔ Output<bool?>
When set to true, creates opsItems for any problems detected on an application.
latefinal
opsItemSnsTopicArn ↔ Output<String?>
SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceGroupName ↔ Output<String>
Name of the resource group.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tags ↔ Output<Map<String, String>?>
Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {ApplicationState? state, CustomResourceOptions? options}) → Application
Gets an existing Application resource's state with the given name and id.