1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Events
  5. Rule
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

oci.Events.Rule

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

    This resource provides the Rule resource in Oracle Cloud Infrastructure Events service.

    Creates a new rule.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRule = new oci.events.Rule("testRule", {
        actions: {
            actions: [{
                actionType: _var.rule_actions_actions_action_type,
                isEnabled: _var.rule_actions_actions_is_enabled,
                description: _var.rule_actions_actions_description,
                functionId: oci_functions_function.test_function.id,
                streamId: oci_streaming_stream.test_stream.id,
                topicId: oci_ons_notification_topic.test_topic.id,
            }],
        },
        compartmentId: _var.compartment_id,
        condition: _var.rule_condition,
        displayName: _var.rule_display_name,
        isEnabled: _var.rule_is_enabled,
        definedTags: {
            "Operations.CostCenter": "42",
        },
        description: _var.rule_description,
        freeformTags: {
            Department: "Finance",
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_rule = oci.events.Rule("testRule",
        actions=oci.events.RuleActionsArgs(
            actions=[oci.events.RuleActionsActionArgs(
                action_type=var["rule_actions_actions_action_type"],
                is_enabled=var["rule_actions_actions_is_enabled"],
                description=var["rule_actions_actions_description"],
                function_id=oci_functions_function["test_function"]["id"],
                stream_id=oci_streaming_stream["test_stream"]["id"],
                topic_id=oci_ons_notification_topic["test_topic"]["id"],
            )],
        ),
        compartment_id=var["compartment_id"],
        condition=var["rule_condition"],
        display_name=var["rule_display_name"],
        is_enabled=var["rule_is_enabled"],
        defined_tags={
            "Operations.CostCenter": "42",
        },
        description=var["rule_description"],
        freeform_tags={
            "Department": "Finance",
        })
    
    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.NewRule(ctx, "testRule", &Events.RuleArgs{
    			Actions: &events.RuleActionsArgs{
    				Actions: events.RuleActionsActionArray{
    					&events.RuleActionsActionArgs{
    						ActionType:  pulumi.Any(_var.Rule_actions_actions_action_type),
    						IsEnabled:   pulumi.Any(_var.Rule_actions_actions_is_enabled),
    						Description: pulumi.Any(_var.Rule_actions_actions_description),
    						FunctionId:  pulumi.Any(oci_functions_function.Test_function.Id),
    						StreamId:    pulumi.Any(oci_streaming_stream.Test_stream.Id),
    						TopicId:     pulumi.Any(oci_ons_notification_topic.Test_topic.Id),
    					},
    				},
    			},
    			CompartmentId: pulumi.Any(_var.Compartment_id),
    			Condition:     pulumi.Any(_var.Rule_condition),
    			DisplayName:   pulumi.Any(_var.Rule_display_name),
    			IsEnabled:     pulumi.Any(_var.Rule_is_enabled),
    			DefinedTags: pulumi.Map{
    				"Operations.CostCenter": pulumi.Any("42"),
    			},
    			Description: pulumi.Any(_var.Rule_description),
    			FreeformTags: pulumi.Map{
    				"Department": pulumi.Any("Finance"),
    			},
    		})
    		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 = new Oci.Events.Rule("testRule", new()
        {
            Actions = new Oci.Events.Inputs.RuleActionsArgs
            {
                Actions = new[]
                {
                    new Oci.Events.Inputs.RuleActionsActionArgs
                    {
                        ActionType = @var.Rule_actions_actions_action_type,
                        IsEnabled = @var.Rule_actions_actions_is_enabled,
                        Description = @var.Rule_actions_actions_description,
                        FunctionId = oci_functions_function.Test_function.Id,
                        StreamId = oci_streaming_stream.Test_stream.Id,
                        TopicId = oci_ons_notification_topic.Test_topic.Id,
                    },
                },
            },
            CompartmentId = @var.Compartment_id,
            Condition = @var.Rule_condition,
            DisplayName = @var.Rule_display_name,
            IsEnabled = @var.Rule_is_enabled,
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            Description = @var.Rule_description,
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Events.Rule;
    import com.pulumi.oci.Events.RuleArgs;
    import com.pulumi.oci.Events.inputs.RuleActionsArgs;
    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 testRule = new Rule("testRule", RuleArgs.builder()        
                .actions(RuleActionsArgs.builder()
                    .actions(RuleActionsActionArgs.builder()
                        .actionType(var_.rule_actions_actions_action_type())
                        .isEnabled(var_.rule_actions_actions_is_enabled())
                        .description(var_.rule_actions_actions_description())
                        .functionId(oci_functions_function.test_function().id())
                        .streamId(oci_streaming_stream.test_stream().id())
                        .topicId(oci_ons_notification_topic.test_topic().id())
                        .build())
                    .build())
                .compartmentId(var_.compartment_id())
                .condition(var_.rule_condition())
                .displayName(var_.rule_display_name())
                .isEnabled(var_.rule_is_enabled())
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .description(var_.rule_description())
                .freeformTags(Map.of("Department", "Finance"))
                .build());
    
        }
    }
    
    resources:
      testRule:
        type: oci:Events:Rule
        properties:
          actions:
            actions:
              - actionType: ${var.rule_actions_actions_action_type}
                isEnabled: ${var.rule_actions_actions_is_enabled}
                description: ${var.rule_actions_actions_description}
                functionId: ${oci_functions_function.test_function.id}
                streamId: ${oci_streaming_stream.test_stream.id}
                topicId: ${oci_ons_notification_topic.test_topic.id}
          compartmentId: ${var.compartment_id}
          condition: ${var.rule_condition}
          displayName: ${var.rule_display_name}
          isEnabled: ${var.rule_is_enabled}
          #Optional
          definedTags:
            Operations.CostCenter: '42'
          description: ${var.rule_description}
          freeformTags:
            Department: Finance
    

    Create Rule Resource

    new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);
    @overload
    def Rule(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             actions: Optional[_events.RuleActionsArgs] = None,
             compartment_id: Optional[str] = None,
             condition: Optional[str] = None,
             defined_tags: Optional[Mapping[str, Any]] = None,
             description: Optional[str] = None,
             display_name: Optional[str] = None,
             freeform_tags: Optional[Mapping[str, Any]] = None,
             is_enabled: Optional[bool] = None)
    @overload
    def Rule(resource_name: str,
             args: RuleArgs,
             opts: Optional[ResourceOptions] = None)
    func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
    public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
    public Rule(String name, RuleArgs args)
    public Rule(String name, RuleArgs args, CustomResourceOptions options)
    
    type: oci:Events:Rule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args RuleArgs
    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 RuleArgs
    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 RuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Actions RuleActions
    (Updatable) A list of one or more ActionDetails objects.
    CompartmentId string
    (Updatable) The OCID of the compartment to which this rule belongs.
    Condition string

    (Updatable) 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: {}

    For more examples, see Matching Events with Filters.

    • For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.

    • Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments.
    • Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

    DisplayName string
    (Updatable) A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    IsEnabled bool

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    DefinedTags Dictionary<string, object>
    (Updatable) 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
    (Updatable) 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.
    FreeformTags Dictionary<string, object>
    (Updatable) 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"}
    Actions RuleActionsArgs
    (Updatable) A list of one or more ActionDetails objects.
    CompartmentId string
    (Updatable) The OCID of the compartment to which this rule belongs.
    Condition string

    (Updatable) 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: {}

    For more examples, see Matching Events with Filters.

    • For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.

    • Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments.
    • Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

    DisplayName string
    (Updatable) A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    IsEnabled bool

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    DefinedTags map[string]interface{}
    (Updatable) 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
    (Updatable) 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.
    FreeformTags map[string]interface{}
    (Updatable) 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"}
    actions RuleActions
    (Updatable) A list of one or more ActionDetails objects.
    compartmentId String
    (Updatable) The OCID of the compartment to which this rule belongs.
    condition String

    (Updatable) 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: {}

    For more examples, see Matching Events with Filters.

    • For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.

    • Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments.
    • Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

    displayName String
    (Updatable) A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    isEnabled Boolean

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags Map<String,Object>
    (Updatable) 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
    (Updatable) 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.
    freeformTags Map<String,Object>
    (Updatable) 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"}
    actions RuleActions
    (Updatable) A list of one or more ActionDetails objects.
    compartmentId string
    (Updatable) The OCID of the compartment to which this rule belongs.
    condition string

    (Updatable) 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: {}

    For more examples, see Matching Events with Filters.

    • For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.

    • Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments.
    • Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

    displayName string
    (Updatable) A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    isEnabled boolean

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags {[key: string]: any}
    (Updatable) 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
    (Updatable) 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.
    freeformTags {[key: string]: any}
    (Updatable) 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"}
    actions RuleActionsArgs
    (Updatable) A list of one or more ActionDetails objects.
    compartment_id str
    (Updatable) The OCID of the compartment to which this rule belongs.
    condition str

    (Updatable) 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: {}

    For more examples, see Matching Events with Filters.

    • For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.

    • Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments.
    • Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

    display_name str
    (Updatable) A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    is_enabled bool

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    defined_tags Mapping[str, Any]
    (Updatable) 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
    (Updatable) 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.
    freeform_tags Mapping[str, Any]
    (Updatable) 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"}
    actions Property Map
    (Updatable) A list of one or more ActionDetails objects.
    compartmentId String
    (Updatable) The OCID of the compartment to which this rule belongs.
    condition String

    (Updatable) 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: {}

    For more examples, see Matching Events with Filters.

    • For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.

    • Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments.
    • Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

    displayName String
    (Updatable) A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    isEnabled Boolean

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags Map<Any>
    (Updatable) 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
    (Updatable) 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.
    freeformTags Map<Any>
    (Updatable) 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"}

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    LifecycleMessage string
    A message generated by the Events service about the current state of this rule.
    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
    Id string
    The provider-assigned unique ID for this managed resource.
    LifecycleMessage string
    A message generated by the Events service about the current state of this rule.
    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
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleMessage String
    A message generated by the Events service about the current state of this rule.
    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
    id string
    The provider-assigned unique ID for this managed resource.
    lifecycleMessage string
    A message generated by the Events service about the current state of this rule.
    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
    id str
    The provider-assigned unique ID for this managed resource.
    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.
    time_created str
    The time this rule was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleMessage String
    A message generated by the Events service about the current state of this rule.
    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

    Look up Existing Rule Resource

    Get an existing Rule 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?: RuleState, opts?: CustomResourceOptions): Rule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actions: Optional[_events.RuleActionsArgs] = None,
            compartment_id: Optional[str] = None,
            condition: Optional[str] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            is_enabled: Optional[bool] = None,
            lifecycle_message: Optional[str] = None,
            state: Optional[str] = None,
            time_created: Optional[str] = None) -> Rule
    func GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)
    public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)
    public static Rule get(String name, Output<String> id, RuleState 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:
    Actions RuleActions
    (Updatable) A list of one or more ActionDetails objects.
    CompartmentId string
    (Updatable) The OCID of the compartment to which this rule belongs.
    Condition string

    (Updatable) 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: {}

    For more examples, see Matching Events with Filters.

    • For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.

    • Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments.
    • Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

    DefinedTags Dictionary<string, object>
    (Updatable) 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
    (Updatable) 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
    (Updatable) A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    FreeformTags Dictionary<string, object>
    (Updatable) 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"}
    IsEnabled bool

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    LifecycleMessage string
    A message generated by the Events service about the current state of this rule.
    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 RuleActionsArgs
    (Updatable) A list of one or more ActionDetails objects.
    CompartmentId string
    (Updatable) The OCID of the compartment to which this rule belongs.
    Condition string

    (Updatable) 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: {}

    For more examples, see Matching Events with Filters.

    • For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.

    • Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments.
    • Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

    DefinedTags map[string]interface{}
    (Updatable) 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
    (Updatable) 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
    (Updatable) A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    FreeformTags map[string]interface{}
    (Updatable) 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"}
    IsEnabled bool

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    LifecycleMessage string
    A message generated by the Events service about the current state of this rule.
    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 RuleActions
    (Updatable) A list of one or more ActionDetails objects.
    compartmentId String
    (Updatable) The OCID of the compartment to which this rule belongs.
    condition String

    (Updatable) 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: {}

    For more examples, see Matching Events with Filters.

    • For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.

    • Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments.
    • Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

    definedTags Map<String,Object>
    (Updatable) 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
    (Updatable) 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
    (Updatable) A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    freeformTags Map<String,Object>
    (Updatable) 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"}
    isEnabled Boolean

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    lifecycleMessage String
    A message generated by the Events service about the current state of this rule.
    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 RuleActions
    (Updatable) A list of one or more ActionDetails objects.
    compartmentId string
    (Updatable) The OCID of the compartment to which this rule belongs.
    condition string

    (Updatable) 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: {}

    For more examples, see Matching Events with Filters.

    • For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.

    • Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments.
    • Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

    definedTags {[key: string]: any}
    (Updatable) 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
    (Updatable) 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
    (Updatable) A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    freeformTags {[key: string]: any}
    (Updatable) 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"}
    isEnabled boolean

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    lifecycleMessage string
    A message generated by the Events service about the current state of this rule.
    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 RuleActionsArgs
    (Updatable) A list of one or more ActionDetails objects.
    compartment_id str
    (Updatable) The OCID of the compartment to which this rule belongs.
    condition str

    (Updatable) 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: {}

    For more examples, see Matching Events with Filters.

    • For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.

    • Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments.
    • Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

    defined_tags Mapping[str, Any]
    (Updatable) 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
    (Updatable) 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
    (Updatable) A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    freeform_tags Mapping[str, Any]
    (Updatable) 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"}
    is_enabled bool

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    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.
    time_created str
    The time this rule was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z
    actions Property Map
    (Updatable) A list of one or more ActionDetails objects.
    compartmentId String
    (Updatable) The OCID of the compartment to which this rule belongs.
    condition String

    (Updatable) 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: {}

    For more examples, see Matching Events with Filters.

    • For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.

    • Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments.
    • Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

    definedTags Map<Any>
    (Updatable) 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
    (Updatable) 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
    (Updatable) A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.
    freeformTags Map<Any>
    (Updatable) 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"}
    isEnabled Boolean

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    lifecycleMessage String
    A message generated by the Events service about the current state of this rule.
    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

    RuleActions, RuleActionsArgs

    Actions List<RuleActionsAction>
    (Updatable) A list of one or more ActionDetails objects.
    Actions []RuleActionsAction
    (Updatable) A list of one or more ActionDetails objects.
    actions List<RuleActionsAction>
    (Updatable) A list of one or more ActionDetails objects.
    actions RuleActionsAction[]
    (Updatable) A list of one or more ActionDetails objects.
    actions RuleActionsAction]
    (Updatable) A list of one or more ActionDetails objects.
    actions List<Property Map>
    (Updatable) A list of one or more ActionDetails objects.

    RuleActionsAction, RuleActionsActionArgs

    ActionType string
    (Updatable) 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.
    IsEnabled bool

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Description string
    (Updatable) 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
    (Updatable) The OCID of a Function hosted by Oracle Functions Service.
    Id string
    The OCID of this rule.
    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
    (Updatable) The OCID of the stream to which messages are delivered.
    TopicId string
    (Updatable) The OCID of the topic to which messages are delivered.
    ActionType string
    (Updatable) 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.
    IsEnabled bool

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Description string
    (Updatable) 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
    (Updatable) The OCID of a Function hosted by Oracle Functions Service.
    Id string
    The OCID of this rule.
    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
    (Updatable) The OCID of the stream to which messages are delivered.
    TopicId string
    (Updatable) The OCID of the topic to which messages are delivered.
    actionType String
    (Updatable) 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.
    isEnabled Boolean

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description String
    (Updatable) 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
    (Updatable) The OCID of a Function hosted by Oracle Functions Service.
    id String
    The OCID of this rule.
    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
    (Updatable) The OCID of the stream to which messages are delivered.
    topicId String
    (Updatable) The OCID of the topic to which messages are delivered.
    actionType string
    (Updatable) 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.
    isEnabled boolean

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description string
    (Updatable) 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
    (Updatable) The OCID of a Function hosted by Oracle Functions Service.
    id string
    The OCID of this rule.
    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
    (Updatable) The OCID of the stream to which messages are delivered.
    topicId string
    (Updatable) The OCID of the topic to which messages are delivered.
    action_type str
    (Updatable) 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.
    is_enabled bool

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description str
    (Updatable) 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
    (Updatable) The OCID of a Function hosted by Oracle Functions Service.
    id str
    The OCID of this rule.
    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
    (Updatable) The OCID of the stream to which messages are delivered.
    topic_id str
    (Updatable) The OCID of the topic to which messages are delivered.
    actionType String
    (Updatable) 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.
    isEnabled Boolean

    (Updatable) Whether or not this rule is currently enabled. Example: true

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description String
    (Updatable) 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
    (Updatable) The OCID of a Function hosted by Oracle Functions Service.
    id String
    The OCID of this rule.
    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
    (Updatable) The OCID of the stream to which messages are delivered.
    topicId String
    (Updatable) The OCID of the topic to which messages are delivered.

    Import

    Rules can be imported using the id, e.g.

    $ pulumi import oci:Events/rule:Rule test_rule "id"
    

    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.29.0 published on Thursday, Mar 28, 2024 by Pulumi