Package com.pulumi.aws.mailmanager
Class Relay
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.mailmanager.Relay
-
public class Relay extends com.pulumi.resources.CustomResourceManages an AWS SES Mail Manager Relay. ## Example Usage ### Basic Usage
### With Secret Authenticationpackage generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.mailmanager.Relay; import com.pulumi.aws.mailmanager.RelayArgs; import com.pulumi.aws.mailmanager.inputs.RelayAuthenticationArgs; import com.pulumi.aws.mailmanager.inputs.RelayAuthenticationNoAuthenticationArgs; import java.util.ArrayList; import java.util.Arrays; 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 example = new Relay("example", RelayArgs.builder() .authentication(RelayAuthenticationArgs.builder() .noAuthentication(RelayAuthenticationNoAuthenticationArgs.builder() .build()) .build()) .name("example") .serverName("smtp.example.com") .serverPort(25) .build()); } }
## Import ### Identity Schema #### Required * `id` (String) Identifier of the relay. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import an SES Mail Manager Relay using its identifier. For example: ```sh $ pulumi import aws:mailmanager/relay:Relay example relay-id-12345678 ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.secretsmanager.Secret; import com.pulumi.aws.secretsmanager.SecretArgs; import com.pulumi.aws.secretsmanager.SecretVersion; import com.pulumi.aws.secretsmanager.SecretVersionArgs; import com.pulumi.aws.mailmanager.Relay; import com.pulumi.aws.mailmanager.RelayArgs; import com.pulumi.aws.mailmanager.inputs.RelayAuthenticationArgs; import static com.pulumi.codegen.internal.Serialization.*; import java.util.ArrayList; import java.util.Arrays; 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 example = new Secret("example", SecretArgs.builder() .name("example") .build()); var exampleSecretVersion = new SecretVersion("exampleSecretVersion", SecretVersionArgs.builder() .secretId(example.id()) .secretString(serializeJson( jsonObject( jsonProperty("username", "user"), jsonProperty("password", "pass") ))) .build()); var exampleRelay = new Relay("exampleRelay", RelayArgs.builder() .authentication(RelayAuthenticationArgs.builder() .secretArn(exampleSecretVersion.arn()) .build()) .name("example") .serverName("smtp.example.com") .serverPort(587) .build()); } }
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.util.Optional<RelayAuthentication>>authentication()com.pulumi.core.Output<java.lang.String>createdTimestamp()static Relayget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, RelayState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>lastModifiedTimestamp()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>serverName()com.pulumi.core.Output<java.lang.Integer>serverPort()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()
-
-
-
Constructor Detail
-
Relay
public Relay(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Relay
public Relay(java.lang.String name, RelayArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Relay
public Relay(java.lang.String name, RelayArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the relay.
-
authentication
public com.pulumi.core.Output<java.util.Optional<RelayAuthentication>> authentication()
- Returns:
- Authentication configuration for the relay. See `authentication` Block.
-
createdTimestamp
public com.pulumi.core.Output<java.lang.String> createdTimestamp()
- Returns:
- Timestamp when the relay was created.
-
lastModifiedTimestamp
public com.pulumi.core.Output<java.lang.String> lastModifiedTimestamp()
- Returns:
- Timestamp when the relay was last modified.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name of the relay.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
serverName
public com.pulumi.core.Output<java.lang.String> serverName()
- Returns:
- Hostname of the SMTP server.
-
serverPort
public com.pulumi.core.Output<java.lang.Integer> serverPort()
- Returns:
- Port of the SMTP server. The following arguments are optional:
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
get
public static Relay get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable RelayState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-