oci.DataSafe.getAlertPolicyRules
Explore with Pulumi AI
This data source provides the list of Alert Policy Rules in Oracle Cloud Infrastructure Data Safe service.
Lists the rules of the specified alert policy. The alert policy is said to be satisfied when all rules in the policy evaulate to true. If there are three rules: rule1,rule2 and rule3, the policy is satisfied if rule1 AND rule2 AND rule3 is True.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testAlertPolicyRules = oci.DataSafe.getAlertPolicyRules({
    alertPolicyId: testAlertPolicy.id,
});
import pulumi
import pulumi_oci as oci
test_alert_policy_rules = oci.DataSafe.get_alert_policy_rules(alert_policy_id=test_alert_policy["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/datasafe"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datasafe.GetAlertPolicyRules(ctx, &datasafe.GetAlertPolicyRulesArgs{
			AlertPolicyId: testAlertPolicy.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 testAlertPolicyRules = Oci.DataSafe.GetAlertPolicyRules.Invoke(new()
    {
        AlertPolicyId = testAlertPolicy.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DataSafe.DataSafeFunctions;
import com.pulumi.oci.DataSafe.inputs.GetAlertPolicyRulesArgs;
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 testAlertPolicyRules = DataSafeFunctions.getAlertPolicyRules(GetAlertPolicyRulesArgs.builder()
            .alertPolicyId(testAlertPolicy.id())
            .build());
    }
}
variables:
  testAlertPolicyRules:
    fn::invoke:
      function: oci:DataSafe:getAlertPolicyRules
      arguments:
        alertPolicyId: ${testAlertPolicy.id}
Using getAlertPolicyRules
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 getAlertPolicyRules(args: GetAlertPolicyRulesArgs, opts?: InvokeOptions): Promise<GetAlertPolicyRulesResult>
function getAlertPolicyRulesOutput(args: GetAlertPolicyRulesOutputArgs, opts?: InvokeOptions): Output<GetAlertPolicyRulesResult>def get_alert_policy_rules(alert_policy_id: Optional[str] = None,
                           filters: Optional[Sequence[GetAlertPolicyRulesFilter]] = None,
                           opts: Optional[InvokeOptions] = None) -> GetAlertPolicyRulesResult
def get_alert_policy_rules_output(alert_policy_id: Optional[pulumi.Input[str]] = None,
                           filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetAlertPolicyRulesFilterArgs]]]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetAlertPolicyRulesResult]func GetAlertPolicyRules(ctx *Context, args *GetAlertPolicyRulesArgs, opts ...InvokeOption) (*GetAlertPolicyRulesResult, error)
func GetAlertPolicyRulesOutput(ctx *Context, args *GetAlertPolicyRulesOutputArgs, opts ...InvokeOption) GetAlertPolicyRulesResultOutput> Note: This function is named GetAlertPolicyRules in the Go SDK.
public static class GetAlertPolicyRules 
{
    public static Task<GetAlertPolicyRulesResult> InvokeAsync(GetAlertPolicyRulesArgs args, InvokeOptions? opts = null)
    public static Output<GetAlertPolicyRulesResult> Invoke(GetAlertPolicyRulesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAlertPolicyRulesResult> getAlertPolicyRules(GetAlertPolicyRulesArgs args, InvokeOptions options)
public static Output<GetAlertPolicyRulesResult> getAlertPolicyRules(GetAlertPolicyRulesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DataSafe/getAlertPolicyRules:getAlertPolicyRules
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AlertPolicy stringId 
- The OCID of the alert policy.
- Filters
List<GetAlert Policy Rules Filter> 
- AlertPolicy stringId 
- The OCID of the alert policy.
- Filters
[]GetAlert Policy Rules Filter 
- alertPolicy StringId 
- The OCID of the alert policy.
- filters
List<GetAlert Policy Rules Filter> 
- alertPolicy stringId 
- The OCID of the alert policy.
- filters
GetAlert Policy Rules Filter[] 
- alert_policy_ strid 
- The OCID of the alert policy.
- filters
Sequence[GetAlert Policy Rules Filter] 
- alertPolicy StringId 
- The OCID of the alert policy.
- filters List<Property Map>
getAlertPolicyRules Result
The following output properties are available:
- AlertPolicy stringId 
- AlertPolicy List<GetRule Collections Alert Policy Rules Alert Policy Rule Collection> 
- The list of alert_policy_rule_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<GetAlert Policy Rules Filter> 
- AlertPolicy stringId 
- AlertPolicy []GetRule Collections Alert Policy Rules Alert Policy Rule Collection 
- The list of alert_policy_rule_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]GetAlert Policy Rules Filter 
- alertPolicy StringId 
- alertPolicy List<GetRule Collections Alert Policy Rules Alert Policy Rule Collection> 
- The list of alert_policy_rule_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<GetAlert Policy Rules Filter> 
- alertPolicy stringId 
- alertPolicy GetRule Collections Alert Policy Rules Alert Policy Rule Collection[] 
- The list of alert_policy_rule_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- filters
GetAlert Policy Rules Filter[] 
- alert_policy_ strid 
- alert_policy_ Sequence[Getrule_ collections Alert Policy Rules Alert Policy Rule Collection] 
- The list of alert_policy_rule_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- filters
Sequence[GetAlert Policy Rules Filter] 
- alertPolicy StringId 
- alertPolicy List<Property Map>Rule Collections 
- The list of alert_policy_rule_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- filters List<Property Map>
Supporting Types
GetAlertPolicyRulesAlertPolicyRuleCollection       
GetAlertPolicyRulesAlertPolicyRuleCollectionItem        
- AlertPolicy stringId 
- The OCID of the alert policy.
- Description string
- Describes the alert policy rule.
- DisplayName string
- The display name of the alert policy rule.
- Expression string
- The conditional expression of the alert policy rule which evaluates to boolean value.
- Key string
- The unique key of the alert policy rule.
- State string
- The current state of the alert policy rule.
- TimeCreated string
- Creation date and time of the alert policy rule, in the format defined by RFC3339.
- AlertPolicy stringId 
- The OCID of the alert policy.
- Description string
- Describes the alert policy rule.
- DisplayName string
- The display name of the alert policy rule.
- Expression string
- The conditional expression of the alert policy rule which evaluates to boolean value.
- Key string
- The unique key of the alert policy rule.
- State string
- The current state of the alert policy rule.
- TimeCreated string
- Creation date and time of the alert policy rule, in the format defined by RFC3339.
- alertPolicy StringId 
- The OCID of the alert policy.
- description String
- Describes the alert policy rule.
- displayName String
- The display name of the alert policy rule.
- expression String
- The conditional expression of the alert policy rule which evaluates to boolean value.
- key String
- The unique key of the alert policy rule.
- state String
- The current state of the alert policy rule.
- timeCreated String
- Creation date and time of the alert policy rule, in the format defined by RFC3339.
- alertPolicy stringId 
- The OCID of the alert policy.
- description string
- Describes the alert policy rule.
- displayName string
- The display name of the alert policy rule.
- expression string
- The conditional expression of the alert policy rule which evaluates to boolean value.
- key string
- The unique key of the alert policy rule.
- state string
- The current state of the alert policy rule.
- timeCreated string
- Creation date and time of the alert policy rule, in the format defined by RFC3339.
- alert_policy_ strid 
- The OCID of the alert policy.
- description str
- Describes the alert policy rule.
- display_name str
- The display name of the alert policy rule.
- expression str
- The conditional expression of the alert policy rule which evaluates to boolean value.
- key str
- The unique key of the alert policy rule.
- state str
- The current state of the alert policy rule.
- time_created str
- Creation date and time of the alert policy rule, in the format defined by RFC3339.
- alertPolicy StringId 
- The OCID of the alert policy.
- description String
- Describes the alert policy rule.
- displayName String
- The display name of the alert policy rule.
- expression String
- The conditional expression of the alert policy rule which evaluates to boolean value.
- key String
- The unique key of the alert policy rule.
- state String
- The current state of the alert policy rule.
- timeCreated String
- Creation date and time of the alert policy rule, in the format defined by RFC3339.
GetAlertPolicyRulesFilter    
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.