1. Packages
  2. Harness Provider
  3. API Docs
  4. autostopping
  5. getAlert
Viewing docs for Harness v0.11.8
published on Friday, Mar 27, 2026 by Pulumi
harness logo
Viewing docs for Harness v0.11.8
published on Friday, Mar 27, 2026 by Pulumi

    Data source for retrieving a Harness AutoStopping alert by ID. Use the id (identifier) returned by the API when the alert was created.

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    variables:
      test:
        fn::invoke:
          function: harness:autostopping:getAlert
          arguments:
            identifier: identifier
    

    Using getAlert

    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 getAlert(args: GetAlertArgs, opts?: InvokeOptions): Promise<GetAlertResult>
    function getAlertOutput(args: GetAlertOutputArgs, opts?: InvokeOptions): Output<GetAlertResult>
    def get_alert(applicable_to_all_rules: Optional[bool] = None,
                  enabled: Optional[bool] = None,
                  events: Optional[Sequence[str]] = None,
                  name: Optional[str] = None,
                  recipients: Optional[GetAlertRecipients] = None,
                  rule_id_lists: Optional[Sequence[int]] = None,
                  opts: Optional[InvokeOptions] = None) -> GetAlertResult
    def get_alert_output(applicable_to_all_rules: Optional[pulumi.Input[bool]] = None,
                  enabled: Optional[pulumi.Input[bool]] = None,
                  events: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  name: Optional[pulumi.Input[str]] = None,
                  recipients: Optional[pulumi.Input[GetAlertRecipientsArgs]] = None,
                  rule_id_lists: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetAlertResult]
    func LookupAlert(ctx *Context, args *LookupAlertArgs, opts ...InvokeOption) (*LookupAlertResult, error)
    func LookupAlertOutput(ctx *Context, args *LookupAlertOutputArgs, opts ...InvokeOption) LookupAlertResultOutput

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

    public static class GetAlert 
    {
        public static Task<GetAlertResult> InvokeAsync(GetAlertArgs args, InvokeOptions? opts = null)
        public static Output<GetAlertResult> Invoke(GetAlertInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAlertResult> getAlert(GetAlertArgs args, InvokeOptions options)
    public static Output<GetAlertResult> getAlert(GetAlertArgs args, InvokeOptions options)
    
    fn::invoke:
      function: harness:autostopping/getAlert:getAlert
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Events List<string>
    List of event types that trigger the alert.
    Name string
    Name of the alert.
    Recipients GetAlertRecipients
    Notification recipients (email and/or slack).
    ApplicableToAllRules bool
    When true, the alert applies to all AutoStopping rules in the account (leave rule_id_list empty). Mutually exclusive with rule_id_list.
    Enabled bool
    Whether the alert is enabled.
    RuleIdLists List<int>
    List of AutoStopping rule IDs to apply the alert to. Required when applicable_to_all_rules is false. Mutually exclusive with applicable_to_all_rules = true.
    Events []string
    List of event types that trigger the alert.
    Name string
    Name of the alert.
    Recipients GetAlertRecipients
    Notification recipients (email and/or slack).
    ApplicableToAllRules bool
    When true, the alert applies to all AutoStopping rules in the account (leave rule_id_list empty). Mutually exclusive with rule_id_list.
    Enabled bool
    Whether the alert is enabled.
    RuleIdLists []int
    List of AutoStopping rule IDs to apply the alert to. Required when applicable_to_all_rules is false. Mutually exclusive with applicable_to_all_rules = true.
    events List<String>
    List of event types that trigger the alert.
    name String
    Name of the alert.
    recipients GetAlertRecipients
    Notification recipients (email and/or slack).
    applicableToAllRules Boolean
    When true, the alert applies to all AutoStopping rules in the account (leave rule_id_list empty). Mutually exclusive with rule_id_list.
    enabled Boolean
    Whether the alert is enabled.
    ruleIdLists List<Integer>
    List of AutoStopping rule IDs to apply the alert to. Required when applicable_to_all_rules is false. Mutually exclusive with applicable_to_all_rules = true.
    events string[]
    List of event types that trigger the alert.
    name string
    Name of the alert.
    recipients GetAlertRecipients
    Notification recipients (email and/or slack).
    applicableToAllRules boolean
    When true, the alert applies to all AutoStopping rules in the account (leave rule_id_list empty). Mutually exclusive with rule_id_list.
    enabled boolean
    Whether the alert is enabled.
    ruleIdLists number[]
    List of AutoStopping rule IDs to apply the alert to. Required when applicable_to_all_rules is false. Mutually exclusive with applicable_to_all_rules = true.
    events Sequence[str]
    List of event types that trigger the alert.
    name str
    Name of the alert.
    recipients GetAlertRecipients
    Notification recipients (email and/or slack).
    applicable_to_all_rules bool
    When true, the alert applies to all AutoStopping rules in the account (leave rule_id_list empty). Mutually exclusive with rule_id_list.
    enabled bool
    Whether the alert is enabled.
    rule_id_lists Sequence[int]
    List of AutoStopping rule IDs to apply the alert to. Required when applicable_to_all_rules is false. Mutually exclusive with applicable_to_all_rules = true.
    events List<String>
    List of event types that trigger the alert.
    name String
    Name of the alert.
    recipients Property Map
    Notification recipients (email and/or slack).
    applicableToAllRules Boolean
    When true, the alert applies to all AutoStopping rules in the account (leave rule_id_list empty). Mutually exclusive with rule_id_list.
    enabled Boolean
    Whether the alert is enabled.
    ruleIdLists List<Number>
    List of AutoStopping rule IDs to apply the alert to. Required when applicable_to_all_rules is false. Mutually exclusive with applicable_to_all_rules = true.

    getAlert Result

    The following output properties are available:

    Events List<string>
    List of event types that trigger the alert.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Unique identifier of the alert.
    Name string
    Name of the alert.
    Recipients GetAlertRecipients
    Notification recipients (email and/or slack).
    ApplicableToAllRules bool
    When true, the alert applies to all AutoStopping rules in the account (leave rule_id_list empty). Mutually exclusive with rule_id_list.
    Enabled bool
    Whether the alert is enabled.
    RuleIdLists List<int>
    List of AutoStopping rule IDs to apply the alert to. Required when applicable_to_all_rules is false. Mutually exclusive with applicable_to_all_rules = true.
    Events []string
    List of event types that trigger the alert.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Unique identifier of the alert.
    Name string
    Name of the alert.
    Recipients GetAlertRecipients
    Notification recipients (email and/or slack).
    ApplicableToAllRules bool
    When true, the alert applies to all AutoStopping rules in the account (leave rule_id_list empty). Mutually exclusive with rule_id_list.
    Enabled bool
    Whether the alert is enabled.
    RuleIdLists []int
    List of AutoStopping rule IDs to apply the alert to. Required when applicable_to_all_rules is false. Mutually exclusive with applicable_to_all_rules = true.
    events List<String>
    List of event types that trigger the alert.
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Unique identifier of the alert.
    name String
    Name of the alert.
    recipients GetAlertRecipients
    Notification recipients (email and/or slack).
    applicableToAllRules Boolean
    When true, the alert applies to all AutoStopping rules in the account (leave rule_id_list empty). Mutually exclusive with rule_id_list.
    enabled Boolean
    Whether the alert is enabled.
    ruleIdLists List<Integer>
    List of AutoStopping rule IDs to apply the alert to. Required when applicable_to_all_rules is false. Mutually exclusive with applicable_to_all_rules = true.
    events string[]
    List of event types that trigger the alert.
    id string
    The provider-assigned unique ID for this managed resource.
    identifier string
    Unique identifier of the alert.
    name string
    Name of the alert.
    recipients GetAlertRecipients
    Notification recipients (email and/or slack).
    applicableToAllRules boolean
    When true, the alert applies to all AutoStopping rules in the account (leave rule_id_list empty). Mutually exclusive with rule_id_list.
    enabled boolean
    Whether the alert is enabled.
    ruleIdLists number[]
    List of AutoStopping rule IDs to apply the alert to. Required when applicable_to_all_rules is false. Mutually exclusive with applicable_to_all_rules = true.
    events Sequence[str]
    List of event types that trigger the alert.
    id str
    The provider-assigned unique ID for this managed resource.
    identifier str
    Unique identifier of the alert.
    name str
    Name of the alert.
    recipients GetAlertRecipients
    Notification recipients (email and/or slack).
    applicable_to_all_rules bool
    When true, the alert applies to all AutoStopping rules in the account (leave rule_id_list empty). Mutually exclusive with rule_id_list.
    enabled bool
    Whether the alert is enabled.
    rule_id_lists Sequence[int]
    List of AutoStopping rule IDs to apply the alert to. Required when applicable_to_all_rules is false. Mutually exclusive with applicable_to_all_rules = true.
    events List<String>
    List of event types that trigger the alert.
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Unique identifier of the alert.
    name String
    Name of the alert.
    recipients Property Map
    Notification recipients (email and/or slack).
    applicableToAllRules Boolean
    When true, the alert applies to all AutoStopping rules in the account (leave rule_id_list empty). Mutually exclusive with rule_id_list.
    enabled Boolean
    Whether the alert is enabled.
    ruleIdLists List<Number>
    List of AutoStopping rule IDs to apply the alert to. Required when applicable_to_all_rules is false. Mutually exclusive with applicable_to_all_rules = true.

    Supporting Types

    GetAlertRecipients

    Emails List<string>
    List of email addresses.
    Slacks List<string>
    List of Slack webhook URLs or channel identifiers.
    Emails []string
    List of email addresses.
    Slacks []string
    List of Slack webhook URLs or channel identifiers.
    emails List<String>
    List of email addresses.
    slacks List<String>
    List of Slack webhook URLs or channel identifiers.
    emails string[]
    List of email addresses.
    slacks string[]
    List of Slack webhook URLs or channel identifiers.
    emails Sequence[str]
    List of email addresses.
    slacks Sequence[str]
    List of Slack webhook URLs or channel identifiers.
    emails List<String>
    List of email addresses.
    slacks List<String>
    List of Slack webhook URLs or channel identifiers.

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Viewing docs for Harness v0.11.8
    published on Friday, Mar 27, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.