1. Packages
  2. Gcorelabs Provider
  3. API Docs
  4. DnsZone
gcorelabs 0.3.63 published on Monday, Apr 14, 2025 by g-core

gcorelabs.DnsZone

Explore with Pulumi AI

gcorelabs logo
gcorelabs 0.3.63 published on Monday, Apr 14, 2025 by g-core

    Represent DNS zone resource. https://dns.gcorelabs.com/zones

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const exampleZone = new gcore.index.Gcore_dns_zone("exampleZone", {name: "example_zone.com"});
    
    import pulumi
    import pulumi_gcore as gcore
    
    example_zone = gcore.index.Gcore_dns_zone("exampleZone", name=example_zone.com)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcore/sdk/go/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.NewGcore_dns_zone(ctx, "exampleZone", &gcore.Gcore_dns_zoneArgs{
    			Name: "example_zone.com",
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleZone = new Gcore.Index.Gcore_dns_zone("exampleZone", new()
        {
            Name = "example_zone.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.gcore_dns_zone;
    import com.pulumi.gcore.Gcore_dns_zoneArgs;
    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 exampleZone = new Gcore_dns_zone("exampleZone", Gcore_dns_zoneArgs.builder()
                .name("example_zone.com")
                .build());
    
        }
    }
    
    resources:
      exampleZone:
        type: gcore:gcore_dns_zone
        properties:
          name: example_zone.com
    

    Create DnsZone Resource

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

    Constructor syntax

    new DnsZone(name: string, args?: DnsZoneArgs, opts?: CustomResourceOptions);
    @overload
    def DnsZone(resource_name: str,
                args: Optional[DnsZoneArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def DnsZone(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                dns_zone_id: Optional[str] = None,
                name: Optional[str] = None,
                timeouts: Optional[DnsZoneTimeoutsArgs] = None)
    func NewDnsZone(ctx *Context, name string, args *DnsZoneArgs, opts ...ResourceOption) (*DnsZone, error)
    public DnsZone(string name, DnsZoneArgs? args = null, CustomResourceOptions? opts = null)
    public DnsZone(String name, DnsZoneArgs args)
    public DnsZone(String name, DnsZoneArgs args, CustomResourceOptions options)
    
    type: gcorelabs:DnsZone
    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 DnsZoneArgs
    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 DnsZoneArgs
    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 DnsZoneArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DnsZoneArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DnsZoneArgs
    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 dnsZoneResource = new Gcorelabs.DnsZone("dnsZoneResource", new()
    {
        DnsZoneId = "string",
        Name = "string",
        Timeouts = new Gcorelabs.Inputs.DnsZoneTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := gcorelabs.NewDnsZone(ctx, "dnsZoneResource", &gcorelabs.DnsZoneArgs{
    	DnsZoneId: pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	Timeouts: &gcorelabs.DnsZoneTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var dnsZoneResource = new DnsZone("dnsZoneResource", DnsZoneArgs.builder()
        .dnsZoneId("string")
        .name("string")
        .timeouts(DnsZoneTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    dns_zone_resource = gcorelabs.DnsZone("dnsZoneResource",
        dns_zone_id="string",
        name="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const dnsZoneResource = new gcorelabs.DnsZone("dnsZoneResource", {
        dnsZoneId: "string",
        name: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: gcorelabs:DnsZone
    properties:
        dnsZoneId: string
        name: string
        timeouts:
            create: string
            delete: string
    

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

    DnsZoneId string
    The ID of this resource.
    Name string
    A name of DNS Zone resource.
    Timeouts DnsZoneTimeouts
    DnsZoneId string
    The ID of this resource.
    Name string
    A name of DNS Zone resource.
    Timeouts DnsZoneTimeoutsArgs
    dnsZoneId String
    The ID of this resource.
    name String
    A name of DNS Zone resource.
    timeouts DnsZoneTimeouts
    dnsZoneId string
    The ID of this resource.
    name string
    A name of DNS Zone resource.
    timeouts DnsZoneTimeouts
    dns_zone_id str
    The ID of this resource.
    name str
    A name of DNS Zone resource.
    timeouts DnsZoneTimeoutsArgs
    dnsZoneId String
    The ID of this resource.
    name String
    A name of DNS Zone resource.
    timeouts Property Map

    Outputs

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

    Get an existing DnsZone 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?: DnsZoneState, opts?: CustomResourceOptions): DnsZone
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dns_zone_id: Optional[str] = None,
            name: Optional[str] = None,
            timeouts: Optional[DnsZoneTimeoutsArgs] = None) -> DnsZone
    func GetDnsZone(ctx *Context, name string, id IDInput, state *DnsZoneState, opts ...ResourceOption) (*DnsZone, error)
    public static DnsZone Get(string name, Input<string> id, DnsZoneState? state, CustomResourceOptions? opts = null)
    public static DnsZone get(String name, Output<String> id, DnsZoneState state, CustomResourceOptions options)
    resources:  _:    type: gcorelabs:DnsZone    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.
    The following state arguments are supported:
    DnsZoneId string
    The ID of this resource.
    Name string
    A name of DNS Zone resource.
    Timeouts DnsZoneTimeouts
    DnsZoneId string
    The ID of this resource.
    Name string
    A name of DNS Zone resource.
    Timeouts DnsZoneTimeoutsArgs
    dnsZoneId String
    The ID of this resource.
    name String
    A name of DNS Zone resource.
    timeouts DnsZoneTimeouts
    dnsZoneId string
    The ID of this resource.
    name string
    A name of DNS Zone resource.
    timeouts DnsZoneTimeouts
    dns_zone_id str
    The ID of this resource.
    name str
    A name of DNS Zone resource.
    timeouts DnsZoneTimeoutsArgs
    dnsZoneId String
    The ID of this resource.
    name String
    A name of DNS Zone resource.
    timeouts Property Map

    Supporting Types

    DnsZoneTimeouts, DnsZoneTimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    import using zone name format

    $ pulumi import gcorelabs:index/dnsZone:DnsZone example_zone example_zone.com
    

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

    Package Details

    Repository
    gcorelabs g-core/terraform-provider-gcorelabs
    License
    Notes
    This Pulumi package is based on the gcorelabs Terraform Provider.
    gcorelabs logo
    gcorelabs 0.3.63 published on Monday, Apr 14, 2025 by g-core