1. Packages
  2. Prismacloud Provider
  3. API Docs
  4. getAlertRule
prismacloud 1.7.0 published on Monday, Apr 14, 2025 by paloaltonetworks

prismacloud.getAlertRule

Explore with Pulumi AI

prismacloud logo
prismacloud 1.7.0 published on Monday, Apr 14, 2025 by paloaltonetworks

    Retrieve information on a specific alert rule.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as prismacloud from "@pulumi/prismacloud";
    
    const example = prismacloud.getAlertRule({
        name: "My Alert Rule",
    });
    
    import pulumi
    import pulumi_prismacloud as prismacloud
    
    example = prismacloud.get_alert_rule(name="My Alert Rule")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/prismacloud/prismacloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := prismacloud.LookupAlertRule(ctx, &prismacloud.LookupAlertRuleArgs{
    			Name: pulumi.StringRef("My Alert Rule"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Prismacloud = Pulumi.Prismacloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Prismacloud.GetAlertRule.Invoke(new()
        {
            Name = "My Alert Rule",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.prismacloud.PrismacloudFunctions;
    import com.pulumi.prismacloud.inputs.GetAlertRuleArgs;
    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 example = PrismacloudFunctions.getAlertRule(GetAlertRuleArgs.builder()
                .name("My Alert Rule")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: prismacloud:getAlertRule
          arguments:
            name: My Alert Rule
    

    Using getAlertRule

    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 getAlertRule(args: GetAlertRuleArgs, opts?: InvokeOptions): Promise<GetAlertRuleResult>
    function getAlertRuleOutput(args: GetAlertRuleOutputArgs, opts?: InvokeOptions): Output<GetAlertRuleResult>
    def get_alert_rule(id: Optional[str] = None,
                       name: Optional[str] = None,
                       policy_scan_config_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetAlertRuleResult
    def get_alert_rule_output(id: Optional[pulumi.Input[str]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       policy_scan_config_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetAlertRuleResult]
    func LookupAlertRule(ctx *Context, args *LookupAlertRuleArgs, opts ...InvokeOption) (*LookupAlertRuleResult, error)
    func LookupAlertRuleOutput(ctx *Context, args *LookupAlertRuleOutputArgs, opts ...InvokeOption) LookupAlertRuleResultOutput

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

    public static class GetAlertRule 
    {
        public static Task<GetAlertRuleResult> InvokeAsync(GetAlertRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetAlertRuleResult> Invoke(GetAlertRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAlertRuleResult> getAlertRule(GetAlertRuleArgs args, InvokeOptions options)
    public static Output<GetAlertRuleResult> getAlertRule(GetAlertRuleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: prismacloud:index/getAlertRule:getAlertRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Name string
    Rule/Scan name
    PolicyScanConfigId string
    Policy scan config ID
    Id string
    Name string
    Rule/Scan name
    PolicyScanConfigId string
    Policy scan config ID
    id String
    name String
    Rule/Scan name
    policyScanConfigId String
    Policy scan config ID
    id string
    name string
    Rule/Scan name
    policyScanConfigId string
    Policy scan config ID
    id str
    name str
    Rule/Scan name
    policy_scan_config_id str
    Policy scan config ID
    id String
    name String
    Rule/Scan name
    policyScanConfigId String
    Policy scan config ID

    getAlertRule Result

    The following output properties are available:

    AllowAutoRemediate bool
    (bool) Allow auto-remediation
    DelayNotificationMs double
    (int) Delay notifications by the specified miliseconds
    Deleted bool
    (bool) Deleted
    Description string
    Description
    Enabled bool
    (bool) Scan enabled
    ExcludedPolicies List<string>
    List of policies to exclude from scan
    Id string
    LastModifiedBy string
    Last modified by
    LastModifiedOn double
    (int) Last modified on
    Name string
    NotificationChannels List<string>
    List of notification channels
    NotificationConfigs List<GetAlertRuleNotificationConfig>
    List of data for notifications to third-party tools, as defined below
    NotifyOnDismissed bool
    (bool) Include dismissed alerts in notification
    NotifyOnOpen bool
    (bool) Include open alerts in notification
    NotifyOnResolved bool
    (bool) Include resolved alerts in notification
    NotifyOnSnoozed bool
    (bool) Include snoozed alerts in notification
    OpenAlertsCount double
    (int) Open alerts count
    Owner string
    Owner
    Policies List<string>
    List of specific policies to scan
    PolicyLabels List<string>
    List of policy labels
    PolicyScanConfigId string
    ReadOnly bool
    (bool) Read only
    ScanAll bool
    (bool) Scan all policies
    Targets List<GetAlertRuleTarget>
    Model for the target filter, as defined below
    AllowAutoRemediate bool
    (bool) Allow auto-remediation
    DelayNotificationMs float64
    (int) Delay notifications by the specified miliseconds
    Deleted bool
    (bool) Deleted
    Description string
    Description
    Enabled bool
    (bool) Scan enabled
    ExcludedPolicies []string
    List of policies to exclude from scan
    Id string
    LastModifiedBy string
    Last modified by
    LastModifiedOn float64
    (int) Last modified on
    Name string
    NotificationChannels []string
    List of notification channels
    NotificationConfigs []GetAlertRuleNotificationConfig
    List of data for notifications to third-party tools, as defined below
    NotifyOnDismissed bool
    (bool) Include dismissed alerts in notification
    NotifyOnOpen bool
    (bool) Include open alerts in notification
    NotifyOnResolved bool
    (bool) Include resolved alerts in notification
    NotifyOnSnoozed bool
    (bool) Include snoozed alerts in notification
    OpenAlertsCount float64
    (int) Open alerts count
    Owner string
    Owner
    Policies []string
    List of specific policies to scan
    PolicyLabels []string
    List of policy labels
    PolicyScanConfigId string
    ReadOnly bool
    (bool) Read only
    ScanAll bool
    (bool) Scan all policies
    Targets []GetAlertRuleTarget
    Model for the target filter, as defined below
    allowAutoRemediate Boolean
    (bool) Allow auto-remediation
    delayNotificationMs Double
    (int) Delay notifications by the specified miliseconds
    deleted Boolean
    (bool) Deleted
    description String
    Description
    enabled Boolean
    (bool) Scan enabled
    excludedPolicies List<String>
    List of policies to exclude from scan
    id String
    lastModifiedBy String
    Last modified by
    lastModifiedOn Double
    (int) Last modified on
    name String
    notificationChannels List<String>
    List of notification channels
    notificationConfigs List<GetAlertRuleNotificationConfig>
    List of data for notifications to third-party tools, as defined below
    notifyOnDismissed Boolean
    (bool) Include dismissed alerts in notification
    notifyOnOpen Boolean
    (bool) Include open alerts in notification
    notifyOnResolved Boolean
    (bool) Include resolved alerts in notification
    notifyOnSnoozed Boolean
    (bool) Include snoozed alerts in notification
    openAlertsCount Double
    (int) Open alerts count
    owner String
    Owner
    policies List<String>
    List of specific policies to scan
    policyLabels List<String>
    List of policy labels
    policyScanConfigId String
    readOnly Boolean
    (bool) Read only
    scanAll Boolean
    (bool) Scan all policies
    targets List<GetAlertRuleTarget>
    Model for the target filter, as defined below
    allowAutoRemediate boolean
    (bool) Allow auto-remediation
    delayNotificationMs number
    (int) Delay notifications by the specified miliseconds
    deleted boolean
    (bool) Deleted
    description string
    Description
    enabled boolean
    (bool) Scan enabled
    excludedPolicies string[]
    List of policies to exclude from scan
    id string
    lastModifiedBy string
    Last modified by
    lastModifiedOn number
    (int) Last modified on
    name string
    notificationChannels string[]
    List of notification channels
    notificationConfigs GetAlertRuleNotificationConfig[]
    List of data for notifications to third-party tools, as defined below
    notifyOnDismissed boolean
    (bool) Include dismissed alerts in notification
    notifyOnOpen boolean
    (bool) Include open alerts in notification
    notifyOnResolved boolean
    (bool) Include resolved alerts in notification
    notifyOnSnoozed boolean
    (bool) Include snoozed alerts in notification
    openAlertsCount number
    (int) Open alerts count
    owner string
    Owner
    policies string[]
    List of specific policies to scan
    policyLabels string[]
    List of policy labels
    policyScanConfigId string
    readOnly boolean
    (bool) Read only
    scanAll boolean
    (bool) Scan all policies
    targets GetAlertRuleTarget[]
    Model for the target filter, as defined below
    allow_auto_remediate bool
    (bool) Allow auto-remediation
    delay_notification_ms float
    (int) Delay notifications by the specified miliseconds
    deleted bool
    (bool) Deleted
    description str
    Description
    enabled bool
    (bool) Scan enabled
    excluded_policies Sequence[str]
    List of policies to exclude from scan
    id str
    last_modified_by str
    Last modified by
    last_modified_on float
    (int) Last modified on
    name str
    notification_channels Sequence[str]
    List of notification channels
    notification_configs Sequence[GetAlertRuleNotificationConfig]
    List of data for notifications to third-party tools, as defined below
    notify_on_dismissed bool
    (bool) Include dismissed alerts in notification
    notify_on_open bool
    (bool) Include open alerts in notification
    notify_on_resolved bool
    (bool) Include resolved alerts in notification
    notify_on_snoozed bool
    (bool) Include snoozed alerts in notification
    open_alerts_count float
    (int) Open alerts count
    owner str
    Owner
    policies Sequence[str]
    List of specific policies to scan
    policy_labels Sequence[str]
    List of policy labels
    policy_scan_config_id str
    read_only bool
    (bool) Read only
    scan_all bool
    (bool) Scan all policies
    targets Sequence[GetAlertRuleTarget]
    Model for the target filter, as defined below
    allowAutoRemediate Boolean
    (bool) Allow auto-remediation
    delayNotificationMs Number
    (int) Delay notifications by the specified miliseconds
    deleted Boolean
    (bool) Deleted
    description String
    Description
    enabled Boolean
    (bool) Scan enabled
    excludedPolicies List<String>
    List of policies to exclude from scan
    id String
    lastModifiedBy String
    Last modified by
    lastModifiedOn Number
    (int) Last modified on
    name String
    notificationChannels List<String>
    List of notification channels
    notificationConfigs List<Property Map>
    List of data for notifications to third-party tools, as defined below
    notifyOnDismissed Boolean
    (bool) Include dismissed alerts in notification
    notifyOnOpen Boolean
    (bool) Include open alerts in notification
    notifyOnResolved Boolean
    (bool) Include resolved alerts in notification
    notifyOnSnoozed Boolean
    (bool) Include snoozed alerts in notification
    openAlertsCount Number
    (int) Open alerts count
    owner String
    Owner
    policies List<String>
    List of specific policies to scan
    policyLabels List<String>
    List of policy labels
    policyScanConfigId String
    readOnly Boolean
    (bool) Read only
    scanAll Boolean
    (bool) Scan all policies
    targets List<Property Map>
    Model for the target filter, as defined below

    Supporting Types

    GetAlertRuleNotificationConfig

    ConfigId string
    Alert rule notification config ID
    ConfigType string
    Config type
    DayOfMonth double
    (int) Day of month
    DaysOfWeeks List<GetAlertRuleNotificationConfigDaysOfWeek>
    List of days of week, as defined below
    DetailedReport bool
    (bool) Provide CSV detailed report
    Enabled bool
    (bool) Scan enabled
    Frequency string
    Frequency
    FrequencyFromRRule string
    Frequency from R rule
    HourOfDay double
    (int) Hour of day
    IncludeRemediation bool
    (bool) Include remediation in detailed report
    LastSentTs double
    (int) Time of last notification in miliseconds
    LastUpdated double
    (int) Last updated
    RRuleSchedule string
    R rule schedule
    Recipients List<string>
    List of unique email addresses to notify (For email notifications), List of integration ids (For integrations without notification templates), or List of notification template ids (For integrations with notification templates)
    TemplateId string
    Template ID
    TimezoneId string
    Timezone ID
    WithCompression bool
    (bool) Compress detailed report
    ConfigId string
    Alert rule notification config ID
    ConfigType string
    Config type
    DayOfMonth float64
    (int) Day of month
    DaysOfWeeks []GetAlertRuleNotificationConfigDaysOfWeek
    List of days of week, as defined below
    DetailedReport bool
    (bool) Provide CSV detailed report
    Enabled bool
    (bool) Scan enabled
    Frequency string
    Frequency
    FrequencyFromRRule string
    Frequency from R rule
    HourOfDay float64
    (int) Hour of day
    IncludeRemediation bool
    (bool) Include remediation in detailed report
    LastSentTs float64
    (int) Time of last notification in miliseconds
    LastUpdated float64
    (int) Last updated
    RRuleSchedule string
    R rule schedule
    Recipients []string
    List of unique email addresses to notify (For email notifications), List of integration ids (For integrations without notification templates), or List of notification template ids (For integrations with notification templates)
    TemplateId string
    Template ID
    TimezoneId string
    Timezone ID
    WithCompression bool
    (bool) Compress detailed report
    configId String
    Alert rule notification config ID
    configType String
    Config type
    dayOfMonth Double
    (int) Day of month
    daysOfWeeks List<GetAlertRuleNotificationConfigDaysOfWeek>
    List of days of week, as defined below
    detailedReport Boolean
    (bool) Provide CSV detailed report
    enabled Boolean
    (bool) Scan enabled
    frequency String
    Frequency
    frequencyFromRRule String
    Frequency from R rule
    hourOfDay Double
    (int) Hour of day
    includeRemediation Boolean
    (bool) Include remediation in detailed report
    lastSentTs Double
    (int) Time of last notification in miliseconds
    lastUpdated Double
    (int) Last updated
    rRuleSchedule String
    R rule schedule
    recipients List<String>
    List of unique email addresses to notify (For email notifications), List of integration ids (For integrations without notification templates), or List of notification template ids (For integrations with notification templates)
    templateId String
    Template ID
    timezoneId String
    Timezone ID
    withCompression Boolean
    (bool) Compress detailed report
    configId string
    Alert rule notification config ID
    configType string
    Config type
    dayOfMonth number
    (int) Day of month
    daysOfWeeks GetAlertRuleNotificationConfigDaysOfWeek[]
    List of days of week, as defined below
    detailedReport boolean
    (bool) Provide CSV detailed report
    enabled boolean
    (bool) Scan enabled
    frequency string
    Frequency
    frequencyFromRRule string
    Frequency from R rule
    hourOfDay number
    (int) Hour of day
    includeRemediation boolean
    (bool) Include remediation in detailed report
    lastSentTs number
    (int) Time of last notification in miliseconds
    lastUpdated number
    (int) Last updated
    rRuleSchedule string
    R rule schedule
    recipients string[]
    List of unique email addresses to notify (For email notifications), List of integration ids (For integrations without notification templates), or List of notification template ids (For integrations with notification templates)
    templateId string
    Template ID
    timezoneId string
    Timezone ID
    withCompression boolean
    (bool) Compress detailed report
    config_id str
    Alert rule notification config ID
    config_type str
    Config type
    day_of_month float
    (int) Day of month
    days_of_weeks Sequence[GetAlertRuleNotificationConfigDaysOfWeek]
    List of days of week, as defined below
    detailed_report bool
    (bool) Provide CSV detailed report
    enabled bool
    (bool) Scan enabled
    frequency str
    Frequency
    frequency_from_r_rule str
    Frequency from R rule
    hour_of_day float
    (int) Hour of day
    include_remediation bool
    (bool) Include remediation in detailed report
    last_sent_ts float
    (int) Time of last notification in miliseconds
    last_updated float
    (int) Last updated
    r_rule_schedule str
    R rule schedule
    recipients Sequence[str]
    List of unique email addresses to notify (For email notifications), List of integration ids (For integrations without notification templates), or List of notification template ids (For integrations with notification templates)
    template_id str
    Template ID
    timezone_id str
    Timezone ID
    with_compression bool
    (bool) Compress detailed report
    configId String
    Alert rule notification config ID
    configType String
    Config type
    dayOfMonth Number
    (int) Day of month
    daysOfWeeks List<Property Map>
    List of days of week, as defined below
    detailedReport Boolean
    (bool) Provide CSV detailed report
    enabled Boolean
    (bool) Scan enabled
    frequency String
    Frequency
    frequencyFromRRule String
    Frequency from R rule
    hourOfDay Number
    (int) Hour of day
    includeRemediation Boolean
    (bool) Include remediation in detailed report
    lastSentTs Number
    (int) Time of last notification in miliseconds
    lastUpdated Number
    (int) Last updated
    rRuleSchedule String
    R rule schedule
    recipients List<String>
    List of unique email addresses to notify (For email notifications), List of integration ids (For integrations without notification templates), or List of notification template ids (For integrations with notification templates)
    templateId String
    Template ID
    timezoneId String
    Timezone ID
    withCompression Boolean
    (bool) Compress detailed report

    GetAlertRuleNotificationConfigDaysOfWeek

    Day string
    Day
    Offset double
    (int) Offset
    Day string
    Day
    Offset float64
    (int) Offset
    day String
    Day
    offset Double
    (int) Offset
    day string
    Day
    offset number
    (int) Offset
    day str
    Day
    offset float
    (int) Offset
    day String
    Day
    offset Number
    (int) Offset

    GetAlertRuleTarget

    AccountGroups List<string>
    List of account groups
    AlertRulePolicyFilters List<GetAlertRuleTargetAlertRulePolicyFilter>
    Model for Alert Rule Policy Filter, as defined below
    ExcludedAccounts List<string>
    List of excluded accounts
    Regions List<string>
    List of regions
    ResourceLists List<GetAlertRuleTargetResourceList>
    Model for holding the resource list for compute access groups below
    Tags List<GetAlertRuleTargetTag>
    List of TargetTag objects, as defined below
    AccountGroups []string
    List of account groups
    AlertRulePolicyFilters []GetAlertRuleTargetAlertRulePolicyFilter
    Model for Alert Rule Policy Filter, as defined below
    ExcludedAccounts []string
    List of excluded accounts
    Regions []string
    List of regions
    ResourceLists []GetAlertRuleTargetResourceList
    Model for holding the resource list for compute access groups below
    Tags []GetAlertRuleTargetTag
    List of TargetTag objects, as defined below
    accountGroups List<String>
    List of account groups
    alertRulePolicyFilters List<GetAlertRuleTargetAlertRulePolicyFilter>
    Model for Alert Rule Policy Filter, as defined below
    excludedAccounts List<String>
    List of excluded accounts
    regions List<String>
    List of regions
    resourceLists List<GetAlertRuleTargetResourceList>
    Model for holding the resource list for compute access groups below
    tags List<GetAlertRuleTargetTag>
    List of TargetTag objects, as defined below
    accountGroups string[]
    List of account groups
    alertRulePolicyFilters GetAlertRuleTargetAlertRulePolicyFilter[]
    Model for Alert Rule Policy Filter, as defined below
    excludedAccounts string[]
    List of excluded accounts
    regions string[]
    List of regions
    resourceLists GetAlertRuleTargetResourceList[]
    Model for holding the resource list for compute access groups below
    tags GetAlertRuleTargetTag[]
    List of TargetTag objects, as defined below
    account_groups Sequence[str]
    List of account groups
    alert_rule_policy_filters Sequence[GetAlertRuleTargetAlertRulePolicyFilter]
    Model for Alert Rule Policy Filter, as defined below
    excluded_accounts Sequence[str]
    List of excluded accounts
    regions Sequence[str]
    List of regions
    resource_lists Sequence[GetAlertRuleTargetResourceList]
    Model for holding the resource list for compute access groups below
    tags Sequence[GetAlertRuleTargetTag]
    List of TargetTag objects, as defined below
    accountGroups List<String>
    List of account groups
    alertRulePolicyFilters List<Property Map>
    Model for Alert Rule Policy Filter, as defined below
    excludedAccounts List<String>
    List of excluded accounts
    regions List<String>
    List of regions
    resourceLists List<Property Map>
    Model for holding the resource list for compute access groups below
    tags List<Property Map>
    List of TargetTag objects, as defined below

    GetAlertRuleTargetAlertRulePolicyFilter

    CloudTypes List<string>
    Cloud Type.
    PolicyComplianceStandards List<string>
    Compliance Standard name.
    PolicyLabels List<string>
    Policy Label.
    PolicySeverities List<string>
    Policy Severity.
    CloudTypes []string
    Cloud Type.
    PolicyComplianceStandards []string
    Compliance Standard name.
    PolicyLabels []string
    Policy Label.
    PolicySeverities []string
    Policy Severity.
    cloudTypes List<String>
    Cloud Type.
    policyComplianceStandards List<String>
    Compliance Standard name.
    policyLabels List<String>
    Policy Label.
    policySeverities List<String>
    Policy Severity.
    cloudTypes string[]
    Cloud Type.
    policyComplianceStandards string[]
    Compliance Standard name.
    policyLabels string[]
    Policy Label.
    policySeverities string[]
    Policy Severity.
    cloud_types Sequence[str]
    Cloud Type.
    policy_compliance_standards Sequence[str]
    Compliance Standard name.
    policy_labels Sequence[str]
    Policy Label.
    policy_severities Sequence[str]
    Policy Severity.
    cloudTypes List<String>
    Cloud Type.
    policyComplianceStandards List<String>
    Compliance Standard name.
    policyLabels List<String>
    Policy Label.
    policySeverities List<String>
    Policy Severity.

    GetAlertRuleTargetResourceList

    ComputeAccessGroupIds List<string>
    List of compute access group IDs.
    ComputeAccessGroupIds []string
    List of compute access group IDs.
    computeAccessGroupIds List<String>
    List of compute access group IDs.
    computeAccessGroupIds string[]
    List of compute access group IDs.
    compute_access_group_ids Sequence[str]
    List of compute access group IDs.
    computeAccessGroupIds List<String>
    List of compute access group IDs.

    GetAlertRuleTargetTag

    Key string
    Resource tag target
    Values List<string>
    List of values for resource tag key
    Key string
    Resource tag target
    Values []string
    List of values for resource tag key
    key String
    Resource tag target
    values List<String>
    List of values for resource tag key
    key string
    Resource tag target
    values string[]
    List of values for resource tag key
    key str
    Resource tag target
    values Sequence[str]
    List of values for resource tag key
    key String
    Resource tag target
    values List<String>
    List of values for resource tag key

    Package Details

    Repository
    prismacloud paloaltonetworks/terraform-provider-prismacloud
    License
    Notes
    This Pulumi package is based on the prismacloud Terraform Provider.
    prismacloud logo
    prismacloud 1.7.0 published on Monday, Apr 14, 2025 by paloaltonetworks