@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
170 lines • 6.05 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The `scaleway.observability.Source` data source allows you to retrieve information about a specific [data source](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#data-sources) in Scaleway's Cockpit.
*
* 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
*
* ### Retrieve a specific data source by ID
*
* The following example retrieves a Cockpit data source by its unique ID.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const example = scaleway.observability.getSource({
* id: "fr-par/11111111-1111-1111-1111-111111111111",
* });
* ```
*
* ### Retrieve a data source by filters
*
* You can also retrieve a data source by specifying filtering criteria such as `name`, `type`, and `origin`.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const filtered = scaleway.observability.getSource({
* projectId: "11111111-1111-1111-1111-111111111111",
* region: "fr-par",
* name: "my-data-source",
* });
* ```
*/
export declare function getSource(args?: GetSourceArgs, opts?: pulumi.InvokeOptions): Promise<GetSourceResult>;
/**
* A collection of arguments for invoking getSource.
*/
export interface GetSourceArgs {
/**
* The unique identifier of the Cockpit data source in the `{region}/{id}` format. If specified, other filters are ignored.
*/
id?: string;
/**
* The name of the data source.
*/
name?: string;
/**
* The origin of the data source. Possible values are:
*/
origin?: string;
/**
* The ID of the Project the data source is associated with. Defaults to the Project ID specified in the provider configuration.
*/
projectId?: string;
/**
* The region where the data source is located. Defaults to the region specified in the provider configuration.
*/
region?: string;
/**
* The [type](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#data-types) of data source. Possible values are: `metrics`, `logs`, or `traces`.
*/
type?: string;
}
/**
* A collection of values returned by getSource.
*/
export interface GetSourceResult {
/**
* The date and time the data source was created (in RFC 3339 format).
*/
readonly createdAt: string;
/**
* The unique identifier of the data source in the `{region}/{id}` format.
*/
readonly id?: string;
readonly name?: string;
/**
* The origin of the data source.
*/
readonly origin?: string;
readonly projectId?: string;
readonly pushUrl: string;
readonly region?: string;
/**
* The number of days the data is retained in the data source.
*/
readonly retentionDays: number;
/**
* Indicates whether the data source is synchronized with Grafana.
*/
readonly synchronizedWithGrafana: boolean;
readonly type?: string;
/**
* The date and time the data source was last updated (in RFC 3339 format).
*/
readonly updatedAt: string;
/**
* The URL of the Cockpit data source.
*/
readonly url: string;
}
/**
* The `scaleway.observability.Source` data source allows you to retrieve information about a specific [data source](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#data-sources) in Scaleway's Cockpit.
*
* 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
*
* ### Retrieve a specific data source by ID
*
* The following example retrieves a Cockpit data source by its unique ID.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const example = scaleway.observability.getSource({
* id: "fr-par/11111111-1111-1111-1111-111111111111",
* });
* ```
*
* ### Retrieve a data source by filters
*
* You can also retrieve a data source by specifying filtering criteria such as `name`, `type`, and `origin`.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const filtered = scaleway.observability.getSource({
* projectId: "11111111-1111-1111-1111-111111111111",
* region: "fr-par",
* name: "my-data-source",
* });
* ```
*/
export declare function getSourceOutput(args?: GetSourceOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetSourceResult>;
/**
* A collection of arguments for invoking getSource.
*/
export interface GetSourceOutputArgs {
/**
* The unique identifier of the Cockpit data source in the `{region}/{id}` format. If specified, other filters are ignored.
*/
id?: pulumi.Input<string | undefined>;
/**
* The name of the data source.
*/
name?: pulumi.Input<string | undefined>;
/**
* The origin of the data source. Possible values are:
*/
origin?: pulumi.Input<string | undefined>;
/**
* The ID of the Project the data source is associated with. Defaults to the Project ID specified in the provider configuration.
*/
projectId?: pulumi.Input<string | undefined>;
/**
* The region where the data source is located. Defaults to the region specified in the provider configuration.
*/
region?: pulumi.Input<string | undefined>;
/**
* The [type](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#data-types) of data source. Possible values are: `metrics`, `logs`, or `traces`.
*/
type?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=getSource.d.ts.map