Oracle Cloud Infrastructure v3.9.0 published on Wednesday, Sep 24, 2025 by Pulumi
oci.DataSafe.getAlertPolicy
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: testAlertPolicyOciDataSafeAlertPolicy.id,
});
import pulumi
import pulumi_oci as oci
test_alert_policy = oci.DataSafe.get_alert_policy(alert_policy_id=test_alert_policy_oci_data_safe_alert_policy["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v3/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: testAlertPolicyOciDataSafeAlertPolicy.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 = testAlertPolicyOciDataSafeAlertPolicy.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(testAlertPolicyOciDataSafeAlertPolicy.id())
            .build());
    }
}
variables:
  testAlertPolicy:
    fn::invoke:
      function: oci:DataSafe:getAlertPolicy
      arguments:
        alertPolicyId: ${testAlertPolicyOciDataSafeAlertPolicy.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 LookupAlertPolicy(ctx *Context, args *LookupAlertPolicyArgs, opts ...InvokeOption) (*LookupAlertPolicyResult, error)
func LookupAlertPolicyOutput(ctx *Context, args *LookupAlertPolicyOutputArgs, opts ...InvokeOption) LookupAlertPolicyResultOutput> Note: This function is named LookupAlertPolicy 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)
public static Output<GetAlertPolicyResult> getAlertPolicy(GetAlertPolicyArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DataSafe/getAlertPolicy:getAlertPolicy
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Alert
Policy stringId  - The OCID of the alert policy.
 
- Alert
Policy stringId  - The OCID of the alert policy.
 
- alert
Policy StringId  - The OCID of the alert policy.
 
- alert
Policy stringId  - The OCID of the alert policy.
 
- alert_
policy_ strid  - The OCID of the alert policy.
 
- alert
Policy StringId  - The OCID of the alert policy.
 
getAlertPolicy Result
The following output properties are available:
- Alert
Policy stringId  - Alert
Policy List<GetRule Details Alert Policy Alert Policy Rule Detail>  - Alert
Policy stringType  - Indicates the Data Safe feature to which the alert policy belongs.
 - Compartment
Id string - The OCID of the compartment that contains the alert policy.
 - Dictionary<string, string>
 - 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.
 - Display
Name string - The display name of the alert policy.
 - Dictionary<string, string>
 - 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 OCID of the alert policy.
 - Is
User boolDefined  - Indicates if the alert policy is user-defined (true) or pre-defined (false).
 - Lifecycle
Details string - Details about the current state of the alert policy.
 - Severity string
 - Severity level of the alert raised by this policy.
 - State string
 - The current state of the alert.
 - Dictionary<string, string>
 - 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 string - Creation date and time of the alert policy, in the format defined by RFC3339.
 - Time
Updated string - Last date and time the alert policy was updated, in the format defined by RFC3339.
 
- Alert
Policy stringId  - Alert
Policy []GetRule Details Alert Policy Alert Policy Rule Detail  - Alert
Policy stringType  - Indicates the Data Safe feature to which the alert policy belongs.
 - Compartment
Id string - The OCID of the compartment that contains the alert policy.
 - map[string]string
 - 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.
 - Display
Name string - The display name of the alert policy.
 - map[string]string
 - 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 OCID of the alert policy.
 - Is
User boolDefined  - Indicates if the alert policy is user-defined (true) or pre-defined (false).
 - Lifecycle
Details string - Details about the current state of the alert policy.
 - Severity string
 - Severity level of the alert raised by this policy.
 - State string
 - The current state of the alert.
 - map[string]string
 - 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 string - Creation date and time of the alert policy, in the format defined by RFC3339.
 - Time
Updated string - Last date and time the alert policy was updated, in the format defined by RFC3339.
 
- alert
Policy StringId  - alert
Policy List<GetRule Details Alert Policy Alert Policy Rule Detail>  - alert
Policy StringType  - Indicates the Data Safe feature to which the alert policy belongs.
 - compartment
Id String - The OCID of the compartment that contains the alert policy.
 - Map<String,String>
 - 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.
 - display
Name String - The display name of the alert policy.
 - Map<String,String>
 - 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 OCID of the alert policy.
 - is
User BooleanDefined  - Indicates if the alert policy is user-defined (true) or pre-defined (false).
 - lifecycle
Details String - Details about the current state of the alert policy.
 - severity String
 - Severity level of the alert raised by this policy.
 - state String
 - The current state of the alert.
 - Map<String,String>
 - 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 String - Creation date and time of the alert policy, in the format defined by RFC3339.
 - time
Updated String - Last date and time the alert policy was updated, in the format defined by RFC3339.
 
- alert
Policy stringId  - alert
Policy GetRule Details Alert Policy Alert Policy Rule Detail[]  - alert
Policy stringType  - Indicates the Data Safe feature to which the alert policy belongs.
 - compartment
Id string - The OCID of the compartment that contains the alert policy.
 - {[key: string]: string}
 - 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.
 - display
Name string - The display name of the alert policy.
 - {[key: string]: string}
 - 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 OCID of the alert policy.
 - is
User booleanDefined  - Indicates if the alert policy is user-defined (true) or pre-defined (false).
 - lifecycle
Details string - Details about the current state of the alert policy.
 - severity string
 - Severity level of the alert raised by this policy.
 - state string
 - The current state of the alert.
 - {[key: string]: string}
 - 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 string - Creation date and time of the alert policy, in the format defined by RFC3339.
 - time
Updated string - Last date and time the alert policy was updated, in the format defined by RFC3339.
 
- alert_
policy_ strid  - alert_
policy_ Sequence[Getrule_ details Alert Policy Alert Policy Rule Detail]  - alert_
policy_ strtype  - Indicates the Data Safe feature to which the alert policy belongs.
 - compartment_
id str - The OCID of the compartment that contains the alert policy.
 - Mapping[str, str]
 - 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.
 - Mapping[str, str]
 - 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 OCID of the alert policy.
 - is_
user_ booldefined  - Indicates if the alert policy is user-defined (true) or pre-defined (false).
 - lifecycle_
details str - Details about the current state of the alert policy.
 - severity str
 - Severity level of the alert raised by this policy.
 - state str
 - The current state of the alert.
 - Mapping[str, str]
 - 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.
 
- alert
Policy StringId  - alert
Policy List<Property Map>Rule Details  - alert
Policy StringType  - Indicates the Data Safe feature to which the alert policy belongs.
 - compartment
Id String - The OCID of the compartment that contains the alert policy.
 - Map<String>
 - 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.
 - display
Name String - The display name of the alert policy.
 - Map<String>
 - 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 OCID of the alert policy.
 - is
User BooleanDefined  - Indicates if the alert policy is user-defined (true) or pre-defined (false).
 - lifecycle
Details String - Details about the current state of the alert policy.
 - severity String
 - Severity level of the alert raised by this policy.
 - state String
 - The current state of the alert.
 - Map<String>
 - 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 String - Creation date and time of the alert policy, in the format defined by RFC3339.
 - time
Updated String - Last date and time the alert policy was updated, in the format defined by RFC3339.
 
Supporting Types
GetAlertPolicyAlertPolicyRuleDetail      
- Description string
 - The description of the alert policy.
 - Display
Name string - The display name of the alert policy.
 - Expression string
 
- Description string
 - The description of the alert policy.
 - Display
Name string - The display name of the alert policy.
 - Expression string
 
- description String
 - The description of the alert policy.
 - display
Name String - The display name of the alert policy.
 - expression String
 
- description string
 - The description of the alert policy.
 - display
Name string - The display name of the alert policy.
 - expression string
 
- description str
 - The description of the alert policy.
 - display_
name str - The display name of the alert policy.
 - expression str
 
- description String
 - The description of the alert policy.
 - display
Name String - The display name of the alert policy.
 - expression String
 
Package Details
- Repository
 - oci pulumi/pulumi-oci
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
ociTerraform Provider. 
