1. Packages
  2. Scaleway
  3. API Docs
  4. getCockpitSource
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.getCockpitSource

Explore with Pulumi AI

Deprecated: scaleway.index/getcockpitsource.getCockpitSource has been deprecated in favor of scaleway.observability/getsource.getSource

The scaleway.observability.Source data source allows you to retrieve information about a specific data source in Scaleway’s Cockpit.

Refer to Cockpit’s product documentation and API documentation for more information.

Example Usage

Retrieve a specific data source by ID

The following example retrieves a Cockpit data source by its unique ID.

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";

const example = scaleway.observability.getSource({
    id: "fr-par/11111111-1111-1111-1111-111111111111",
});
Copy
import pulumi
import pulumi_scaleway as scaleway

example = scaleway.observability.get_source(id="fr-par/11111111-1111-1111-1111-111111111111")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/observability"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := observability.LookupSource(ctx, &observability.LookupSourceArgs{
			Id: pulumi.StringRef("fr-par/11111111-1111-1111-1111-111111111111"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;

return await Deployment.RunAsync(() => 
{
    var example = Scaleway.Observability.GetSource.Invoke(new()
    {
        Id = "fr-par/11111111-1111-1111-1111-111111111111",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.observability.ObservabilityFunctions;
import com.pulumi.scaleway.observability.inputs.GetSourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = ObservabilityFunctions.getSource(GetSourceArgs.builder()
            .id("fr-par/11111111-1111-1111-1111-111111111111")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: scaleway:observability:getSource
      arguments:
        id: fr-par/11111111-1111-1111-1111-111111111111
Copy

Retrieve a data source by filters

You can also retrieve a data source by specifying filtering criteria such as name, type, and origin.

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.observability.ObservabilityFunctions;
import com.pulumi.scaleway.observability.inputs.GetSourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var filtered = ObservabilityFunctions.getSource(GetSourceArgs.builder()
            .projectId("11111111-1111-1111-1111-111111111111")
            .region("fr-par")
            .name("my-data-source")
            .build());

    }
}
Copy
variables:
  filtered:
    fn::invoke:
      function: scaleway:observability:getSource
      arguments:
        projectId: 11111111-1111-1111-1111-111111111111
        region: fr-par
        name: my-data-source
Copy

Using getCockpitSource

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getCockpitSource(args: GetCockpitSourceArgs, opts?: InvokeOptions): Promise<GetCockpitSourceResult>
function getCockpitSourceOutput(args: GetCockpitSourceOutputArgs, opts?: InvokeOptions): Output<GetCockpitSourceResult>
Copy
def get_cockpit_source(id: Optional[str] = None,
                       name: Optional[str] = None,
                       origin: Optional[str] = None,
                       project_id: Optional[str] = None,
                       type: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetCockpitSourceResult
def get_cockpit_source_output(id: Optional[pulumi.Input[str]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       origin: Optional[pulumi.Input[str]] = None,
                       project_id: Optional[pulumi.Input[str]] = None,
                       type: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetCockpitSourceResult]
Copy
func LookupCockpitSource(ctx *Context, args *LookupCockpitSourceArgs, opts ...InvokeOption) (*LookupCockpitSourceResult, error)
func LookupCockpitSourceOutput(ctx *Context, args *LookupCockpitSourceOutputArgs, opts ...InvokeOption) LookupCockpitSourceResultOutput
Copy

> Note: This function is named LookupCockpitSource in the Go SDK.

public static class GetCockpitSource 
{
    public static Task<GetCockpitSourceResult> InvokeAsync(GetCockpitSourceArgs args, InvokeOptions? opts = null)
    public static Output<GetCockpitSourceResult> Invoke(GetCockpitSourceInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCockpitSourceResult> getCockpitSource(GetCockpitSourceArgs args, InvokeOptions options)
public static Output<GetCockpitSourceResult> getCockpitSource(GetCockpitSourceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:index/getCockpitSource:getCockpitSource
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id string
The unique identifier of the Cockpit data source in the {region}/{id} format. If specified, other filters are ignored.
Name string
The name of the data source.
Origin string
The origin of the data source. Possible values are:
ProjectId Changes to this property will trigger replacement. string
The ID of the Project the data source is associated with. Defaults to the Project ID specified in the provider configuration.
Type string
The type of data source. Possible values are: metrics, logs, or traces.
Id string
The unique identifier of the Cockpit data source in the {region}/{id} format. If specified, other filters are ignored.
Name string
The name of the data source.
Origin string
The origin of the data source. Possible values are:
ProjectId Changes to this property will trigger replacement. string
The ID of the Project the data source is associated with. Defaults to the Project ID specified in the provider configuration.
Type string
The type of data source. Possible values are: metrics, logs, or traces.
id String
The unique identifier of the Cockpit data source in the {region}/{id} format. If specified, other filters are ignored.
name String
The name of the data source.
origin String
The origin of the data source. Possible values are:
projectId Changes to this property will trigger replacement. String
The ID of the Project the data source is associated with. Defaults to the Project ID specified in the provider configuration.
type String
The type of data source. Possible values are: metrics, logs, or traces.
id string
The unique identifier of the Cockpit data source in the {region}/{id} format. If specified, other filters are ignored.
name string
The name of the data source.
origin string
The origin of the data source. Possible values are:
projectId Changes to this property will trigger replacement. string
The ID of the Project the data source is associated with. Defaults to the Project ID specified in the provider configuration.
type string
The type of data source. Possible values are: metrics, logs, or traces.
id str
The unique identifier of the Cockpit data source in the {region}/{id} format. If specified, other filters are ignored.
name str
The name of the data source.
origin str
The origin of the data source. Possible values are:
project_id Changes to this property will trigger replacement. str
The ID of the Project the data source is associated with. Defaults to the Project ID specified in the provider configuration.
type str
The type of data source. Possible values are: metrics, logs, or traces.
id String
The unique identifier of the Cockpit data source in the {region}/{id} format. If specified, other filters are ignored.
name String
The name of the data source.
origin String
The origin of the data source. Possible values are:
projectId Changes to this property will trigger replacement. String
The ID of the Project the data source is associated with. Defaults to the Project ID specified in the provider configuration.
type String
The type of data source. Possible values are: metrics, logs, or traces.

getCockpitSource Result

The following output properties are available:

CreatedAt string
The date and time the data source was created (in RFC 3339 format).
Id string
The unique identifier of the data source in the {region}/{id} format.
Name string
Origin string
The origin of the data source.
ProjectId string
Region string
RetentionDays int
The number of days the data is retained in the data source.
SynchronizedWithGrafana bool
Indicates whether the data source is synchronized with Grafana.
Type string
UpdatedAt string
The date and time the data source was last updated (in RFC 3339 format).
Url string
The URL of the Cockpit data source.
CreatedAt string
The date and time the data source was created (in RFC 3339 format).
Id string
The unique identifier of the data source in the {region}/{id} format.
Name string
Origin string
The origin of the data source.
ProjectId string
Region string
RetentionDays int
The number of days the data is retained in the data source.
SynchronizedWithGrafana bool
Indicates whether the data source is synchronized with Grafana.
Type string
UpdatedAt string
The date and time the data source was last updated (in RFC 3339 format).
Url string
The URL of the Cockpit data source.
createdAt String
The date and time the data source was created (in RFC 3339 format).
id String
The unique identifier of the data source in the {region}/{id} format.
name String
origin String
The origin of the data source.
projectId String
region String
retentionDays Integer
The number of days the data is retained in the data source.
synchronizedWithGrafana Boolean
Indicates whether the data source is synchronized with Grafana.
type String
updatedAt String
The date and time the data source was last updated (in RFC 3339 format).
url String
The URL of the Cockpit data source.
createdAt string
The date and time the data source was created (in RFC 3339 format).
id string
The unique identifier of the data source in the {region}/{id} format.
name string
origin string
The origin of the data source.
projectId string
region string
retentionDays number
The number of days the data is retained in the data source.
synchronizedWithGrafana boolean
Indicates whether the data source is synchronized with Grafana.
type string
updatedAt string
The date and time the data source was last updated (in RFC 3339 format).
url string
The URL of the Cockpit data source.
created_at str
The date and time the data source was created (in RFC 3339 format).
id str
The unique identifier of the data source in the {region}/{id} format.
name str
origin str
The origin of the data source.
project_id str
region str
retention_days int
The number of days the data is retained in the data source.
synchronized_with_grafana bool
Indicates whether the data source is synchronized with Grafana.
type str
updated_at str
The date and time the data source was last updated (in RFC 3339 format).
url str
The URL of the Cockpit data source.
createdAt String
The date and time the data source was created (in RFC 3339 format).
id String
The unique identifier of the data source in the {region}/{id} format.
name String
origin String
The origin of the data source.
projectId String
region String
retentionDays Number
The number of days the data is retained in the data source.
synchronizedWithGrafana Boolean
Indicates whether the data source is synchronized with Grafana.
type String
updatedAt String
The date and time the data source was last updated (in RFC 3339 format).
url String
The URL of the Cockpit data source.

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.