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

oci.Email.getEmailDomains

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 Email Domains in Oracle Cloud Infrastructure Email service.

    Lists email domains in the specified compartment.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testEmailDomains = oci.Email.getEmailDomains({
        compartmentId: _var.compartment_id,
        id: _var.email_domain_id,
        name: _var.email_domain_name,
        state: _var.email_domain_state,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_email_domains = oci.Email.get_email_domains(compartment_id=var["compartment_id"],
        id=var["email_domain_id"],
        name=var["email_domain_name"],
        state=var["email_domain_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.GetEmailDomains(ctx, &email.GetEmailDomainsArgs{
    			CompartmentId: _var.Compartment_id,
    			Id:            pulumi.StringRef(_var.Email_domain_id),
    			Name:          pulumi.StringRef(_var.Email_domain_name),
    			State:         pulumi.StringRef(_var.Email_domain_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 testEmailDomains = Oci.Email.GetEmailDomains.Invoke(new()
        {
            CompartmentId = @var.Compartment_id,
            Id = @var.Email_domain_id,
            Name = @var.Email_domain_name,
            State = @var.Email_domain_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.GetEmailDomainsArgs;
    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 testEmailDomains = EmailFunctions.getEmailDomains(GetEmailDomainsArgs.builder()
                .compartmentId(var_.compartment_id())
                .id(var_.email_domain_id())
                .name(var_.email_domain_name())
                .state(var_.email_domain_state())
                .build());
    
        }
    }
    
    variables:
      testEmailDomains:
        fn::invoke:
          Function: oci:Email:getEmailDomains
          Arguments:
            compartmentId: ${var.compartment_id}
            id: ${var.email_domain_id}
            name: ${var.email_domain_name}
            state: ${var.email_domain_state}
    

    Using getEmailDomains

    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 getEmailDomains(args: GetEmailDomainsArgs, opts?: InvokeOptions): Promise<GetEmailDomainsResult>
    function getEmailDomainsOutput(args: GetEmailDomainsOutputArgs, opts?: InvokeOptions): Output<GetEmailDomainsResult>
    def get_email_domains(compartment_id: Optional[str] = None,
                          filters: Optional[Sequence[_email.GetEmailDomainsFilter]] = None,
                          id: Optional[str] = None,
                          name: Optional[str] = None,
                          state: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetEmailDomainsResult
    def get_email_domains_output(compartment_id: Optional[pulumi.Input[str]] = None,
                          filters: Optional[pulumi.Input[Sequence[pulumi.Input[_email.GetEmailDomainsFilterArgs]]]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          name: Optional[pulumi.Input[str]] = None,
                          state: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetEmailDomainsResult]
    func GetEmailDomains(ctx *Context, args *GetEmailDomainsArgs, opts ...InvokeOption) (*GetEmailDomainsResult, error)
    func GetEmailDomainsOutput(ctx *Context, args *GetEmailDomainsOutputArgs, opts ...InvokeOption) GetEmailDomainsResultOutput

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

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

    The following arguments are supported:

    CompartmentId string
    The OCID for the compartment.
    Filters List<GetEmailDomainsFilter>
    Id string
    A filter to only return resources that match the given id exactly.
    Name string
    A filter to only return resources that match the given name exactly.
    State string
    Filter returned list by specified lifecycle state. This parameter is case-insensitive.
    CompartmentId string
    The OCID for the compartment.
    Filters []GetEmailDomainsFilter
    Id string
    A filter to only return resources that match the given id exactly.
    Name string
    A filter to only return resources that match the given name exactly.
    State string
    Filter returned list by specified lifecycle state. This parameter is case-insensitive.
    compartmentId String
    The OCID for the compartment.
    filters List<GetDomainsFilter>
    id String
    A filter to only return resources that match the given id exactly.
    name String
    A filter to only return resources that match the given name exactly.
    state String
    Filter returned list by specified lifecycle state. This parameter is case-insensitive.
    compartmentId string
    The OCID for the compartment.
    filters GetEmailDomainsFilter[]
    id string
    A filter to only return resources that match the given id exactly.
    name string
    A filter to only return resources that match the given name exactly.
    state string
    Filter returned list by specified lifecycle state. This parameter is case-insensitive.
    compartment_id str
    The OCID for the compartment.
    filters Sequence[email.GetEmailDomainsFilter]
    id str
    A filter to only return resources that match the given id exactly.
    name str
    A filter to only return resources that match the given name exactly.
    state str
    Filter returned list by specified lifecycle state. This parameter is case-insensitive.
    compartmentId String
    The OCID for the compartment.
    filters List<Property Map>
    id String
    A filter to only return resources that match the given id exactly.
    name String
    A filter to only return resources that match the given name exactly.
    state String
    Filter returned list by specified lifecycle state. This parameter is case-insensitive.

    getEmailDomains Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment that contains this email domain.
    EmailDomainCollections List<GetEmailDomainsEmailDomainCollection>
    The list of email_domain_collection.
    Filters List<GetEmailDomainsFilter>
    Id string
    The OCID of the email domain.
    Name string
    The name of the email domain in the Internet Domain Name System (DNS). Example: mydomain.example.com
    State string
    The current state of the email domain.
    CompartmentId string
    The OCID of the compartment that contains this email domain.
    EmailDomainCollections []GetEmailDomainsEmailDomainCollection
    The list of email_domain_collection.
    Filters []GetEmailDomainsFilter
    Id string
    The OCID of the email domain.
    Name string
    The name of the email domain in the Internet Domain Name System (DNS). Example: mydomain.example.com
    State string
    The current state of the email domain.
    compartmentId String
    The OCID of the compartment that contains this email domain.
    emailDomainCollections List<GetDomainsDomainCollection>
    The list of email_domain_collection.
    filters List<GetDomainsFilter>
    id String
    The OCID of the email domain.
    name String
    The name of the email domain in the Internet Domain Name System (DNS). Example: mydomain.example.com
    state String
    The current state of the email domain.
    compartmentId string
    The OCID of the compartment that contains this email domain.
    emailDomainCollections GetEmailDomainsEmailDomainCollection[]
    The list of email_domain_collection.
    filters GetEmailDomainsFilter[]
    id string
    The OCID of the email domain.
    name string
    The name of the email domain in the Internet Domain Name System (DNS). Example: mydomain.example.com
    state string
    The current state of the email domain.
    compartment_id str
    The OCID of the compartment that contains this email domain.
    email_domain_collections Sequence[email.GetEmailDomainsEmailDomainCollection]
    The list of email_domain_collection.
    filters Sequence[email.GetEmailDomainsFilter]
    id str
    The OCID of the email domain.
    name str
    The name of the email domain in the Internet Domain Name System (DNS). Example: mydomain.example.com
    state str
    The current state of the email domain.
    compartmentId String
    The OCID of the compartment that contains this email domain.
    emailDomainCollections List<Property Map>
    The list of email_domain_collection.
    filters List<Property Map>
    id String
    The OCID of the email domain.
    name String
    The name of the email domain in the Internet Domain Name System (DNS). Example: mydomain.example.com
    state String
    The current state of the email domain.

    Supporting Types

    GetEmailDomainsEmailDomainCollection

    GetEmailDomainsEmailDomainCollectionItem

    ActiveDkimId string
    The OCID of the DKIM key that will be used to sign mail sent from this email domain.
    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"}
    Description string
    The description of an email domain.
    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
    A filter to only return resources that match the given id exactly.
    IsSpf bool
    Value of the SPF field. For more information about SPF, please see SPF Authentication.
    Name string
    A filter to only return resources that match the given name exactly.
    State string
    Filter returned list by specified lifecycle state. This parameter is case-insensitive.
    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 time the email domain was created, expressed in RFC 3339 timestamp format, "YYYY-MM-ddThh:mmZ". Example: 2021-02-12T22:47:12.613Z
    ActiveDkimId string
    The OCID of the DKIM key that will be used to sign mail sent from this email domain.
    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"}
    Description string
    The description of an email domain.
    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
    A filter to only return resources that match the given id exactly.
    IsSpf bool
    Value of the SPF field. For more information about SPF, please see SPF Authentication.
    Name string
    A filter to only return resources that match the given name exactly.
    State string
    Filter returned list by specified lifecycle state. This parameter is case-insensitive.
    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 time the email domain was created, expressed in RFC 3339 timestamp format, "YYYY-MM-ddThh:mmZ". Example: 2021-02-12T22:47:12.613Z
    activeDkimId String
    The OCID of the DKIM key that will be used to sign mail sent from this email domain.
    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"}
    description String
    The description of an email domain.
    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
    A filter to only return resources that match the given id exactly.
    isSpf Boolean
    Value of the SPF field. For more information about SPF, please see SPF Authentication.
    name String
    A filter to only return resources that match the given name exactly.
    state String
    Filter returned list by specified lifecycle state. This parameter is case-insensitive.
    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 time the email domain was created, expressed in RFC 3339 timestamp format, "YYYY-MM-ddThh:mmZ". Example: 2021-02-12T22:47:12.613Z
    activeDkimId string
    The OCID of the DKIM key that will be used to sign mail sent from this email domain.
    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"}
    description string
    The description of an email domain.
    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
    A filter to only return resources that match the given id exactly.
    isSpf boolean
    Value of the SPF field. For more information about SPF, please see SPF Authentication.
    name string
    A filter to only return resources that match the given name exactly.
    state string
    Filter returned list by specified lifecycle state. This parameter is case-insensitive.
    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 time the email domain was created, expressed in RFC 3339 timestamp format, "YYYY-MM-ddThh:mmZ". Example: 2021-02-12T22:47:12.613Z
    active_dkim_id str
    The OCID of the DKIM key that will be used to sign mail sent from this email domain.
    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"}
    description str
    The description of an email domain.
    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
    A filter to only return resources that match the given id exactly.
    is_spf bool
    Value of the SPF field. For more information about SPF, please see SPF Authentication.
    name str
    A filter to only return resources that match the given name exactly.
    state str
    Filter returned list by specified lifecycle state. This parameter is case-insensitive.
    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 time the email domain was created, expressed in RFC 3339 timestamp format, "YYYY-MM-ddThh:mmZ". Example: 2021-02-12T22:47:12.613Z
    activeDkimId String
    The OCID of the DKIM key that will be used to sign mail sent from this email domain.
    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"}
    description String
    The description of an email domain.
    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
    A filter to only return resources that match the given id exactly.
    isSpf Boolean
    Value of the SPF field. For more information about SPF, please see SPF Authentication.
    name String
    A filter to only return resources that match the given name exactly.
    state String
    Filter returned list by specified lifecycle state. This parameter is case-insensitive.
    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 time the email domain was created, expressed in RFC 3339 timestamp format, "YYYY-MM-ddThh:mmZ". Example: 2021-02-12T22:47:12.613Z

    GetEmailDomainsFilter

    Name string
    A filter to only return resources that match the given name exactly.
    Values List<string>
    Regex bool
    Name string
    A filter to only return resources that match the given name exactly.
    Values []string
    Regex bool
    name String
    A filter to only return resources that match the given name exactly.
    values List<String>
    regex Boolean
    name string
    A filter to only return resources that match the given name exactly.
    values string[]
    regex boolean
    name str
    A filter to only return resources that match the given name exactly.
    values Sequence[str]
    regex bool
    name String
    A filter to only return resources that match the given name exactly.
    values List<String>
    regex Boolean

    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