@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
235 lines • 8.85 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* The `scaleway.observability.Exporter` resource allows you to create and manage [data exports](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#data-exports) in Scaleway's Cockpit. Data exports send metrics and logs from Scaleway products to external destinations like Datadog or OTLP-compatible endpoints.
*
* 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
*
* ### Datadog destination
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const project = scaleway.account.getProject({
* name: "default",
* });
* const scalewayMetrics = project.then(project => scaleway.observability.getSources({
* projectId: project.id,
* origin: "scaleway",
* type: "metrics",
* }));
* const main = new scaleway.observability.Exporter("main", {
* projectId: project.then(project => project.id),
* datasourceId: scalewayMetrics.then(scalewayMetrics => scalewayMetrics.sources?.[0]?.id),
* name: "my-datadog-exporter",
* exportedProducts: ["all"],
* datadogDestination: {
* apiKey: datadogApiKey,
* endpoint: "https://api.datadoghq.com",
* },
* });
* ```
*
* ### OTLP destination
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const project = scaleway.account.getProject({
* name: "default",
* });
* const scalewayMetrics = project.then(project => scaleway.observability.getSources({
* projectId: project.id,
* origin: "scaleway",
* type: "metrics",
* }));
* const otlpTarget = new scaleway.observability.Source("otlp_target", {
* projectId: project.then(project => project.id),
* name: "otlp-target",
* type: "metrics",
* retentionDays: 31,
* });
* const main = new scaleway.observability.Exporter("main", {
* projectId: project.then(project => project.id),
* datasourceId: scalewayMetrics.then(scalewayMetrics => scalewayMetrics.sources?.[0]?.id),
* name: "my-otlp-exporter",
* exportedProducts: [
* "lb",
* "object-storage",
* "rdb",
* ],
* otlpDestination: {
* endpoint: otlpTarget.pushUrl,
* },
* });
* ```
*
* ## Import
*
* Import an exporter using the regional ID:
*
* ```sh
* $ pulumi import scaleway:observability/exporter:Exporter main fr-par/11111111-1111-1111-1111-111111111111
* ```
*/
export declare class Exporter extends pulumi.CustomResource {
/**
* Get an existing Exporter 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<pulumi.ID>, state?: ExporterState, opts?: pulumi.CustomResourceOptions): Exporter;
/**
* Returns true if the given object is an instance of Exporter. 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 Exporter;
/**
* Date and time of creation (RFC 3339 format).
*/
readonly createdAt: pulumi.Output<string>;
/**
* Datadog destination configuration. Cannot be used with `otlpDestination`.
*/
readonly datadogDestination: pulumi.Output<outputs.observability.ExporterDatadogDestination | undefined>;
/**
* ID of the data source linked to the data export. Use `scaleway.observability.getSources` to find available data sources.
*/
readonly datasourceId: pulumi.Output<string>;
/**
* Description of the data export.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* List of Scaleway products to export. Use `["all"]` to export all products. Use `scaleway.observability.getProducts` for valid product names. Defaults to `["all"]`.
*/
readonly exportedProducts: pulumi.Output<string[] | undefined>;
/**
* Name of the data export.
*/
readonly name: pulumi.Output<string>;
/**
* OTLP destination configuration. Cannot be used with `datadogDestination`.
*/
readonly otlpDestination: pulumi.Output<outputs.observability.ExporterOtlpDestination | undefined>;
/**
* ) The ID of the Project.
*/
readonly projectId: pulumi.Output<string>;
/**
* ) The region where the exporter is located.
*/
readonly region: pulumi.Output<string | undefined>;
/**
* Status of the data export (`creating`, `ready`, `error`).
*/
readonly status: pulumi.Output<string>;
/**
* Date and time of last update (RFC 3339 format).
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Create a Exporter 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: ExporterArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Exporter resources.
*/
export interface ExporterState {
/**
* Date and time of creation (RFC 3339 format).
*/
createdAt?: pulumi.Input<string | undefined>;
/**
* Datadog destination configuration. Cannot be used with `otlpDestination`.
*/
datadogDestination?: pulumi.Input<inputs.observability.ExporterDatadogDestination | undefined>;
/**
* ID of the data source linked to the data export. Use `scaleway.observability.getSources` to find available data sources.
*/
datasourceId?: pulumi.Input<string | undefined>;
/**
* Description of the data export.
*/
description?: pulumi.Input<string | undefined>;
/**
* List of Scaleway products to export. Use `["all"]` to export all products. Use `scaleway.observability.getProducts` for valid product names. Defaults to `["all"]`.
*/
exportedProducts?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Name of the data export.
*/
name?: pulumi.Input<string | undefined>;
/**
* OTLP destination configuration. Cannot be used with `datadogDestination`.
*/
otlpDestination?: pulumi.Input<inputs.observability.ExporterOtlpDestination | undefined>;
/**
* ) The ID of the Project.
*/
projectId?: pulumi.Input<string | undefined>;
/**
* ) The region where the exporter is located.
*/
region?: pulumi.Input<string | undefined>;
/**
* Status of the data export (`creating`, `ready`, `error`).
*/
status?: pulumi.Input<string | undefined>;
/**
* Date and time of last update (RFC 3339 format).
*/
updatedAt?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a Exporter resource.
*/
export interface ExporterArgs {
/**
* Datadog destination configuration. Cannot be used with `otlpDestination`.
*/
datadogDestination?: pulumi.Input<inputs.observability.ExporterDatadogDestination | undefined>;
/**
* ID of the data source linked to the data export. Use `scaleway.observability.getSources` to find available data sources.
*/
datasourceId: pulumi.Input<string>;
/**
* Description of the data export.
*/
description?: pulumi.Input<string | undefined>;
/**
* List of Scaleway products to export. Use `["all"]` to export all products. Use `scaleway.observability.getProducts` for valid product names. Defaults to `["all"]`.
*/
exportedProducts?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Name of the data export.
*/
name?: pulumi.Input<string | undefined>;
/**
* OTLP destination configuration. Cannot be used with `datadogDestination`.
*/
otlpDestination?: pulumi.Input<inputs.observability.ExporterOtlpDestination | undefined>;
/**
* ) The ID of the Project.
*/
projectId?: pulumi.Input<string | undefined>;
/**
* ) The region where the exporter is located.
*/
region?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=exporter.d.ts.map