Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Email.getEmailDomains
Explore with Pulumi AI
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[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[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)
public static Output<GetEmailDomainsResult> getEmailDomains(GetEmailDomainsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Email/getEmailDomains:getEmailDomains
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID for the compartment.
- Filters
List<GetEmail Domains Filter> 
- 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
[]GetEmail Domains Filter 
- 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<GetDomains Filter> 
- 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
GetEmail Domains Filter[] 
- 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[GetEmail Domains Filter] 
- 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.
- EmailDomain List<GetCollections Email Domains Email Domain Collection> 
- The list of email_domain_collection.
- Filters
List<GetEmail Domains Filter> 
- 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.
- EmailDomain []GetCollections Email Domains Email Domain Collection 
- The list of email_domain_collection.
- Filters
[]GetEmail Domains Filter 
- 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.
- emailDomain List<GetCollections Domains Domain Collection> 
- The list of email_domain_collection.
- filters
List<GetDomains Filter> 
- 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.
- emailDomain GetCollections Email Domains Email Domain Collection[] 
- The list of email_domain_collection.
- filters
GetEmail Domains Filter[] 
- 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_ Sequence[Getcollections Email Domains Email Domain Collection] 
- The list of email_domain_collection.
- filters
Sequence[GetEmail Domains Filter] 
- 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.
- emailDomain List<Property Map>Collections 
- 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      
- ActiveDkim stringId 
- 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.
- 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.
- DomainVerification stringId 
- Id for Domain in Domain Management (under governance) if DOMAINID verification method used.
- DomainVerification stringStatus 
- The current domain verification status.
- 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.
- 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
- ActiveDkim stringId 
- 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.
- 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.
- DomainVerification stringId 
- Id for Domain in Domain Management (under governance) if DOMAINID verification method used.
- DomainVerification stringStatus 
- The current domain verification status.
- 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.
- 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
- activeDkim StringId 
- 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.
- 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.
- domainVerification StringId 
- Id for Domain in Domain Management (under governance) if DOMAINID verification method used.
- domainVerification StringStatus 
- The current domain verification status.
- 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.
- 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
- activeDkim stringId 
- 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.
- {[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.
- domainVerification stringId 
- Id for Domain in Domain Management (under governance) if DOMAINID verification method used.
- domainVerification stringStatus 
- The current domain verification status.
- {[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.
- {[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_ strid 
- 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.
- 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_ strid 
- Id for Domain in Domain Management (under governance) if DOMAINID verification method used.
- domain_verification_ strstatus 
- The current domain verification status.
- 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.
- 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
- activeDkim StringId 
- 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.
- 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.
- domainVerification StringId 
- Id for Domain in Domain Management (under governance) if DOMAINID verification method used.
- domainVerification StringStatus 
- The current domain verification status.
- 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.
- 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   
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.