1. Packages
  2. Infoblox Provider
  3. API Docs
  4. DnsView
infoblox 2.10.0 published on Friday, Apr 25, 2025 by infobloxopen

infoblox.DnsView

Explore with Pulumi AI

infoblox logo
infoblox 2.10.0 published on Friday, Apr 25, 2025 by infobloxopen

    # DNS View Resource

    The infoblox.DnsView resource enables you to perform create, update and delete operations on DNS views in a NIOS appliance. The resource represents the ‘view’ WAPI object in NIOS.

    The following list describes the parameters you can define in the infoblox.DnsView resource block:

    • name: required, specifies the name of the DNS View. Example: nondefault_dnsview.
    • network_view: optional, specifies the name of the Network View in which DNS View exists. If value is not specified ,the default will be considered as default networkview. Example: custom_netview.
    • comment: optional, describes the DNS view. Example: example DNS view.
    • ext_attrs: optional, specifies the set of NIOS extensible attributes that will be attached to DNS view. Example: jsonencode({}).

    You can update ’name’ of the DNS view created in resource block, as it can be modified in NIOS.

    Examples of an DNS View Block

    import * as pulumi from "@pulumi/pulumi";
    import * as infoblox from "@pulumi/infoblox";
    
    //creating DNS view resource with minimal set of parameters
    const view1 = new infoblox.DnsView("view1", {});
    //creating DNS view resource with full set of parameters
    const view2 = new infoblox.DnsView("view2", {
        networkView: "default",
        comment: "test dns view example",
        extAttrs: JSON.stringify({
            Site: "Main test site",
        }),
    });
    // creating DNS View under non default network view
    const view3 = new infoblox.DnsView("view3", {
        networkView: "non_defaultview",
        comment: "example under custom network view",
        extAttrs: JSON.stringify({
            Site: "Cal Site",
        }),
    });
    
    import pulumi
    import json
    import pulumi_infoblox as infoblox
    
    #creating DNS view resource with minimal set of parameters
    view1 = infoblox.DnsView("view1")
    #creating DNS view resource with full set of parameters
    view2 = infoblox.DnsView("view2",
        network_view="default",
        comment="test dns view example",
        ext_attrs=json.dumps({
            "Site": "Main test site",
        }))
    # creating DNS View under non default network view
    view3 = infoblox.DnsView("view3",
        network_view="non_defaultview",
        comment="example under custom network view",
        ext_attrs=json.dumps({
            "Site": "Cal Site",
        }))
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/infoblox/v2/infoblox"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// creating DNS view resource with minimal set of parameters
    		_, err := infoblox.NewDnsView(ctx, "view1", nil)
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"Site": "Main test site",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		// creating DNS view resource with full set of parameters
    		_, err = infoblox.NewDnsView(ctx, "view2", &infoblox.DnsViewArgs{
    			NetworkView: pulumi.String("default"),
    			Comment:     pulumi.String("test dns view example"),
    			ExtAttrs:    pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON1, err := json.Marshal(map[string]interface{}{
    			"Site": "Cal Site",
    		})
    		if err != nil {
    			return err
    		}
    		json1 := string(tmpJSON1)
    		// creating DNS View under non default network view
    		_, err = infoblox.NewDnsView(ctx, "view3", &infoblox.DnsViewArgs{
    			NetworkView: pulumi.String("non_defaultview"),
    			Comment:     pulumi.String("example under custom network view"),
    			ExtAttrs:    pulumi.String(json1),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Infoblox = Pulumi.Infoblox;
    
    return await Deployment.RunAsync(() => 
    {
        //creating DNS view resource with minimal set of parameters
        var view1 = new Infoblox.DnsView("view1");
    
        //creating DNS view resource with full set of parameters
        var view2 = new Infoblox.DnsView("view2", new()
        {
            NetworkView = "default",
            Comment = "test dns view example",
            ExtAttrs = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["Site"] = "Main test site",
            }),
        });
    
        // creating DNS View under non default network view
        var view3 = new Infoblox.DnsView("view3", new()
        {
            NetworkView = "non_defaultview",
            Comment = "example under custom network view",
            ExtAttrs = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["Site"] = "Cal Site",
            }),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.infoblox.DnsView;
    import com.pulumi.infoblox.DnsViewArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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) {
            //creating DNS view resource with minimal set of parameters
            var view1 = new DnsView("view1");
    
            //creating DNS view resource with full set of parameters
            var view2 = new DnsView("view2", DnsViewArgs.builder()
                .networkView("default")
                .comment("test dns view example")
                .extAttrs(serializeJson(
                    jsonObject(
                        jsonProperty("Site", "Main test site")
                    )))
                .build());
    
            // creating DNS View under non default network view
            var view3 = new DnsView("view3", DnsViewArgs.builder()
                .networkView("non_defaultview")
                .comment("example under custom network view")
                .extAttrs(serializeJson(
                    jsonObject(
                        jsonProperty("Site", "Cal Site")
                    )))
                .build());
    
        }
    }
    
    resources:
      # creating DNS view resource with minimal set of parameters
      view1:
        type: infoblox:DnsView
      # creating DNS view resource with full set of parameters
      view2:
        type: infoblox:DnsView
        properties:
          networkView: default
          comment: test dns view example
          extAttrs:
            fn::toJSON:
              Site: Main test site
      # creating DNS View under non default network view
      view3:
        type: infoblox:DnsView
        properties:
          networkView: non_defaultview
          comment: example under custom network view
          extAttrs:
            fn::toJSON:
              Site: Cal Site
    

    Create DnsView Resource

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

    Constructor syntax

    new DnsView(name: string, args?: DnsViewArgs, opts?: CustomResourceOptions);
    @overload
    def DnsView(resource_name: str,
                args: Optional[DnsViewArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def DnsView(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                comment: Optional[str] = None,
                dns_view_id: Optional[str] = None,
                ext_attrs: Optional[str] = None,
                name: Optional[str] = None,
                network_view: Optional[str] = None)
    func NewDnsView(ctx *Context, name string, args *DnsViewArgs, opts ...ResourceOption) (*DnsView, error)
    public DnsView(string name, DnsViewArgs? args = null, CustomResourceOptions? opts = null)
    public DnsView(String name, DnsViewArgs args)
    public DnsView(String name, DnsViewArgs args, CustomResourceOptions options)
    
    type: infoblox:DnsView
    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 DnsViewArgs
    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 DnsViewArgs
    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 DnsViewArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DnsViewArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DnsViewArgs
    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 dnsViewResource = new Infoblox.DnsView("dnsViewResource", new()
    {
        Comment = "string",
        DnsViewId = "string",
        ExtAttrs = "string",
        Name = "string",
        NetworkView = "string",
    });
    
    example, err := infoblox.NewDnsView(ctx, "dnsViewResource", &infoblox.DnsViewArgs{
    	Comment:     pulumi.String("string"),
    	DnsViewId:   pulumi.String("string"),
    	ExtAttrs:    pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	NetworkView: pulumi.String("string"),
    })
    
    var dnsViewResource = new DnsView("dnsViewResource", DnsViewArgs.builder()
        .comment("string")
        .dnsViewId("string")
        .extAttrs("string")
        .name("string")
        .networkView("string")
        .build());
    
    dns_view_resource = infoblox.DnsView("dnsViewResource",
        comment="string",
        dns_view_id="string",
        ext_attrs="string",
        name="string",
        network_view="string")
    
    const dnsViewResource = new infoblox.DnsView("dnsViewResource", {
        comment: "string",
        dnsViewId: "string",
        extAttrs: "string",
        name: "string",
        networkView: "string",
    });
    
    type: infoblox:DnsView
    properties:
        comment: string
        dnsViewId: string
        extAttrs: string
        name: string
        networkView: string
    

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

    Comment string
    Comment for the DNS View object; maximum 256 characters.
    DnsViewId string
    ExtAttrs string
    The Extensible attributes of the DNS view to be added/updated, as a map in JSON format
    Name string
    The name of the DNS View to be specified
    NetworkView string
    The name of the Network View in which DNS View exists.
    Comment string
    Comment for the DNS View object; maximum 256 characters.
    DnsViewId string
    ExtAttrs string
    The Extensible attributes of the DNS view to be added/updated, as a map in JSON format
    Name string
    The name of the DNS View to be specified
    NetworkView string
    The name of the Network View in which DNS View exists.
    comment String
    Comment for the DNS View object; maximum 256 characters.
    dnsViewId String
    extAttrs String
    The Extensible attributes of the DNS view to be added/updated, as a map in JSON format
    name String
    The name of the DNS View to be specified
    networkView String
    The name of the Network View in which DNS View exists.
    comment string
    Comment for the DNS View object; maximum 256 characters.
    dnsViewId string
    extAttrs string
    The Extensible attributes of the DNS view to be added/updated, as a map in JSON format
    name string
    The name of the DNS View to be specified
    networkView string
    The name of the Network View in which DNS View exists.
    comment str
    Comment for the DNS View object; maximum 256 characters.
    dns_view_id str
    ext_attrs str
    The Extensible attributes of the DNS view to be added/updated, as a map in JSON format
    name str
    The name of the DNS View to be specified
    network_view str
    The name of the Network View in which DNS View exists.
    comment String
    Comment for the DNS View object; maximum 256 characters.
    dnsViewId String
    extAttrs String
    The Extensible attributes of the DNS view to be added/updated, as a map in JSON format
    name String
    The name of the DNS View to be specified
    networkView String
    The name of the Network View in which DNS View exists.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    InternalId string
    Ref string
    NIOS object's reference, not to be set by a user.
    Id string
    The provider-assigned unique ID for this managed resource.
    InternalId string
    Ref string
    NIOS object's reference, not to be set by a user.
    id String
    The provider-assigned unique ID for this managed resource.
    internalId String
    ref String
    NIOS object's reference, not to be set by a user.
    id string
    The provider-assigned unique ID for this managed resource.
    internalId string
    ref string
    NIOS object's reference, not to be set by a user.
    id str
    The provider-assigned unique ID for this managed resource.
    internal_id str
    ref str
    NIOS object's reference, not to be set by a user.
    id String
    The provider-assigned unique ID for this managed resource.
    internalId String
    ref String
    NIOS object's reference, not to be set by a user.

    Look up Existing DnsView Resource

    Get an existing DnsView 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?: DnsViewState, opts?: CustomResourceOptions): DnsView
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comment: Optional[str] = None,
            dns_view_id: Optional[str] = None,
            ext_attrs: Optional[str] = None,
            internal_id: Optional[str] = None,
            name: Optional[str] = None,
            network_view: Optional[str] = None,
            ref: Optional[str] = None) -> DnsView
    func GetDnsView(ctx *Context, name string, id IDInput, state *DnsViewState, opts ...ResourceOption) (*DnsView, error)
    public static DnsView Get(string name, Input<string> id, DnsViewState? state, CustomResourceOptions? opts = null)
    public static DnsView get(String name, Output<String> id, DnsViewState state, CustomResourceOptions options)
    resources:  _:    type: infoblox:DnsView    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:
    Comment string
    Comment for the DNS View object; maximum 256 characters.
    DnsViewId string
    ExtAttrs string
    The Extensible attributes of the DNS view to be added/updated, as a map in JSON format
    InternalId string
    Name string
    The name of the DNS View to be specified
    NetworkView string
    The name of the Network View in which DNS View exists.
    Ref string
    NIOS object's reference, not to be set by a user.
    Comment string
    Comment for the DNS View object; maximum 256 characters.
    DnsViewId string
    ExtAttrs string
    The Extensible attributes of the DNS view to be added/updated, as a map in JSON format
    InternalId string
    Name string
    The name of the DNS View to be specified
    NetworkView string
    The name of the Network View in which DNS View exists.
    Ref string
    NIOS object's reference, not to be set by a user.
    comment String
    Comment for the DNS View object; maximum 256 characters.
    dnsViewId String
    extAttrs String
    The Extensible attributes of the DNS view to be added/updated, as a map in JSON format
    internalId String
    name String
    The name of the DNS View to be specified
    networkView String
    The name of the Network View in which DNS View exists.
    ref String
    NIOS object's reference, not to be set by a user.
    comment string
    Comment for the DNS View object; maximum 256 characters.
    dnsViewId string
    extAttrs string
    The Extensible attributes of the DNS view to be added/updated, as a map in JSON format
    internalId string
    name string
    The name of the DNS View to be specified
    networkView string
    The name of the Network View in which DNS View exists.
    ref string
    NIOS object's reference, not to be set by a user.
    comment str
    Comment for the DNS View object; maximum 256 characters.
    dns_view_id str
    ext_attrs str
    The Extensible attributes of the DNS view to be added/updated, as a map in JSON format
    internal_id str
    name str
    The name of the DNS View to be specified
    network_view str
    The name of the Network View in which DNS View exists.
    ref str
    NIOS object's reference, not to be set by a user.
    comment String
    Comment for the DNS View object; maximum 256 characters.
    dnsViewId String
    extAttrs String
    The Extensible attributes of the DNS view to be added/updated, as a map in JSON format
    internalId String
    name String
    The name of the DNS View to be specified
    networkView String
    The name of the Network View in which DNS View exists.
    ref String
    NIOS object's reference, not to be set by a user.

    Package Details

    Repository
    infoblox infobloxopen/terraform-provider-infoblox
    License
    Notes
    This Pulumi package is based on the infoblox Terraform Provider.
    infoblox logo
    infoblox 2.10.0 published on Friday, Apr 25, 2025 by infobloxopen