ResourceCollection class

Resource for managing an AWS DevOps Guru Resource Collection.

> Only one type of resource collection (All Account Resources, CloudFormation, or Tags) can be enabled in an account at a time. To avoid persistent differences, this resource should be defined only once.

Example Usage

All Account Resources

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.devopsguru.ResourceCollection("example", {
    cloudformation: {
        stackNames: ["*"],
    },
    type: "AWS_SERVICE",
});
import pulumi
import pulumi_aws as aws

example = aws.devopsguru.ResourceCollection("example",
    cloudformation={
        "stack_names": ["*"],
    },
    type="AWS_SERVICE")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.DevOpsGuru.ResourceCollection("example", new()
    {
        Cloudformation = new Aws.DevOpsGuru.Inputs.ResourceCollectionCloudformationArgs
        {
            StackNames = new[]
            {
                "*",
            },
        },
        Type = "AWS_SERVICE",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/devopsguru"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devopsguru.NewResourceCollection(ctx, "example", &devopsguru.ResourceCollectionArgs{
			Cloudformation: &devopsguru.ResourceCollectionCloudformationArgs{
				StackNames: pulumi.StringArray{
					pulumi.String("*"),
				},
			},
			Type: pulumi.String("AWS_SERVICE"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_devopsguru_resourcecollection" "example" {
  cloudformation = {
    stack_names = ["*"]
  }
  type = "AWS_SERVICE"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.devopsguru.ResourceCollection;
import com.pulumi.aws.devopsguru.ResourceCollectionArgs;
import com.pulumi.aws.devopsguru.inputs.ResourceCollectionCloudformationArgs;
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 example = new ResourceCollection("example", ResourceCollectionArgs.builder()
            .cloudformation(ResourceCollectionCloudformationArgs.builder()
                .stackNames("*")
                .build())
            .type("AWS_SERVICE")
            .build());

    }
}
resources:
  example:
    type: aws:devopsguru:ResourceCollection
    properties:
      cloudformation:
        stackNames:
          - '*'
      type: AWS_SERVICE

CloudFormation Stacks

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.devopsguru.ResourceCollection("example", {
    cloudformation: {
        stackNames: ["ExampleStack"],
    },
    type: "AWS_CLOUD_FORMATION",
});
import pulumi
import pulumi_aws as aws

example = aws.devopsguru.ResourceCollection("example",
    cloudformation={
        "stack_names": ["ExampleStack"],
    },
    type="AWS_CLOUD_FORMATION")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.DevOpsGuru.ResourceCollection("example", new()
    {
        Cloudformation = new Aws.DevOpsGuru.Inputs.ResourceCollectionCloudformationArgs
        {
            StackNames = new[]
            {
                "ExampleStack",
            },
        },
        Type = "AWS_CLOUD_FORMATION",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/devopsguru"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devopsguru.NewResourceCollection(ctx, "example", &devopsguru.ResourceCollectionArgs{
			Cloudformation: &devopsguru.ResourceCollectionCloudformationArgs{
				StackNames: pulumi.StringArray{
					pulumi.String("ExampleStack"),
				},
			},
			Type: pulumi.String("AWS_CLOUD_FORMATION"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_devopsguru_resourcecollection" "example" {
  cloudformation = {
    stack_names = ["ExampleStack"]
  }
  type = "AWS_CLOUD_FORMATION"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.devopsguru.ResourceCollection;
import com.pulumi.aws.devopsguru.ResourceCollectionArgs;
import com.pulumi.aws.devopsguru.inputs.ResourceCollectionCloudformationArgs;
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 example = new ResourceCollection("example", ResourceCollectionArgs.builder()
            .cloudformation(ResourceCollectionCloudformationArgs.builder()
                .stackNames("ExampleStack")
                .build())
            .type("AWS_CLOUD_FORMATION")
            .build());

    }
}
resources:
  example:
    type: aws:devopsguru:ResourceCollection
    properties:
      cloudformation:
        stackNames:
          - ExampleStack
      type: AWS_CLOUD_FORMATION

Tags

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.devopsguru.ResourceCollection("example", {
    tags: {
        appBoundaryKey: "DevOps-Guru-Example",
        tagValues: ["Example-Value"],
    },
    type: "AWS_TAGS",
});
import pulumi
import pulumi_aws as aws

example = aws.devopsguru.ResourceCollection("example",
    tags={
        "app_boundary_key": "DevOps-Guru-Example",
        "tag_values": ["Example-Value"],
    },
    type="AWS_TAGS")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.DevOpsGuru.ResourceCollection("example", new()
    {
        Tags = new Aws.DevOpsGuru.Inputs.ResourceCollectionTagsArgs
        {
            AppBoundaryKey = "DevOps-Guru-Example",
            TagValues = new[]
            {
                "Example-Value",
            },
        },
        Type = "AWS_TAGS",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/devopsguru"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devopsguru.NewResourceCollection(ctx, "example", &devopsguru.ResourceCollectionArgs{
			Tags: &devopsguru.ResourceCollectionTagsArgs{
				AppBoundaryKey: pulumi.String("DevOps-Guru-Example"),
				TagValues: pulumi.StringArray{
					pulumi.String("Example-Value"),
				},
			},
			Type: pulumi.String("AWS_TAGS"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_devopsguru_resourcecollection" "example" {
  tags = {
    app_boundary_key = "DevOps-Guru-Example"
    tag_values       = ["Example-Value"]
  }
  type = "AWS_TAGS"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.devopsguru.ResourceCollection;
import com.pulumi.aws.devopsguru.ResourceCollectionArgs;
import com.pulumi.aws.devopsguru.inputs.ResourceCollectionTagsArgs;
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 example = new ResourceCollection("example", ResourceCollectionArgs.builder()
            .tags(ResourceCollectionTagsArgs.builder()
                .appBoundaryKey("DevOps-Guru-Example")
                .tagValues("Example-Value")
                .build())
            .type("AWS_TAGS")
            .build());

    }
}
resources:
  example:
    type: aws:devopsguru:ResourceCollection
    properties:
      tags:
        appBoundaryKey: DevOps-Guru-Example
        tagValues:
          - Example-Value
      type: AWS_TAGS

Tags All Resources

To analyze all resources with the appBoundaryKey regardless of the corresponding tag value, set tagValues to ["*"].

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.devopsguru.ResourceCollection("example", {
    tags: {
        appBoundaryKey: "DevOps-Guru-Example",
        tagValues: ["*"],
    },
    type: "AWS_TAGS",
});
import pulumi
import pulumi_aws as aws

example = aws.devopsguru.ResourceCollection("example",
    tags={
        "app_boundary_key": "DevOps-Guru-Example",
        "tag_values": ["*"],
    },
    type="AWS_TAGS")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.DevOpsGuru.ResourceCollection("example", new()
    {
        Tags = new Aws.DevOpsGuru.Inputs.ResourceCollectionTagsArgs
        {
            AppBoundaryKey = "DevOps-Guru-Example",
            TagValues = new[]
            {
                "*",
            },
        },
        Type = "AWS_TAGS",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/devopsguru"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devopsguru.NewResourceCollection(ctx, "example", &devopsguru.ResourceCollectionArgs{
			Tags: &devopsguru.ResourceCollectionTagsArgs{
				AppBoundaryKey: pulumi.String("DevOps-Guru-Example"),
				TagValues: pulumi.StringArray{
					pulumi.String("*"),
				},
			},
			Type: pulumi.String("AWS_TAGS"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_devopsguru_resourcecollection" "example" {
  tags = {
    app_boundary_key = "DevOps-Guru-Example"
    tag_values       = ["*"]
  }
  type = "AWS_TAGS"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.devopsguru.ResourceCollection;
import com.pulumi.aws.devopsguru.ResourceCollectionArgs;
import com.pulumi.aws.devopsguru.inputs.ResourceCollectionTagsArgs;
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 example = new ResourceCollection("example", ResourceCollectionArgs.builder()
            .tags(ResourceCollectionTagsArgs.builder()
                .appBoundaryKey("DevOps-Guru-Example")
                .tagValues("*")
                .build())
            .type("AWS_TAGS")
            .build());

    }
}
resources:
  example:
    type: aws:devopsguru:ResourceCollection
    properties:
      tags:
        appBoundaryKey: DevOps-Guru-Example
        tagValues:
          - '*'
      type: AWS_TAGS

Import

Using pulumi import, import DevOps Guru Resource Collection using the id. For example:

$ pulumi import aws:devopsguru/resourceCollection:ResourceCollection example AWS_CLOUD_FORMATION

Constructors

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

Properties

childResources Set<Resource>
finalinherited
cloudformation ↔ Output<ResourceCollectionCloudformation?>
A collection of AWS CloudFormation stacks. See cloudformation below for additional details.
latefinal
completionSources Map<String, IOutputCompletionSource>
latefinalinherited
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
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
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<ResourceCollectionTags?>
AWS tags used to filter the resources in the resource collection. See tags below for additional details.
latefinal
transformations List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
type ↔ Output<String>
Type of AWS resource collection to create. Valid values are AWS_CLOUD_FORMATION, AWS_SERVICE, and AWS_TAGS.
latefinal
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, {ResourceCollectionState? state, CustomResourceOptions? options}) ResourceCollection
Gets an existing ResourceCollection resource's state with the given name and id.