1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Email
  5. getSuppressions
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.Email.getSuppressions

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This data source provides the list of Suppressions in Oracle Cloud Infrastructure Email service.

    Gets a list of suppressed recipient email addresses for a user. The compartmentId for suppressions must be a tenancy OCID. The returned list is sorted by creation time in descending order.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testSuppressions = oci.Email.getSuppressions({
        compartmentId: tenancyOcid,
        emailAddress: suppressionEmailAddress,
        timeCreatedGreaterThanOrEqualTo: suppressionTimeCreatedGreaterThanOrEqualTo,
        timeCreatedLessThan: suppressionTimeCreatedLessThan,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_suppressions = oci.Email.get_suppressions(compartment_id=tenancy_ocid,
        email_address=suppression_email_address,
        time_created_greater_than_or_equal_to=suppression_time_created_greater_than_or_equal_to,
        time_created_less_than=suppression_time_created_less_than)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Email"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Email.GetSuppressions(ctx, &email.GetSuppressionsArgs{
    			CompartmentId:                   tenancyOcid,
    			EmailAddress:                    pulumi.StringRef(suppressionEmailAddress),
    			TimeCreatedGreaterThanOrEqualTo: pulumi.StringRef(suppressionTimeCreatedGreaterThanOrEqualTo),
    			TimeCreatedLessThan:             pulumi.StringRef(suppressionTimeCreatedLessThan),
    		}, 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 testSuppressions = Oci.Email.GetSuppressions.Invoke(new()
        {
            CompartmentId = tenancyOcid,
            EmailAddress = suppressionEmailAddress,
            TimeCreatedGreaterThanOrEqualTo = suppressionTimeCreatedGreaterThanOrEqualTo,
            TimeCreatedLessThan = suppressionTimeCreatedLessThan,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Email.EmailFunctions;
    import com.pulumi.oci.Email.inputs.GetSuppressionsArgs;
    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 testSuppressions = EmailFunctions.getSuppressions(GetSuppressionsArgs.builder()
                .compartmentId(tenancyOcid)
                .emailAddress(suppressionEmailAddress)
                .timeCreatedGreaterThanOrEqualTo(suppressionTimeCreatedGreaterThanOrEqualTo)
                .timeCreatedLessThan(suppressionTimeCreatedLessThan)
                .build());
    
        }
    }
    
    variables:
      testSuppressions:
        fn::invoke:
          Function: oci:Email:getSuppressions
          Arguments:
            compartmentId: ${tenancyOcid}
            emailAddress: ${suppressionEmailAddress}
            timeCreatedGreaterThanOrEqualTo: ${suppressionTimeCreatedGreaterThanOrEqualTo}
            timeCreatedLessThan: ${suppressionTimeCreatedLessThan}
    

    Using getSuppressions

    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 getSuppressions(args: GetSuppressionsArgs, opts?: InvokeOptions): Promise<GetSuppressionsResult>
    function getSuppressionsOutput(args: GetSuppressionsOutputArgs, opts?: InvokeOptions): Output<GetSuppressionsResult>
    def get_suppressions(compartment_id: Optional[str] = None,
                         email_address: Optional[str] = None,
                         filters: Optional[Sequence[_email.GetSuppressionsFilter]] = None,
                         time_created_greater_than_or_equal_to: Optional[str] = None,
                         time_created_less_than: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetSuppressionsResult
    def get_suppressions_output(compartment_id: Optional[pulumi.Input[str]] = None,
                         email_address: Optional[pulumi.Input[str]] = None,
                         filters: Optional[pulumi.Input[Sequence[pulumi.Input[_email.GetSuppressionsFilterArgs]]]] = None,
                         time_created_greater_than_or_equal_to: Optional[pulumi.Input[str]] = None,
                         time_created_less_than: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetSuppressionsResult]
    func GetSuppressions(ctx *Context, args *GetSuppressionsArgs, opts ...InvokeOption) (*GetSuppressionsResult, error)
    func GetSuppressionsOutput(ctx *Context, args *GetSuppressionsOutputArgs, opts ...InvokeOption) GetSuppressionsResultOutput

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

    public static class GetSuppressions 
    {
        public static Task<GetSuppressionsResult> InvokeAsync(GetSuppressionsArgs args, InvokeOptions? opts = null)
        public static Output<GetSuppressionsResult> Invoke(GetSuppressionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSuppressionsResult> getSuppressions(GetSuppressionsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Email/getSuppressions:getSuppressions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID for the compartment.
    EmailAddress string
    The email address of the suppression.
    Filters List<GetSuppressionsFilter>
    TimeCreatedGreaterThanOrEqualTo string

    Search for suppressions that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve suppressions created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    Example: 2016-12-19T16:39:57.600Z

    TimeCreatedLessThan string

    Search for suppressions that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all suppressions created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    Example: 2016-12-19T16:39:57.600Z

    CompartmentId string
    The OCID for the compartment.
    EmailAddress string
    The email address of the suppression.
    Filters []GetSuppressionsFilter
    TimeCreatedGreaterThanOrEqualTo string

    Search for suppressions that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve suppressions created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    Example: 2016-12-19T16:39:57.600Z

    TimeCreatedLessThan string

    Search for suppressions that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all suppressions created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    Example: 2016-12-19T16:39:57.600Z

    compartmentId String
    The OCID for the compartment.
    emailAddress String
    The email address of the suppression.
    filters List<GetSuppressionsFilter>
    timeCreatedGreaterThanOrEqualTo String

    Search for suppressions that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve suppressions created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    Example: 2016-12-19T16:39:57.600Z

    timeCreatedLessThan String

    Search for suppressions that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all suppressions created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    Example: 2016-12-19T16:39:57.600Z

    compartmentId string
    The OCID for the compartment.
    emailAddress string
    The email address of the suppression.
    filters GetSuppressionsFilter[]
    timeCreatedGreaterThanOrEqualTo string

    Search for suppressions that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve suppressions created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    Example: 2016-12-19T16:39:57.600Z

    timeCreatedLessThan string

    Search for suppressions that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all suppressions created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    Example: 2016-12-19T16:39:57.600Z

    compartment_id str
    The OCID for the compartment.
    email_address str
    The email address of the suppression.
    filters Sequence[email.GetSuppressionsFilter]
    time_created_greater_than_or_equal_to str

    Search for suppressions that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve suppressions created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    Example: 2016-12-19T16:39:57.600Z

    time_created_less_than str

    Search for suppressions that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all suppressions created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    Example: 2016-12-19T16:39:57.600Z

    compartmentId String
    The OCID for the compartment.
    emailAddress String
    The email address of the suppression.
    filters List<Property Map>
    timeCreatedGreaterThanOrEqualTo String

    Search for suppressions that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve suppressions created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    Example: 2016-12-19T16:39:57.600Z

    timeCreatedLessThan String

    Search for suppressions that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all suppressions created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    Example: 2016-12-19T16:39:57.600Z

    getSuppressions Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment to contain the suppression. Since suppressions are at the customer level, this must be the tenancy OCID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Suppressions List<GetSuppressionsSuppression>
    The list of suppressions.
    EmailAddress string
    The email address of the suppression.
    Filters List<GetSuppressionsFilter>
    TimeCreatedGreaterThanOrEqualTo string
    TimeCreatedLessThan string
    CompartmentId string
    The OCID of the compartment to contain the suppression. Since suppressions are at the customer level, this must be the tenancy OCID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Suppressions []GetSuppressionsSuppression
    The list of suppressions.
    EmailAddress string
    The email address of the suppression.
    Filters []GetSuppressionsFilter
    TimeCreatedGreaterThanOrEqualTo string
    TimeCreatedLessThan string
    compartmentId String
    The OCID of the compartment to contain the suppression. Since suppressions are at the customer level, this must be the tenancy OCID.
    id String
    The provider-assigned unique ID for this managed resource.
    suppressions List<GetSuppressionsSuppression>
    The list of suppressions.
    emailAddress String
    The email address of the suppression.
    filters List<GetSuppressionsFilter>
    timeCreatedGreaterThanOrEqualTo String
    timeCreatedLessThan String
    compartmentId string
    The OCID of the compartment to contain the suppression. Since suppressions are at the customer level, this must be the tenancy OCID.
    id string
    The provider-assigned unique ID for this managed resource.
    suppressions GetSuppressionsSuppression[]
    The list of suppressions.
    emailAddress string
    The email address of the suppression.
    filters GetSuppressionsFilter[]
    timeCreatedGreaterThanOrEqualTo string
    timeCreatedLessThan string
    compartment_id str
    The OCID of the compartment to contain the suppression. Since suppressions are at the customer level, this must be the tenancy OCID.
    id str
    The provider-assigned unique ID for this managed resource.
    suppressions Sequence[email.GetSuppressionsSuppression]
    The list of suppressions.
    email_address str
    The email address of the suppression.
    filters Sequence[email.GetSuppressionsFilter]
    time_created_greater_than_or_equal_to str
    time_created_less_than str
    compartmentId String
    The OCID of the compartment to contain the suppression. Since suppressions are at the customer level, this must be the tenancy OCID.
    id String
    The provider-assigned unique ID for this managed resource.
    suppressions List<Property Map>
    The list of suppressions.
    emailAddress String
    The email address of the suppression.
    filters List<Property Map>
    timeCreatedGreaterThanOrEqualTo String
    timeCreatedLessThan String

    Supporting Types

    GetSuppressionsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetSuppressionsSuppression

    CompartmentId string
    The OCID for the compartment.
    EmailAddress string
    The email address of the suppression.
    ErrorDetail string
    The specific error message returned by a system that resulted in the suppression. This message is usually an SMTP error code with additional descriptive text. Not provided for all types of suppressions.
    ErrorSource string
    DNS name of the source of the error that caused the suppression. Will be set to either the remote-mta or reporting-mta field from a delivery status notification (RFC 3464) when available. Not provided for all types of suppressions, and not always known.
    Id string
    The unique OCID of the suppression.
    MessageId string
    The value of the Message-ID header from the email that triggered a suppression. This value is as defined in RFC 5322 section 3.6.4, excluding angle-brackets. Not provided for all types of suppressions.
    Reason string
    The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List.
    TimeCreated string
    The date and time a recipient's email address was added to the suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    TimeLastSuppressed string
    The last date and time the suppression prevented submission in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    CompartmentId string
    The OCID for the compartment.
    EmailAddress string
    The email address of the suppression.
    ErrorDetail string
    The specific error message returned by a system that resulted in the suppression. This message is usually an SMTP error code with additional descriptive text. Not provided for all types of suppressions.
    ErrorSource string
    DNS name of the source of the error that caused the suppression. Will be set to either the remote-mta or reporting-mta field from a delivery status notification (RFC 3464) when available. Not provided for all types of suppressions, and not always known.
    Id string
    The unique OCID of the suppression.
    MessageId string
    The value of the Message-ID header from the email that triggered a suppression. This value is as defined in RFC 5322 section 3.6.4, excluding angle-brackets. Not provided for all types of suppressions.
    Reason string
    The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List.
    TimeCreated string
    The date and time a recipient's email address was added to the suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    TimeLastSuppressed string
    The last date and time the suppression prevented submission in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    compartmentId String
    The OCID for the compartment.
    emailAddress String
    The email address of the suppression.
    errorDetail String
    The specific error message returned by a system that resulted in the suppression. This message is usually an SMTP error code with additional descriptive text. Not provided for all types of suppressions.
    errorSource String
    DNS name of the source of the error that caused the suppression. Will be set to either the remote-mta or reporting-mta field from a delivery status notification (RFC 3464) when available. Not provided for all types of suppressions, and not always known.
    id String
    The unique OCID of the suppression.
    messageId String
    The value of the Message-ID header from the email that triggered a suppression. This value is as defined in RFC 5322 section 3.6.4, excluding angle-brackets. Not provided for all types of suppressions.
    reason String
    The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List.
    timeCreated String
    The date and time a recipient's email address was added to the suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    timeLastSuppressed String
    The last date and time the suppression prevented submission in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    compartmentId string
    The OCID for the compartment.
    emailAddress string
    The email address of the suppression.
    errorDetail string
    The specific error message returned by a system that resulted in the suppression. This message is usually an SMTP error code with additional descriptive text. Not provided for all types of suppressions.
    errorSource string
    DNS name of the source of the error that caused the suppression. Will be set to either the remote-mta or reporting-mta field from a delivery status notification (RFC 3464) when available. Not provided for all types of suppressions, and not always known.
    id string
    The unique OCID of the suppression.
    messageId string
    The value of the Message-ID header from the email that triggered a suppression. This value is as defined in RFC 5322 section 3.6.4, excluding angle-brackets. Not provided for all types of suppressions.
    reason string
    The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List.
    timeCreated string
    The date and time a recipient's email address was added to the suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    timeLastSuppressed string
    The last date and time the suppression prevented submission in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    compartment_id str
    The OCID for the compartment.
    email_address str
    The email address of the suppression.
    error_detail str
    The specific error message returned by a system that resulted in the suppression. This message is usually an SMTP error code with additional descriptive text. Not provided for all types of suppressions.
    error_source str
    DNS name of the source of the error that caused the suppression. Will be set to either the remote-mta or reporting-mta field from a delivery status notification (RFC 3464) when available. Not provided for all types of suppressions, and not always known.
    id str
    The unique OCID of the suppression.
    message_id str
    The value of the Message-ID header from the email that triggered a suppression. This value is as defined in RFC 5322 section 3.6.4, excluding angle-brackets. Not provided for all types of suppressions.
    reason str
    The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List.
    time_created str
    The date and time a recipient's email address was added to the suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    time_last_suppressed str
    The last date and time the suppression prevented submission in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    compartmentId String
    The OCID for the compartment.
    emailAddress String
    The email address of the suppression.
    errorDetail String
    The specific error message returned by a system that resulted in the suppression. This message is usually an SMTP error code with additional descriptive text. Not provided for all types of suppressions.
    errorSource String
    DNS name of the source of the error that caused the suppression. Will be set to either the remote-mta or reporting-mta field from a delivery status notification (RFC 3464) when available. Not provided for all types of suppressions, and not always known.
    id String
    The unique OCID of the suppression.
    messageId String
    The value of the Message-ID header from the email that triggered a suppression. This value is as defined in RFC 5322 section 3.6.4, excluding angle-brackets. Not provided for all types of suppressions.
    reason String
    The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List.
    timeCreated String
    The date and time a recipient's email address was added to the suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    timeLastSuppressed String
    The last date and time the suppression prevented submission in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

    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.41.0 published on Wednesday, Jun 19, 2024 by Pulumi