civo.DnsDomainName
Explore with Pulumi AI
Provides a Civo DNS domain name resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as civo from "@pulumi/civo";
// Create a new domain name
const main = new civo.DnsDomainName("main", {name: "mydomain.com"});
import pulumi
import pulumi_civo as civo
# Create a new domain name
main = civo.DnsDomainName("main", name="mydomain.com")
package main
import (
"github.com/pulumi/pulumi-civo/sdk/v2/go/civo"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a new domain name
_, err := civo.NewDnsDomainName(ctx, "main", &civo.DnsDomainNameArgs{
Name: pulumi.String("mydomain.com"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Civo = Pulumi.Civo;
return await Deployment.RunAsync(() =>
{
// Create a new domain name
var main = new Civo.DnsDomainName("main", new()
{
Name = "mydomain.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.civo.DnsDomainName;
import com.pulumi.civo.DnsDomainNameArgs;
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 new domain name
var main = new DnsDomainName("main", DnsDomainNameArgs.builder()
.name("mydomain.com")
.build());
}
}
resources:
# Create a new domain name
main:
type: civo:DnsDomainName
properties:
name: mydomain.com
Create DnsDomainName Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DnsDomainName(name: string, args?: DnsDomainNameArgs, opts?: CustomResourceOptions);
@overload
def DnsDomainName(resource_name: str,
args: Optional[DnsDomainNameArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def DnsDomainName(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None)
func NewDnsDomainName(ctx *Context, name string, args *DnsDomainNameArgs, opts ...ResourceOption) (*DnsDomainName, error)
public DnsDomainName(string name, DnsDomainNameArgs? args = null, CustomResourceOptions? opts = null)
public DnsDomainName(String name, DnsDomainNameArgs args)
public DnsDomainName(String name, DnsDomainNameArgs args, CustomResourceOptions options)
type: civo:DnsDomainName
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 DnsDomainNameArgs
- 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 DnsDomainNameArgs
- 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 DnsDomainNameArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DnsDomainNameArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DnsDomainNameArgs
- 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 dnsDomainNameResource = new Civo.DnsDomainName("dnsDomainNameResource", new()
{
Name = "string",
});
example, err := civo.NewDnsDomainName(ctx, "dnsDomainNameResource", &civo.DnsDomainNameArgs{
Name: pulumi.String("string"),
})
var dnsDomainNameResource = new DnsDomainName("dnsDomainNameResource", DnsDomainNameArgs.builder()
.name("string")
.build());
dns_domain_name_resource = civo.DnsDomainName("dnsDomainNameResource", name="string")
const dnsDomainNameResource = new civo.DnsDomainName("dnsDomainNameResource", {name: "string"});
type: civo:DnsDomainName
properties:
name: string
DnsDomainName 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 DnsDomainName resource accepts the following input properties:
- Name string
- The name of the domain
- Name string
- The name of the domain
- name String
- The name of the domain
- name string
- The name of the domain
- name str
- The name of the domain
- name String
- The name of the domain
Outputs
All input properties are implicitly available as output properties. Additionally, the DnsDomainName resource produces the following output properties:
- account_
id str - The account ID of the domain
- id str
- The provider-assigned unique ID for this managed resource.
Look up Existing DnsDomainName Resource
Get an existing DnsDomainName 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?: DnsDomainNameState, opts?: CustomResourceOptions): DnsDomainName
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
name: Optional[str] = None) -> DnsDomainName
func GetDnsDomainName(ctx *Context, name string, id IDInput, state *DnsDomainNameState, opts ...ResourceOption) (*DnsDomainName, error)
public static DnsDomainName Get(string name, Input<string> id, DnsDomainNameState? state, CustomResourceOptions? opts = null)
public static DnsDomainName get(String name, Output<String> id, DnsDomainNameState 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.
- account_
id str - The account ID of the domain
- name str
- The name of the domain
Import
using domain name
$ pulumi import civo:index/dnsDomainName:DnsDomainName main mydomain.com
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Civo pulumi/pulumi-civo
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
civo
Terraform Provider.