1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Email
  5. getSenders
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.Email.getSenders

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

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

    Gets a collection of approved sender email addresses and sender IDs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testSenders = oci.Email.getSenders({
        compartmentId: _var.compartment_id,
        domain: _var.sender_domain,
        emailAddress: _var.sender_email_address,
        state: _var.sender_state,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_senders = oci.Email.get_senders(compartment_id=var["compartment_id"],
        domain=var["sender_domain"],
        email_address=var["sender_email_address"],
        state=var["sender_state"])
    
    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.GetSenders(ctx, &email.GetSendersArgs{
    			CompartmentId: _var.Compartment_id,
    			Domain:        pulumi.StringRef(_var.Sender_domain),
    			EmailAddress:  pulumi.StringRef(_var.Sender_email_address),
    			State:         pulumi.StringRef(_var.Sender_state),
    		}, 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 testSenders = Oci.Email.GetSenders.Invoke(new()
        {
            CompartmentId = @var.Compartment_id,
            Domain = @var.Sender_domain,
            EmailAddress = @var.Sender_email_address,
            State = @var.Sender_state,
        });
    
    });
    
    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.GetSendersArgs;
    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 testSenders = EmailFunctions.getSenders(GetSendersArgs.builder()
                .compartmentId(var_.compartment_id())
                .domain(var_.sender_domain())
                .emailAddress(var_.sender_email_address())
                .state(var_.sender_state())
                .build());
    
        }
    }
    
    variables:
      testSenders:
        fn::invoke:
          Function: oci:Email:getSenders
          Arguments:
            compartmentId: ${var.compartment_id}
            domain: ${var.sender_domain}
            emailAddress: ${var.sender_email_address}
            state: ${var.sender_state}
    

    Using getSenders

    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 getSenders(args: GetSendersArgs, opts?: InvokeOptions): Promise<GetSendersResult>
    function getSendersOutput(args: GetSendersOutputArgs, opts?: InvokeOptions): Output<GetSendersResult>
    def get_senders(compartment_id: Optional[str] = None,
                    domain: Optional[str] = None,
                    email_address: Optional[str] = None,
                    filters: Optional[Sequence[_email.GetSendersFilter]] = None,
                    state: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetSendersResult
    def get_senders_output(compartment_id: Optional[pulumi.Input[str]] = None,
                    domain: Optional[pulumi.Input[str]] = None,
                    email_address: Optional[pulumi.Input[str]] = None,
                    filters: Optional[pulumi.Input[Sequence[pulumi.Input[_email.GetSendersFilterArgs]]]] = None,
                    state: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetSendersResult]
    func GetSenders(ctx *Context, args *GetSendersArgs, opts ...InvokeOption) (*GetSendersResult, error)
    func GetSendersOutput(ctx *Context, args *GetSendersOutputArgs, opts ...InvokeOption) GetSendersResultOutput

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

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

    The following arguments are supported:

    CompartmentId string
    The OCID for the compartment.
    Domain string
    A filter to only return resources that match the given domain exactly.
    EmailAddress string
    The email address of the approved sender.
    Filters List<GetSendersFilter>
    State string
    The current state of a sender.
    CompartmentId string
    The OCID for the compartment.
    Domain string
    A filter to only return resources that match the given domain exactly.
    EmailAddress string
    The email address of the approved sender.
    Filters []GetSendersFilter
    State string
    The current state of a sender.
    compartmentId String
    The OCID for the compartment.
    domain String
    A filter to only return resources that match the given domain exactly.
    emailAddress String
    The email address of the approved sender.
    filters List<GetSendersFilter>
    state String
    The current state of a sender.
    compartmentId string
    The OCID for the compartment.
    domain string
    A filter to only return resources that match the given domain exactly.
    emailAddress string
    The email address of the approved sender.
    filters GetSendersFilter[]
    state string
    The current state of a sender.
    compartment_id str
    The OCID for the compartment.
    domain str
    A filter to only return resources that match the given domain exactly.
    email_address str
    The email address of the approved sender.
    filters Sequence[email.GetSendersFilter]
    state str
    The current state of a sender.
    compartmentId String
    The OCID for the compartment.
    domain String
    A filter to only return resources that match the given domain exactly.
    emailAddress String
    The email address of the approved sender.
    filters List<Property Map>
    state String
    The current state of a sender.

    getSenders Result

    The following output properties are available:

    CompartmentId string
    The OCID for the compartment.
    Id string
    The provider-assigned unique ID for this managed resource.
    Senders List<GetSendersSender>
    The list of senders.
    Domain string
    EmailAddress string
    The email address of the sender.
    Filters List<GetSendersFilter>
    State string
    The current status of the approved sender.
    CompartmentId string
    The OCID for the compartment.
    Id string
    The provider-assigned unique ID for this managed resource.
    Senders []GetSendersSender
    The list of senders.
    Domain string
    EmailAddress string
    The email address of the sender.
    Filters []GetSendersFilter
    State string
    The current status of the approved sender.
    compartmentId String
    The OCID for the compartment.
    id String
    The provider-assigned unique ID for this managed resource.
    senders List<GetSendersSender>
    The list of senders.
    domain String
    emailAddress String
    The email address of the sender.
    filters List<GetSendersFilter>
    state String
    The current status of the approved sender.
    compartmentId string
    The OCID for the compartment.
    id string
    The provider-assigned unique ID for this managed resource.
    senders GetSendersSender[]
    The list of senders.
    domain string
    emailAddress string
    The email address of the sender.
    filters GetSendersFilter[]
    state string
    The current status of the approved sender.
    compartment_id str
    The OCID for the compartment.
    id str
    The provider-assigned unique ID for this managed resource.
    senders Sequence[email.GetSendersSender]
    The list of senders.
    domain str
    email_address str
    The email address of the sender.
    filters Sequence[email.GetSendersFilter]
    state str
    The current status of the approved sender.
    compartmentId String
    The OCID for the compartment.
    id String
    The provider-assigned unique ID for this managed resource.
    senders List<Property Map>
    The list of senders.
    domain String
    emailAddress String
    The email address of the sender.
    filters List<Property Map>
    state String
    The current status of the approved sender.

    Supporting Types

    GetSendersFilter

    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

    GetSendersSender

    CompartmentId string
    The OCID for the compartment.
    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"}
    EmailAddress string
    The email address of the approved sender.
    EmailDomainId string
    The email domain used to assert responsibility for emails sent from this sender.
    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 unique OCID of the sender.
    IsSpf bool
    Value of the SPF field. For more information about SPF, please see SPF Authentication.
    State string
    The current state of a sender.
    SystemTags Dictionary<string, object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    CompartmentId string
    The OCID for the compartment.
    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"}
    EmailAddress string
    The email address of the approved sender.
    EmailDomainId string
    The email domain used to assert responsibility for emails sent from this sender.
    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 unique OCID of the sender.
    IsSpf bool
    Value of the SPF field. For more information about SPF, please see SPF Authentication.
    State string
    The current state of a sender.
    SystemTags map[string]interface{}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    compartmentId String
    The OCID for the compartment.
    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"}
    emailAddress String
    The email address of the approved sender.
    emailDomainId String
    The email domain used to assert responsibility for emails sent from this sender.
    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 unique OCID of the sender.
    isSpf Boolean
    Value of the SPF field. For more information about SPF, please see SPF Authentication.
    state String
    The current state of a sender.
    systemTags Map<String,Object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    compartmentId string
    The OCID for the compartment.
    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"}
    emailAddress string
    The email address of the approved sender.
    emailDomainId string
    The email domain used to assert responsibility for emails sent from this sender.
    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 unique OCID of the sender.
    isSpf boolean
    Value of the SPF field. For more information about SPF, please see SPF Authentication.
    state string
    The current state of a sender.
    systemTags {[key: string]: any}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    compartment_id str
    The OCID for the compartment.
    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"}
    email_address str
    The email address of the approved sender.
    email_domain_id str
    The email domain used to assert responsibility for emails sent from this sender.
    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 unique OCID of the sender.
    is_spf bool
    Value of the SPF field. For more information about SPF, please see SPF Authentication.
    state str
    The current state of a sender.
    system_tags Mapping[str, Any]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    The date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
    compartmentId String
    The OCID for the compartment.
    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"}
    emailAddress String
    The email address of the approved sender.
    emailDomainId String
    The email domain used to assert responsibility for emails sent from this sender.
    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 unique OCID of the sender.
    isSpf Boolean
    Value of the SPF field. For more information about SPF, please see SPF Authentication.
    state String
    The current state of a sender.
    systemTags Map<Any>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time the approved sender was added 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.32.0 published on Thursday, Apr 18, 2024 by Pulumi