oci.Email.getSuppressions
Explore with Pulumi AI
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/v2/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)
public static Output<GetSuppressionsResult> getSuppressions(GetSuppressionsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Email/getSuppressions:getSuppressions
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID for the compartment.
- EmailAddress string
- The email address of the suppression.
- Filters
List<GetSuppressions Filter> 
- TimeCreated stringGreater Than Or Equal To 
- 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 - timeCreatedLessThanparameter will retrieve suppressions created from the given- timeCreatedGreaterThanOrEqualToto 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 
- TimeCreated stringLess Than 
- 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 - timeCreatedGreaterThanOrEqualToparameter 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
[]GetSuppressions Filter 
- TimeCreated stringGreater Than Or Equal To 
- 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 - timeCreatedLessThanparameter will retrieve suppressions created from the given- timeCreatedGreaterThanOrEqualToto 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 
- TimeCreated stringLess Than 
- 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 - timeCreatedGreaterThanOrEqualToparameter 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<GetSuppressions Filter> 
- timeCreated StringGreater Than Or Equal To 
- 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 - timeCreatedLessThanparameter will retrieve suppressions created from the given- timeCreatedGreaterThanOrEqualToto 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 
- timeCreated StringLess Than 
- 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 - timeCreatedGreaterThanOrEqualToparameter 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
GetSuppressions Filter[] 
- timeCreated stringGreater Than Or Equal To 
- 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 - timeCreatedLessThanparameter will retrieve suppressions created from the given- timeCreatedGreaterThanOrEqualToto 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 
- timeCreated stringLess Than 
- 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 - timeCreatedGreaterThanOrEqualToparameter 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.Get Suppressions Filter] 
- time_created_ strgreater_ than_ or_ equal_ to 
- 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 - timeCreatedLessThanparameter will retrieve suppressions created from the given- timeCreatedGreaterThanOrEqualToto 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_ strless_ than 
- 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 - timeCreatedGreaterThanOrEqualToparameter 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>
- timeCreated StringGreater Than Or Equal To 
- 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 - timeCreatedLessThanparameter will retrieve suppressions created from the given- timeCreatedGreaterThanOrEqualToto 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 
- timeCreated StringLess Than 
- 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 - timeCreatedGreaterThanOrEqualToparameter 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<GetSuppressions Suppression> 
- The list of suppressions.
- EmailAddress string
- The email address of the suppression.
- Filters
List<GetSuppressions Filter> 
- TimeCreated stringGreater Than Or Equal To 
- TimeCreated stringLess Than 
- 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
[]GetSuppressions Suppression 
- The list of suppressions.
- EmailAddress string
- The email address of the suppression.
- Filters
[]GetSuppressions Filter 
- TimeCreated stringGreater Than Or Equal To 
- TimeCreated stringLess Than 
- 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<GetSuppressions Suppression> 
- The list of suppressions.
- emailAddress String
- The email address of the suppression.
- filters
List<GetSuppressions Filter> 
- timeCreated StringGreater Than Or Equal To 
- timeCreated StringLess Than 
- 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
GetSuppressions Suppression[] 
- The list of suppressions.
- emailAddress string
- The email address of the suppression.
- filters
GetSuppressions Filter[] 
- timeCreated stringGreater Than Or Equal To 
- timeCreated stringLess Than 
- 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.Get Suppressions Suppression] 
- The list of suppressions.
- email_address str
- The email address of the suppression.
- filters
Sequence[email.Get Suppressions Filter] 
- time_created_ strgreater_ than_ or_ equal_ to 
- time_created_ strless_ than 
- 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>
- timeCreated StringGreater Than Or Equal To 
- timeCreated StringLess Than 
Supporting Types
GetSuppressionsFilter  
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.
- TimeLast stringSuppressed 
- 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.
- TimeLast stringSuppressed 
- 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.
- timeLast StringSuppressed 
- 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.
- timeLast stringSuppressed 
- 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_ strsuppressed 
- 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.
- timeLast StringSuppressed 
- 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 ociTerraform Provider.