import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Data source for retrieving a Harness Chaos Experiment Template by identity or name. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * // Example 1: Lookup by Identity (Project-level) * const byIdentity = harness.chaos.getExperimentTemplate({ * orgId: "my_org", * projectId: "my_project", * hubIdentity: "my-chaos-hub", * identity: "simple-pod-delete-experiment", * }); * // Example 2: Lookup by Name (Project-level) * const byName = harness.chaos.getExperimentTemplate({ * orgId: "my_org", * projectId: "my_project", * hubIdentity: "my-chaos-hub", * name: "Simple Pod Delete Experiment", * }); * // Example 3: Lookup Org-level Template * const orgTemplate = harness.chaos.getExperimentTemplate({ * orgId: "my_org", * hubIdentity: "org-chaos-hub", * identity: "org-experiment-template", * }); * // Example 4: Lookup Account-level Template * const accountTemplate = harness.chaos.getExperimentTemplate({ * hubIdentity: "account-chaos-hub", * identity: "account-experiment-template", * }); * export const experimentId = byIdentity.then(byIdentity => byIdentity.id); * export const experimentIdentity = byIdentity.then(byIdentity => byIdentity.identity); * export const experimentSpec = byIdentity.then(byIdentity => byIdentity.specs); * export const faultsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.faults).length; * export const probesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.probes).length; * export const actionsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.actions).length; * export const verticesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.vertices).length; * ``` */ export declare function getExperimentTemplate(args: GetExperimentTemplateArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getExperimentTemplate. */ export interface GetExperimentTemplateArgs { /** * Hub identifier where the template is stored */ hubIdentity: string; /** * Unique identifier of the experiment template. Either identity or name must be specified. */ identity?: string; /** * Name of the experiment template. Either identity or name must be specified. */ name?: string; /** * Organization identifier. Leave empty for account-level templates. */ orgId?: string; /** * Project identifier. Leave empty for account and org-level templates. */ projectId?: string; } /** * A collection of values returned by getExperimentTemplate. */ export interface GetExperimentTemplateResult { /** * API version of the experiment template */ readonly apiVersion: string; /** * Description of the experiment template */ readonly description: string; /** * Hub identifier where the template is stored */ readonly hubIdentity: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * Unique identifier of the experiment template. Either identity or name must be specified. */ readonly identity: string; /** * Whether this is a default template */ readonly isDefault: boolean; /** * Kind of the experiment template */ readonly kind: string; /** * Name of the experiment template. Either identity or name must be specified. */ readonly name: string; /** * Organization identifier. Leave empty for account-level templates. */ readonly orgId?: string; /** * Project identifier. Leave empty for account and org-level templates. */ readonly projectId?: string; /** * Revision of the experiment template */ readonly revision: string; /** * Specification of the experiment template */ readonly specs: outputs.chaos.GetExperimentTemplateSpec[]; /** * Tags associated with the experiment template */ readonly tags: string[]; } /** * Data source for retrieving a Harness Chaos Experiment Template by identity or name. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * // Example 1: Lookup by Identity (Project-level) * const byIdentity = harness.chaos.getExperimentTemplate({ * orgId: "my_org", * projectId: "my_project", * hubIdentity: "my-chaos-hub", * identity: "simple-pod-delete-experiment", * }); * // Example 2: Lookup by Name (Project-level) * const byName = harness.chaos.getExperimentTemplate({ * orgId: "my_org", * projectId: "my_project", * hubIdentity: "my-chaos-hub", * name: "Simple Pod Delete Experiment", * }); * // Example 3: Lookup Org-level Template * const orgTemplate = harness.chaos.getExperimentTemplate({ * orgId: "my_org", * hubIdentity: "org-chaos-hub", * identity: "org-experiment-template", * }); * // Example 4: Lookup Account-level Template * const accountTemplate = harness.chaos.getExperimentTemplate({ * hubIdentity: "account-chaos-hub", * identity: "account-experiment-template", * }); * export const experimentId = byIdentity.then(byIdentity => byIdentity.id); * export const experimentIdentity = byIdentity.then(byIdentity => byIdentity.identity); * export const experimentSpec = byIdentity.then(byIdentity => byIdentity.specs); * export const faultsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.faults).length; * export const probesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.probes).length; * export const actionsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.actions).length; * export const verticesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.vertices).length; * ``` */ export declare function getExperimentTemplateOutput(args: GetExperimentTemplateOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getExperimentTemplate. */ export interface GetExperimentTemplateOutputArgs { /** * Hub identifier where the template is stored */ hubIdentity: pulumi.Input; /** * Unique identifier of the experiment template. Either identity or name must be specified. */ identity?: pulumi.Input; /** * Name of the experiment template. Either identity or name must be specified. */ name?: pulumi.Input; /** * Organization identifier. Leave empty for account-level templates. */ orgId?: pulumi.Input; /** * Project identifier. Leave empty for account and org-level templates. */ projectId?: pulumi.Input; } //# sourceMappingURL=getExperimentTemplate.d.ts.map