1. Packages
  2. Scaleway
  3. API Docs
  4. CockpitSource
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

scaleway.CockpitSource

Explore with Pulumi AI

scaleway logo
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

    Creates and manages Scaleway Cockpit Data Sources.

    For more information consult the documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const project = new scaleway.AccountProject("project", {});
    const main = new scaleway.CockpitSource("main", {
        projectId: project.id,
        type: "metrics",
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    project = scaleway.AccountProject("project")
    main = scaleway.CockpitSource("main",
        project_id=project.id,
        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", nil)
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewCockpitSource(ctx, "main", &scaleway.CockpitSourceArgs{
    			ProjectId: project.ID(),
    			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");
    
        var main = new Scaleway.CockpitSource("main", new()
        {
            ProjectId = project.Id,
            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.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");
    
            var main = new CockpitSource("main", CockpitSourceArgs.builder()        
                .projectId(project.id())
                .type("metrics")
                .build());
    
        }
    }
    
    resources:
      project:
        type: scaleway:AccountProject
      main:
        type: scaleway:CockpitSource
        properties:
          projectId: ${project.id}
          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

    The CockpitSource resource accepts the following input properties:

    Name string
    The name of the cockpit data source.
    ProjectId string
    project_id) The ID of the project the cockpit data source is associated with.
    Region string
    region) The region of the cockpit datasource.
    Type string
    The type of the cockpit data source. Possible values are: metrics, logs or traces.
    Name string
    The name of the cockpit data source.
    ProjectId string
    project_id) The ID of the project the cockpit data source is associated with.
    Region string
    region) The region of the cockpit datasource.
    Type string
    The type of the cockpit data source. Possible values are: metrics, logs or traces.
    name String
    The name of the cockpit data source.
    projectId String
    project_id) The ID of the project the cockpit data source is associated with.
    region String
    region) The region of the cockpit datasource.
    type String
    The type of the cockpit data source. Possible values are: metrics, logs or traces.
    name string
    The name of the cockpit data source.
    projectId string
    project_id) The ID of the project the cockpit data source is associated with.
    region string
    region) The region of the cockpit datasource.
    type string
    The type of the cockpit data source. Possible values are: metrics, logs or traces.
    name str
    The name of the cockpit data source.
    project_id str
    project_id) The ID of the project the cockpit data source is associated with.
    region str
    region) The region of the cockpit datasource.
    type str
    The type of the cockpit data source. Possible values are: metrics, logs or traces.
    name String
    The name of the cockpit data source.
    projectId String
    project_id) The ID of the project the cockpit data source is associated with.
    region String
    region) The region of the cockpit datasource.
    type String
    The type of the cockpit 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
    Date and time of the cockpit data source's creation (RFC 3339 format).
    Id string
    The provider-assigned unique ID for this managed resource.
    Origin string
    The origin of the cockpit data source.
    SynchronizedWithGrafana bool
    Indicates whether the data source is synchronized with Grafana.
    UpdatedAt string
    Date and time of the cockpit datas ource's last update (RFC 3339 format).
    Url string
    The URL of the cockpit data source.
    CreatedAt string
    Date and time of the cockpit data source's creation (RFC 3339 format).
    Id string
    The provider-assigned unique ID for this managed resource.
    Origin string
    The origin of the cockpit data source.
    SynchronizedWithGrafana bool
    Indicates whether the data source is synchronized with Grafana.
    UpdatedAt string
    Date and time of the cockpit datas ource's last update (RFC 3339 format).
    Url string
    The URL of the cockpit data source.
    createdAt String
    Date and time of the cockpit data source's creation (RFC 3339 format).
    id String
    The provider-assigned unique ID for this managed resource.
    origin String
    The origin of the cockpit data source.
    synchronizedWithGrafana Boolean
    Indicates whether the data source is synchronized with Grafana.
    updatedAt String
    Date and time of the cockpit datas ource's last update (RFC 3339 format).
    url String
    The URL of the cockpit data source.
    createdAt string
    Date and time of the cockpit data source's creation (RFC 3339 format).
    id string
    The provider-assigned unique ID for this managed resource.
    origin string
    The origin of the cockpit data source.
    synchronizedWithGrafana boolean
    Indicates whether the data source is synchronized with Grafana.
    updatedAt string
    Date and time of the cockpit datas ource's last update (RFC 3339 format).
    url string
    The URL of the cockpit data source.
    created_at str
    Date and time of the cockpit data source's creation (RFC 3339 format).
    id str
    The provider-assigned unique ID for this managed resource.
    origin str
    The origin of the cockpit data source.
    synchronized_with_grafana bool
    Indicates whether the data source is synchronized with Grafana.
    updated_at str
    Date and time of the cockpit datas ource's last update (RFC 3339 format).
    url str
    The URL of the cockpit data source.
    createdAt String
    Date and time of the cockpit data source's creation (RFC 3339 format).
    id String
    The provider-assigned unique ID for this managed resource.
    origin String
    The origin of the cockpit data source.
    synchronizedWithGrafana Boolean
    Indicates whether the data source is synchronized with Grafana.
    updatedAt String
    Date and time of the cockpit datas ource's last update (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,
            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
    Date and time of the cockpit data source's creation (RFC 3339 format).
    Name string
    The name of the cockpit data source.
    Origin string
    The origin of the cockpit data source.
    ProjectId string
    project_id) The ID of the project the cockpit data source is associated with.
    Region string
    region) The region of the cockpit datasource.
    SynchronizedWithGrafana bool
    Indicates whether the data source is synchronized with Grafana.
    Type string
    The type of the cockpit data source. Possible values are: metrics, logs or traces.
    UpdatedAt string
    Date and time of the cockpit datas ource's last update (RFC 3339 format).
    Url string
    The URL of the cockpit data source.
    CreatedAt string
    Date and time of the cockpit data source's creation (RFC 3339 format).
    Name string
    The name of the cockpit data source.
    Origin string
    The origin of the cockpit data source.
    ProjectId string
    project_id) The ID of the project the cockpit data source is associated with.
    Region string
    region) The region of the cockpit datasource.
    SynchronizedWithGrafana bool
    Indicates whether the data source is synchronized with Grafana.
    Type string
    The type of the cockpit data source. Possible values are: metrics, logs or traces.
    UpdatedAt string
    Date and time of the cockpit datas ource's last update (RFC 3339 format).
    Url string
    The URL of the cockpit data source.
    createdAt String
    Date and time of the cockpit data source's creation (RFC 3339 format).
    name String
    The name of the cockpit data source.
    origin String
    The origin of the cockpit data source.
    projectId String
    project_id) The ID of the project the cockpit data source is associated with.
    region String
    region) The region of the cockpit datasource.
    synchronizedWithGrafana Boolean
    Indicates whether the data source is synchronized with Grafana.
    type String
    The type of the cockpit data source. Possible values are: metrics, logs or traces.
    updatedAt String
    Date and time of the cockpit datas ource's last update (RFC 3339 format).
    url String
    The URL of the cockpit data source.
    createdAt string
    Date and time of the cockpit data source's creation (RFC 3339 format).
    name string
    The name of the cockpit data source.
    origin string
    The origin of the cockpit data source.
    projectId string
    project_id) The ID of the project the cockpit data source is associated with.
    region string
    region) The region of the cockpit datasource.
    synchronizedWithGrafana boolean
    Indicates whether the data source is synchronized with Grafana.
    type string
    The type of the cockpit data source. Possible values are: metrics, logs or traces.
    updatedAt string
    Date and time of the cockpit datas ource's last update (RFC 3339 format).
    url string
    The URL of the cockpit data source.
    created_at str
    Date and time of the cockpit data source's creation (RFC 3339 format).
    name str
    The name of the cockpit data source.
    origin str
    The origin of the cockpit data source.
    project_id str
    project_id) The ID of the project the cockpit data source is associated with.
    region str
    region) The region of the cockpit datasource.
    synchronized_with_grafana bool
    Indicates whether the data source is synchronized with Grafana.
    type str
    The type of the cockpit data source. Possible values are: metrics, logs or traces.
    updated_at str
    Date and time of the cockpit datas ource's last update (RFC 3339 format).
    url str
    The URL of the cockpit data source.
    createdAt String
    Date and time of the cockpit data source's creation (RFC 3339 format).
    name String
    The name of the cockpit data source.
    origin String
    The origin of the cockpit data source.
    projectId String
    project_id) The ID of the project the cockpit data source is associated with.
    region String
    region) The region of the cockpit datasource.
    synchronizedWithGrafana Boolean
    Indicates whether the data source is synchronized with Grafana.
    type String
    The type of the cockpit data source. Possible values are: metrics, logs or traces.
    updatedAt String
    Date and time of the cockpit datas ource's last update (RFC 3339 format).
    url String
    The URL of the cockpit data source.

    Import

    Cockpits Data Sources can be imported using the {region}/{id}, e.g.

    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.14.0 published on Thursday, Jun 6, 2024 by pulumiverse