1. Packages
  2. Scaleway
  3. API Docs
  4. CockpitSource
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

scaleway.CockpitSource

Explore with Pulumi AI

scaleway logo
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

    The scaleway.CockpitSource resource allows you to create and manage data sources in Scaleway’s Cockpit.

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

    Example Usage

    Create a data source

    The following command allows you to create a metrics data source named my-data-source in a given Project.

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const project = new scaleway.AccountProject("project", {name: "test project data source"});
    const main = new scaleway.CockpitSource("main", {
        projectId: project.id,
        name: "my-data-source",
        type: "metrics",
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    project = scaleway.AccountProject("project", name="test project data source")
    main = scaleway.CockpitSource("main",
        project_id=project.id,
        name="my-data-source",
        type="metrics")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		project, err := scaleway.NewAccountProject(ctx, "project", &scaleway.AccountProjectArgs{
    			Name: pulumi.String("test project data source"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewCockpitSource(ctx, "main", &scaleway.CockpitSourceArgs{
    			ProjectId: project.ID(),
    			Name:      pulumi.String("my-data-source"),
    			Type:      pulumi.String("metrics"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var project = new Scaleway.AccountProject("project", new()
        {
            Name = "test project data source",
        });
    
        var main = new Scaleway.CockpitSource("main", new()
        {
            ProjectId = project.Id,
            Name = "my-data-source",
            Type = "metrics",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.AccountProject;
    import com.pulumi.scaleway.AccountProjectArgs;
    import com.pulumi.scaleway.CockpitSource;
    import com.pulumi.scaleway.CockpitSourceArgs;
    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) {
            var project = new AccountProject("project", AccountProjectArgs.builder()
                .name("test project data source")
                .build());
    
            var main = new CockpitSource("main", CockpitSourceArgs.builder()
                .projectId(project.id())
                .name("my-data-source")
                .type("metrics")
                .build());
    
        }
    }
    
    resources:
      project:
        type: scaleway:AccountProject
        properties:
          name: test project data source
      main:
        type: scaleway:CockpitSource
        properties:
          projectId: ${project.id}
          name: my-data-source
          type: metrics
    

    Create CockpitSource Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CockpitSource(name: string, args?: CockpitSourceArgs, opts?: CustomResourceOptions);
    @overload
    def CockpitSource(resource_name: str,
                      args: Optional[CockpitSourceArgs] = None,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def CockpitSource(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      name: Optional[str] = None,
                      project_id: Optional[str] = None,
                      region: Optional[str] = None,
                      type: Optional[str] = None)
    func NewCockpitSource(ctx *Context, name string, args *CockpitSourceArgs, opts ...ResourceOption) (*CockpitSource, error)
    public CockpitSource(string name, CockpitSourceArgs? args = null, CustomResourceOptions? opts = null)
    public CockpitSource(String name, CockpitSourceArgs args)
    public CockpitSource(String name, CockpitSourceArgs args, CustomResourceOptions options)
    
    type: scaleway:CockpitSource
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CockpitSourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CockpitSourceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CockpitSourceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CockpitSourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CockpitSourceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var cockpitSourceResource = new Scaleway.CockpitSource("cockpitSourceResource", new()
    {
        Name = "string",
        ProjectId = "string",
        Region = "string",
        Type = "string",
    });
    
    example, err := scaleway.NewCockpitSource(ctx, "cockpitSourceResource", &scaleway.CockpitSourceArgs{
    	Name:      pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	Region:    pulumi.String("string"),
    	Type:      pulumi.String("string"),
    })
    
    var cockpitSourceResource = new CockpitSource("cockpitSourceResource", CockpitSourceArgs.builder()
        .name("string")
        .projectId("string")
        .region("string")
        .type("string")
        .build());
    
    cockpit_source_resource = scaleway.CockpitSource("cockpitSourceResource",
        name="string",
        project_id="string",
        region="string",
        type="string")
    
    const cockpitSourceResource = new scaleway.CockpitSource("cockpitSourceResource", {
        name: "string",
        projectId: "string",
        region: "string",
        type: "string",
    });
    
    type: scaleway:CockpitSource
    properties:
        name: string
        projectId: string
        region: string
        type: string
    

    CockpitSource Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CockpitSource resource accepts the following input properties:

    Name string
    The name of the data source.
    ProjectId string
    ) The ID of the Project the data source is associated with.
    Region string
    ) The region where the data source is located.
    Type string
    The type of data source. Possible values are: metrics, logs, or traces.
    Name string
    The name of the data source.
    ProjectId string
    ) The ID of the Project the data source is associated with.
    Region string
    ) The region where the data source is located.
    Type string
    The type of data source. Possible values are: metrics, logs, or traces.
    name String
    The name of the data source.
    projectId String
    ) The ID of the Project the data source is associated with.
    region String
    ) The region where the data source is located.
    type String
    The type of data source. Possible values are: metrics, logs, or traces.
    name string
    The name of the data source.
    projectId string
    ) The ID of the Project the data source is associated with.
    region string
    ) The region where the data source is located.
    type string
    The type of data source. Possible values are: metrics, logs, or traces.
    name str
    The name of the data source.
    project_id str
    ) The ID of the Project the data source is associated with.
    region str
    ) The region where the data source is located.
    type str
    The type of data source. Possible values are: metrics, logs, or traces.
    name String
    The name of the data source.
    projectId String
    ) The ID of the Project the data source is associated with.
    region String
    ) The region where the data source is located.
    type String
    The type of data source. Possible values are: metrics, logs, or traces.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CockpitSource resource produces the following output properties:

    CreatedAt string
    The date and time the data source was created (in RFC 3339 format).
    Id string
    The provider-assigned unique ID for this managed resource.
    Origin string
    The origin of the Cockpit data source.
    PushUrl string
    The URL endpoint used for pushing data to the Cockpit data source.
    SynchronizedWithGrafana bool
    Indicates whether the data source is synchronized with Grafana.
    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 provider-assigned unique ID for this managed resource.
    Origin string
    The origin of the Cockpit data source.
    PushUrl string
    The URL endpoint used for pushing data to the Cockpit data source.
    SynchronizedWithGrafana bool
    Indicates whether the data source is synchronized with Grafana.
    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 provider-assigned unique ID for this managed resource.
    origin String
    The origin of the Cockpit data source.
    pushUrl String
    The URL endpoint used for pushing data to the Cockpit data source.
    synchronizedWithGrafana Boolean
    Indicates whether the data source is synchronized with Grafana.
    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 provider-assigned unique ID for this managed resource.
    origin string
    The origin of the Cockpit data source.
    pushUrl string
    The URL endpoint used for pushing data to the Cockpit data source.
    synchronizedWithGrafana boolean
    Indicates whether the data source is synchronized with Grafana.
    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 provider-assigned unique ID for this managed resource.
    origin str
    The origin of the Cockpit data source.
    push_url str
    The URL endpoint used for pushing data to the Cockpit data source.
    synchronized_with_grafana bool
    Indicates whether the data source is synchronized with Grafana.
    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 provider-assigned unique ID for this managed resource.
    origin String
    The origin of the Cockpit data source.
    pushUrl String
    The URL endpoint used for pushing data to the Cockpit data source.
    synchronizedWithGrafana Boolean
    Indicates whether the data source is synchronized with Grafana.
    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.

    Look up Existing CockpitSource Resource

    Get an existing CockpitSource resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CockpitSourceState, opts?: CustomResourceOptions): CockpitSource
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            name: Optional[str] = None,
            origin: Optional[str] = None,
            project_id: Optional[str] = None,
            push_url: Optional[str] = None,
            region: Optional[str] = None,
            synchronized_with_grafana: Optional[bool] = None,
            type: Optional[str] = None,
            updated_at: Optional[str] = None,
            url: Optional[str] = None) -> CockpitSource
    func GetCockpitSource(ctx *Context, name string, id IDInput, state *CockpitSourceState, opts ...ResourceOption) (*CockpitSource, error)
    public static CockpitSource Get(string name, Input<string> id, CockpitSourceState? state, CustomResourceOptions? opts = null)
    public static CockpitSource get(String name, Output<String> id, CockpitSourceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreatedAt string
    The date and time the data source was created (in RFC 3339 format).
    Name string
    The name of the data source.
    Origin string
    The origin of the Cockpit data source.
    ProjectId string
    ) The ID of the Project the data source is associated with.
    PushUrl string
    The URL endpoint used for pushing data to the Cockpit data source.
    Region string
    ) The region where the data source is located.
    SynchronizedWithGrafana bool
    Indicates whether the data source is synchronized with Grafana.
    Type string
    The type of data source. Possible values are: metrics, logs, or traces.
    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).
    Name string
    The name of the data source.
    Origin string
    The origin of the Cockpit data source.
    ProjectId string
    ) The ID of the Project the data source is associated with.
    PushUrl string
    The URL endpoint used for pushing data to the Cockpit data source.
    Region string
    ) The region where the data source is located.
    SynchronizedWithGrafana bool
    Indicates whether the data source is synchronized with Grafana.
    Type string
    The type of data source. Possible values are: metrics, logs, or traces.
    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).
    name String
    The name of the data source.
    origin String
    The origin of the Cockpit data source.
    projectId String
    ) The ID of the Project the data source is associated with.
    pushUrl String
    The URL endpoint used for pushing data to the Cockpit data source.
    region String
    ) The region where the data source is located.
    synchronizedWithGrafana Boolean
    Indicates whether the data source is synchronized with Grafana.
    type String
    The type of data source. Possible values are: metrics, logs, or traces.
    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).
    name string
    The name of the data source.
    origin string
    The origin of the Cockpit data source.
    projectId string
    ) The ID of the Project the data source is associated with.
    pushUrl string
    The URL endpoint used for pushing data to the Cockpit data source.
    region string
    ) The region where the data source is located.
    synchronizedWithGrafana boolean
    Indicates whether the data source is synchronized with Grafana.
    type string
    The type of data source. Possible values are: metrics, logs, or traces.
    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).
    name str
    The name of the data source.
    origin str
    The origin of the Cockpit data source.
    project_id str
    ) The ID of the Project the data source is associated with.
    push_url str
    The URL endpoint used for pushing data to the Cockpit data source.
    region str
    ) The region where the data source is located.
    synchronized_with_grafana bool
    Indicates whether the data source is synchronized with Grafana.
    type str
    The type of data source. Possible values are: metrics, logs, or traces.
    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).
    name String
    The name of the data source.
    origin String
    The origin of the Cockpit data source.
    projectId String
    ) The ID of the Project the data source is associated with.
    pushUrl String
    The URL endpoint used for pushing data to the Cockpit data source.
    region String
    ) The region where the data source is located.
    synchronizedWithGrafana Boolean
    Indicates whether the data source is synchronized with Grafana.
    type String
    The type of data source. Possible values are: metrics, logs, or traces.
    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.

    Import

    This section explains how to import a data source using the ID of the region it is located in, in the {region}/{id} format.

    bash

    $ pulumi import scaleway:index/cockpitSource:CockpitSource main fr-par/11111111-1111-1111-1111-111111111111
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse