1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getTargetAlertPolicyAssociation
Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 by Pulumi

oci.DataSafe.getTargetAlertPolicyAssociation

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 by Pulumi

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

    Gets the details of target-alert policy association by its ID.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testTargetAlertPolicyAssociation = oci.DataSafe.getTargetAlertPolicyAssociation({
        targetAlertPolicyAssociationId: oci_data_safe_target_alert_policy_association.test_target_alert_policy_association.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_target_alert_policy_association = oci.DataSafe.get_target_alert_policy_association(target_alert_policy_association_id=oci_data_safe_target_alert_policy_association["test_target_alert_policy_association"]["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.GetTargetAlertPolicyAssociation(ctx, &datasafe.GetTargetAlertPolicyAssociationArgs{
    			TargetAlertPolicyAssociationId: oci_data_safe_target_alert_policy_association.Test_target_alert_policy_association.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 testTargetAlertPolicyAssociation = Oci.DataSafe.GetTargetAlertPolicyAssociation.Invoke(new()
        {
            TargetAlertPolicyAssociationId = oci_data_safe_target_alert_policy_association.Test_target_alert_policy_association.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.GetTargetAlertPolicyAssociationArgs;
    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 testTargetAlertPolicyAssociation = DataSafeFunctions.getTargetAlertPolicyAssociation(GetTargetAlertPolicyAssociationArgs.builder()
                .targetAlertPolicyAssociationId(oci_data_safe_target_alert_policy_association.test_target_alert_policy_association().id())
                .build());
    
        }
    }
    
    variables:
      testTargetAlertPolicyAssociation:
        fn::invoke:
          Function: oci:DataSafe:getTargetAlertPolicyAssociation
          Arguments:
            targetAlertPolicyAssociationId: ${oci_data_safe_target_alert_policy_association.test_target_alert_policy_association.id}
    

    Using getTargetAlertPolicyAssociation

    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 getTargetAlertPolicyAssociation(args: GetTargetAlertPolicyAssociationArgs, opts?: InvokeOptions): Promise<GetTargetAlertPolicyAssociationResult>
    function getTargetAlertPolicyAssociationOutput(args: GetTargetAlertPolicyAssociationOutputArgs, opts?: InvokeOptions): Output<GetTargetAlertPolicyAssociationResult>
    def get_target_alert_policy_association(target_alert_policy_association_id: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetTargetAlertPolicyAssociationResult
    def get_target_alert_policy_association_output(target_alert_policy_association_id: Optional[pulumi.Input[str]] = None,
                                            opts: Optional[InvokeOptions] = None) -> Output[GetTargetAlertPolicyAssociationResult]
    func GetTargetAlertPolicyAssociation(ctx *Context, args *GetTargetAlertPolicyAssociationArgs, opts ...InvokeOption) (*GetTargetAlertPolicyAssociationResult, error)
    func GetTargetAlertPolicyAssociationOutput(ctx *Context, args *GetTargetAlertPolicyAssociationOutputArgs, opts ...InvokeOption) GetTargetAlertPolicyAssociationResultOutput

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

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

    The following arguments are supported:

    TargetAlertPolicyAssociationId string
    The OCID of the target-alert policy association.
    TargetAlertPolicyAssociationId string
    The OCID of the target-alert policy association.
    targetAlertPolicyAssociationId String
    The OCID of the target-alert policy association.
    targetAlertPolicyAssociationId string
    The OCID of the target-alert policy association.
    target_alert_policy_association_id str
    The OCID of the target-alert policy association.
    targetAlertPolicyAssociationId String
    The OCID of the target-alert policy association.

    getTargetAlertPolicyAssociation Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment that contains the 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
    Describes the target-alert policy association.
    DisplayName string
    The display name of the target-alert policy association.
    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 OCID of the target-alert policy association.
    IsEnabled bool
    Indicates if the target-alert policy association is enabled or disabled.
    PolicyId string
    The OCID of the alert policy.
    State string
    The current state of the target-alert policy association.
    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"}
    TargetAlertPolicyAssociationId string
    TargetId string
    The OCID of the target on which alert policy is to be applied.
    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.
    CompartmentId string
    The OCID of the compartment that contains the 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
    Describes the target-alert policy association.
    DisplayName string
    The display name of the target-alert policy association.
    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 OCID of the target-alert policy association.
    IsEnabled bool
    Indicates if the target-alert policy association is enabled or disabled.
    PolicyId string
    The OCID of the alert policy.
    State string
    The current state of the target-alert policy association.
    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"}
    TargetAlertPolicyAssociationId string
    TargetId string
    The OCID of the target on which alert policy is to be applied.
    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.
    compartmentId String
    The OCID of the compartment that contains the 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
    Describes the target-alert policy association.
    displayName String
    The display name of the target-alert policy association.
    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 OCID of the target-alert policy association.
    isEnabled Boolean
    Indicates if the target-alert policy association is enabled or disabled.
    policyId String
    The OCID of the alert policy.
    state String
    The current state of the target-alert policy association.
    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"}
    targetAlertPolicyAssociationId String
    targetId String
    The OCID of the target on which alert policy is to be applied.
    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.
    compartmentId string
    The OCID of the compartment that contains the 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
    Describes the target-alert policy association.
    displayName string
    The display name of the target-alert policy association.
    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 OCID of the target-alert policy association.
    isEnabled boolean
    Indicates if the target-alert policy association is enabled or disabled.
    policyId string
    The OCID of the alert policy.
    state string
    The current state of the target-alert policy association.
    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"}
    targetAlertPolicyAssociationId string
    targetId string
    The OCID of the target on which alert policy is to be applied.
    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.
    compartment_id str
    The OCID of the compartment that contains the 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
    Describes the target-alert policy association.
    display_name str
    The display name of the target-alert policy association.
    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 OCID of the target-alert policy association.
    is_enabled bool
    Indicates if the target-alert policy association is enabled or disabled.
    policy_id str
    The OCID of the alert policy.
    state str
    The current state of the target-alert policy association.
    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"}
    target_alert_policy_association_id str
    target_id str
    The OCID of the target on which alert policy is to be applied.
    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.
    compartmentId String
    The OCID of the compartment that contains the 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
    Describes the target-alert policy association.
    displayName String
    The display name of the target-alert policy association.
    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 OCID of the target-alert policy association.
    isEnabled Boolean
    Indicates if the target-alert policy association is enabled or disabled.
    policyId String
    The OCID of the alert policy.
    state String
    The current state of the target-alert policy association.
    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"}
    targetAlertPolicyAssociationId String
    targetId String
    The OCID of the target on which alert policy is to be applied.
    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.27.0 published on Friday, Mar 15, 2024 by Pulumi