import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Use this resource to create, update, and delete tags for a New Relic One entity.
*
* > **IMPORTANT!** Version 2.0.0 of the New Relic Terraform Provider introduces some [additional requirements](https://www.terraform.io/providers/newrelic/newrelic/latest/docs/guides/migration_guide_v2) for configuring the provider.
*
* Before upgrading to version 2.0.0 or later, it is recommended to upgrade to the most recent 1.x version of the provider and ensure that your environment successfully runs `pulumi preview` without unexpected changes.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as newrelic from "@pulumi/newrelic";
*
* const foo = newrelic.getEntity({
* name: "Example application",
* type: "APPLICATION",
* domain: "APM",
* });
* const fooEntityTags = new newrelic.EntityTags("foo", {
* guid: foo.then(foo => foo.guid),
* tags: [
* {
* key: "my-key",
* values: [
* "my-value",
* "my-other-value",
* ],
* },
* {
* key: "my-key-2",
* values: ["my-value-2"],
* },
* ],
* });
* ```
*
* ### Example of applying multiple tags to multiple entities using a nested `dynamic` block
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as newrelic from "@pulumi/newrelic";
* import * as std from "@pulumi/std";
*
* export = async () => {
* const apps = (await std.toset({
* input: [
* "Example App Name 1",
* "Example App Name 2",
* ],
* })).result;
* const customTags = {
* "tag-key-1": "tag-value-1",
* "tag-key-2": "tag-value-2",
* "tag-key-3": "tag-value-3",
* };
* const foo = .reduce((__obj, [__key, __value]) => ({ ...__obj, [String(__key)]: await newrelic.getEntity({
* name: String(__key),
* type: "APPLICATION",
* domain: "APM",
* }) }), {});
* const fooEntityTags: newrelic.EntityTags[] = [];
* for (const range of apps.map((v, k) => ({key: k, value: v}))) {
* fooEntityTags.push(new newrelic.EntityTags(`foo-${range.key}`, {
* tags: Object.entries(customTags).sort().map(([k, v]) => ({key: k, value: v})).map(entry => ({
* key: entry.key,
* values: [entry.value],
* })),
* guid: foo[range.key].guid,
* }));
* }
* }
* ```
*
* ## Import
*
* New Relic One entity tags can be imported using a concatenated string of the format
* ``, e.g.
*
* ```sh
* $ pulumi import newrelic:index/entityTags:EntityTags foo MjUyMDUyOHxBUE18QVBRTElDQVRJT058MjE1MDM3Nzk1
* ```
*/
export declare class EntityTags extends pulumi.CustomResource {
/**
* Get an existing EntityTags resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input, state?: EntityTagsState, opts?: pulumi.CustomResourceOptions): EntityTags;
/**
* Returns true if the given object is an instance of EntityTags. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is EntityTags;
/**
* The guid of the entity to tag.
*/
readonly guid: pulumi.Output;
/**
* A nested block that describes an entity tag. See Nested tag blocks below for details.
*/
readonly tags: pulumi.Output;
/**
* Create a EntityTags resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: EntityTagsArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering EntityTags resources.
*/
export interface EntityTagsState {
/**
* The guid of the entity to tag.
*/
guid?: pulumi.Input;
/**
* A nested block that describes an entity tag. See Nested tag blocks below for details.
*/
tags?: pulumi.Input[] | undefined>;
}
/**
* The set of arguments for constructing a EntityTags resource.
*/
export interface EntityTagsArgs {
/**
* The guid of the entity to tag.
*/
guid: pulumi.Input;
/**
* A nested block that describes an entity tag. See Nested tag blocks below for details.
*/
tags: pulumi.Input[]>;
}
//# sourceMappingURL=entityTags.d.ts.map