tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getEbEventRules
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
Use this data source to query detailed information of eb event_rules
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const foo = new tencentcloud.EbEventBus("foo", {
eventBusName: "tf-event_bus_rule",
description: "event bus desc",
enableStore: false,
saveDays: 1,
tags: {
createdBy: "terraform",
},
});
const eventRule = new tencentcloud.EbEventRule("eventRule", {
eventBusId: foo.ebEventBusId,
ruleName: "tf-event_rule",
description: "event rule desc",
enable: true,
eventPattern: JSON.stringify({
source: "apigw.cloud.tencent",
type: ["connector:apigw"],
}),
tags: {
createdBy: "terraform",
},
});
const eventRules = tencentcloud.getEbEventRulesOutput({
eventBusId: foo.ebEventBusId,
orderBy: "AddTime",
order: "DESC",
});
import pulumi
import json
import pulumi_tencentcloud as tencentcloud
foo = tencentcloud.EbEventBus("foo",
event_bus_name="tf-event_bus_rule",
description="event bus desc",
enable_store=False,
save_days=1,
tags={
"createdBy": "terraform",
})
event_rule = tencentcloud.EbEventRule("eventRule",
event_bus_id=foo.eb_event_bus_id,
rule_name="tf-event_rule",
description="event rule desc",
enable=True,
event_pattern=json.dumps({
"source": "apigw.cloud.tencent",
"type": ["connector:apigw"],
}),
tags={
"createdBy": "terraform",
})
event_rules = tencentcloud.get_eb_event_rules_output(event_bus_id=foo.eb_event_bus_id,
order_by="AddTime",
order="DESC")
package main
import (
"encoding/json"
"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 {
foo, err := tencentcloud.NewEbEventBus(ctx, "foo", &tencentcloud.EbEventBusArgs{
EventBusName: pulumi.String("tf-event_bus_rule"),
Description: pulumi.String("event bus desc"),
EnableStore: pulumi.Bool(false),
SaveDays: pulumi.Float64(1),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
if err != nil {
return err
}
tmpJSON0, err := json.Marshal(map[string]interface{}{
"source": "apigw.cloud.tencent",
"type": []string{
"connector:apigw",
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = tencentcloud.NewEbEventRule(ctx, "eventRule", &tencentcloud.EbEventRuleArgs{
EventBusId: foo.EbEventBusId,
RuleName: pulumi.String("tf-event_rule"),
Description: pulumi.String("event rule desc"),
Enable: pulumi.Bool(true),
EventPattern: pulumi.String(json0),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
if err != nil {
return err
}
_ = tencentcloud.GetEbEventRulesOutput(ctx, tencentcloud.GetEbEventRulesOutputArgs{
EventBusId: foo.EbEventBusId,
OrderBy: pulumi.String("AddTime"),
Order: pulumi.String("DESC"),
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var foo = new Tencentcloud.EbEventBus("foo", new()
{
EventBusName = "tf-event_bus_rule",
Description = "event bus desc",
EnableStore = false,
SaveDays = 1,
Tags =
{
{ "createdBy", "terraform" },
},
});
var eventRule = new Tencentcloud.EbEventRule("eventRule", new()
{
EventBusId = foo.EbEventBusId,
RuleName = "tf-event_rule",
Description = "event rule desc",
Enable = true,
EventPattern = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["source"] = "apigw.cloud.tencent",
["type"] = new[]
{
"connector:apigw",
},
}),
Tags =
{
{ "createdBy", "terraform" },
},
});
var eventRules = Tencentcloud.GetEbEventRules.Invoke(new()
{
EventBusId = foo.EbEventBusId,
OrderBy = "AddTime",
Order = "DESC",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.EbEventBus;
import com.pulumi.tencentcloud.EbEventBusArgs;
import com.pulumi.tencentcloud.EbEventRule;
import com.pulumi.tencentcloud.EbEventRuleArgs;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetEbEventRulesArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 foo = new EbEventBus("foo", EbEventBusArgs.builder()
.eventBusName("tf-event_bus_rule")
.description("event bus desc")
.enableStore(false)
.saveDays(1)
.tags(Map.of("createdBy", "terraform"))
.build());
var eventRule = new EbEventRule("eventRule", EbEventRuleArgs.builder()
.eventBusId(foo.ebEventBusId())
.ruleName("tf-event_rule")
.description("event rule desc")
.enable(true)
.eventPattern(serializeJson(
jsonObject(
jsonProperty("source", "apigw.cloud.tencent"),
jsonProperty("type", jsonArray("connector:apigw"))
)))
.tags(Map.of("createdBy", "terraform"))
.build());
final var eventRules = TencentcloudFunctions.getEbEventRules(GetEbEventRulesArgs.builder()
.eventBusId(foo.ebEventBusId())
.orderBy("AddTime")
.order("DESC")
.build());
}
}
resources:
foo:
type: tencentcloud:EbEventBus
properties:
eventBusName: tf-event_bus_rule
description: event bus desc
enableStore: false
saveDays: 1
tags:
createdBy: terraform
eventRule:
type: tencentcloud:EbEventRule
properties:
eventBusId: ${foo.ebEventBusId}
ruleName: tf-event_rule
description: event rule desc
enable: true
eventPattern:
fn::toJSON:
source: apigw.cloud.tencent
type:
- connector:apigw
tags:
createdBy: terraform
variables:
eventRules:
fn::invoke:
function: tencentcloud:getEbEventRules
arguments:
eventBusId: ${foo.ebEventBusId}
orderBy: AddTime
order: DESC
Using getEbEventRules
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getEbEventRules(args: GetEbEventRulesArgs, opts?: InvokeOptions): Promise<GetEbEventRulesResult>
function getEbEventRulesOutput(args: GetEbEventRulesOutputArgs, opts?: InvokeOptions): Output<GetEbEventRulesResult>
def get_eb_event_rules(event_bus_id: Optional[str] = None,
id: Optional[str] = None,
order: Optional[str] = None,
order_by: Optional[str] = None,
result_output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetEbEventRulesResult
def get_eb_event_rules_output(event_bus_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
order: Optional[pulumi.Input[str]] = None,
order_by: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEbEventRulesResult]
func GetEbEventRules(ctx *Context, args *GetEbEventRulesArgs, opts ...InvokeOption) (*GetEbEventRulesResult, error)
func GetEbEventRulesOutput(ctx *Context, args *GetEbEventRulesOutputArgs, opts ...InvokeOption) GetEbEventRulesResultOutput
> Note: This function is named GetEbEventRules
in the Go SDK.
public static class GetEbEventRules
{
public static Task<GetEbEventRulesResult> InvokeAsync(GetEbEventRulesArgs args, InvokeOptions? opts = null)
public static Output<GetEbEventRulesResult> Invoke(GetEbEventRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEbEventRulesResult> getEbEventRules(GetEbEventRulesArgs args, InvokeOptions options)
public static Output<GetEbEventRulesResult> getEbEventRules(GetEbEventRulesArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getEbEventRules:getEbEventRules
arguments:
# arguments dictionary
The following arguments are supported:
- Event
Bus stringId - event bus Id.
- Id string
- Order string
- Return results in ascending or descending order, optional values ASC (ascending) and DESC (descending).
- Order
By string - According to which field to sort the returned results, the following fields are supported: AddTime (creation time), ModTime (modification time).
- Result
Output stringFile - Used to save results.
- Event
Bus stringId - event bus Id.
- Id string
- Order string
- Return results in ascending or descending order, optional values ASC (ascending) and DESC (descending).
- Order
By string - According to which field to sort the returned results, the following fields are supported: AddTime (creation time), ModTime (modification time).
- Result
Output stringFile - Used to save results.
- event
Bus StringId - event bus Id.
- id String
- order String
- Return results in ascending or descending order, optional values ASC (ascending) and DESC (descending).
- order
By String - According to which field to sort the returned results, the following fields are supported: AddTime (creation time), ModTime (modification time).
- result
Output StringFile - Used to save results.
- event
Bus stringId - event bus Id.
- id string
- order string
- Return results in ascending or descending order, optional values ASC (ascending) and DESC (descending).
- order
By string - According to which field to sort the returned results, the following fields are supported: AddTime (creation time), ModTime (modification time).
- result
Output stringFile - Used to save results.
- event_
bus_ strid - event bus Id.
- id str
- order str
- Return results in ascending or descending order, optional values ASC (ascending) and DESC (descending).
- order_
by str - According to which field to sort the returned results, the following fields are supported: AddTime (creation time), ModTime (modification time).
- result_
output_ strfile - Used to save results.
- event
Bus StringId - event bus Id.
- id String
- order String
- Return results in ascending or descending order, optional values ASC (ascending) and DESC (descending).
- order
By String - According to which field to sort the returned results, the following fields are supported: AddTime (creation time), ModTime (modification time).
- result
Output StringFile - Used to save results.
getEbEventRules Result
The following output properties are available:
- Event
Bus stringId - event bus Id.
- Id string
- Rules
List<Get
Eb Event Rules Rule> - Event rule information.
- Order string
- Order
By string - Result
Output stringFile
- Event
Bus stringId - event bus Id.
- Id string
- Rules
[]Get
Eb Event Rules Rule - Event rule information.
- Order string
- Order
By string - Result
Output stringFile
- event
Bus StringId - event bus Id.
- id String
- rules
List<Get
Eb Event Rules Rule> - Event rule information.
- order String
- order
By String - result
Output StringFile
- event
Bus stringId - event bus Id.
- id string
- rules
Get
Eb Event Rules Rule[] - Event rule information.
- order string
- order
By string - result
Output stringFile
- event_
bus_ strid - event bus Id.
- id str
- rules
Sequence[Get
Eb Event Rules Rule] - Event rule information.
- order str
- order_
by str - result_
output_ strfile
- event
Bus StringId - event bus Id.
- id String
- rules List<Property Map>
- Event rule information.
- order String
- order
By String - result
Output StringFile
Supporting Types
GetEbEventRulesRule
- Add
Time string - create time.
- Dead
Letter List<GetConfigs Eb Event Rules Rule Dead Letter Config> - The dlq rule set by rule. It may be null. Note: this field may return null, indicating that no valid value can be obtained.
- Description string
- description.
- Enable bool
- enable switch.
- Event
Bus stringId - event bus Id.
- Mod
Time string - modify time.
- Rule
Id string - rule Id.
- Rule
Name string - rule name.
- Status string
- Status.
- Targets
List<Get
Eb Event Rules Rule Target> - Target brief information, note: this field may return null, indicating that no valid value can be obtained.
- Add
Time string - create time.
- Dead
Letter []GetConfigs Eb Event Rules Rule Dead Letter Config - The dlq rule set by rule. It may be null. Note: this field may return null, indicating that no valid value can be obtained.
- Description string
- description.
- Enable bool
- enable switch.
- Event
Bus stringId - event bus Id.
- Mod
Time string - modify time.
- Rule
Id string - rule Id.
- Rule
Name string - rule name.
- Status string
- Status.
- Targets
[]Get
Eb Event Rules Rule Target - Target brief information, note: this field may return null, indicating that no valid value can be obtained.
- add
Time String - create time.
- dead
Letter List<GetConfigs Eb Event Rules Rule Dead Letter Config> - The dlq rule set by rule. It may be null. Note: this field may return null, indicating that no valid value can be obtained.
- description String
- description.
- enable Boolean
- enable switch.
- event
Bus StringId - event bus Id.
- mod
Time String - modify time.
- rule
Id String - rule Id.
- rule
Name String - rule name.
- status String
- Status.
- targets
List<Get
Eb Event Rules Rule Target> - Target brief information, note: this field may return null, indicating that no valid value can be obtained.
- add
Time string - create time.
- dead
Letter GetConfigs Eb Event Rules Rule Dead Letter Config[] - The dlq rule set by rule. It may be null. Note: this field may return null, indicating that no valid value can be obtained.
- description string
- description.
- enable boolean
- enable switch.
- event
Bus stringId - event bus Id.
- mod
Time string - modify time.
- rule
Id string - rule Id.
- rule
Name string - rule name.
- status string
- Status.
- targets
Get
Eb Event Rules Rule Target[] - Target brief information, note: this field may return null, indicating that no valid value can be obtained.
- add_
time str - create time.
- dead_
letter_ Sequence[Getconfigs Eb Event Rules Rule Dead Letter Config] - The dlq rule set by rule. It may be null. Note: this field may return null, indicating that no valid value can be obtained.
- description str
- description.
- enable bool
- enable switch.
- event_
bus_ strid - event bus Id.
- mod_
time str - modify time.
- rule_
id str - rule Id.
- rule_
name str - rule name.
- status str
- Status.
- targets
Sequence[Get
Eb Event Rules Rule Target] - Target brief information, note: this field may return null, indicating that no valid value can be obtained.
- add
Time String - create time.
- dead
Letter List<Property Map>Configs - The dlq rule set by rule. It may be null. Note: this field may return null, indicating that no valid value can be obtained.
- description String
- description.
- enable Boolean
- enable switch.
- event
Bus StringId - event bus Id.
- mod
Time String - modify time.
- rule
Id String - rule Id.
- rule
Name String - rule name.
- status String
- Status.
- targets List<Property Map>
- Target brief information, note: this field may return null, indicating that no valid value can be obtained.
GetEbEventRulesRuleDeadLetterConfig
- Ckafka
Delivery List<GetParams Eb Event Rules Rule Dead Letter Config Ckafka Delivery Param> - After setting the DLQ mode, this option is required. The error message will be delivered to the corresponding kafka topic Note: This field may return null, indicating that no valid value can be obtained.
- Dispose
Method string - Support three modes of dlq, discarding, ignoring errors and continuing to pass, corresponding to: DLQ, DROP, IGNORE_ERROR.
- Ckafka
Delivery []GetParams Eb Event Rules Rule Dead Letter Config Ckafka Delivery Param - After setting the DLQ mode, this option is required. The error message will be delivered to the corresponding kafka topic Note: This field may return null, indicating that no valid value can be obtained.
- Dispose
Method string - Support three modes of dlq, discarding, ignoring errors and continuing to pass, corresponding to: DLQ, DROP, IGNORE_ERROR.
- ckafka
Delivery List<GetParams Eb Event Rules Rule Dead Letter Config Ckafka Delivery Param> - After setting the DLQ mode, this option is required. The error message will be delivered to the corresponding kafka topic Note: This field may return null, indicating that no valid value can be obtained.
- dispose
Method String - Support three modes of dlq, discarding, ignoring errors and continuing to pass, corresponding to: DLQ, DROP, IGNORE_ERROR.
- ckafka
Delivery GetParams Eb Event Rules Rule Dead Letter Config Ckafka Delivery Param[] - After setting the DLQ mode, this option is required. The error message will be delivered to the corresponding kafka topic Note: This field may return null, indicating that no valid value can be obtained.
- dispose
Method string - Support three modes of dlq, discarding, ignoring errors and continuing to pass, corresponding to: DLQ, DROP, IGNORE_ERROR.
- ckafka_
delivery_ Sequence[Getparams Eb Event Rules Rule Dead Letter Config Ckafka Delivery Param] - After setting the DLQ mode, this option is required. The error message will be delivered to the corresponding kafka topic Note: This field may return null, indicating that no valid value can be obtained.
- dispose_
method str - Support three modes of dlq, discarding, ignoring errors and continuing to pass, corresponding to: DLQ, DROP, IGNORE_ERROR.
- ckafka
Delivery List<Property Map>Params - After setting the DLQ mode, this option is required. The error message will be delivered to the corresponding kafka topic Note: This field may return null, indicating that no valid value can be obtained.
- dispose
Method String - Support three modes of dlq, discarding, ignoring errors and continuing to pass, corresponding to: DLQ, DROP, IGNORE_ERROR.
GetEbEventRulesRuleDeadLetterConfigCkafkaDeliveryParam
- Resource
Description string - ckafka resource qcs six-segment.
- Topic
Name string - ckafka topic name.
- Resource
Description string - ckafka resource qcs six-segment.
- Topic
Name string - ckafka topic name.
- resource
Description String - ckafka resource qcs six-segment.
- topic
Name String - ckafka topic name.
- resource
Description string - ckafka resource qcs six-segment.
- topic
Name string - ckafka topic name.
- resource_
description str - ckafka resource qcs six-segment.
- topic_
name str - ckafka topic name.
- resource
Description String - ckafka resource qcs six-segment.
- topic
Name String - ckafka topic name.
GetEbEventRulesRuleTarget
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack