1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Events
  5. getRule
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.Events.getRule

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This data source provides details about a specific Rule resource in Oracle Cloud Infrastructure Events service.

    Retrieves a rule.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRule = oci.Events.getRule({
        ruleId: testRuleOciEventsRule.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_rule = oci.Events.get_rule(rule_id=test_rule_oci_events_rule["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Events"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Events.GetRule(ctx, &events.GetRuleArgs{
    			RuleId: testRuleOciEventsRule.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testRule = Oci.Events.GetRule.Invoke(new()
        {
            RuleId = testRuleOciEventsRule.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Events.EventsFunctions;
    import com.pulumi.oci.Events.inputs.GetRuleArgs;
    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) {
            final var testRule = EventsFunctions.getRule(GetRuleArgs.builder()
                .ruleId(testRuleOciEventsRule.id())
                .build());
    
        }
    }
    
    variables:
      testRule:
        fn::invoke:
          Function: oci:Events:getRule
          Arguments:
            ruleId: ${testRuleOciEventsRule.id}
    

    Using getRule

    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 getRule(args: GetRuleArgs, opts?: InvokeOptions): Promise<GetRuleResult>
    function getRuleOutput(args: GetRuleOutputArgs, opts?: InvokeOptions): Output<GetRuleResult>
    def get_rule(rule_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetRuleResult
    def get_rule_output(rule_id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetRuleResult]
    func GetRule(ctx *Context, args *GetRuleArgs, opts ...InvokeOption) (*GetRuleResult, error)
    func GetRuleOutput(ctx *Context, args *GetRuleOutputArgs, opts ...InvokeOption) GetRuleResultOutput

    > Note: This function is named GetRule in the Go SDK.

    public static class GetRule 
    {
        public static Task<GetRuleResult> InvokeAsync(GetRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetRuleResult> Invoke(GetRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRuleResult> getRule(GetRuleArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Events/getRule:getRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    RuleId string
    The OCID of this rule.
    RuleId string
    The OCID of this rule.
    ruleId String
    The OCID of this rule.
    ruleId string
    The OCID of this rule.
    rule_id str
    The OCID of this rule.
    ruleId String
    The OCID of this rule.

    getRule Result

    The following output properties are available:

    Actions List<GetRuleAction>
    A list of one or more Action objects.
    CompartmentId string
    The OCID of the compartment to which this rule belongs.
    Condition string
    A filter that specifies the event that will trigger actions associated with this rule. A few important things to remember about filters:

    • Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets: {}
    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    DisplayName string
    A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information. Example: "This rule sends a notification upon completion of DbaaS backup."
    FreeformTags Dictionary<string, object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The OCID of this rule.
    IsEnabled bool
    Whether or not this rule is currently enabled. Example: true
    LifecycleMessage string
    A message generated by the Events service about the current state of this rule.
    RuleId string
    State string
    The current state of the rule.
    TimeCreated string
    The time this rule was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z
    Actions []GetRuleAction
    A list of one or more Action objects.
    CompartmentId string
    The OCID of the compartment to which this rule belongs.
    Condition string
    A filter that specifies the event that will trigger actions associated with this rule. A few important things to remember about filters:

    • Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets: {}
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    DisplayName string
    A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information. Example: "This rule sends a notification upon completion of DbaaS backup."
    FreeformTags map[string]interface{}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The OCID of this rule.
    IsEnabled bool
    Whether or not this rule is currently enabled. Example: true
    LifecycleMessage string
    A message generated by the Events service about the current state of this rule.
    RuleId string
    State string
    The current state of the rule.
    TimeCreated string
    The time this rule was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z
    actions List<GetRuleAction>
    A list of one or more Action objects.
    compartmentId String
    The OCID of the compartment to which this rule belongs.
    condition String
    A filter that specifies the event that will trigger actions associated with this rule. A few important things to remember about filters:

    • Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets: {}
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    displayName String
    A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information. Example: "This rule sends a notification upon completion of DbaaS backup."
    freeformTags Map<String,Object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The OCID of this rule.
    isEnabled Boolean
    Whether or not this rule is currently enabled. Example: true
    lifecycleMessage String
    A message generated by the Events service about the current state of this rule.
    ruleId String
    state String
    The current state of the rule.
    timeCreated String
    The time this rule was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z
    actions GetRuleAction[]
    A list of one or more Action objects.
    compartmentId string
    The OCID of the compartment to which this rule belongs.
    condition string
    A filter that specifies the event that will trigger actions associated with this rule. A few important things to remember about filters:

    • Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets: {}
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    displayName string
    A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information. Example: "This rule sends a notification upon completion of DbaaS backup."
    freeformTags {[key: string]: any}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id string
    The OCID of this rule.
    isEnabled boolean
    Whether or not this rule is currently enabled. Example: true
    lifecycleMessage string
    A message generated by the Events service about the current state of this rule.
    ruleId string
    state string
    The current state of the rule.
    timeCreated string
    The time this rule was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z
    actions Sequence[events.GetRuleAction]
    A list of one or more Action objects.
    compartment_id str
    The OCID of the compartment to which this rule belongs.
    condition str
    A filter that specifies the event that will trigger actions associated with this rule. A few important things to remember about filters:

    • Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets: {}
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    display_name str
    A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information. Example: "This rule sends a notification upon completion of DbaaS backup."
    freeform_tags Mapping[str, Any]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id str
    The OCID of this rule.
    is_enabled bool
    Whether or not this rule is currently enabled. Example: true
    lifecycle_message str
    A message generated by the Events service about the current state of this rule.
    rule_id str
    state str
    The current state of the rule.
    time_created str
    The time this rule was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z
    actions List<Property Map>
    A list of one or more Action objects.
    compartmentId String
    The OCID of the compartment to which this rule belongs.
    condition String
    A filter that specifies the event that will trigger actions associated with this rule. A few important things to remember about filters:

    • Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets: {}
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    displayName String
    A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information. Example: "This rule sends a notification upon completion of DbaaS backup."
    freeformTags Map<Any>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The OCID of this rule.
    isEnabled Boolean
    Whether or not this rule is currently enabled. Example: true
    lifecycleMessage String
    A message generated by the Events service about the current state of this rule.
    ruleId String
    state String
    The current state of the rule.
    timeCreated String
    The time this rule was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

    Supporting Types

    GetRuleAction

    Actions List<GetRuleActionAction>
    A list of one or more Action objects.
    Actions []GetRuleActionAction
    A list of one or more Action objects.
    actions List<GetRuleActionAction>
    A list of one or more Action objects.
    actions GetRuleActionAction[]
    A list of one or more Action objects.
    actions Sequence[events.GetRuleActionAction]
    A list of one or more Action objects.
    actions List<Property Map>
    A list of one or more Action objects.

    GetRuleActionAction

    ActionType string
    The action to perform if the condition in the rule matches an event.

    • ONS: Send to an Oracle Notification Service topic.
    • OSS: Send to a stream from Oracle Streaming Service.
    • FAAS: Send to an Oracle Functions Service endpoint.
    Description string
    A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    FunctionId string
    The OCID of a Function hosted by Oracle Functions Service.
    Id string
    The OCID of this rule.
    IsEnabled bool
    Whether or not this rule is currently enabled. Example: true
    LifecycleMessage string
    A message generated by the Events service about the current state of this rule.
    State string
    The current state of the rule.
    StreamId string
    The OCID of the stream to which messages are delivered.
    TopicId string
    The OCID of the topic to which messages are delivered.
    ActionType string
    The action to perform if the condition in the rule matches an event.

    • ONS: Send to an Oracle Notification Service topic.
    • OSS: Send to a stream from Oracle Streaming Service.
    • FAAS: Send to an Oracle Functions Service endpoint.
    Description string
    A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    FunctionId string
    The OCID of a Function hosted by Oracle Functions Service.
    Id string
    The OCID of this rule.
    IsEnabled bool
    Whether or not this rule is currently enabled. Example: true
    LifecycleMessage string
    A message generated by the Events service about the current state of this rule.
    State string
    The current state of the rule.
    StreamId string
    The OCID of the stream to which messages are delivered.
    TopicId string
    The OCID of the topic to which messages are delivered.
    actionType String
    The action to perform if the condition in the rule matches an event.

    • ONS: Send to an Oracle Notification Service topic.
    • OSS: Send to a stream from Oracle Streaming Service.
    • FAAS: Send to an Oracle Functions Service endpoint.
    description String
    A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    functionId String
    The OCID of a Function hosted by Oracle Functions Service.
    id String
    The OCID of this rule.
    isEnabled Boolean
    Whether or not this rule is currently enabled. Example: true
    lifecycleMessage String
    A message generated by the Events service about the current state of this rule.
    state String
    The current state of the rule.
    streamId String
    The OCID of the stream to which messages are delivered.
    topicId String
    The OCID of the topic to which messages are delivered.
    actionType string
    The action to perform if the condition in the rule matches an event.

    • ONS: Send to an Oracle Notification Service topic.
    • OSS: Send to a stream from Oracle Streaming Service.
    • FAAS: Send to an Oracle Functions Service endpoint.
    description string
    A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    functionId string
    The OCID of a Function hosted by Oracle Functions Service.
    id string
    The OCID of this rule.
    isEnabled boolean
    Whether or not this rule is currently enabled. Example: true
    lifecycleMessage string
    A message generated by the Events service about the current state of this rule.
    state string
    The current state of the rule.
    streamId string
    The OCID of the stream to which messages are delivered.
    topicId string
    The OCID of the topic to which messages are delivered.
    action_type str
    The action to perform if the condition in the rule matches an event.

    • ONS: Send to an Oracle Notification Service topic.
    • OSS: Send to a stream from Oracle Streaming Service.
    • FAAS: Send to an Oracle Functions Service endpoint.
    description str
    A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    function_id str
    The OCID of a Function hosted by Oracle Functions Service.
    id str
    The OCID of this rule.
    is_enabled bool
    Whether or not this rule is currently enabled. Example: true
    lifecycle_message str
    A message generated by the Events service about the current state of this rule.
    state str
    The current state of the rule.
    stream_id str
    The OCID of the stream to which messages are delivered.
    topic_id str
    The OCID of the topic to which messages are delivered.
    actionType String
    The action to perform if the condition in the rule matches an event.

    • ONS: Send to an Oracle Notification Service topic.
    • OSS: Send to a stream from Oracle Streaming Service.
    • FAAS: Send to an Oracle Functions Service endpoint.
    description String
    A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    functionId String
    The OCID of a Function hosted by Oracle Functions Service.
    id String
    The OCID of this rule.
    isEnabled Boolean
    Whether or not this rule is currently enabled. Example: true
    lifecycleMessage String
    A message generated by the Events service about the current state of this rule.
    state String
    The current state of the rule.
    streamId String
    The OCID of the stream to which messages are delivered.
    topicId String
    The OCID of the topic to which messages are delivered.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi