1. Packages
  2. AWS
  3. API Docs
  4. lightsail
  5. Domain
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.lightsail.Domain

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Creates a domain resource for the specified domain (e.g., example.com). You cannot register a new domain name using Lightsail. You must register a domain name using Amazon Route 53 or another domain name registrar. If you have already registered your domain, you can enter its name in this parameter to manage the DNS records for that domain.

    Note: Lightsail is currently only supported in a limited number of AWS Regions, please see “Regions and Availability Zones in Amazon Lightsail” for more details

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const domainTest = new aws.lightsail.Domain("domain_test", {domainName: "mydomain.com"});
    
    import pulumi
    import pulumi_aws as aws
    
    domain_test = aws.lightsail.Domain("domain_test", domain_name="mydomain.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lightsail.NewDomain(ctx, "domain_test", &lightsail.DomainArgs{
    			DomainName: pulumi.String("mydomain.com"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var domainTest = new Aws.LightSail.Domain("domain_test", new()
        {
            DomainName = "mydomain.com",
        });
    
    });
    
    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 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 domainTest = new Domain("domainTest", DomainArgs.builder()
                .domainName("mydomain.com")
                .build());
    
        }
    }
    
    resources:
      domainTest:
        type: aws:lightsail:Domain
        name: domain_test
        properties:
          domainName: mydomain.com
    

    Create Domain Resource

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

    Constructor syntax

    new Domain(name: string, args: DomainArgs, opts?: CustomResourceOptions);
    @overload
    def Domain(resource_name: str,
               args: DomainArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Domain(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               domain_name: Optional[str] = None)
    func NewDomain(ctx *Context, name string, args DomainArgs, opts ...ResourceOption) (*Domain, error)
    public Domain(string name, DomainArgs args, CustomResourceOptions? opts = null)
    public Domain(String name, DomainArgs args)
    public Domain(String name, DomainArgs args, CustomResourceOptions options)
    
    type: aws:lightsail:Domain
    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 DomainArgs
    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 DomainArgs
    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 DomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DomainArgs
    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 exampledomainResourceResourceFromLightsaildomain = new Aws.LightSail.Domain("exampledomainResourceResourceFromLightsaildomain", new()
    {
        DomainName = "string",
    });
    
    example, err := lightsail.NewDomain(ctx, "exampledomainResourceResourceFromLightsaildomain", &lightsail.DomainArgs{
    	DomainName: pulumi.String("string"),
    })
    
    var exampledomainResourceResourceFromLightsaildomain = new Domain("exampledomainResourceResourceFromLightsaildomain", DomainArgs.builder()
        .domainName("string")
        .build());
    
    exampledomain_resource_resource_from_lightsaildomain = aws.lightsail.Domain("exampledomainResourceResourceFromLightsaildomain", domain_name="string")
    
    const exampledomainResourceResourceFromLightsaildomain = new aws.lightsail.Domain("exampledomainResourceResourceFromLightsaildomain", {domainName: "string"});
    
    type: aws:lightsail:Domain
    properties:
        domainName: string
    

    Domain 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 Domain resource accepts the following input properties:

    DomainName string
    The name of the Lightsail domain to manage
    DomainName string
    The name of the Lightsail domain to manage
    domainName String
    The name of the Lightsail domain to manage
    domainName string
    The name of the Lightsail domain to manage
    domain_name str
    The name of the Lightsail domain to manage
    domainName String
    The name of the Lightsail domain to manage

    Outputs

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

    Arn string
    The ARN of the Lightsail domain
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    The ARN of the Lightsail domain
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    The ARN of the Lightsail domain
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    The ARN of the Lightsail domain
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    The ARN of the Lightsail domain
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    The ARN of the Lightsail domain
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Domain Resource

    Get an existing Domain 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?: DomainState, opts?: CustomResourceOptions): Domain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            domain_name: Optional[str] = None) -> Domain
    func GetDomain(ctx *Context, name string, id IDInput, state *DomainState, opts ...ResourceOption) (*Domain, error)
    public static Domain Get(string name, Input<string> id, DomainState? state, CustomResourceOptions? opts = null)
    public static Domain get(String name, Output<String> id, DomainState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    Arn string
    The ARN of the Lightsail domain
    DomainName string
    The name of the Lightsail domain to manage
    Arn string
    The ARN of the Lightsail domain
    DomainName string
    The name of the Lightsail domain to manage
    arn String
    The ARN of the Lightsail domain
    domainName String
    The name of the Lightsail domain to manage
    arn string
    The ARN of the Lightsail domain
    domainName string
    The name of the Lightsail domain to manage
    arn str
    The ARN of the Lightsail domain
    domain_name str
    The name of the Lightsail domain to manage
    arn String
    The ARN of the Lightsail domain
    domainName String
    The name of the Lightsail domain to manage

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi