Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

Resource

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 in 1.162.0+, log resource region should be set a main region: cn-heyuan

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new AliCloud.Log.Resource("example", new AliCloud.Log.ResourceArgs
        {
            Description = "user tf test 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\"}]}",
            Type = "userdefine",
        });
    }

}
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{
			Description: pulumi.String("user tf test 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\"}]}"),
			Type:        pulumi.String("userdefine"),
		})
		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()        
            .description("user tf test 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\"}]}")
            .type("userdefine")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.log.Resource("example",
    description="user tf test 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\"}]}",
    type="userdefine")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.log.Resource("example", {
    description: "user tf test 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\"}]}",
    type: "userdefine",
});
resources:
  example:
    type: alicloud:log:Resource
    properties:
      description: user tf test 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"}]}'
      type: userdefine

Create Resource Resource

new Resource(name: string, args: ResourceArgs, opts?: CustomResourceOptions);
@overload
def Resource(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             description: Optional[str] = None,
             ext_info: Optional[str] = None,
             name: Optional[str] = None,
             schema: Optional[str] = None,
             type: Optional[str] = None)
@overload
def Resource(resource_name: str,
             args: ResourceArgs,
             opts: Optional[ResourceOptions] = None)
func NewResource(ctx *Context, name string, args ResourceArgs, opts ...ResourceOption) (*Resource, error)
public Resource(string name, ResourceArgs args, CustomResourceOptions? opts = null)
public Resource(String name, ResourceArgs args)
public Resource(String name, ResourceArgs args, CustomResourceOptions options)
type: alicloud:log:Resource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ResourceArgs
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 ResourceArgs
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 ResourceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ResourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ResourceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Resource 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 Resource resource accepts the following input properties:

Schema string

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

Type string

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

Description string

The meta store's description.

ExtInfo string

The ext info of meta store.

Name string

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

Schema string

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

Type string

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

Description string

The meta store's description.

ExtInfo string

The ext info of meta store.

Name string

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

schema String

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

type String

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

description String

The meta store's description.

extInfo String

The ext info of meta store.

name String

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

schema string

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

type string

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

description string

The meta store's description.

extInfo string

The ext info of meta store.

name string

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

schema str

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

type str

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

description str

The meta store's description.

ext_info str

The ext info of meta store.

name str

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

schema String

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

type String

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

description String

The meta store's description.

extInfo String

The ext info of meta store.

name String

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

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing Resource Resource

Get an existing Resource 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?: ResourceState, opts?: CustomResourceOptions): Resource
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        ext_info: Optional[str] = None,
        name: Optional[str] = None,
        schema: Optional[str] = None,
        type: Optional[str] = None) -> Resource
func GetResource(ctx *Context, name string, id IDInput, state *ResourceState, opts ...ResourceOption) (*Resource, error)
public static Resource Get(string name, Input<string> id, ResourceState? state, CustomResourceOptions? opts = null)
public static Resource get(String name, Output<String> id, ResourceState 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:
Description string

The meta store's description.

ExtInfo string

The ext info of meta store.

Name string

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

Schema string

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

Type string

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

Description string

The meta store's description.

ExtInfo string

The ext info of meta store.

Name string

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

Schema string

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

Type string

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

description String

The meta store's description.

extInfo String

The ext info of meta store.

name String

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

schema String

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

type String

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

description string

The meta store's description.

extInfo string

The ext info of meta store.

name string

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

schema string

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

type string

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

description str

The meta store's description.

ext_info str

The ext info of meta store.

name str

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

schema str

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

type str

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

description String

The meta store's description.

extInfo String

The ext info of meta store.

name String

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

schema String

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

type String

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

Import

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

 $ pulumi import alicloud:log/resource:Resource example user.tf.test_resource

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.