1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getAlertPolicy
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.DataSafe.getAlertPolicy

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    This data source provides details about a specific Alert Policy resource in Oracle Cloud Infrastructure Data Safe service.

    Gets the details of alert policy by its ID.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAlertPolicy = oci.DataSafe.getAlertPolicy({
        alertPolicyId: oci_data_safe_alert_policy.test_alert_policy.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_alert_policy = oci.DataSafe.get_alert_policy(alert_policy_id=oci_data_safe_alert_policy["test_alert_policy"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/DataSafe"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := DataSafe.GetAlertPolicy(ctx, &datasafe.GetAlertPolicyArgs{
    			AlertPolicyId: oci_data_safe_alert_policy.Test_alert_policy.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 testAlertPolicy = Oci.DataSafe.GetAlertPolicy.Invoke(new()
        {
            AlertPolicyId = oci_data_safe_alert_policy.Test_alert_policy.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.GetAlertPolicyArgs;
    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 testAlertPolicy = DataSafeFunctions.getAlertPolicy(GetAlertPolicyArgs.builder()
                .alertPolicyId(oci_data_safe_alert_policy.test_alert_policy().id())
                .build());
    
        }
    }
    
    variables:
      testAlertPolicy:
        fn::invoke:
          Function: oci:DataSafe:getAlertPolicy
          Arguments:
            alertPolicyId: ${oci_data_safe_alert_policy.test_alert_policy.id}
    

    Using getAlertPolicy

    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 getAlertPolicy(args: GetAlertPolicyArgs, opts?: InvokeOptions): Promise<GetAlertPolicyResult>
    function getAlertPolicyOutput(args: GetAlertPolicyOutputArgs, opts?: InvokeOptions): Output<GetAlertPolicyResult>
    def get_alert_policy(alert_policy_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetAlertPolicyResult
    def get_alert_policy_output(alert_policy_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetAlertPolicyResult]
    func GetAlertPolicy(ctx *Context, args *GetAlertPolicyArgs, opts ...InvokeOption) (*GetAlertPolicyResult, error)
    func GetAlertPolicyOutput(ctx *Context, args *GetAlertPolicyOutputArgs, opts ...InvokeOption) GetAlertPolicyResultOutput

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

    public static class GetAlertPolicy 
    {
        public static Task<GetAlertPolicyResult> InvokeAsync(GetAlertPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetAlertPolicyResult> Invoke(GetAlertPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAlertPolicyResult> getAlertPolicy(GetAlertPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DataSafe/getAlertPolicy:getAlertPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AlertPolicyId string
    The OCID of the alert policy.
    AlertPolicyId string
    The OCID of the alert policy.
    alertPolicyId String
    The OCID of the alert policy.
    alertPolicyId string
    The OCID of the alert policy.
    alert_policy_id str
    The OCID of the alert policy.
    alertPolicyId String
    The OCID of the alert policy.

    getAlertPolicy Result

    The following output properties are available:

    AlertPolicyId string
    AlertPolicyType string
    Indicates the Data Safe feature to which the alert policy belongs.
    CompartmentId string
    The OCID of the compartment that contains the alert policy.
    DefinedTags 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
    The description of the alert policy.
    DisplayName string
    The display name of the alert policy.
    FreeformTags Dictionary<string, object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
    Id string
    The provider-assigned unique ID for this managed resource.
    IsUserDefined bool
    Indicates if the alert policy is user-defined (true) or pre-defined (false).
    Severity string
    Severity level of the alert raised by this policy.
    State string
    The current state of the alert.
    SystemTags Dictionary<string, object>
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    Creation date and time of the alert policy, in the format defined by RFC3339.
    TimeUpdated string
    Last date and time the alert policy was updated, in the format defined by RFC3339.
    AlertPolicyId string
    AlertPolicyType string
    Indicates the Data Safe feature to which the alert policy belongs.
    CompartmentId string
    The OCID of the compartment that contains the alert policy.
    DefinedTags 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
    The description of the alert policy.
    DisplayName string
    The display name of the alert policy.
    FreeformTags map[string]interface{}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
    Id string
    The provider-assigned unique ID for this managed resource.
    IsUserDefined bool
    Indicates if the alert policy is user-defined (true) or pre-defined (false).
    Severity string
    Severity level of the alert raised by this policy.
    State string
    The current state of the alert.
    SystemTags map[string]interface{}
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    Creation date and time of the alert policy, in the format defined by RFC3339.
    TimeUpdated string
    Last date and time the alert policy was updated, in the format defined by RFC3339.
    alertPolicyId String
    alertPolicyType String
    Indicates the Data Safe feature to which the alert policy belongs.
    compartmentId String
    The OCID of the compartment that contains the alert policy.
    definedTags 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
    The description of the alert policy.
    displayName String
    The display name of the alert policy.
    freeformTags Map<String,Object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
    id String
    The provider-assigned unique ID for this managed resource.
    isUserDefined Boolean
    Indicates if the alert policy is user-defined (true) or pre-defined (false).
    severity String
    Severity level of the alert raised by this policy.
    state String
    The current state of the alert.
    systemTags Map<String,Object>
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    Creation date and time of the alert policy, in the format defined by RFC3339.
    timeUpdated String
    Last date and time the alert policy was updated, in the format defined by RFC3339.
    alertPolicyId string
    alertPolicyType string
    Indicates the Data Safe feature to which the alert policy belongs.
    compartmentId string
    The OCID of the compartment that contains the alert policy.
    definedTags {[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
    The description of the alert policy.
    displayName string
    The display name of the alert policy.
    freeformTags {[key: string]: any}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
    id string
    The provider-assigned unique ID for this managed resource.
    isUserDefined boolean
    Indicates if the alert policy is user-defined (true) or pre-defined (false).
    severity string
    Severity level of the alert raised by this policy.
    state string
    The current state of the alert.
    systemTags {[key: string]: any}
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    Creation date and time of the alert policy, in the format defined by RFC3339.
    timeUpdated string
    Last date and time the alert policy was updated, in the format defined by RFC3339.
    alert_policy_id str
    alert_policy_type str
    Indicates the Data Safe feature to which the alert policy belongs.
    compartment_id str
    The OCID of the compartment that contains the alert policy.
    defined_tags 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
    The description of the alert policy.
    display_name str
    The display name of the alert policy.
    freeform_tags Mapping[str, Any]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
    id str
    The provider-assigned unique ID for this managed resource.
    is_user_defined bool
    Indicates if the alert policy is user-defined (true) or pre-defined (false).
    severity str
    Severity level of the alert raised by this policy.
    state str
    The current state of the alert.
    system_tags Mapping[str, Any]
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    Creation date and time of the alert policy, in the format defined by RFC3339.
    time_updated str
    Last date and time the alert policy was updated, in the format defined by RFC3339.
    alertPolicyId String
    alertPolicyType String
    Indicates the Data Safe feature to which the alert policy belongs.
    compartmentId String
    The OCID of the compartment that contains the alert policy.
    definedTags 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
    The description of the alert policy.
    displayName String
    The display name of the alert policy.
    freeformTags Map<Any>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
    id String
    The provider-assigned unique ID for this managed resource.
    isUserDefined Boolean
    Indicates if the alert policy is user-defined (true) or pre-defined (false).
    severity String
    Severity level of the alert raised by this policy.
    state String
    The current state of the alert.
    systemTags Map<Any>
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    Creation date and time of the alert policy, in the format defined by RFC3339.
    timeUpdated String
    Last date and time the alert policy was updated, in the format defined by RFC3339.

    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.32.0 published on Thursday, Apr 18, 2024 by Pulumi