Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dnsimple from "@pulumi/dnsimple";
const example = new dnsimple.DomainDelegation("example", {
domain: "example.com",
nameServers: [
"ns1.example.org",
"ns2.example.com",
],
});
import pulumi
import pulumi_dnsimple as dnsimple
example = dnsimple.DomainDelegation("example",
domain="example.com",
name_servers=[
"ns1.example.org",
"ns2.example.com",
])
package main
import (
"github.com/pulumi/pulumi-dnsimple/sdk/v5/go/dnsimple"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dnsimple.NewDomainDelegation(ctx, "example", &dnsimple.DomainDelegationArgs{
Domain: pulumi.String("example.com"),
NameServers: pulumi.StringArray{
pulumi.String("ns1.example.org"),
pulumi.String("ns2.example.com"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DNSimple = Pulumi.DNSimple;
return await Deployment.RunAsync(() =>
{
var example = new DNSimple.DomainDelegation("example", new()
{
Domain = "example.com",
NameServers = new[]
{
"ns1.example.org",
"ns2.example.com",
},
});
});
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) {
var example = new DomainDelegation("example", DomainDelegationArgs.builder()
.domain("example.com")
.nameServers(
"ns1.example.org",
"ns2.example.com")
.build());
}
}
resources:
example:
type: dnsimple:DomainDelegation
properties:
domain: example.com
nameServers:
- ns1.example.org
- ns2.example.com
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 string
- The unique name of the resource.
- args DomainDelegationArgs
- 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 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 string
- The unique name of the resource.
- args DomainDelegationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DomainDelegationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
},
});
example, err := dnsimple.NewDomainDelegation(ctx, "domainDelegationResource", &dnsimple.DomainDelegationArgs{
Domain: pulumi.String("string"),
NameServers: pulumi.StringArray{
pulumi.String("string"),
},
})
var domainDelegationResource = new DomainDelegation("domainDelegationResource", DomainDelegationArgs.builder()
.domain("string")
.nameServers("string")
.build());
domain_delegation_resource = dnsimple.DomainDelegation("domainDelegationResource",
domain="string",
name_servers=["string"])
const domainDelegationResource = new dnsimple.DomainDelegation("domainDelegationResource", {
domain: "string",
nameServers: ["string"],
});
type: dnsimple:DomainDelegation
properties:
domain: string
nameServers:
- string
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 string
- The domain name.
- Name
Servers List<string> - List of name servers to delegate to.
- Domain string
- The domain name.
- Name
Servers []string - List of name servers to delegate to.
- domain String
- The domain name.
- name
Servers List<String> - List of name servers to delegate to.
- domain string
- The domain name.
- name
Servers string[] - List of name servers to delegate to.
- domain str
- The domain name.
- name_
servers Sequence[str] - List of name servers to delegate to.
- domain String
- The domain name.
- name
Servers List<String> - List of name servers to delegate to.
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) -> DomainDelegationfunc 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
- 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.
- Domain string
- The domain name.
- Name
Servers List<string> - List of name servers to delegate to.
- Domain string
- The domain name.
- Name
Servers []string - List of name servers to delegate to.
- domain String
- The domain name.
- name
Servers List<String> - List of name servers to delegate to.
- domain string
- The domain name.
- name
Servers string[] - List of name servers to delegate to.
- domain str
- The domain name.
- name_
servers Sequence[str] - List of name servers to delegate to.
- domain String
- The domain name.
- name
Servers List<String> - List of name servers to delegate to.
Import
DNSimple domain delegations can be imported using the domain name.
bash
$ pulumi import dnsimple:index/domainDelegation:DomainDelegation example example.com
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
dnsimpleTerraform Provider.
