@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
240 lines • 6.33 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* Gets information about multiple Cockpit data sources.
*
* ## Example Usage
*
* ### List all sources in a project
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const all = scaleway.observability.getSources({
* projectId: "11111111-1111-1111-1111-111111111111",
* });
* ```
*
* ### Filter sources by type
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const metrics = scaleway.observability.getSources({
* projectId: "11111111-1111-1111-1111-111111111111",
* type: "metrics",
* });
* ```
*
* ### Filter sources by name
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const mySources = scaleway.observability.getSources({
* projectId: "11111111-1111-1111-1111-111111111111",
* name: "my-data-source",
* });
* ```
*
* ### Filter sources by origin
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const custom = scaleway.observability.getSources({
* projectId: "11111111-1111-1111-1111-111111111111",
* origin: "custom",
* });
* ```
*
* ### List default Scaleway sources
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const _default = scaleway.observability.getSources({
* projectId: "11111111-1111-1111-1111-111111111111",
* origin: "scaleway",
* });
* ```
*/
export declare function getSources(args?: GetSourcesArgs, opts?: pulumi.InvokeOptions): Promise<GetSourcesResult>;
/**
* A collection of arguments for invoking getSources.
*/
export interface GetSourcesArgs {
/**
* Filter sources by name.
*/
name?: string;
/**
* Filter sources by origin. Possible values are: `scaleway`, `custom`.
*/
origin?: string;
/**
* The project ID the cockpit sources are associated with.
*/
projectId?: string;
/**
* The region in which the cockpit sources are located.
*/
region?: string;
/**
* Filter sources by type. Possible values are: `metrics`, `logs`, `traces`.
*/
type?: string;
}
/**
* A collection of values returned by getSources.
*/
export interface GetSourcesResult {
/**
* The date and time of the creation of the cockpit datasource.
*/
readonly createdAt: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* Name of the datasource.
*/
readonly name?: string;
/**
* The origin of the datasource.
*/
readonly origin?: string;
/**
* The project ID of the data source.
*/
readonly projectId?: string;
/**
* The URL endpoint used for pushing data to the cockpit data source.
*/
readonly pushUrl: string;
/**
* The region of the data source.
*/
readonly region?: string;
/**
* The number of days to retain data.
*/
readonly retentionDays: number;
/**
* List of cockpit sources.
*/
readonly sources: outputs.observability.GetSourcesSource[];
/**
* Indicates whether the data source is synchronized with Grafana.
*/
readonly synchronizedWithGrafana: boolean;
/**
* The type of the datasource.
*/
readonly type?: string;
/**
* The date and time of the last update of the cockpit datasource.
*/
readonly updatedAt: string;
/**
* The URL of the datasource.
*/
readonly url: string;
}
/**
* Gets information about multiple Cockpit data sources.
*
* ## Example Usage
*
* ### List all sources in a project
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const all = scaleway.observability.getSources({
* projectId: "11111111-1111-1111-1111-111111111111",
* });
* ```
*
* ### Filter sources by type
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const metrics = scaleway.observability.getSources({
* projectId: "11111111-1111-1111-1111-111111111111",
* type: "metrics",
* });
* ```
*
* ### Filter sources by name
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const mySources = scaleway.observability.getSources({
* projectId: "11111111-1111-1111-1111-111111111111",
* name: "my-data-source",
* });
* ```
*
* ### Filter sources by origin
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const custom = scaleway.observability.getSources({
* projectId: "11111111-1111-1111-1111-111111111111",
* origin: "custom",
* });
* ```
*
* ### List default Scaleway sources
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const _default = scaleway.observability.getSources({
* projectId: "11111111-1111-1111-1111-111111111111",
* origin: "scaleway",
* });
* ```
*/
export declare function getSourcesOutput(args?: GetSourcesOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetSourcesResult>;
/**
* A collection of arguments for invoking getSources.
*/
export interface GetSourcesOutputArgs {
/**
* Filter sources by name.
*/
name?: pulumi.Input<string | undefined>;
/**
* Filter sources by origin. Possible values are: `scaleway`, `custom`.
*/
origin?: pulumi.Input<string | undefined>;
/**
* The project ID the cockpit sources are associated with.
*/
projectId?: pulumi.Input<string | undefined>;
/**
* The region in which the cockpit sources are located.
*/
region?: pulumi.Input<string | undefined>;
/**
* Filter sources by type. Possible values are: `metrics`, `logs`, `traces`.
*/
type?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=getSources.d.ts.map