Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.Events.getRules
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
This data source provides the list of Rules in Oracle Cloud Infrastructure Events service.
Lists rules for this compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRules = oci.Events.getRules({
compartmentId: compartmentId,
displayName: ruleDisplayName,
state: ruleState,
});
import pulumi
import pulumi_oci as oci
test_rules = oci.Events.get_rules(compartment_id=compartment_id,
display_name=rule_display_name,
state=rule_state)
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.GetRules(ctx, &events.GetRulesArgs{
CompartmentId: compartmentId,
DisplayName: pulumi.StringRef(ruleDisplayName),
State: pulumi.StringRef(ruleState),
}, 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 testRules = Oci.Events.GetRules.Invoke(new()
{
CompartmentId = compartmentId,
DisplayName = ruleDisplayName,
State = ruleState,
});
});
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.GetRulesArgs;
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 testRules = EventsFunctions.getRules(GetRulesArgs.builder()
.compartmentId(compartmentId)
.displayName(ruleDisplayName)
.state(ruleState)
.build());
}
}
variables:
testRules:
fn::invoke:
Function: oci:Events:getRules
Arguments:
compartmentId: ${compartmentId}
displayName: ${ruleDisplayName}
state: ${ruleState}
Using getRules
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 getRules(args: GetRulesArgs, opts?: InvokeOptions): Promise<GetRulesResult>
function getRulesOutput(args: GetRulesOutputArgs, opts?: InvokeOptions): Output<GetRulesResult>
def get_rules(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[_events.GetRulesFilter]] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRulesResult
def get_rules_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_events.GetRulesFilterArgs]]]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRulesResult]
func GetRules(ctx *Context, args *GetRulesArgs, opts ...InvokeOption) (*GetRulesResult, error)
func GetRulesOutput(ctx *Context, args *GetRulesOutputArgs, opts ...InvokeOption) GetRulesResultOutput
> Note: This function is named GetRules
in the Go SDK.
public static class GetRules
{
public static Task<GetRulesResult> InvokeAsync(GetRulesArgs args, InvokeOptions? opts = null)
public static Output<GetRulesResult> Invoke(GetRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRulesResult> getRules(GetRulesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Events/getRules:getRules
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment to which this rule belongs.
- Display
Name string - A filter to return only rules with descriptions that match the displayName string in this parameter. Example:
"This rule sends a notification upon completion of DbaaS backup."
- Filters
List<Get
Rules Filter> - State string
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- Compartment
Id string - The OCID of the compartment to which this rule belongs.
- Display
Name string - A filter to return only rules with descriptions that match the displayName string in this parameter. Example:
"This rule sends a notification upon completion of DbaaS backup."
- Filters
[]Get
Rules Filter - State string
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- compartment
Id String - The OCID of the compartment to which this rule belongs.
- display
Name String - A filter to return only rules with descriptions that match the displayName string in this parameter. Example:
"This rule sends a notification upon completion of DbaaS backup."
- filters
List<Get
Rules Filter> - state String
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- compartment
Id string - The OCID of the compartment to which this rule belongs.
- display
Name string - A filter to return only rules with descriptions that match the displayName string in this parameter. Example:
"This rule sends a notification upon completion of DbaaS backup."
- filters
Get
Rules Filter[] - state string
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- compartment_
id str - The OCID of the compartment to which this rule belongs.
- display_
name str - A filter to return only rules with descriptions that match the displayName string in this parameter. Example:
"This rule sends a notification upon completion of DbaaS backup."
- filters
Sequence[events.
Get Rules Filter] - state str
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- compartment
Id String - The OCID of the compartment to which this rule belongs.
- display
Name String - A filter to return only rules with descriptions that match the displayName string in this parameter. Example:
"This rule sends a notification upon completion of DbaaS backup."
- filters List<Property Map>
- state String
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
getRules Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment to which this rule belongs.
- Id string
- The provider-assigned unique ID for this managed resource.
- Rules
List<Get
Rules Rule> - The list of rules.
- Display
Name 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."
- Filters
List<Get
Rules Filter> - State string
- The current state of the rule.
- Compartment
Id string - The OCID of the compartment to which this rule belongs.
- Id string
- The provider-assigned unique ID for this managed resource.
- Rules
[]Get
Rules Rule - The list of rules.
- Display
Name 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."
- Filters
[]Get
Rules Filter - State string
- The current state of the rule.
- compartment
Id String - The OCID of the compartment to which this rule belongs.
- id String
- The provider-assigned unique ID for this managed resource.
- rules
List<Get
Rules Rule> - The list of rules.
- display
Name 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."
- filters
List<Get
Rules Filter> - state String
- The current state of the rule.
- compartment
Id string - The OCID of the compartment to which this rule belongs.
- id string
- The provider-assigned unique ID for this managed resource.
- rules
Get
Rules Rule[] - The list of rules.
- display
Name 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."
- filters
Get
Rules Filter[] - state string
- The current state of the rule.
- compartment_
id str - The OCID of the compartment to which this rule belongs.
- id str
- The provider-assigned unique ID for this managed resource.
- rules
Sequence[events.
Get Rules Rule] - The list of rules.
- 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."
- filters
Sequence[events.
Get Rules Filter] - state str
- The current state of the rule.
- compartment
Id String - The OCID of the compartment to which this rule belongs.
- id String
- The provider-assigned unique ID for this managed resource.
- rules List<Property Map>
- The list of rules.
- display
Name 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."
- filters List<Property Map>
- state String
- The current state of the rule.
Supporting Types
GetRulesFilter
GetRulesRule
- Actions
List<Get
Rules Rule Action> - A list of one or more Action objects.
- Compartment
Id 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:
{}
- Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets:
- 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.
- Display
Name string - A filter to return only rules with descriptions that match the displayName string in this parameter. Example:
"This rule sends a notification upon completion of DbaaS backup."
- 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.
- Is
Enabled bool - Whether or not this rule is currently enabled. Example:
true
- Lifecycle
Message string - A message generated by the Events service about the current state of this rule.
- State string
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- Time
Created string - The time this rule was created, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- Actions
[]Get
Rules Rule Action - A list of one or more Action objects.
- Compartment
Id 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:
{}
- Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets:
- 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.
- Display
Name string - A filter to return only rules with descriptions that match the displayName string in this parameter. Example:
"This rule sends a notification upon completion of DbaaS backup."
- 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.
- Is
Enabled bool - Whether or not this rule is currently enabled. Example:
true
- Lifecycle
Message string - A message generated by the Events service about the current state of this rule.
- State string
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- Time
Created string - The time this rule was created, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- actions
List<Get
Rules Rule Action> - A list of one or more Action objects.
- compartment
Id 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:
{}
- Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets:
- 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.
- display
Name String - A filter to return only rules with descriptions that match the displayName string in this parameter. Example:
"This rule sends a notification upon completion of DbaaS backup."
- 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.
- is
Enabled Boolean - Whether or not this rule is currently enabled. Example:
true
- lifecycle
Message String - A message generated by the Events service about the current state of this rule.
- state String
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- time
Created String - The time this rule was created, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- actions
Get
Rules Rule Action[] - A list of one or more Action objects.
- compartment
Id 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:
{}
- Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets:
- {[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.
- display
Name string - A filter to return only rules with descriptions that match the displayName string in this parameter. Example:
"This rule sends a notification upon completion of DbaaS backup."
- {[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.
- is
Enabled boolean - Whether or not this rule is currently enabled. Example:
true
- lifecycle
Message string - A message generated by the Events service about the current state of this rule.
- state string
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- time
Created string - The time this rule was created, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- actions
Sequence[events.
Get Rules Rule Action] - 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:
{}
- Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets:
- 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 filter to return only rules with descriptions that match the displayName string in this parameter. Example:
"This rule sends a notification upon completion of DbaaS backup."
- 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.
- state str
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- 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.
- compartment
Id 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:
{}
- Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets:
- 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.
- display
Name String - A filter to return only rules with descriptions that match the displayName string in this parameter. Example:
"This rule sends a notification upon completion of DbaaS backup."
- 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.
- is
Enabled Boolean - Whether or not this rule is currently enabled. Example:
true
- lifecycle
Message String - A message generated by the Events service about the current state of this rule.
- state String
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- time
Created String - The time this rule was created, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
GetRulesRuleAction
- Actions
List<Get
Rules Rule Action Action> - A list of one or more Action objects.
- Actions
[]Get
Rules Rule Action Action - A list of one or more Action objects.
- actions
List<Get
Rules Rule Action Action> - A list of one or more Action objects.
- actions
Get
Rules Rule Action Action[] - A list of one or more Action objects.
- actions
Sequence[events.
Get Rules Rule Action Action] - A list of one or more Action objects.
- actions List<Property Map>
- A list of one or more Action objects.
GetRulesRuleActionAction
- Action
Type 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.
- Function
Id string - The OCID of a Function hosted by Oracle Functions Service.
- Id string
- The OCID of this rule.
- Is
Enabled bool - Whether or not this rule is currently enabled. Example:
true
- Lifecycle
Message string - A message generated by the Events service about the current state of this rule.
- State string
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- Stream
Id string - The OCID of the stream to which messages are delivered.
- Topic
Id string - The OCID of the topic to which messages are delivered.
- Action
Type 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.
- Function
Id string - The OCID of a Function hosted by Oracle Functions Service.
- Id string
- The OCID of this rule.
- Is
Enabled bool - Whether or not this rule is currently enabled. Example:
true
- Lifecycle
Message string - A message generated by the Events service about the current state of this rule.
- State string
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- Stream
Id string - The OCID of the stream to which messages are delivered.
- Topic
Id string - The OCID of the topic to which messages are delivered.
- action
Type 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.
- function
Id String - The OCID of a Function hosted by Oracle Functions Service.
- id String
- The OCID of this rule.
- is
Enabled Boolean - Whether or not this rule is currently enabled. Example:
true
- lifecycle
Message String - A message generated by the Events service about the current state of this rule.
- state String
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- stream
Id String - The OCID of the stream to which messages are delivered.
- topic
Id String - The OCID of the topic to which messages are delivered.
- action
Type 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.
- function
Id string - The OCID of a Function hosted by Oracle Functions Service.
- id string
- The OCID of this rule.
- is
Enabled boolean - Whether or not this rule is currently enabled. Example:
true
- lifecycle
Message string - A message generated by the Events service about the current state of this rule.
- state string
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- stream
Id string - The OCID of the stream to which messages are delivered.
- topic
Id 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
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- 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.
- action
Type 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.
- function
Id String - The OCID of a Function hosted by Oracle Functions Service.
- id String
- The OCID of this rule.
- is
Enabled Boolean - Whether or not this rule is currently enabled. Example:
true
- lifecycle
Message String - A message generated by the Events service about the current state of this rule.
- state String
- A filter to return only rules that match the lifecycle state in this parameter. Example:
Creating
- stream
Id String - The OCID of the stream to which messages are delivered.
- topic
Id 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.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi