1. Packages
  2. Dnsimple Provider
  3. API Docs
  4. DomainDelegation
DNSimple v4.3.0 published on Thursday, Apr 10, 2025 by Pulumi

dnsimple.DomainDelegation

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as dnsimple from "@pulumi/dnsimple";

// Create a domain delegation
const foobar = new dnsimple.DomainDelegation("foobar", {
    domain: dnsimple.domain,
    nameServers: [
        "ns1.example.org",
        "ns2.example.com",
    ],
});
Copy
import pulumi
import pulumi_dnsimple as dnsimple

# Create a domain delegation
foobar = dnsimple.DomainDelegation("foobar",
    domain=dnsimple["domain"],
    name_servers=[
        "ns1.example.org",
        "ns2.example.com",
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-dnsimple/sdk/v4/go/dnsimple"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a domain delegation
		_, err := dnsimple.NewDomainDelegation(ctx, "foobar", &dnsimple.DomainDelegationArgs{
			Domain: pulumi.Any(dnsimple.Domain),
			NameServers: pulumi.StringArray{
				pulumi.String("ns1.example.org"),
				pulumi.String("ns2.example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DNSimple = Pulumi.DNSimple;

return await Deployment.RunAsync(() => 
{
    // Create a domain delegation
    var foobar = new DNSimple.DomainDelegation("foobar", new()
    {
        Domain = dnsimple.Domain,
        NameServers = new[]
        {
            "ns1.example.org",
            "ns2.example.com",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dnsimple.DomainDelegation;
import com.pulumi.dnsimple.DomainDelegationArgs;
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) {
        // Create a domain delegation
        var foobar = new DomainDelegation("foobar", DomainDelegationArgs.builder()
            .domain(dnsimple.domain())
            .nameServers(            
                "ns1.example.org",
                "ns2.example.com")
            .build());

    }
}
Copy
resources:
  # Create a domain delegation
  foobar:
    type: dnsimple:DomainDelegation
    properties:
      domain: ${dnsimple.domain}
      nameServers:
        - ns1.example.org
        - ns2.example.com
Copy

Create DomainDelegation Resource

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

Constructor syntax

new DomainDelegation(name: string, args: DomainDelegationArgs, opts?: CustomResourceOptions);
@overload
def DomainDelegation(resource_name: str,
                     args: DomainDelegationArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def DomainDelegation(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     domain: Optional[str] = None,
                     name_servers: Optional[Sequence[str]] = None)
func NewDomainDelegation(ctx *Context, name string, args DomainDelegationArgs, opts ...ResourceOption) (*DomainDelegation, error)
public DomainDelegation(string name, DomainDelegationArgs args, CustomResourceOptions? opts = null)
public DomainDelegation(String name, DomainDelegationArgs args)
public DomainDelegation(String name, DomainDelegationArgs args, CustomResourceOptions options)
type: dnsimple:DomainDelegation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DomainDelegationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DomainDelegationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DomainDelegationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DomainDelegationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DomainDelegationArgs
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 domainDelegationResource = new DNSimple.DomainDelegation("domainDelegationResource", new()
{
    Domain = "string",
    NameServers = new[]
    {
        "string",
    },
});
Copy
example, err := dnsimple.NewDomainDelegation(ctx, "domainDelegationResource", &dnsimple.DomainDelegationArgs{
	Domain: pulumi.String("string"),
	NameServers: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var domainDelegationResource = new DomainDelegation("domainDelegationResource", DomainDelegationArgs.builder()
    .domain("string")
    .nameServers("string")
    .build());
Copy
domain_delegation_resource = dnsimple.DomainDelegation("domainDelegationResource",
    domain="string",
    name_servers=["string"])
Copy
const domainDelegationResource = new dnsimple.DomainDelegation("domainDelegationResource", {
    domain: "string",
    nameServers: ["string"],
});
Copy
type: dnsimple:DomainDelegation
properties:
    domain: string
    nameServers:
        - string
Copy

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

Domain This property is required. string
The domain name.
NameServers This property is required. List<string>
The list of name servers to delegate to.

Attributes Reference

Domain This property is required. string
The domain name.
NameServers This property is required. []string
The list of name servers to delegate to.

Attributes Reference

domain This property is required. String
The domain name.
nameServers This property is required. List<String>
The list of name servers to delegate to.

Attributes Reference

domain This property is required. string
The domain name.
nameServers This property is required. string[]
The list of name servers to delegate to.

Attributes Reference

domain This property is required. str
The domain name.
name_servers This property is required. Sequence[str]
The list of name servers to delegate to.

Attributes Reference

domain This property is required. String
The domain name.
nameServers This property is required. List<String>
The list of name servers to delegate to.

Attributes Reference

Outputs

All input properties are implicitly available as output properties. Additionally, the DomainDelegation 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 DomainDelegation Resource

Get an existing DomainDelegation 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?: DomainDelegationState, opts?: CustomResourceOptions): DomainDelegation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        domain: Optional[str] = None,
        name_servers: Optional[Sequence[str]] = None) -> DomainDelegation
func GetDomainDelegation(ctx *Context, name string, id IDInput, state *DomainDelegationState, opts ...ResourceOption) (*DomainDelegation, error)
public static DomainDelegation Get(string name, Input<string> id, DomainDelegationState? state, CustomResourceOptions? opts = null)
public static DomainDelegation get(String name, Output<String> id, DomainDelegationState state, CustomResourceOptions options)
resources:  _:    type: dnsimple:DomainDelegation    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Domain string
The domain name.
NameServers List<string>
The list of name servers to delegate to.

Attributes Reference

Domain string
The domain name.
NameServers []string
The list of name servers to delegate to.

Attributes Reference

domain String
The domain name.
nameServers List<String>
The list of name servers to delegate to.

Attributes Reference

domain string
The domain name.
nameServers string[]
The list of name servers to delegate to.

Attributes Reference

domain str
The domain name.
name_servers Sequence[str]
The list of name servers to delegate to.

Attributes Reference

domain String
The domain name.
nameServers List<String>
The list of name servers to delegate to.

Attributes Reference

Import

DNSimple domain delegations can be imported using the domain name.

Importing domain delegation for example.com

bash

$ pulumi import dnsimple:index/domainDelegation:DomainDelegation resource_name example.com
Copy

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.