Alibaba Cloud

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

ResourceRecord

Log resource is a meta store service provided by log service, resource can be used to define meta store’s table structure, record can be used for table’s row data.

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.ResourceRecord("example", new AliCloud.Log.ResourceRecordArgs
        {
            RecordId = "user_tf_test_resource_1",
            ResourceName = "user.tf.test_resource",
            Tag = "test resource tag",
            Value = "{\"col1\": \"this is col1 value\", \"col2\": \"col2 value\"}",
        });
    }

}
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.NewResourceRecord(ctx, "example", &log.ResourceRecordArgs{
			RecordId:     pulumi.String("user_tf_test_resource_1"),
			ResourceName: pulumi.String("user.tf.test_resource"),
			Tag:          pulumi.String("test resource tag"),
			Value:        pulumi.String("{\"col1\": \"this is col1 value\", \"col2\": \"col2 value\"}"),
		})
		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.ResourceRecord;
import com.pulumi.alicloud.log.ResourceRecordArgs;
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 ResourceRecord("example", ResourceRecordArgs.builder()        
            .recordId("user_tf_test_resource_1")
            .resourceName("user.tf.test_resource")
            .tag("test resource tag")
            .value("{\"col1\": \"this is col1 value\", \"col2\": \"col2 value\"}")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.log.ResourceRecord("example",
    record_id="user_tf_test_resource_1",
    resource_name_="user.tf.test_resource",
    tag="test resource tag",
    value="{\"col1\": \"this is col1 value\", \"col2\": \"col2 value\"}")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.log.ResourceRecord("example", {
    recordId: "user_tf_test_resource_1",
    resourceName: "user.tf.test_resource",
    tag: "test resource tag",
    value: "{\"col1\": \"this is col1 value\", \"col2\": \"col2 value\"}",
});
resources:
  example:
    type: alicloud:log:ResourceRecord
    properties:
      recordId: user_tf_test_resource_1
      resourceName: user.tf.test_resource
      tag: test resource tag
      value: '{"col1": "this is col1 value", "col2": "col2 value"}'

Create ResourceRecord Resource

new ResourceRecord(name: string, args: ResourceRecordArgs, opts?: CustomResourceOptions);
@overload
def ResourceRecord(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   record_id: Optional[str] = None,
                   resource_name_: Optional[str] = None,
                   tag: Optional[str] = None,
                   value: Optional[str] = None)
@overload
def ResourceRecord(resource_name: str,
                   args: ResourceRecordArgs,
                   opts: Optional[ResourceOptions] = None)
func NewResourceRecord(ctx *Context, name string, args ResourceRecordArgs, opts ...ResourceOption) (*ResourceRecord, error)
public ResourceRecord(string name, ResourceRecordArgs args, CustomResourceOptions? opts = null)
public ResourceRecord(String name, ResourceRecordArgs args)
public ResourceRecord(String name, ResourceRecordArgs args, CustomResourceOptions options)
type: alicloud:log:ResourceRecord
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

RecordId string

The record's id, should be unique.

ResourceName string

The name defined in log_resource, log service have some internal resource, like sls.common.user, sls.common.user_group.

Tag string

The record's tag, can be used for search.

Value string

The json value of record.

RecordId string

The record's id, should be unique.

ResourceName string

The name defined in log_resource, log service have some internal resource, like sls.common.user, sls.common.user_group.

Tag string

The record's tag, can be used for search.

Value string

The json value of record.

recordId String

The record's id, should be unique.

resourceName String

The name defined in log_resource, log service have some internal resource, like sls.common.user, sls.common.user_group.

tag String

The record's tag, can be used for search.

value String

The json value of record.

recordId string

The record's id, should be unique.

resourceName string

The name defined in log_resource, log service have some internal resource, like sls.common.user, sls.common.user_group.

tag string

The record's tag, can be used for search.

value string

The json value of record.

record_id str

The record's id, should be unique.

resource_name str

The name defined in log_resource, log service have some internal resource, like sls.common.user, sls.common.user_group.

tag str

The record's tag, can be used for search.

value str

The json value of record.

recordId String

The record's id, should be unique.

resourceName String

The name defined in log_resource, log service have some internal resource, like sls.common.user, sls.common.user_group.

tag String

The record's tag, can be used for search.

value String

The json value of record.

Outputs

All input properties are implicitly available as output properties. Additionally, the ResourceRecord 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 ResourceRecord Resource

Get an existing ResourceRecord 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?: ResourceRecordState, opts?: CustomResourceOptions): ResourceRecord
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        record_id: Optional[str] = None,
        resource_name: Optional[str] = None,
        tag: Optional[str] = None,
        value: Optional[str] = None) -> ResourceRecord
func GetResourceRecord(ctx *Context, name string, id IDInput, state *ResourceRecordState, opts ...ResourceOption) (*ResourceRecord, error)
public static ResourceRecord Get(string name, Input<string> id, ResourceRecordState? state, CustomResourceOptions? opts = null)
public static ResourceRecord get(String name, Output<String> id, ResourceRecordState 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:
RecordId string

The record's id, should be unique.

ResourceName string

The name defined in log_resource, log service have some internal resource, like sls.common.user, sls.common.user_group.

Tag string

The record's tag, can be used for search.

Value string

The json value of record.

RecordId string

The record's id, should be unique.

ResourceName string

The name defined in log_resource, log service have some internal resource, like sls.common.user, sls.common.user_group.

Tag string

The record's tag, can be used for search.

Value string

The json value of record.

recordId String

The record's id, should be unique.

resourceName String

The name defined in log_resource, log service have some internal resource, like sls.common.user, sls.common.user_group.

tag String

The record's tag, can be used for search.

value String

The json value of record.

recordId string

The record's id, should be unique.

resourceName string

The name defined in log_resource, log service have some internal resource, like sls.common.user, sls.common.user_group.

tag string

The record's tag, can be used for search.

value string

The json value of record.

record_id str

The record's id, should be unique.

resource_name str

The name defined in log_resource, log service have some internal resource, like sls.common.user, sls.common.user_group.

tag str

The record's tag, can be used for search.

value str

The json value of record.

recordId String

The record's id, should be unique.

resourceName String

The name defined in log_resource, log service have some internal resource, like sls.common.user, sls.common.user_group.

tag String

The record's tag, can be used for search.

value String

The json value of record.

Import

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

 $ pulumi import alicloud:log/resourceRecord:ResourceRecord example user.tf.test_resource:user_tf_test_resource_1

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.