1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Email
  5. getEmailDomains
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Email.getEmailDomains

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 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: compartmentId,
        id: emailDomainId,
        name: emailDomainName,
        state: emailDomainState,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_email_domains = oci.Email.get_email_domains(compartment_id=compartment_id,
        id=email_domain_id,
        name=email_domain_name,
        state=email_domain_state)
    
    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.GetEmailDomains(ctx, &email.GetEmailDomainsArgs{
    			CompartmentId: compartmentId,
    			Id:            pulumi.StringRef(emailDomainId),
    			Name:          pulumi.StringRef(emailDomainName),
    			State:         pulumi.StringRef(emailDomainState),
    		}, 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 = compartmentId,
            Id = emailDomainId,
            Name = emailDomainName,
            State = emailDomainState,
        });
    
    });
    
    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(compartmentId)
                .id(emailDomainId)
                .name(emailDomainName)
                .state(emailDomainState)
                .build());
    
        }
    }
    
    variables:
      testEmailDomains:
        fn::invoke:
          Function: oci:Email:getEmailDomains
          Arguments:
            compartmentId: ${compartmentId}
            id: ${emailDomainId}
            name: ${emailDomainName}
            state: ${emailDomainState}
    

    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, string>
    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.
    DomainVerificationId string
    Id for Domain in Domain Management (under governance) if DOMAINID verification method used.
    DomainVerificationStatus string
    The current domain verification status.
    FreeformTags Dictionary<string, string>
    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, string>
    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]string
    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.
    DomainVerificationId string
    Id for Domain in Domain Management (under governance) if DOMAINID verification method used.
    DomainVerificationStatus string
    The current domain verification status.
    FreeformTags map[string]string
    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]string
    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,String>
    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.
    domainVerificationId String
    Id for Domain in Domain Management (under governance) if DOMAINID verification method used.
    domainVerificationStatus String
    The current domain verification status.
    freeformTags Map<String,String>
    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,String>
    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]: string}
    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.
    domainVerificationId string
    Id for Domain in Domain Management (under governance) if DOMAINID verification method used.
    domainVerificationStatus string
    The current domain verification status.
    freeformTags {[key: string]: string}
    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]: string}
    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, str]
    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.
    domain_verification_id str
    Id for Domain in Domain Management (under governance) if DOMAINID verification method used.
    domain_verification_status str
    The current domain verification status.
    freeform_tags Mapping[str, str]
    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, str]
    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<String>
    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.
    domainVerificationId String
    Id for Domain in Domain Management (under governance) if DOMAINID verification method used.
    domainVerificationStatus String
    The current domain verification status.
    freeformTags Map<String>
    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>
    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 v2.17.0 published on Friday, Nov 15, 2024 by Pulumi