1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Email
  5. Sender
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.Email.Sender

Explore with Pulumi AI

This resource provides the Sender resource in Oracle Cloud Infrastructure Email service.

Creates a sender for a tenancy in a given compartment.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testSender = new oci.email.Sender("test_sender", {
    compartmentId: compartmentId,
    emailAddress: senderEmailAddress,
    definedTags: {
        "Operations.CostCenter": "42",
    },
    freeformTags: {
        Department: "Finance",
    },
});
Copy
import pulumi
import pulumi_oci as oci

test_sender = oci.email.Sender("test_sender",
    compartment_id=compartment_id,
    email_address=sender_email_address,
    defined_tags={
        "Operations.CostCenter": "42",
    },
    freeform_tags={
        "Department": "Finance",
    })
Copy
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.NewSender(ctx, "test_sender", &email.SenderArgs{
			CompartmentId: pulumi.Any(compartmentId),
			EmailAddress:  pulumi.Any(senderEmailAddress),
			DefinedTags: pulumi.StringMap{
				"Operations.CostCenter": pulumi.String("42"),
			},
			FreeformTags: pulumi.StringMap{
				"Department": pulumi.String("Finance"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testSender = new Oci.Email.Sender("test_sender", new()
    {
        CompartmentId = compartmentId,
        EmailAddress = senderEmailAddress,
        DefinedTags = 
        {
            { "Operations.CostCenter", "42" },
        },
        FreeformTags = 
        {
            { "Department", "Finance" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Email.Sender;
import com.pulumi.oci.Email.SenderArgs;
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) {
        var testSender = new Sender("testSender", SenderArgs.builder()
            .compartmentId(compartmentId)
            .emailAddress(senderEmailAddress)
            .definedTags(Map.of("Operations.CostCenter", "42"))
            .freeformTags(Map.of("Department", "Finance"))
            .build());

    }
}
Copy
resources:
  testSender:
    type: oci:Email:Sender
    name: test_sender
    properties:
      compartmentId: ${compartmentId}
      emailAddress: ${senderEmailAddress}
      definedTags:
        Operations.CostCenter: '42'
      freeformTags:
        Department: Finance
Copy

Create Sender Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Sender(name: string, args: SenderArgs, opts?: CustomResourceOptions);
@overload
def Sender(resource_name: str,
           args: SenderArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Sender(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           compartment_id: Optional[str] = None,
           email_address: Optional[str] = None,
           defined_tags: Optional[Mapping[str, str]] = None,
           freeform_tags: Optional[Mapping[str, str]] = None)
func NewSender(ctx *Context, name string, args SenderArgs, opts ...ResourceOption) (*Sender, error)
public Sender(string name, SenderArgs args, CustomResourceOptions? opts = null)
public Sender(String name, SenderArgs args)
public Sender(String name, SenderArgs args, CustomResourceOptions options)
type: oci:Email:Sender
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SenderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SenderArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SenderArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SenderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SenderArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var senderResource = new Oci.Email.Sender("senderResource", new()
{
    CompartmentId = "string",
    EmailAddress = "string",
    DefinedTags = 
    {
        { "string", "string" },
    },
    FreeformTags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := Email.NewSender(ctx, "senderResource", &Email.SenderArgs{
	CompartmentId: pulumi.String("string"),
	EmailAddress:  pulumi.String("string"),
	DefinedTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	FreeformTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var senderResource = new Sender("senderResource", SenderArgs.builder()
    .compartmentId("string")
    .emailAddress("string")
    .definedTags(Map.of("string", "string"))
    .freeformTags(Map.of("string", "string"))
    .build());
Copy
sender_resource = oci.email.Sender("senderResource",
    compartment_id="string",
    email_address="string",
    defined_tags={
        "string": "string",
    },
    freeform_tags={
        "string": "string",
    })
Copy
const senderResource = new oci.email.Sender("senderResource", {
    compartmentId: "string",
    emailAddress: "string",
    definedTags: {
        string: "string",
    },
    freeformTags: {
        string: "string",
    },
});
Copy
type: oci:Email:Sender
properties:
    compartmentId: string
    definedTags:
        string: string
    emailAddress: string
    freeformTags:
        string: string
Copy

Sender Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Sender resource accepts the following input properties:

CompartmentId This property is required. string
(Updatable) The OCID of the compartment that contains the sender.
EmailAddress
This property is required.
Changes to this property will trigger replacement.
string
The email address of the sender.
DefinedTags Dictionary<string, string>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
FreeformTags Dictionary<string, string>

(Updatable) 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"}

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

CompartmentId This property is required. string
(Updatable) The OCID of the compartment that contains the sender.
EmailAddress
This property is required.
Changes to this property will trigger replacement.
string
The email address of the sender.
DefinedTags map[string]string
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
FreeformTags map[string]string

(Updatable) 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"}

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

compartmentId This property is required. String
(Updatable) The OCID of the compartment that contains the sender.
emailAddress
This property is required.
Changes to this property will trigger replacement.
String
The email address of the sender.
definedTags Map<String,String>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
freeformTags Map<String,String>

(Updatable) 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"}

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

compartmentId This property is required. string
(Updatable) The OCID of the compartment that contains the sender.
emailAddress
This property is required.
Changes to this property will trigger replacement.
string
The email address of the sender.
definedTags {[key: string]: string}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
freeformTags {[key: string]: string}

(Updatable) 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"}

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

compartment_id This property is required. str
(Updatable) The OCID of the compartment that contains the sender.
email_address
This property is required.
Changes to this property will trigger replacement.
str
The email address of the sender.
defined_tags Mapping[str, str]
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
freeform_tags Mapping[str, str]

(Updatable) 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"}

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

compartmentId This property is required. String
(Updatable) The OCID of the compartment that contains the sender.
emailAddress
This property is required.
Changes to this property will trigger replacement.
String
The email address of the sender.
definedTags Map<String>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
freeformTags Map<String>

(Updatable) 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"}

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Outputs

All input properties are implicitly available as output properties. Additionally, the Sender resource produces the following output properties:

EmailDomainId string
The email domain used to assert responsibility for emails sent from this sender.
Id string
The provider-assigned unique ID for this managed resource.
IsSpf bool
Value of the SPF field. For more information about SPF, please see SPF Authentication.
State string
The current status of the approved sender.
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 date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
EmailDomainId string
The email domain used to assert responsibility for emails sent from this sender.
Id string
The provider-assigned unique ID for this managed resource.
IsSpf bool
Value of the SPF field. For more information about SPF, please see SPF Authentication.
State string
The current status of the approved sender.
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 date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
emailDomainId String
The email domain used to assert responsibility for emails sent from this sender.
id String
The provider-assigned unique ID for this managed resource.
isSpf Boolean
Value of the SPF field. For more information about SPF, please see SPF Authentication.
state String
The current status of the approved sender.
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 date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
emailDomainId string
The email domain used to assert responsibility for emails sent from this sender.
id string
The provider-assigned unique ID for this managed resource.
isSpf boolean
Value of the SPF field. For more information about SPF, please see SPF Authentication.
state string
The current status of the approved sender.
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 date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
email_domain_id str
The email domain used to assert responsibility for emails sent from this sender.
id str
The provider-assigned unique ID for this managed resource.
is_spf bool
Value of the SPF field. For more information about SPF, please see SPF Authentication.
state str
The current status of the approved sender.
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 date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
emailDomainId String
The email domain used to assert responsibility for emails sent from this sender.
id String
The provider-assigned unique ID for this managed resource.
isSpf Boolean
Value of the SPF field. For more information about SPF, please see SPF Authentication.
state String
The current status of the approved sender.
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 date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Look up Existing Sender Resource

Get an existing Sender resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: SenderState, opts?: CustomResourceOptions): Sender
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compartment_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, str]] = None,
        email_address: Optional[str] = None,
        email_domain_id: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, str]] = None,
        is_spf: Optional[bool] = None,
        state: Optional[str] = None,
        system_tags: Optional[Mapping[str, str]] = None,
        time_created: Optional[str] = None) -> Sender
func GetSender(ctx *Context, name string, id IDInput, state *SenderState, opts ...ResourceOption) (*Sender, error)
public static Sender Get(string name, Input<string> id, SenderState? state, CustomResourceOptions? opts = null)
public static Sender get(String name, Output<String> id, SenderState state, CustomResourceOptions options)
resources:  _:    type: oci:Email:Sender    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CompartmentId string
(Updatable) The OCID of the compartment that contains the sender.
DefinedTags Dictionary<string, string>
(Updatable) 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 Changes to this property will trigger replacement. string
The email address of the sender.
EmailDomainId string
The email domain used to assert responsibility for emails sent from this sender.
FreeformTags Dictionary<string, string>

(Updatable) 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"}

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

IsSpf bool
Value of the SPF field. For more information about SPF, please see SPF Authentication.
State string
The current status of the approved sender.
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 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
(Updatable) The OCID of the compartment that contains the sender.
DefinedTags map[string]string
(Updatable) 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 Changes to this property will trigger replacement. string
The email address of the sender.
EmailDomainId string
The email domain used to assert responsibility for emails sent from this sender.
FreeformTags map[string]string

(Updatable) 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"}

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

IsSpf bool
Value of the SPF field. For more information about SPF, please see SPF Authentication.
State string
The current status of the approved sender.
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 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
(Updatable) The OCID of the compartment that contains the sender.
definedTags Map<String,String>
(Updatable) 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 Changes to this property will trigger replacement. String
The email address of the sender.
emailDomainId String
The email domain used to assert responsibility for emails sent from this sender.
freeformTags Map<String,String>

(Updatable) 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"}

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

isSpf Boolean
Value of the SPF field. For more information about SPF, please see SPF Authentication.
state String
The current status of the approved sender.
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 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
(Updatable) The OCID of the compartment that contains the sender.
definedTags {[key: string]: string}
(Updatable) 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 Changes to this property will trigger replacement. string
The email address of the sender.
emailDomainId string
The email domain used to assert responsibility for emails sent from this sender.
freeformTags {[key: string]: string}

(Updatable) 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"}

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

isSpf boolean
Value of the SPF field. For more information about SPF, please see SPF Authentication.
state string
The current status of the approved sender.
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 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
(Updatable) The OCID of the compartment that contains the sender.
defined_tags Mapping[str, str]
(Updatable) 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 Changes to this property will trigger replacement. str
The email address of the sender.
email_domain_id str
The email domain used to assert responsibility for emails sent from this sender.
freeform_tags Mapping[str, str]

(Updatable) 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"}

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

is_spf bool
Value of the SPF field. For more information about SPF, please see SPF Authentication.
state str
The current status of the approved sender.
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 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
(Updatable) The OCID of the compartment that contains the sender.
definedTags Map<String>
(Updatable) 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 Changes to this property will trigger replacement. String
The email address of the sender.
emailDomainId String
The email domain used to assert responsibility for emails sent from this sender.
freeformTags Map<String>

(Updatable) 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"}

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

isSpf Boolean
Value of the SPF field. For more information about SPF, please see SPF Authentication.
state String
The current status of the approved sender.
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 date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Import

Senders can be imported using the id, e.g.

$ pulumi import oci:Email/sender:Sender test_sender "id"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.