ResourceArgs

data class ResourceArgs(val description: Output<String>? = null, val extInfo: Output<String>? = null, val name: Output<String>? = null, val schema: Output<String>? = null, val type: Output<String>? = null) : ConvertibleToJava<ResourceArgs>

Log resource is a meta store service provided by log service, resource can be used to define meta store's table structure. For information about SLS Resource and how to use it, see Resource management

NOTE: Available since v1.162.0. log resource region should be set a main region: cn-heyuan.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.log.Resource("example", {
type: "userdefine",
name: "user.tf.resource",
description: "user tf resource desc",
extInfo: "{}",
schema: ` {
"schema": [
{
"column": "col1",
"desc": "col1 desc",
"ext_info": {
},
"required": true,
"type": "string"
},
{
"column": "col2",
"desc": "col2 desc",
"ext_info": "optional",
"required": true,
"type": "string"
}
]
}
`,
});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.log.Resource("example",
type="userdefine",
name="user.tf.resource",
description="user tf resource desc",
ext_info="{}",
schema=""" {
"schema": [
{
"column": "col1",
"desc": "col1 desc",
"ext_info": {
},
"required": true,
"type": "string"
},
{
"column": "col2",
"desc": "col2 desc",
"ext_info": "optional",
"required": true,
"type": "string"
}
]
}
""")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.Log.Resource("example", new()
{
Type = "userdefine",
Name = "user.tf.resource",
Description = "user tf resource desc",
ExtInfo = "{}",
Schema = @" {
""schema"": [
{
""column"": ""col1"",
""desc"": ""col1 desc"",
""ext_info"": {
},
""required"": true,
""type"": ""string""
},
{
""column"": ""col2"",
""desc"": ""col2 desc"",
""ext_info"": ""optional"",
""required"": true,
""type"": ""string""
}
]
}
",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := log.NewResource(ctx, "example", &log.ResourceArgs{
Type: pulumi.String("userdefine"),
Name: pulumi.String("user.tf.resource"),
Description: pulumi.String("user tf resource desc"),
ExtInfo: pulumi.String("{}"),
Schema: pulumi.String(` {
"schema": [
{
"column": "col1",
"desc": "col1 desc",
"ext_info": {
},
"required": true,
"type": "string"
},
{
"column": "col2",
"desc": "col2 desc",
"ext_info": "optional",
"required": true,
"type": "string"
}
]
}
`),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.log.Resource;
import com.pulumi.alicloud.log.ResourceArgs;
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 example = new Resource("example", ResourceArgs.builder()
.type("userdefine")
.name("user.tf.resource")
.description("user tf resource desc")
.extInfo("{}")
.schema("""
{
"schema": [
{
"column": "col1",
"desc": "col1 desc",
"ext_info": {
},
"required": true,
"type": "string"
},
{
"column": "col2",
"desc": "col2 desc",
"ext_info": "optional",
"required": true,
"type": "string"
}
]
}
""")
.build());
}
}
resources:
example:
type: alicloud:log:Resource
properties:
type: userdefine
name: user.tf.resource
description: user tf resource desc
extInfo: '{}'
schema: |2
{
"schema": [
{
"column": "col1",
"desc": "col1 desc",
"ext_info": {
},
"required": true,
"type": "string"
},
{
"column": "col2",
"desc": "col2 desc",
"ext_info": "optional",
"required": true,
"type": "string"
}
]
}

Import

Log resource can be imported using the id, e.g.

$ pulumi import alicloud:log/resource:Resource example <id>

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, extInfo: Output<String>? = null, name: Output<String>? = null, schema: Output<String>? = null, type: Output<String>? = null)

Properties

Link copied to clipboard
val description: Output<String>? = null

The meta store's description.

Link copied to clipboard
val extInfo: Output<String>? = null

The ext info of meta store.

Link copied to clipboard
val name: Output<String>? = null

The meta store's name, can be used as table name.

Link copied to clipboard
val schema: Output<String>? = null

The meta store's schema info, which is json string format, used to define table's fields.

Link copied to clipboard
val type: Output<String>? = null

The meta store's type, userdefine e.g.

Functions

Link copied to clipboard
open override fun toJava(): ResourceArgs