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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Email/getSuppressions:getSuppressions
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID for the compartment.
- Email
Address string - The email address of the suppression.
- Filters
List<Get
Suppressions Filter> - Time
Created 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
timeCreatedLessThan
parameter will retrieve suppressions created from the giventimeCreatedGreaterThanOrEqualTo
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 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
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 string - The OCID for the compartment.
- Email
Address string - The email address of the suppression.
- Filters
[]Get
Suppressions Filter - Time
Created 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
timeCreatedLessThan
parameter will retrieve suppressions created from the giventimeCreatedGreaterThanOrEqualTo
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 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
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 String - The OCID for the compartment.
- email
Address String - The email address of the suppression.
- filters
List<Get
Suppressions Filter> - time
Created 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
timeCreatedLessThan
parameter will retrieve suppressions created from the giventimeCreatedGreaterThanOrEqualTo
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 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
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 string - The OCID for the compartment.
- email
Address string - The email address of the suppression.
- filters
Get
Suppressions Filter[] - time
Created 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
timeCreatedLessThan
parameter will retrieve suppressions created from the giventimeCreatedGreaterThanOrEqualTo
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 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
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.
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
timeCreatedLessThan
parameter will retrieve suppressions created from the giventimeCreatedGreaterThanOrEqualTo
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_ 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
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 String - The OCID for the compartment.
- email
Address String - The email address of the suppression.
- filters List<Property Map>
- time
Created 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
timeCreatedLessThan
parameter will retrieve suppressions created from the giventimeCreatedGreaterThanOrEqualTo
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 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
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:
- Compartment
Id 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<Get
Suppressions Suppression> - The list of suppressions.
- Email
Address string - The email address of the suppression.
- Filters
List<Get
Suppressions Filter> - Time
Created stringGreater Than Or Equal To - Time
Created stringLess Than
- Compartment
Id 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
[]Get
Suppressions Suppression - The list of suppressions.
- Email
Address string - The email address of the suppression.
- Filters
[]Get
Suppressions Filter - Time
Created stringGreater Than Or Equal To - Time
Created stringLess Than
- compartment
Id 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<Get
Suppressions Suppression> - The list of suppressions.
- email
Address String - The email address of the suppression.
- filters
List<Get
Suppressions Filter> - time
Created StringGreater Than Or Equal To - time
Created StringLess Than
- compartment
Id 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
Get
Suppressions Suppression[] - The list of suppressions.
- email
Address string - The email address of the suppression.
- filters
Get
Suppressions Filter[] - time
Created stringGreater Than Or Equal To - time
Created 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
- compartment
Id 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.
- email
Address String - The email address of the suppression.
- filters List<Property Map>
- time
Created StringGreater Than Or Equal To - time
Created StringLess Than
Supporting Types
GetSuppressionsFilter
GetSuppressionsSuppression
- Compartment
Id string - The OCID for the compartment.
- Email
Address string - The email address of the suppression.
- Error
Detail 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.
- Error
Source 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.
- Message
Id 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.
- Time
Created 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.
- Time
Last 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 string - The OCID for the compartment.
- Email
Address string - The email address of the suppression.
- Error
Detail 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.
- Error
Source 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.
- Message
Id 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.
- Time
Created 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.
- Time
Last 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 String - The OCID for the compartment.
- email
Address String - The email address of the suppression.
- error
Detail 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.
- error
Source 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.
- message
Id 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.
- time
Created 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.
- time
Last 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 string - The OCID for the compartment.
- email
Address string - The email address of the suppression.
- error
Detail 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.
- error
Source 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.
- message
Id 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.
- time
Created 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.
- time
Last 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.
- compartment
Id String - The OCID for the compartment.
- email
Address String - The email address of the suppression.
- error
Detail 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.
- error
Source 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.
- message
Id 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.
- time
Created 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.
- time
Last 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
oci
Terraform Provider.