import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Use this data source to get information about a specific notification destination in New Relic that already exists. More information on Terraform's data sources can be found here. * * ## ID Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * // Data source * const foo = newrelic.getNotificationDestination({ * id: "1e543419-0c25-456a-9057-fb0eb310e60b", * }); * // Resource * const foo_channel = new newrelic.NotificationChannel("foo-channel", { * name: "webhook-example", * type: "WEBHOOK", * destinationId: foo.then(foo => foo.id), * product: "IINT", * properties: [{ * key: "payload", * value: `{ * \x09"name": "foo" * }`, * label: "Payload Template", * }], * }); * ``` * * ## Name Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * // Data source (uses contains match) * // Searching for "webhook-destination" would match "webhook-destination", "webhook-destination-1", etc. * const foo = newrelic.getNotificationDestination({ * name: "webhook-destination", * }); * // Resource * const foo_channel = new newrelic.NotificationChannel("foo-channel", { * name: "webhook-example", * type: "WEBHOOK", * destinationId: foo.then(foo => foo.id), * product: "IINT", * properties: [{ * key: "payload", * value: `{ * \x09"name": "foo" * }`, * label: "Payload Template", * }], * }); * ``` * * ## Exact Name Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * // Data source (uses exact match) * // Searching for "webhook-destination" would only match "webhook-destination", not "my-webhook-destination" * const foo = newrelic.getNotificationDestination({ * exactName: "webhook-destination", * }); * // Resource * const foo_channel = new newrelic.NotificationChannel("foo-channel", { * name: "webhook-example", * type: "WEBHOOK", * destinationId: foo.then(foo => foo.id), * product: "IINT", * properties: [{ * key: "payload", * value: `{ * \x09"name": "foo" * }`, * label: "Payload Template", * }], * }); * ``` * * Use this data source to create cross account destination. */ export declare function getNotificationDestination(args?: GetNotificationDestinationArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getNotificationDestination. */ export interface GetNotificationDestinationArgs { /** * The New Relic account ID to operate on. This allows you to override the `accountId` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`. */ accountId?: string; /** * The exact name of the notification destination. Uses an **exact** match, so searching for "foo" would only match "foo", not "foobar". * * Optional: */ exactName?: string; /** * The id of the notification destination in New Relic. */ id?: string; /** * The name of the notification destination. Uses a **contains** match, so searching for "foo" would match "foobar", "myfoo", etc. */ name?: string; /** * The scope of destination which has two parameters scope type and ID. This is required when trying to get either account scoped or cross account destination. The scope type can be either `ORGANIZATION` or `ACCOUNT`. If the scope type is `ORGANIZATION`, then the scope ID should be the Organization UUID. If the scope type is `ACCOUNT`, then the scope ID should be the New Relic account ID. * * Note: * By Default account scope is considered for the destination until unless it is mentioned explicitly in the arguments. If you want to get a cross account destination, then you need to provide the scope of destination in the arguments. */ scope?: inputs.GetNotificationDestinationScope; /** * The URL in secure format, showing only the `prefix`, as the `secureSuffix` is a secret. */ secureUrls?: inputs.GetNotificationDestinationSecureUrl[]; } /** * A collection of values returned by getNotificationDestination. */ export interface GetNotificationDestinationResult { readonly accountId: string; /** * An indication whether the notification destination is active or not. */ readonly active: boolean; readonly exactName?: string; /** * The unique entity identifier of the destination in New Relic. */ readonly guid: string; readonly id: string; /** * The name of the notification destination. */ readonly name?: string; /** * A nested block that describes a notification destination property. */ readonly properties: outputs.GetNotificationDestinationProperty[]; /** * A nested block of scope of destination which has two parameters scope type and ID. */ readonly scope?: outputs.GetNotificationDestinationScope; /** * The URL in secure format, showing only the `prefix`, as the `secureSuffix` is a secret. */ readonly secureUrls: outputs.GetNotificationDestinationSecureUrl[]; /** * The status of the notification destination. */ readonly status: string; /** * The notification destination type, either: `EMAIL`, `SERVICE_NOW`, `SERVICE_NOW_APP`, `WEBHOOK`, `JIRA`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `PAGERDUTY_SERVICE_INTEGRATION`, `SLACK`, `SLACK_COLLABORATION`, `MICROSOFT_TEAMS` and `WORKFLOW_AUTOMATION`. */ readonly type: string; } /** * Use this data source to get information about a specific notification destination in New Relic that already exists. More information on Terraform's data sources can be found here. * * ## ID Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * // Data source * const foo = newrelic.getNotificationDestination({ * id: "1e543419-0c25-456a-9057-fb0eb310e60b", * }); * // Resource * const foo_channel = new newrelic.NotificationChannel("foo-channel", { * name: "webhook-example", * type: "WEBHOOK", * destinationId: foo.then(foo => foo.id), * product: "IINT", * properties: [{ * key: "payload", * value: `{ * \x09"name": "foo" * }`, * label: "Payload Template", * }], * }); * ``` * * ## Name Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * // Data source (uses contains match) * // Searching for "webhook-destination" would match "webhook-destination", "webhook-destination-1", etc. * const foo = newrelic.getNotificationDestination({ * name: "webhook-destination", * }); * // Resource * const foo_channel = new newrelic.NotificationChannel("foo-channel", { * name: "webhook-example", * type: "WEBHOOK", * destinationId: foo.then(foo => foo.id), * product: "IINT", * properties: [{ * key: "payload", * value: `{ * \x09"name": "foo" * }`, * label: "Payload Template", * }], * }); * ``` * * ## Exact Name Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * // Data source (uses exact match) * // Searching for "webhook-destination" would only match "webhook-destination", not "my-webhook-destination" * const foo = newrelic.getNotificationDestination({ * exactName: "webhook-destination", * }); * // Resource * const foo_channel = new newrelic.NotificationChannel("foo-channel", { * name: "webhook-example", * type: "WEBHOOK", * destinationId: foo.then(foo => foo.id), * product: "IINT", * properties: [{ * key: "payload", * value: `{ * \x09"name": "foo" * }`, * label: "Payload Template", * }], * }); * ``` * * Use this data source to create cross account destination. */ export declare function getNotificationDestinationOutput(args?: GetNotificationDestinationOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getNotificationDestination. */ export interface GetNotificationDestinationOutputArgs { /** * The New Relic account ID to operate on. This allows you to override the `accountId` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`. */ accountId?: pulumi.Input; /** * The exact name of the notification destination. Uses an **exact** match, so searching for "foo" would only match "foo", not "foobar". * * Optional: */ exactName?: pulumi.Input; /** * The id of the notification destination in New Relic. */ id?: pulumi.Input; /** * The name of the notification destination. Uses a **contains** match, so searching for "foo" would match "foobar", "myfoo", etc. */ name?: pulumi.Input; /** * The scope of destination which has two parameters scope type and ID. This is required when trying to get either account scoped or cross account destination. The scope type can be either `ORGANIZATION` or `ACCOUNT`. If the scope type is `ORGANIZATION`, then the scope ID should be the Organization UUID. If the scope type is `ACCOUNT`, then the scope ID should be the New Relic account ID. * * Note: * By Default account scope is considered for the destination until unless it is mentioned explicitly in the arguments. If you want to get a cross account destination, then you need to provide the scope of destination in the arguments. */ scope?: pulumi.Input; /** * The URL in secure format, showing only the `prefix`, as the `secureSuffix` is a secret. */ secureUrls?: pulumi.Input[] | undefined>; } //# sourceMappingURL=getNotificationDestination.d.ts.map