import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * > **Public Preview:** This resource is in public preview and available only to opted-in accounts. * * Pathpoint maps the health of your technical systems onto the business journeys they support. Each Flow in Pathpoint represents one journey — checkout, authentication, or onboarding — broken into stages, so when something goes wrong you can see which part of the customer journey the problem affects. * * Use this resource to create, read, update, and delete a New Relic Pathpoint flow. * * A New Relic User API key is required to provision this resource. Set the `apiKey` attribute in the `provider` block or the `NEW_RELIC_API_KEY` environment variable with your User API key. * * > **NOTE:** Any manual changes made outside Terraform (e.g., via the New Relic UI) will be automatically overridden on the next pulumi up. Review your plan output carefully, if you want to keep external changes, export the existing flow * * ## Example Usage * * A flow is made up of `stages`, each stage made up of `levels`, each level made up of `steps`. Each step contains `signals` — entities, alerts, or entities discovered dynamically via `entitySearchQuery` — and its health is derived from those signals. * * The example below is a **Checkout** flow with 2 stages (`Revenue` and `Frontend`), a flow-level KPI (`Order Success Rate`), a stage-level KPI (`Payment Errors`), and a step that uses all three signal types — an entity signal (`GUID1`), an alert signal (`GUID2`), and a dynamic `entitySearchQuery`. * * > **NOTE:** Replace the placeholder values below — `accountId`, entity `guid`s, `entitySearchQuery` filters, and `link` URLs — with values from your own account before applying. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * const checkout = new newrelic.PathpointFlow("checkout", { * accountId: "1234", * name: "Checkout Flow", * description: "End-to-end checkout pipeline", * refreshInterval: "ONE_MINUTE", * kpis: [{ * name: "Order Success Rate", * description: "Percentage of orders completed successfully", * category: "Revenue", * query: { * from: "Transaction", * where: "name='checkout'", * select: { * aggregationType: "COUNT", * alias: "orders", * }, * }, * }], * stages: [ * { * name: "Revenue", * healthRollup: "ALERT_CONDITIONS", * link: "https://runbooks.example.com/checkout/revenue", * related: { * source: false, * target: true, * }, * stageKpis: [{ * name: "Payment Errors", * category: "Reliability", * query: { * from: "TransactionError", * select: { * aggregationType: "COUNT", * alias: "errors", * }, * }, * }], * levels: [{ * steps: [{ * name: "Order Service", * entitySearchQuery: { * query: "accountId=123 AND domain='APM' AND name='OrderService'", * }, * }], * }], * }, * { * name: "Frontend", * link: "https://runbooks.example.com/checkout/frontend", * related: { * source: true, * target: false, * }, * levels: [{ * steps: [{ * name: "Login Page", * signals: [ * { * guid: "GUID1", * name: "Cart Service", * type: "ENTITY", * }, * { * guid: "GUID2", * name: "Checkout Error Rate", * type: "ALERT", * }, * ], * entitySearchQuery: { * query: "accountId=1234 AND domain='BROWSER' AND name='Login'", * }, * }], * }], * }, * ], * }); * ``` * * The sections below break down each block type — stages, steps, KPIs, and health rollup — on its own, with smaller focused examples. * * ### Flow-level health * * `healthRollup` on the flow controls how the flow's overall health is derived: * * - `AUTOMATIC_ROLL_UP` (the default) — health rolls up automatically from the flow's stages. * * - `isExcluded` controls whether the stage contributes to the flow's overall health calculation: * - `true` — the stage is excluded from the flow's health rollup. Its levels, steps, and signals are still evaluated and shown in the Pathpoint UI, but the stage does not affect the flow's overall health status. Useful for stages under construction or temporarily removed from the scope. * - `false` (default) — the stage participates in the flow's health rollup normally. * * - `ALERT_CONDITIONS` — health is tied directly to the flow's KPI alert conditions instead of stage rollup. Typically paired with flow-level `kpis`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * const checkout = new newrelic.PathpointFlow("checkout", { * name: "Checkout Flow", * healthRollup: "AUTOMATIC_ROLL_UP", * }); * ``` * * ## Import * * New Relic Pathpoint flows can be imported using the flow's entity GUID, e.g. * * ```sh * $ pulumi import newrelic:index/pathpointFlow:PathpointFlow checkout GUID1 * ``` * > **NOTE:** After importing, run `pulumi preview` to verify the state matches the existing configuration. The provider will read the current flow configuration from the API and populate all attributes in state. */ export declare class PathpointFlow extends pulumi.CustomResource { /** * Get an existing PathpointFlow 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?: PathpointFlowState, opts?: pulumi.CustomResourceOptions): PathpointFlow; /** * Returns true if the given object is an instance of PathpointFlow. 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 PathpointFlow; /** * The New Relic account ID that owns this Pathpoint flow. Defaults to the provider account ID. */ readonly accountId: pulumi.Output; /** * A category used to group flows (e.g. `Marketing`, `Checkout`). */ readonly category: pulumi.Output; /** * A brief description of the flow. */ readonly description: pulumi.Output; /** * The entity GUID assigned to this Pathpoint flow in New Relic. */ readonly guid: pulumi.Output; /** * Health rollup strategy for the flow, derived from its stages. Valid values: `ALERT_CONDITIONS`, `AUTOMATIC_ROLL_UP`. */ readonly healthRollup: pulumi.Output; /** * A list of Key Performance Indicators tracked at the flow level. See Nested `kpis` blocks below for details. */ readonly kpis: pulumi.Output; /** * The display name of the Pathpoint flow. */ readonly name: pulumi.Output; /** * How often the flow, stage, level, and step health statuses are refreshed. Defaults to `ONE_MINUTE` if not set. Valid values: `ONE_MINUTE`, `FIVE_MINUTES`, `TEN_MINUTES`, `FIFTEEN_MINUTES`, `THIRTY_MINUTES`. */ readonly refreshInterval: pulumi.Output; /** * An ordered list of stages that make up this flow. Maximum 50 stages. A flow can be created without stages and stages can be added later. See Nested `stages` blocks below for details. */ readonly stages: pulumi.Output; /** * The last-updated epoch-millisecond timestamp used for optimistic concurrency control. This is managed automatically and must not be modified. It is persisted to state after every create/update and sent to the API on each subsequent update. * * `stages.#.id` - The internal workload ID of the stage. Populated after creation and used to identify stages on updates. * * `stages.#.levels.#.id` - The internal workload ID of the level. Populated after creation and used to identify levels on updates. * * `stages.#.levels.#.steps.#.id` - The internal workload ID of the step. Populated after creation and used to identify steps on updates. * * `kpis.#.id` - The internal ID of the flow-level KPI. Populated after creation. * * `kpis.#.metric_query` - The resolved NRQL metric query string synthesized from the KPI's `query` block. This is a read-only computed value set by the API. * * `stages.#.stage_kpis.#.id` - The internal ID of the stage-level KPI. Populated after creation. */ readonly version: pulumi.Output; /** * Create a PathpointFlow 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?: PathpointFlowArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PathpointFlow resources. */ export interface PathpointFlowState { /** * The New Relic account ID that owns this Pathpoint flow. Defaults to the provider account ID. */ accountId?: pulumi.Input; /** * A category used to group flows (e.g. `Marketing`, `Checkout`). */ category?: pulumi.Input; /** * A brief description of the flow. */ description?: pulumi.Input; /** * The entity GUID assigned to this Pathpoint flow in New Relic. */ guid?: pulumi.Input; /** * Health rollup strategy for the flow, derived from its stages. Valid values: `ALERT_CONDITIONS`, `AUTOMATIC_ROLL_UP`. */ healthRollup?: pulumi.Input; /** * A list of Key Performance Indicators tracked at the flow level. See Nested `kpis` blocks below for details. */ kpis?: pulumi.Input[] | undefined>; /** * The display name of the Pathpoint flow. */ name?: pulumi.Input; /** * How often the flow, stage, level, and step health statuses are refreshed. Defaults to `ONE_MINUTE` if not set. Valid values: `ONE_MINUTE`, `FIVE_MINUTES`, `TEN_MINUTES`, `FIFTEEN_MINUTES`, `THIRTY_MINUTES`. */ refreshInterval?: pulumi.Input; /** * An ordered list of stages that make up this flow. Maximum 50 stages. A flow can be created without stages and stages can be added later. See Nested `stages` blocks below for details. */ stages?: pulumi.Input[] | undefined>; /** * The last-updated epoch-millisecond timestamp used for optimistic concurrency control. This is managed automatically and must not be modified. It is persisted to state after every create/update and sent to the API on each subsequent update. * * `stages.#.id` - The internal workload ID of the stage. Populated after creation and used to identify stages on updates. * * `stages.#.levels.#.id` - The internal workload ID of the level. Populated after creation and used to identify levels on updates. * * `stages.#.levels.#.steps.#.id` - The internal workload ID of the step. Populated after creation and used to identify steps on updates. * * `kpis.#.id` - The internal ID of the flow-level KPI. Populated after creation. * * `kpis.#.metric_query` - The resolved NRQL metric query string synthesized from the KPI's `query` block. This is a read-only computed value set by the API. * * `stages.#.stage_kpis.#.id` - The internal ID of the stage-level KPI. Populated after creation. */ version?: pulumi.Input; } /** * The set of arguments for constructing a PathpointFlow resource. */ export interface PathpointFlowArgs { /** * The New Relic account ID that owns this Pathpoint flow. Defaults to the provider account ID. */ accountId?: pulumi.Input; /** * A category used to group flows (e.g. `Marketing`, `Checkout`). */ category?: pulumi.Input; /** * A brief description of the flow. */ description?: pulumi.Input; /** * Health rollup strategy for the flow, derived from its stages. Valid values: `ALERT_CONDITIONS`, `AUTOMATIC_ROLL_UP`. */ healthRollup?: pulumi.Input; /** * A list of Key Performance Indicators tracked at the flow level. See Nested `kpis` blocks below for details. */ kpis?: pulumi.Input[] | undefined>; /** * The display name of the Pathpoint flow. */ name?: pulumi.Input; /** * How often the flow, stage, level, and step health statuses are refreshed. Defaults to `ONE_MINUTE` if not set. Valid values: `ONE_MINUTE`, `FIVE_MINUTES`, `TEN_MINUTES`, `FIFTEEN_MINUTES`, `THIRTY_MINUTES`. */ refreshInterval?: pulumi.Input; /** * An ordered list of stages that make up this flow. Maximum 50 stages. A flow can be created without stages and stages can be added later. See Nested `stages` blocks below for details. */ stages?: pulumi.Input[] | undefined>; } //# sourceMappingURL=pathpointFlow.d.ts.map