Package com.pulumi.aws.lightsail
Class DomainEntry
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.lightsail.DomainEntry
-
public class DomainEntry extends com.pulumi.resources.CustomResourceManages a Lightsail domain entry (DNS record). Use this resource to define how DNS queries for your domain are handled. > **NOTE on `id`:** In an effort to simplify imports, this resource `id` field has been updated to the standard resource ID separator, a comma (`,`). For backward compatibility, the previous separator (underscore `_`) can still be used to read and import existing resources. When state is refreshed, the `id` will be updated to use the new standard separator. The previous separator will be deprecated in a future major release. ## Example Usage
## Import Using `pulumi import`, import Lightsail Domain Entry using the `id` attribute. For example: ```sh $ pulumi import aws:lightsail/domainEntry:DomainEntry example www,example.com,A,127.0.0.1 ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.lightsail.Domain; import com.pulumi.aws.lightsail.DomainArgs; import com.pulumi.aws.lightsail.DomainEntry; import com.pulumi.aws.lightsail.DomainEntryArgs; 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 Domain("example", DomainArgs.builder() .domainName("example.com") .build()); var exampleDomainEntry = new DomainEntry("exampleDomainEntry", DomainEntryArgs.builder() .domainName(example.domainName()) .name("www") .type("A") .target("127.0.0.1") .build()); } }
-
-
Constructor Summary
Constructors Constructor Description DomainEntry(java.lang.String name)DomainEntry(java.lang.String name, DomainEntryArgs args)DomainEntry(java.lang.String name, DomainEntryArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>domainName()static DomainEntryget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, DomainEntryState 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.util.Optional<java.lang.Boolean>>isAlias()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>target()com.pulumi.core.Output<java.lang.String>type()
-
-
-
Constructor Detail
-
DomainEntry
public DomainEntry(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
DomainEntry
public DomainEntry(java.lang.String name, DomainEntryArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
DomainEntry
public DomainEntry(java.lang.String name, DomainEntryArgs 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
-
domainName
public com.pulumi.core.Output<java.lang.String> domainName()
- Returns:
- Name of the Lightsail domain in which to create the entry.
-
isAlias
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> isAlias()
- Returns:
- Whether the entry should be an alias. Default: `false`.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name of the entry record.
-
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.
-
target
public com.pulumi.core.Output<java.lang.String> target()
- Returns:
- Target of the domain entry.
-
type
public com.pulumi.core.Output<java.lang.String> type()
- Returns:
- Type of record. Valid values: `A`, `AAAA`, `CNAME`, `MX`, `NS`, `SOA`, `SRV`, `TXT`. The following arguments are optional:
-
get
public static DomainEntry get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable DomainEntryState 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.
-
-