tencentcloud.RedisLogDelivery
Explore with Pulumi AI
Provides a resource to create Redis instance log delivery land set its attributes.
NOTE: When you use an existing cls logset and topic to enable logging, there is no need to set parameters such as
period
,create_index
,log_region
, etc.
Example Usage
Use cls logset and topic which existed
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.RedisLogDelivery("example", {
instanceId: "crs-dmjj8en7",
logsetId: "cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c",
topicId: "5c2333e9-0bab-41fd-9f75-c602b3f9545f",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.RedisLogDelivery("example",
instance_id="crs-dmjj8en7",
logset_id="cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c",
topic_id="5c2333e9-0bab-41fd-9f75-c602b3f9545f")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewRedisLogDelivery(ctx, "example", &tencentcloud.RedisLogDeliveryArgs{
InstanceId: pulumi.String("crs-dmjj8en7"),
LogsetId: pulumi.String("cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c"),
TopicId: pulumi.String("5c2333e9-0bab-41fd-9f75-c602b3f9545f"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.RedisLogDelivery("example", new()
{
InstanceId = "crs-dmjj8en7",
LogsetId = "cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c",
TopicId = "5c2333e9-0bab-41fd-9f75-c602b3f9545f",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.RedisLogDelivery;
import com.pulumi.tencentcloud.RedisLogDeliveryArgs;
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 RedisLogDelivery("example", RedisLogDeliveryArgs.builder()
.instanceId("crs-dmjj8en7")
.logsetId("cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c")
.topicId("5c2333e9-0bab-41fd-9f75-c602b3f9545f")
.build());
}
}
resources:
example:
type: tencentcloud:RedisLogDelivery
properties:
instanceId: crs-dmjj8en7
logsetId: cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c
topicId: 5c2333e9-0bab-41fd-9f75-c602b3f9545f
Use exist cls logset and create new topic
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.RedisLogDelivery("example", {
createIndex: true,
instanceId: "crs-dmjj8en7",
logsetId: "cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c",
period: 20,
topicName: "tf-example",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.RedisLogDelivery("example",
create_index=True,
instance_id="crs-dmjj8en7",
logset_id="cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c",
period=20,
topic_name="tf-example")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewRedisLogDelivery(ctx, "example", &tencentcloud.RedisLogDeliveryArgs{
CreateIndex: pulumi.Bool(true),
InstanceId: pulumi.String("crs-dmjj8en7"),
LogsetId: pulumi.String("cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c"),
Period: pulumi.Float64(20),
TopicName: pulumi.String("tf-example"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.RedisLogDelivery("example", new()
{
CreateIndex = true,
InstanceId = "crs-dmjj8en7",
LogsetId = "cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c",
Period = 20,
TopicName = "tf-example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.RedisLogDelivery;
import com.pulumi.tencentcloud.RedisLogDeliveryArgs;
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 RedisLogDelivery("example", RedisLogDeliveryArgs.builder()
.createIndex(true)
.instanceId("crs-dmjj8en7")
.logsetId("cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c")
.period(20)
.topicName("tf-example")
.build());
}
}
resources:
example:
type: tencentcloud:RedisLogDelivery
properties:
createIndex: true
instanceId: crs-dmjj8en7
logsetId: cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c
period: 20
topicName: tf-example
Create new cls logset and topic
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.RedisLogDelivery("example", {
createIndex: true,
instanceId: "crs-dmjj8en7",
logRegion: "ap-guangzhou",
logsetName: "tf-example",
period: 20,
topicName: "tf-example",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.RedisLogDelivery("example",
create_index=True,
instance_id="crs-dmjj8en7",
log_region="ap-guangzhou",
logset_name="tf-example",
period=20,
topic_name="tf-example")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewRedisLogDelivery(ctx, "example", &tencentcloud.RedisLogDeliveryArgs{
CreateIndex: pulumi.Bool(true),
InstanceId: pulumi.String("crs-dmjj8en7"),
LogRegion: pulumi.String("ap-guangzhou"),
LogsetName: pulumi.String("tf-example"),
Period: pulumi.Float64(20),
TopicName: pulumi.String("tf-example"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.RedisLogDelivery("example", new()
{
CreateIndex = true,
InstanceId = "crs-dmjj8en7",
LogRegion = "ap-guangzhou",
LogsetName = "tf-example",
Period = 20,
TopicName = "tf-example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.RedisLogDelivery;
import com.pulumi.tencentcloud.RedisLogDeliveryArgs;
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 RedisLogDelivery("example", RedisLogDeliveryArgs.builder()
.createIndex(true)
.instanceId("crs-dmjj8en7")
.logRegion("ap-guangzhou")
.logsetName("tf-example")
.period(20)
.topicName("tf-example")
.build());
}
}
resources:
example:
type: tencentcloud:RedisLogDelivery
properties:
createIndex: true
instanceId: crs-dmjj8en7
logRegion: ap-guangzhou
logsetName: tf-example
period: 20
topicName: tf-example
Create RedisLogDelivery Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RedisLogDelivery(name: string, args: RedisLogDeliveryArgs, opts?: CustomResourceOptions);
@overload
def RedisLogDelivery(resource_name: str,
args: RedisLogDeliveryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RedisLogDelivery(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
create_index: Optional[bool] = None,
log_region: Optional[str] = None,
logset_id: Optional[str] = None,
logset_name: Optional[str] = None,
period: Optional[float] = None,
redis_log_delivery_id: Optional[str] = None,
topic_id: Optional[str] = None,
topic_name: Optional[str] = None)
func NewRedisLogDelivery(ctx *Context, name string, args RedisLogDeliveryArgs, opts ...ResourceOption) (*RedisLogDelivery, error)
public RedisLogDelivery(string name, RedisLogDeliveryArgs args, CustomResourceOptions? opts = null)
public RedisLogDelivery(String name, RedisLogDeliveryArgs args)
public RedisLogDelivery(String name, RedisLogDeliveryArgs args, CustomResourceOptions options)
type: tencentcloud:RedisLogDelivery
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 RedisLogDeliveryArgs
- 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 RedisLogDeliveryArgs
- 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 RedisLogDeliveryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RedisLogDeliveryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RedisLogDeliveryArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
RedisLogDelivery Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RedisLogDelivery resource accepts the following input properties:
- Instance
Id string - Instance ID.
- Create
Index bool - Whether to create an index when creating a log topic.
- Log
Region string - The region where the log set is located; if not specified, the region where the instance is located will be used by default.
- Logset
Id string - The ID of the log set being delivered.
- Logset
Name string - Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
- Period double
- Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
- Redis
Log stringDelivery Id - ID of the resource.
- Topic
Id string - The ID of the topic being delivered.
- Topic
Name string - Log topic name, required when TopicId is empty, a new log topic will be automatically created.
- Instance
Id string - Instance ID.
- Create
Index bool - Whether to create an index when creating a log topic.
- Log
Region string - The region where the log set is located; if not specified, the region where the instance is located will be used by default.
- Logset
Id string - The ID of the log set being delivered.
- Logset
Name string - Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
- Period float64
- Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
- Redis
Log stringDelivery Id - ID of the resource.
- Topic
Id string - The ID of the topic being delivered.
- Topic
Name string - Log topic name, required when TopicId is empty, a new log topic will be automatically created.
- instance
Id String - Instance ID.
- create
Index Boolean - Whether to create an index when creating a log topic.
- log
Region String - The region where the log set is located; if not specified, the region where the instance is located will be used by default.
- logset
Id String - The ID of the log set being delivered.
- logset
Name String - Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
- period Double
- Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
- redis
Log StringDelivery Id - ID of the resource.
- topic
Id String - The ID of the topic being delivered.
- topic
Name String - Log topic name, required when TopicId is empty, a new log topic will be automatically created.
- instance
Id string - Instance ID.
- create
Index boolean - Whether to create an index when creating a log topic.
- log
Region string - The region where the log set is located; if not specified, the region where the instance is located will be used by default.
- logset
Id string - The ID of the log set being delivered.
- logset
Name string - Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
- period number
- Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
- redis
Log stringDelivery Id - ID of the resource.
- topic
Id string - The ID of the topic being delivered.
- topic
Name string - Log topic name, required when TopicId is empty, a new log topic will be automatically created.
- instance_
id str - Instance ID.
- create_
index bool - Whether to create an index when creating a log topic.
- log_
region str - The region where the log set is located; if not specified, the region where the instance is located will be used by default.
- logset_
id str - The ID of the log set being delivered.
- logset_
name str - Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
- period float
- Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
- redis_
log_ strdelivery_ id - ID of the resource.
- topic_
id str - The ID of the topic being delivered.
- topic_
name str - Log topic name, required when TopicId is empty, a new log topic will be automatically created.
- instance
Id String - Instance ID.
- create
Index Boolean - Whether to create an index when creating a log topic.
- log
Region String - The region where the log set is located; if not specified, the region where the instance is located will be used by default.
- logset
Id String - The ID of the log set being delivered.
- logset
Name String - Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
- period Number
- Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
- redis
Log StringDelivery Id - ID of the resource.
- topic
Id String - The ID of the topic being delivered.
- topic
Name String - Log topic name, required when TopicId is empty, a new log topic will be automatically created.
Outputs
All input properties are implicitly available as output properties. Additionally, the RedisLogDelivery 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 RedisLogDelivery Resource
Get an existing RedisLogDelivery 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?: RedisLogDeliveryState, opts?: CustomResourceOptions): RedisLogDelivery
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_index: Optional[bool] = None,
instance_id: Optional[str] = None,
log_region: Optional[str] = None,
logset_id: Optional[str] = None,
logset_name: Optional[str] = None,
period: Optional[float] = None,
redis_log_delivery_id: Optional[str] = None,
topic_id: Optional[str] = None,
topic_name: Optional[str] = None) -> RedisLogDelivery
func GetRedisLogDelivery(ctx *Context, name string, id IDInput, state *RedisLogDeliveryState, opts ...ResourceOption) (*RedisLogDelivery, error)
public static RedisLogDelivery Get(string name, Input<string> id, RedisLogDeliveryState? state, CustomResourceOptions? opts = null)
public static RedisLogDelivery get(String name, Output<String> id, RedisLogDeliveryState state, CustomResourceOptions options)
resources: _: type: tencentcloud:RedisLogDelivery get: id: ${id}
- 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.
- Create
Index bool - Whether to create an index when creating a log topic.
- Instance
Id string - Instance ID.
- Log
Region string - The region where the log set is located; if not specified, the region where the instance is located will be used by default.
- Logset
Id string - The ID of the log set being delivered.
- Logset
Name string - Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
- Period double
- Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
- Redis
Log stringDelivery Id - ID of the resource.
- Topic
Id string - The ID of the topic being delivered.
- Topic
Name string - Log topic name, required when TopicId is empty, a new log topic will be automatically created.
- Create
Index bool - Whether to create an index when creating a log topic.
- Instance
Id string - Instance ID.
- Log
Region string - The region where the log set is located; if not specified, the region where the instance is located will be used by default.
- Logset
Id string - The ID of the log set being delivered.
- Logset
Name string - Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
- Period float64
- Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
- Redis
Log stringDelivery Id - ID of the resource.
- Topic
Id string - The ID of the topic being delivered.
- Topic
Name string - Log topic name, required when TopicId is empty, a new log topic will be automatically created.
- create
Index Boolean - Whether to create an index when creating a log topic.
- instance
Id String - Instance ID.
- log
Region String - The region where the log set is located; if not specified, the region where the instance is located will be used by default.
- logset
Id String - The ID of the log set being delivered.
- logset
Name String - Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
- period Double
- Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
- redis
Log StringDelivery Id - ID of the resource.
- topic
Id String - The ID of the topic being delivered.
- topic
Name String - Log topic name, required when TopicId is empty, a new log topic will be automatically created.
- create
Index boolean - Whether to create an index when creating a log topic.
- instance
Id string - Instance ID.
- log
Region string - The region where the log set is located; if not specified, the region where the instance is located will be used by default.
- logset
Id string - The ID of the log set being delivered.
- logset
Name string - Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
- period number
- Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
- redis
Log stringDelivery Id - ID of the resource.
- topic
Id string - The ID of the topic being delivered.
- topic
Name string - Log topic name, required when TopicId is empty, a new log topic will be automatically created.
- create_
index bool - Whether to create an index when creating a log topic.
- instance_
id str - Instance ID.
- log_
region str - The region where the log set is located; if not specified, the region where the instance is located will be used by default.
- logset_
id str - The ID of the log set being delivered.
- logset_
name str - Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
- period float
- Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
- redis_
log_ strdelivery_ id - ID of the resource.
- topic_
id str - The ID of the topic being delivered.
- topic_
name str - Log topic name, required when TopicId is empty, a new log topic will be automatically created.
- create
Index Boolean - Whether to create an index when creating a log topic.
- instance
Id String - Instance ID.
- log
Region String - The region where the log set is located; if not specified, the region where the instance is located will be used by default.
- logset
Id String - The ID of the log set being delivered.
- logset
Name String - Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
- period Number
- Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
- redis
Log StringDelivery Id - ID of the resource.
- topic
Id String - The ID of the topic being delivered.
- topic
Name String - Log topic name, required when TopicId is empty, a new log topic will be automatically created.
Import
Redis log delivery can be imported, e.g.
$ pulumi import tencentcloud:index/redisLogDelivery:RedisLogDelivery example crs-dmjj8en7
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.