Provides a resource to create a CLS Dashboard.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const dashboard = new tencentcloud.ClsDashboard("dashboard", {dashboardName: "my-dashboard"});
import pulumi
import pulumi_tencentcloud as tencentcloud
dashboard = tencentcloud.ClsDashboard("dashboard", dashboard_name="my-dashboard")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewClsDashboard(ctx, "dashboard", &tencentcloud.ClsDashboardArgs{
DashboardName: pulumi.String("my-dashboard"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var dashboard = new Tencentcloud.ClsDashboard("dashboard", new()
{
DashboardName = "my-dashboard",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClsDashboard;
import com.pulumi.tencentcloud.ClsDashboardArgs;
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 dashboard = new ClsDashboard("dashboard", ClsDashboardArgs.builder()
.dashboardName("my-dashboard")
.build());
}
}
resources:
dashboard:
type: tencentcloud:ClsDashboard
properties:
dashboardName: my-dashboard
With configuration data
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const dashboard = new tencentcloud.ClsDashboard("dashboard", {
dashboardName: "production-dashboard",
data: JSON.stringify({
timezone: "browser",
subType: "CLS_Host",
}),
tags: {
team: "ops",
environment: "production",
},
});
import pulumi
import json
import pulumi_tencentcloud as tencentcloud
dashboard = tencentcloud.ClsDashboard("dashboard",
dashboard_name="production-dashboard",
data=json.dumps({
"timezone": "browser",
"subType": "CLS_Host",
}),
tags={
"team": "ops",
"environment": "production",
})
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"timezone": "browser",
"subType": "CLS_Host",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = tencentcloud.NewClsDashboard(ctx, "dashboard", &tencentcloud.ClsDashboardArgs{
DashboardName: pulumi.String("production-dashboard"),
Data: pulumi.String(json0),
Tags: pulumi.StringMap{
"team": pulumi.String("ops"),
"environment": pulumi.String("production"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var dashboard = new Tencentcloud.ClsDashboard("dashboard", new()
{
DashboardName = "production-dashboard",
Data = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["timezone"] = "browser",
["subType"] = "CLS_Host",
}),
Tags =
{
{ "team", "ops" },
{ "environment", "production" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClsDashboard;
import com.pulumi.tencentcloud.ClsDashboardArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 dashboard = new ClsDashboard("dashboard", ClsDashboardArgs.builder()
.dashboardName("production-dashboard")
.data(serializeJson(
jsonObject(
jsonProperty("timezone", "browser"),
jsonProperty("subType", "CLS_Host")
)))
.tags(Map.ofEntries(
Map.entry("team", "ops"),
Map.entry("environment", "production")
))
.build());
}
}
resources:
dashboard:
type: tencentcloud:ClsDashboard
properties:
dashboardName: production-dashboard
data:
fn::toJSON:
timezone: browser
subType: CLS_Host
tags:
team: ops
environment: production
Create ClsDashboard Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClsDashboard(name: string, args: ClsDashboardArgs, opts?: CustomResourceOptions);@overload
def ClsDashboard(resource_name: str,
args: ClsDashboardArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClsDashboard(resource_name: str,
opts: Optional[ResourceOptions] = None,
dashboard_name: Optional[str] = None,
cls_dashboard_id: Optional[str] = None,
data: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)func NewClsDashboard(ctx *Context, name string, args ClsDashboardArgs, opts ...ResourceOption) (*ClsDashboard, error)public ClsDashboard(string name, ClsDashboardArgs args, CustomResourceOptions? opts = null)
public ClsDashboard(String name, ClsDashboardArgs args)
public ClsDashboard(String name, ClsDashboardArgs args, CustomResourceOptions options)
type: tencentcloud:ClsDashboard
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 ClsDashboardArgs
- 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 ClsDashboardArgs
- 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 ClsDashboardArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClsDashboardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClsDashboardArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClsDashboard 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 ClsDashboard resource accepts the following input properties:
- Dashboard
Name string - Dashboard name, which must be unique within the account.
- Cls
Dashboard stringId - ID of the resource.
- Data string
- Dashboard configuration data in JSON format. If not specified, an empty dashboard will be created.
- Dictionary<string, string>
- Tag key-value pairs. Maximum of 10 tags.
- Dashboard
Name string - Dashboard name, which must be unique within the account.
- Cls
Dashboard stringId - ID of the resource.
- Data string
- Dashboard configuration data in JSON format. If not specified, an empty dashboard will be created.
- map[string]string
- Tag key-value pairs. Maximum of 10 tags.
- dashboard
Name String - Dashboard name, which must be unique within the account.
- cls
Dashboard StringId - ID of the resource.
- data String
- Dashboard configuration data in JSON format. If not specified, an empty dashboard will be created.
- Map<String,String>
- Tag key-value pairs. Maximum of 10 tags.
- dashboard
Name string - Dashboard name, which must be unique within the account.
- cls
Dashboard stringId - ID of the resource.
- data string
- Dashboard configuration data in JSON format. If not specified, an empty dashboard will be created.
- {[key: string]: string}
- Tag key-value pairs. Maximum of 10 tags.
- dashboard_
name str - Dashboard name, which must be unique within the account.
- cls_
dashboard_ strid - ID of the resource.
- data str
- Dashboard configuration data in JSON format. If not specified, an empty dashboard will be created.
- Mapping[str, str]
- Tag key-value pairs. Maximum of 10 tags.
- dashboard
Name String - Dashboard name, which must be unique within the account.
- cls
Dashboard StringId - ID of the resource.
- data String
- Dashboard configuration data in JSON format. If not specified, an empty dashboard will be created.
- Map<String>
- Tag key-value pairs. Maximum of 10 tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClsDashboard resource produces the following output properties:
- Create
Time string - Creation time.
- Dashboard
Id string - Dashboard ID (globally unique identifier).
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time string - Last update time.
- Create
Time string - Creation time.
- Dashboard
Id string - Dashboard ID (globally unique identifier).
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time string - Last update time.
- create
Time String - Creation time.
- dashboard
Id String - Dashboard ID (globally unique identifier).
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time String - Last update time.
- create
Time string - Creation time.
- dashboard
Id string - Dashboard ID (globally unique identifier).
- id string
- The provider-assigned unique ID for this managed resource.
- update
Time string - Last update time.
- create_
time str - Creation time.
- dashboard_
id str - Dashboard ID (globally unique identifier).
- id str
- The provider-assigned unique ID for this managed resource.
- update_
time str - Last update time.
- create
Time String - Creation time.
- dashboard
Id String - Dashboard ID (globally unique identifier).
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time String - Last update time.
Look up Existing ClsDashboard Resource
Get an existing ClsDashboard 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?: ClsDashboardState, opts?: CustomResourceOptions): ClsDashboard@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cls_dashboard_id: Optional[str] = None,
create_time: Optional[str] = None,
dashboard_id: Optional[str] = None,
dashboard_name: Optional[str] = None,
data: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
update_time: Optional[str] = None) -> ClsDashboardfunc GetClsDashboard(ctx *Context, name string, id IDInput, state *ClsDashboardState, opts ...ResourceOption) (*ClsDashboard, error)public static ClsDashboard Get(string name, Input<string> id, ClsDashboardState? state, CustomResourceOptions? opts = null)public static ClsDashboard get(String name, Output<String> id, ClsDashboardState state, CustomResourceOptions options)resources: _: type: tencentcloud:ClsDashboard get: id: ${id}- 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.
- Cls
Dashboard stringId - ID of the resource.
- Create
Time string - Creation time.
- Dashboard
Id string - Dashboard ID (globally unique identifier).
- Dashboard
Name string - Dashboard name, which must be unique within the account.
- Data string
- Dashboard configuration data in JSON format. If not specified, an empty dashboard will be created.
- Dictionary<string, string>
- Tag key-value pairs. Maximum of 10 tags.
- Update
Time string - Last update time.
- Cls
Dashboard stringId - ID of the resource.
- Create
Time string - Creation time.
- Dashboard
Id string - Dashboard ID (globally unique identifier).
- Dashboard
Name string - Dashboard name, which must be unique within the account.
- Data string
- Dashboard configuration data in JSON format. If not specified, an empty dashboard will be created.
- map[string]string
- Tag key-value pairs. Maximum of 10 tags.
- Update
Time string - Last update time.
- cls
Dashboard StringId - ID of the resource.
- create
Time String - Creation time.
- dashboard
Id String - Dashboard ID (globally unique identifier).
- dashboard
Name String - Dashboard name, which must be unique within the account.
- data String
- Dashboard configuration data in JSON format. If not specified, an empty dashboard will be created.
- Map<String,String>
- Tag key-value pairs. Maximum of 10 tags.
- update
Time String - Last update time.
- cls
Dashboard stringId - ID of the resource.
- create
Time string - Creation time.
- dashboard
Id string - Dashboard ID (globally unique identifier).
- dashboard
Name string - Dashboard name, which must be unique within the account.
- data string
- Dashboard configuration data in JSON format. If not specified, an empty dashboard will be created.
- {[key: string]: string}
- Tag key-value pairs. Maximum of 10 tags.
- update
Time string - Last update time.
- cls_
dashboard_ strid - ID of the resource.
- create_
time str - Creation time.
- dashboard_
id str - Dashboard ID (globally unique identifier).
- dashboard_
name str - Dashboard name, which must be unique within the account.
- data str
- Dashboard configuration data in JSON format. If not specified, an empty dashboard will be created.
- Mapping[str, str]
- Tag key-value pairs. Maximum of 10 tags.
- update_
time str - Last update time.
- cls
Dashboard StringId - ID of the resource.
- create
Time String - Creation time.
- dashboard
Id String - Dashboard ID (globally unique identifier).
- dashboard
Name String - Dashboard name, which must be unique within the account.
- data String
- Dashboard configuration data in JSON format. If not specified, an empty dashboard will be created.
- Map<String>
- Tag key-value pairs. Maximum of 10 tags.
- update
Time String - Last update time.
Import
CLS dashboard can be imported using the id, e.g.
$ pulumi import tencentcloud:index/clsDashboard:ClsDashboard dashboard dashboard-xxxx-xxxx-xxxx-xxxx
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
