1. Packages
  2. DNSimple
  3. API Docs
  4. Domain
DNSimple v3.4.2 published on Thursday, Mar 21, 2024 by Pulumi

dnsimple.Domain

Explore with Pulumi AI

dnsimple logo
DNSimple v3.4.2 published on Thursday, Mar 21, 2024 by Pulumi

    Provides a DNSimple domain resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dnsimple from "@pulumi/dnsimple";
    
    // Create a domain
    const foobar = new dnsimple.Domain("foobar", {name: _var.dnsimple.domain});
    
    import pulumi
    import pulumi_dnsimple as dnsimple
    
    # Create a domain
    foobar = dnsimple.Domain("foobar", name=var["dnsimple"]["domain"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-dnsimple/sdk/v3/go/dnsimple"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create a domain
    		_, err := dnsimple.NewDomain(ctx, "foobar", &dnsimple.DomainArgs{
    			Name: pulumi.Any(_var.Dnsimple.Domain),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DNSimple = Pulumi.DNSimple;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a domain
        var foobar = new DNSimple.Domain("foobar", new()
        {
            Name = @var.Dnsimple.Domain,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dnsimple.Domain;
    import com.pulumi.dnsimple.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 foobar = new Domain("foobar", DomainArgs.builder()        
                .name(var_.dnsimple().domain())
                .build());
    
        }
    }
    
    resources:
      # Create a domain
      foobar:
        type: dnsimple:Domain
        properties:
          name: ${var.dnsimple.domain}
    

    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,
               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: dnsimple: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.

    Example

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

    var domainResource = new DNSimple.Domain("domainResource", new()
    {
        Name = "string",
    });
    
    example, err := dnsimple.NewDomain(ctx, "domainResource", &dnsimple.DomainArgs{
    	Name: pulumi.String("string"),
    })
    
    var domainResource = new Domain("domainResource", DomainArgs.builder()        
        .name("string")
        .build());
    
    domain_resource = dnsimple.Domain("domainResource", name="string")
    
    const domainResource = new dnsimple.Domain("domainResource", {name: "string"});
    
    type: dnsimple:Domain
    properties:
        name: 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

    The Domain resource accepts the following input properties:

    Name string
    The domain name to be created
    Name string
    The domain name to be created
    name String
    The domain name to be created
    name string
    The domain name to be created
    name str
    The domain name to be created
    name String
    The domain name to be created

    Outputs

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

    AccountId int
    AutoRenew bool
    Id string
    The provider-assigned unique ID for this managed resource.
    PrivateWhois bool
    RegistrantId int
    State string
    UnicodeName string
    AccountId int
    AutoRenew bool
    Id string
    The provider-assigned unique ID for this managed resource.
    PrivateWhois bool
    RegistrantId int
    State string
    UnicodeName string
    accountId Integer
    autoRenew Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    privateWhois Boolean
    registrantId Integer
    state String
    unicodeName String
    accountId number
    autoRenew boolean
    id string
    The provider-assigned unique ID for this managed resource.
    privateWhois boolean
    registrantId number
    state string
    unicodeName string
    account_id int
    auto_renew bool
    id str
    The provider-assigned unique ID for this managed resource.
    private_whois bool
    registrant_id int
    state str
    unicode_name str
    accountId Number
    autoRenew Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    privateWhois Boolean
    registrantId Number
    state String
    unicodeName String

    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,
            account_id: Optional[int] = None,
            auto_renew: Optional[bool] = None,
            name: Optional[str] = None,
            private_whois: Optional[bool] = None,
            registrant_id: Optional[int] = None,
            state: Optional[str] = None,
            unicode_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:
    AccountId int
    AutoRenew bool
    Name string
    The domain name to be created
    PrivateWhois bool
    RegistrantId int
    State string
    UnicodeName string
    AccountId int
    AutoRenew bool
    Name string
    The domain name to be created
    PrivateWhois bool
    RegistrantId int
    State string
    UnicodeName string
    accountId Integer
    autoRenew Boolean
    name String
    The domain name to be created
    privateWhois Boolean
    registrantId Integer
    state String
    unicodeName String
    accountId number
    autoRenew boolean
    name string
    The domain name to be created
    privateWhois boolean
    registrantId number
    state string
    unicodeName string
    account_id int
    auto_renew bool
    name str
    The domain name to be created
    private_whois bool
    registrant_id int
    state str
    unicode_name str
    accountId Number
    autoRenew Boolean
    name String
    The domain name to be created
    privateWhois Boolean
    registrantId Number
    state String
    unicodeName String

    Import

    DNSimple domains can be imported using their numeric record ID.

    $ pulumi import dnsimple:index/domain:Domain resource_name 5678
    

    The record ID can be found within DNSimple Domains API. Check out Authentication in API Overview for available options.

    $ curl -u ‘EMAIL:PASSWORD’ https://api.dnsimple.com/v2/1234/domains?name_like=example.com | jq

    {

    “data”: [

    {
    
      "id": 5678,
    
      "account_id": 1234,
    
      "registrant_id": null,
    
      "name": "example.com",
    
      "unicode_name": "example.com",
    
      "state": "hosted",
    
      "auto_renew": false,
    
      "private_whois": false,
    
      "expires_on": null,
    
      "expires_at": null,
    
      "created_at": "2021-10-01T00:00:00Z",
    
      "updated_at": "2021-10-01T00:00:00Z"
    
    }
    

    ],

    “pagination”: {

    "current_page": 1,
    
    "per_page": 30,
    
    "total_entries": 1,
    
    "total_pages": 1
    

    }

    }

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

    Package Details

    Repository
    DNSimple pulumi/pulumi-dnsimple
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dnsimple Terraform Provider.
    dnsimple logo
    DNSimple v3.4.2 published on Thursday, Mar 21, 2024 by Pulumi