1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. log
  5. Resource
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.log.Resource

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    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", {
        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"
            }
          ]
        }
      
    `,
        type: "userdefine",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.log.Resource("example",
        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"
            }
          ]
        }
      
    """,
        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 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
    	})
    }
    
    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()
        {
            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""
            }
          ]
        }
      
    ",
            Type = "userdefine",
        });
    
    });
    
    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 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());
    
        }
    }
    
    resources:
      example:
        type: alicloud:log:Resource
        properties:
          description: user tf resource desc
          extInfo: '{}'
          schema: "    {\n      \"schema\": [\n        {\n          \"column\": \"col1\",\n          \"desc\": \"col1   desc\",\n          \"ext_info\": {\n          },\n          \"required\": true,\n          \"type\": \"string\"\n        },\n        {\n          \"column\": \"col2\",\n          \"desc\": \"col2   desc\",\n          \"ext_info\": \"optional\",\n          \"required\": true,\n          \"type\": \"string\"\n        }\n      ]\n    }\n  \n"
          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 <id>
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi