nexus.MailConfig
Explore with Pulumi AI
Use this resource to configure Nexus’ mailing behaviour
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nexus from "@pulumi/nexus";
const config = new nexus.MailConfig("config", {
enabled: true,
fromAddress: "from@examplehost.org",
host: "examplehost.org",
nexusTrustStoreEnabled: true,
password: "topsecret",
port: 25,
sslOnConnectEnabled: true,
startTlsEnabled: true,
startTlsRequired: true,
subjectPrefix: "prefix: ",
username: "uname",
});
import pulumi
import pulumi_nexus as nexus
config = nexus.MailConfig("config",
enabled=True,
from_address="from@examplehost.org",
host="examplehost.org",
nexus_trust_store_enabled=True,
password="topsecret",
port=25,
ssl_on_connect_enabled=True,
start_tls_enabled=True,
start_tls_required=True,
subject_prefix="prefix: ",
username="uname")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/nexus/v2/nexus"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nexus.NewMailConfig(ctx, "config", &nexus.MailConfigArgs{
Enabled: pulumi.Bool(true),
FromAddress: pulumi.String("from@examplehost.org"),
Host: pulumi.String("examplehost.org"),
NexusTrustStoreEnabled: pulumi.Bool(true),
Password: pulumi.String("topsecret"),
Port: pulumi.Float64(25),
SslOnConnectEnabled: pulumi.Bool(true),
StartTlsEnabled: pulumi.Bool(true),
StartTlsRequired: pulumi.Bool(true),
SubjectPrefix: pulumi.String("prefix: "),
Username: pulumi.String("uname"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nexus = Pulumi.Nexus;
return await Deployment.RunAsync(() =>
{
var config = new Nexus.MailConfig("config", new()
{
Enabled = true,
FromAddress = "from@examplehost.org",
Host = "examplehost.org",
NexusTrustStoreEnabled = true,
Password = "topsecret",
Port = 25,
SslOnConnectEnabled = true,
StartTlsEnabled = true,
StartTlsRequired = true,
SubjectPrefix = "prefix: ",
Username = "uname",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nexus.MailConfig;
import com.pulumi.nexus.MailConfigArgs;
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 config = new MailConfig("config", MailConfigArgs.builder()
.enabled(true)
.fromAddress("from@examplehost.org")
.host("examplehost.org")
.nexusTrustStoreEnabled(true)
.password("topsecret")
.port(25)
.sslOnConnectEnabled(true)
.startTlsEnabled(true)
.startTlsRequired(true)
.subjectPrefix("prefix: ")
.username("uname")
.build());
}
}
resources:
config:
type: nexus:MailConfig
properties:
enabled: true
fromAddress: from@examplehost.org
host: examplehost.org
nexusTrustStoreEnabled: true
password: topsecret
port: 25
sslOnConnectEnabled: true
startTlsEnabled: true
startTlsRequired: true
subjectPrefix: 'prefix: '
username: uname
Create MailConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MailConfig(name: string, args: MailConfigArgs, opts?: CustomResourceOptions);
@overload
def MailConfig(resource_name: str,
args: MailConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MailConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
from_address: Optional[str] = None,
host: Optional[str] = None,
port: Optional[float] = None,
enabled: Optional[bool] = None,
nexus_trust_store_enabled: Optional[bool] = None,
password: Optional[str] = None,
ssl_on_connect_enabled: Optional[bool] = None,
ssl_server_identity_check_enabled: Optional[bool] = None,
start_tls_enabled: Optional[bool] = None,
start_tls_required: Optional[bool] = None,
subject_prefix: Optional[str] = None,
username: Optional[str] = None)
func NewMailConfig(ctx *Context, name string, args MailConfigArgs, opts ...ResourceOption) (*MailConfig, error)
public MailConfig(string name, MailConfigArgs args, CustomResourceOptions? opts = null)
public MailConfig(String name, MailConfigArgs args)
public MailConfig(String name, MailConfigArgs args, CustomResourceOptions options)
type: nexus:MailConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args MailConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args MailConfigArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args MailConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MailConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MailConfigArgs
- 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 mailConfigResource = new Nexus.MailConfig("mailConfigResource", new()
{
FromAddress = "string",
Host = "string",
Port = 0,
Enabled = false,
NexusTrustStoreEnabled = false,
Password = "string",
SslOnConnectEnabled = false,
SslServerIdentityCheckEnabled = false,
StartTlsEnabled = false,
StartTlsRequired = false,
SubjectPrefix = "string",
Username = "string",
});
example, err := nexus.NewMailConfig(ctx, "mailConfigResource", &nexus.MailConfigArgs{
FromAddress: pulumi.String("string"),
Host: pulumi.String("string"),
Port: pulumi.Float64(0),
Enabled: pulumi.Bool(false),
NexusTrustStoreEnabled: pulumi.Bool(false),
Password: pulumi.String("string"),
SslOnConnectEnabled: pulumi.Bool(false),
SslServerIdentityCheckEnabled: pulumi.Bool(false),
StartTlsEnabled: pulumi.Bool(false),
StartTlsRequired: pulumi.Bool(false),
SubjectPrefix: pulumi.String("string"),
Username: pulumi.String("string"),
})
var mailConfigResource = new MailConfig("mailConfigResource", MailConfigArgs.builder()
.fromAddress("string")
.host("string")
.port(0)
.enabled(false)
.nexusTrustStoreEnabled(false)
.password("string")
.sslOnConnectEnabled(false)
.sslServerIdentityCheckEnabled(false)
.startTlsEnabled(false)
.startTlsRequired(false)
.subjectPrefix("string")
.username("string")
.build());
mail_config_resource = nexus.MailConfig("mailConfigResource",
from_address="string",
host="string",
port=0,
enabled=False,
nexus_trust_store_enabled=False,
password="string",
ssl_on_connect_enabled=False,
ssl_server_identity_check_enabled=False,
start_tls_enabled=False,
start_tls_required=False,
subject_prefix="string",
username="string")
const mailConfigResource = new nexus.MailConfig("mailConfigResource", {
fromAddress: "string",
host: "string",
port: 0,
enabled: false,
nexusTrustStoreEnabled: false,
password: "string",
sslOnConnectEnabled: false,
sslServerIdentityCheckEnabled: false,
startTlsEnabled: false,
startTlsRequired: false,
subjectPrefix: "string",
username: "string",
});
type: nexus:MailConfig
properties:
enabled: false
fromAddress: string
host: string
nexusTrustStoreEnabled: false
password: string
port: 0
sslOnConnectEnabled: false
sslServerIdentityCheckEnabled: false
startTlsEnabled: false
startTlsRequired: false
subjectPrefix: string
username: string
MailConfig 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 MailConfig resource accepts the following input properties:
- From
Address string - fromAddress
- Host string
- hostname
- Port double
- port
- Enabled bool
- Whether the config is enabled or not
- Nexus
Trust boolStore Enabled - SSL on connect enabled
- Password string
- Password
- Ssl
On boolConnect Enabled - SSL on connect enabled
- Ssl
Server boolIdentity Check Enabled - SSL on connect enabled
- Start
Tls boolEnabled - Star TLS Enabled
- Start
Tls boolRequired - Star TLS required
- Subject
Prefix string - Subject prefix
- Username string
- Username
- From
Address string - fromAddress
- Host string
- hostname
- Port float64
- port
- Enabled bool
- Whether the config is enabled or not
- Nexus
Trust boolStore Enabled - SSL on connect enabled
- Password string
- Password
- Ssl
On boolConnect Enabled - SSL on connect enabled
- Ssl
Server boolIdentity Check Enabled - SSL on connect enabled
- Start
Tls boolEnabled - Star TLS Enabled
- Start
Tls boolRequired - Star TLS required
- Subject
Prefix string - Subject prefix
- Username string
- Username
- from
Address String - fromAddress
- host String
- hostname
- port Double
- port
- enabled Boolean
- Whether the config is enabled or not
- nexus
Trust BooleanStore Enabled - SSL on connect enabled
- password String
- Password
- ssl
On BooleanConnect Enabled - SSL on connect enabled
- ssl
Server BooleanIdentity Check Enabled - SSL on connect enabled
- start
Tls BooleanEnabled - Star TLS Enabled
- start
Tls BooleanRequired - Star TLS required
- subject
Prefix String - Subject prefix
- username String
- Username
- from
Address string - fromAddress
- host string
- hostname
- port number
- port
- enabled boolean
- Whether the config is enabled or not
- nexus
Trust booleanStore Enabled - SSL on connect enabled
- password string
- Password
- ssl
On booleanConnect Enabled - SSL on connect enabled
- ssl
Server booleanIdentity Check Enabled - SSL on connect enabled
- start
Tls booleanEnabled - Star TLS Enabled
- start
Tls booleanRequired - Star TLS required
- subject
Prefix string - Subject prefix
- username string
- Username
- from_
address str - fromAddress
- host str
- hostname
- port float
- port
- enabled bool
- Whether the config is enabled or not
- nexus_
trust_ boolstore_ enabled - SSL on connect enabled
- password str
- Password
- ssl_
on_ boolconnect_ enabled - SSL on connect enabled
- ssl_
server_ boolidentity_ check_ enabled - SSL on connect enabled
- start_
tls_ boolenabled - Star TLS Enabled
- start_
tls_ boolrequired - Star TLS required
- subject_
prefix str - Subject prefix
- username str
- Username
- from
Address String - fromAddress
- host String
- hostname
- port Number
- port
- enabled Boolean
- Whether the config is enabled or not
- nexus
Trust BooleanStore Enabled - SSL on connect enabled
- password String
- Password
- ssl
On BooleanConnect Enabled - SSL on connect enabled
- ssl
Server BooleanIdentity Check Enabled - SSL on connect enabled
- start
Tls BooleanEnabled - Star TLS Enabled
- start
Tls BooleanRequired - Star TLS required
- subject
Prefix String - Subject prefix
- username String
- Username
Outputs
All input properties are implicitly available as output properties. Additionally, the MailConfig resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing MailConfig Resource
Get an existing MailConfig 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?: MailConfigState, opts?: CustomResourceOptions): MailConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
from_address: Optional[str] = None,
host: Optional[str] = None,
nexus_trust_store_enabled: Optional[bool] = None,
password: Optional[str] = None,
port: Optional[float] = None,
ssl_on_connect_enabled: Optional[bool] = None,
ssl_server_identity_check_enabled: Optional[bool] = None,
start_tls_enabled: Optional[bool] = None,
start_tls_required: Optional[bool] = None,
subject_prefix: Optional[str] = None,
username: Optional[str] = None) -> MailConfig
func GetMailConfig(ctx *Context, name string, id IDInput, state *MailConfigState, opts ...ResourceOption) (*MailConfig, error)
public static MailConfig Get(string name, Input<string> id, MailConfigState? state, CustomResourceOptions? opts = null)
public static MailConfig get(String name, Output<String> id, MailConfigState state, CustomResourceOptions options)
resources: _: type: nexus:MailConfig get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Enabled bool
- Whether the config is enabled or not
- From
Address string - fromAddress
- Host string
- hostname
- Nexus
Trust boolStore Enabled - SSL on connect enabled
- Password string
- Password
- Port double
- port
- Ssl
On boolConnect Enabled - SSL on connect enabled
- Ssl
Server boolIdentity Check Enabled - SSL on connect enabled
- Start
Tls boolEnabled - Star TLS Enabled
- Start
Tls boolRequired - Star TLS required
- Subject
Prefix string - Subject prefix
- Username string
- Username
- Enabled bool
- Whether the config is enabled or not
- From
Address string - fromAddress
- Host string
- hostname
- Nexus
Trust boolStore Enabled - SSL on connect enabled
- Password string
- Password
- Port float64
- port
- Ssl
On boolConnect Enabled - SSL on connect enabled
- Ssl
Server boolIdentity Check Enabled - SSL on connect enabled
- Start
Tls boolEnabled - Star TLS Enabled
- Start
Tls boolRequired - Star TLS required
- Subject
Prefix string - Subject prefix
- Username string
- Username
- enabled Boolean
- Whether the config is enabled or not
- from
Address String - fromAddress
- host String
- hostname
- nexus
Trust BooleanStore Enabled - SSL on connect enabled
- password String
- Password
- port Double
- port
- ssl
On BooleanConnect Enabled - SSL on connect enabled
- ssl
Server BooleanIdentity Check Enabled - SSL on connect enabled
- start
Tls BooleanEnabled - Star TLS Enabled
- start
Tls BooleanRequired - Star TLS required
- subject
Prefix String - Subject prefix
- username String
- Username
- enabled boolean
- Whether the config is enabled or not
- from
Address string - fromAddress
- host string
- hostname
- nexus
Trust booleanStore Enabled - SSL on connect enabled
- password string
- Password
- port number
- port
- ssl
On booleanConnect Enabled - SSL on connect enabled
- ssl
Server booleanIdentity Check Enabled - SSL on connect enabled
- start
Tls booleanEnabled - Star TLS Enabled
- start
Tls booleanRequired - Star TLS required
- subject
Prefix string - Subject prefix
- username string
- Username
- enabled bool
- Whether the config is enabled or not
- from_
address str - fromAddress
- host str
- hostname
- nexus_
trust_ boolstore_ enabled - SSL on connect enabled
- password str
- Password
- port float
- port
- ssl_
on_ boolconnect_ enabled - SSL on connect enabled
- ssl_
server_ boolidentity_ check_ enabled - SSL on connect enabled
- start_
tls_ boolenabled - Star TLS Enabled
- start_
tls_ boolrequired - Star TLS required
- subject_
prefix str - Subject prefix
- username str
- Username
- enabled Boolean
- Whether the config is enabled or not
- from
Address String - fromAddress
- host String
- hostname
- nexus
Trust BooleanStore Enabled - SSL on connect enabled
- password String
- Password
- port Number
- port
- ssl
On BooleanConnect Enabled - SSL on connect enabled
- ssl
Server BooleanIdentity Check Enabled - SSL on connect enabled
- start
Tls BooleanEnabled - Star TLS Enabled
- start
Tls BooleanRequired - Star TLS required
- subject
Prefix String - Subject prefix
- username String
- Username
Import
import using the userid of the user
$ pulumi import nexus:index/mailConfig:MailConfig config cfg
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- nexus datadrivers/terraform-provider-nexus
- License
- Notes
- This Pulumi package is based on the
nexus
Terraform Provider.