alicloud.log.Resource
Explore with Pulumi AI
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"
}
]
}
""")
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
})
}
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 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"
}
]
}
Create Resource Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Resource(name: string, args: ResourceArgs, opts?: CustomResourceOptions);
@overload
def Resource(resource_name: str,
args: ResourceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Resource(resource_name: str,
opts: Optional[ResourceOptions] = None,
schema: Optional[str] = None,
type: Optional[str] = None,
description: Optional[str] = None,
ext_info: Optional[str] = None,
name: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var resourceResource = new AliCloud.Log.Resource("resourceResource", new()
{
Schema = "string",
Type = "string",
Description = "string",
ExtInfo = "string",
Name = "string",
});
example, err := log.NewResource(ctx, "resourceResource", &log.ResourceArgs{
Schema: pulumi.String("string"),
Type: pulumi.String("string"),
Description: pulumi.String("string"),
ExtInfo: pulumi.String("string"),
Name: pulumi.String("string"),
})
var resourceResource = new Resource("resourceResource", ResourceArgs.builder()
.schema("string")
.type("string")
.description("string")
.extInfo("string")
.name("string")
.build());
resource_resource = alicloud.log.Resource("resourceResource",
schema="string",
type="string",
description="string",
ext_info="string",
name="string")
const resourceResource = new alicloud.log.Resource("resourceResource", {
schema: "string",
type: "string",
description: "string",
extInfo: "string",
name: "string",
});
type: alicloud:log:Resource
properties:
description: string
extInfo: string
name: string
schema: string
type: string
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.
- Ext
Info 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.
- Ext
Info 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.
- ext
Info 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.
- ext
Info 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.
- ext
Info 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.
- Description string
- The meta store's description.
- Ext
Info 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.
- Ext
Info 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.
- ext
Info 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.
- ext
Info 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.
- ext
Info 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>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.