UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

143 lines 4.86 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Gets the list of Cockpit products available for a specific region. * * Use this data source to retrieve the list of products that can be exported via `scaleway.observability.Exporter`. The products are returned with their machine-readable name, display name, and family name. * * Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information. * * ## Example Usage * * ### Get all available products * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = scaleway.observability.getProducts({ * region: "fr-par", * }); * export const availableProducts = main.then(main => main.products); * ``` * * ### Use with cockpitExporter * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = scaleway.observability.getProducts({ * region: "fr-par", * }); * const mainExporter = new scaleway.observability.Exporter("main", { * name: "my-exporter", * region: "fr-par", * exportedProducts: main.then(main => main.names), * }); * ``` * * ### Filter products by family * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = scaleway.observability.getProducts({ * region: "fr-par", * }); * // Filter to only compute products * const computeProducts = main.then(main => .filter(p => p.familyName == "Compute").map(p => (p.name))); * export const computeProductNames = computeProducts; * ``` */ export declare function getProducts(args?: GetProductsArgs, opts?: pulumi.InvokeOptions): Promise<GetProductsResult>; /** * A collection of arguments for invoking getProducts. */ export interface GetProductsArgs { /** * The region to query. Defaults to the region configured in the provider. */ region?: string; } /** * A collection of values returned by getProducts. */ export interface GetProductsResult { /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * List of product names that can be directly used in `scaleway_cockpit_exporter.exported_products`. */ readonly names: string[]; /** * List of available Cockpit products. (see below) */ readonly products: outputs.observability.GetProductsProduct[]; readonly region?: string; } /** * Gets the list of Cockpit products available for a specific region. * * Use this data source to retrieve the list of products that can be exported via `scaleway.observability.Exporter`. The products are returned with their machine-readable name, display name, and family name. * * Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information. * * ## Example Usage * * ### Get all available products * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = scaleway.observability.getProducts({ * region: "fr-par", * }); * export const availableProducts = main.then(main => main.products); * ``` * * ### Use with cockpitExporter * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = scaleway.observability.getProducts({ * region: "fr-par", * }); * const mainExporter = new scaleway.observability.Exporter("main", { * name: "my-exporter", * region: "fr-par", * exportedProducts: main.then(main => main.names), * }); * ``` * * ### Filter products by family * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = scaleway.observability.getProducts({ * region: "fr-par", * }); * // Filter to only compute products * const computeProducts = main.then(main => .filter(p => p.familyName == "Compute").map(p => (p.name))); * export const computeProductNames = computeProducts; * ``` */ export declare function getProductsOutput(args?: GetProductsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetProductsResult>; /** * A collection of arguments for invoking getProducts. */ export interface GetProductsOutputArgs { /** * The region to query. Defaults to the region configured in the provider. */ region?: pulumi.Input<string | undefined>; } //# sourceMappingURL=getProducts.d.ts.map