1. Packages
  2. Avi Provider
  3. API Docs
  4. getDnspolicy
avi 31.1.1 published on Monday, Apr 14, 2025 by vmware

avi.getDnspolicy

Explore with Pulumi AI

avi logo
avi 31.1.1 published on Monday, Apr 14, 2025 by vmware

    <!–

    Copyright 2021 VMware, Inc.
    SPDX-License-Identifier: Mozilla Public License 2.0
    

    –>

    layout: “avi”

    page_title: “AVI: avi.Dnspolicy” sidebar_current: “docs-avi-datasource-dnspolicy” description: |- Get information of Avi DnsPolicy.

    avi.Dnspolicy

    This data source is used to to get avi.Dnspolicy objects.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as avi from "@pulumi/avi";
    
    const fooDnspolicy = avi.getDnspolicy({
        name: "foo",
        uuid: "dnspolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
    });
    
    import pulumi
    import pulumi_avi as avi
    
    foo_dnspolicy = avi.get_dnspolicy(name="foo",
        uuid="dnspolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/avi/v31/avi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := avi.LookupDnspolicy(ctx, &avi.LookupDnspolicyArgs{
    			Name: pulumi.StringRef("foo"),
    			Uuid: pulumi.StringRef("dnspolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Avi = Pulumi.Avi;
    
    return await Deployment.RunAsync(() => 
    {
        var fooDnspolicy = Avi.GetDnspolicy.Invoke(new()
        {
            Name = "foo",
            Uuid = "dnspolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.avi.AviFunctions;
    import com.pulumi.avi.inputs.GetDnspolicyArgs;
    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) {
            final var fooDnspolicy = AviFunctions.getDnspolicy(GetDnspolicyArgs.builder()
                .name("foo")
                .uuid("dnspolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
                .build());
    
        }
    }
    
    variables:
      fooDnspolicy:
        fn::invoke:
          function: avi:getDnspolicy
          arguments:
            name: foo
            uuid: dnspolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b
    

    Using getDnspolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDnspolicy(args: GetDnspolicyArgs, opts?: InvokeOptions): Promise<GetDnspolicyResult>
    function getDnspolicyOutput(args: GetDnspolicyOutputArgs, opts?: InvokeOptions): Output<GetDnspolicyResult>
    def get_dnspolicy(id: Optional[str] = None,
                      name: Optional[str] = None,
                      tenant_ref: Optional[str] = None,
                      uuid: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetDnspolicyResult
    def get_dnspolicy_output(id: Optional[pulumi.Input[str]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      tenant_ref: Optional[pulumi.Input[str]] = None,
                      uuid: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetDnspolicyResult]
    func LookupDnspolicy(ctx *Context, args *LookupDnspolicyArgs, opts ...InvokeOption) (*LookupDnspolicyResult, error)
    func LookupDnspolicyOutput(ctx *Context, args *LookupDnspolicyOutputArgs, opts ...InvokeOption) LookupDnspolicyResultOutput

    > Note: This function is named LookupDnspolicy in the Go SDK.

    public static class GetDnspolicy 
    {
        public static Task<GetDnspolicyResult> InvokeAsync(GetDnspolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetDnspolicyResult> Invoke(GetDnspolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDnspolicyResult> getDnspolicy(GetDnspolicyArgs args, InvokeOptions options)
    public static Output<GetDnspolicyResult> getDnspolicy(GetDnspolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: avi:index/getDnspolicy:getDnspolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Name string
    Search DnsPolicy by name.
    TenantRef string
    It is a reference to an object of type tenant. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Uuid string
    Search DnsPolicy by uuid.
    Id string
    Name string
    Search DnsPolicy by name.
    TenantRef string
    It is a reference to an object of type tenant. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Uuid string
    Search DnsPolicy by uuid.
    id String
    name String
    Search DnsPolicy by name.
    tenantRef String
    It is a reference to an object of type tenant. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid String
    Search DnsPolicy by uuid.
    id string
    name string
    Search DnsPolicy by name.
    tenantRef string
    It is a reference to an object of type tenant. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid string
    Search DnsPolicy by uuid.
    id str
    name str
    Search DnsPolicy by name.
    tenant_ref str
    It is a reference to an object of type tenant. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid str
    Search DnsPolicy by uuid.
    id String
    name String
    Search DnsPolicy by name.
    tenantRef String
    It is a reference to an object of type tenant. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid String
    Search DnsPolicy by uuid.

    getDnspolicy Result

    The following output properties are available:

    ConfigpbAttributes List<GetDnspolicyConfigpbAttribute>
    Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    CreatedBy string
    Creator name. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Description string
    Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Id string
    Internal string
    The dns policy is created and modified by internal modules only. This should not be modified by users. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Markers List<GetDnspolicyMarker>
    List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Name string
    Name of the dns policy. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Rules List<GetDnspolicyRule>
    Dns rules. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    TenantRef string
    It is a reference to an object of type tenant. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Uuid string
    Uuid of the dns policy. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    ConfigpbAttributes []GetDnspolicyConfigpbAttribute
    Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    CreatedBy string
    Creator name. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Description string
    Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Id string
    Internal string
    The dns policy is created and modified by internal modules only. This should not be modified by users. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Markers []GetDnspolicyMarker
    List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Name string
    Name of the dns policy. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Rules []GetDnspolicyRule
    Dns rules. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    TenantRef string
    It is a reference to an object of type tenant. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Uuid string
    Uuid of the dns policy. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    configpbAttributes List<GetDnspolicyConfigpbAttribute>
    Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    createdBy String
    Creator name. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    description String
    Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    id String
    internal String
    The dns policy is created and modified by internal modules only. This should not be modified by users. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    markers List<GetDnspolicyMarker>
    List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    name String
    Name of the dns policy. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    rules List<GetDnspolicyRule>
    Dns rules. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    tenantRef String
    It is a reference to an object of type tenant. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid String
    Uuid of the dns policy. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    configpbAttributes GetDnspolicyConfigpbAttribute[]
    Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    createdBy string
    Creator name. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    description string
    Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    id string
    internal string
    The dns policy is created and modified by internal modules only. This should not be modified by users. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    markers GetDnspolicyMarker[]
    List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    name string
    Name of the dns policy. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    rules GetDnspolicyRule[]
    Dns rules. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    tenantRef string
    It is a reference to an object of type tenant. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid string
    Uuid of the dns policy. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    configpb_attributes Sequence[GetDnspolicyConfigpbAttribute]
    Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    created_by str
    Creator name. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    description str
    Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    id str
    internal str
    The dns policy is created and modified by internal modules only. This should not be modified by users. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    markers Sequence[GetDnspolicyMarker]
    List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    name str
    Name of the dns policy. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    rules Sequence[GetDnspolicyRule]
    Dns rules. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    tenant_ref str
    It is a reference to an object of type tenant. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid str
    Uuid of the dns policy. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    configpbAttributes List<Property Map>
    Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    createdBy String
    Creator name. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    description String
    Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    id String
    internal String
    The dns policy is created and modified by internal modules only. This should not be modified by users. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    markers List<Property Map>
    List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    name String
    Name of the dns policy. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    rules List<Property Map>
    Dns rules. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    tenantRef String
    It is a reference to an object of type tenant. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid String
    Uuid of the dns policy. Field introduced in 17.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.

    Supporting Types

    GetDnspolicyConfigpbAttribute

    Version string
    Version string
    version String
    version string
    version String

    GetDnspolicyMarker

    Key string
    Values List<string>
    Key string
    Values []string
    key String
    values List<String>
    key string
    values string[]
    key str
    values Sequence[str]
    key String
    values List<String>

    GetDnspolicyRule

    Actions []GetDnspolicyRuleAction
    Enable string
    Index string
    Log string
    Matches []GetDnspolicyRuleMatch
    Name string
    Search DnsPolicy by name.
    actions GetDnspolicyRuleAction[]
    enable string
    index string
    log string
    matches GetDnspolicyRuleMatch[]
    name string
    Search DnsPolicy by name.
    actions List<Property Map>
    enable String
    index String
    log String
    matches List<Property Map>
    name String
    Search DnsPolicy by name.

    GetDnspolicyRuleAction

    GetDnspolicyRuleActionAllow

    Allow string
    ResetConn string
    Allow string
    ResetConn string
    allow String
    resetConn String
    allow string
    resetConn string
    allow String
    resetConn String

    GetDnspolicyRuleActionDnsRateLimiter

    GetDnspolicyRuleActionDnsRateLimiterAction

    Type string
    Type string
    type String
    type string
    type str
    type String

    GetDnspolicyRuleActionDnsRateLimiterRateLimiterObject

    BurstSz string
    Count string
    Name string
    Search DnsPolicy by name.
    Period string
    BurstSz string
    Count string
    Name string
    Search DnsPolicy by name.
    Period string
    burstSz String
    count String
    name String
    Search DnsPolicy by name.
    period String
    burstSz string
    count string
    name string
    Search DnsPolicy by name.
    period string
    burst_sz str
    count str
    name str
    Search DnsPolicy by name.
    period str
    burstSz String
    count String
    name String
    Search DnsPolicy by name.
    period String

    GetDnspolicyRuleActionGsGroupSelection

    GroupName string
    GroupName string
    groupName String
    groupName string
    groupName String

    GetDnspolicyRuleActionGslbSiteSelection

    FallbackSiteNames List<string>
    IsSitePreferred string
    SiteName string
    fallbackSiteNames List<String>
    isSitePreferred String
    siteName String
    fallbackSiteNames List<String>
    isSitePreferred String
    siteName String

    GetDnspolicyRuleActionPoolSwitching

    PoolGroupRef string
    PoolRef string
    PoolGroupRef string
    PoolRef string
    poolGroupRef String
    poolRef String
    poolGroupRef string
    poolRef string
    poolGroupRef String
    poolRef String

    GetDnspolicyRuleActionResponse

    GetDnspolicyRuleActionResponseResourceRecordSet

    GetDnspolicyRuleActionResponseResourceRecordSetResourceRecordSet

    GetDnspolicyRuleActionResponseResourceRecordSetResourceRecordSetCname

    Cname string
    Cname string
    cname String
    cname string
    cname str
    cname String

    GetDnspolicyRuleActionResponseResourceRecordSetResourceRecordSetIp6Address

    GetDnspolicyRuleActionResponseResourceRecordSetResourceRecordSetIp6AddressIp6Address

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetDnspolicyRuleActionResponseResourceRecordSetResourceRecordSetIpAddress

    GetDnspolicyRuleActionResponseResourceRecordSetResourceRecordSetIpAddressIpAddress

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetDnspolicyRuleActionResponseResourceRecordSetResourceRecordSetNse

    GetDnspolicyRuleActionResponseResourceRecordSetResourceRecordSetNseIp6Address

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetDnspolicyRuleActionResponseResourceRecordSetResourceRecordSetNseIpAddress

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetDnspolicyRuleMatch

    GetDnspolicyRuleMatchClientIpAddress

    GetDnspolicyRuleMatchClientIpAddressClientIp

    GetDnspolicyRuleMatchClientIpAddressClientIpAddr

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetDnspolicyRuleMatchClientIpAddressClientIpPrefix

    GetDnspolicyRuleMatchClientIpAddressClientIpPrefixIpAddr

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetDnspolicyRuleMatchClientIpAddressClientIpRange

    GetDnspolicyRuleMatchClientIpAddressClientIpRangeBegin

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetDnspolicyRuleMatchClientIpAddressClientIpRangeEnd

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetDnspolicyRuleMatchClientPortNumber

    GetDnspolicyRuleMatchClientPortNumberClientPort

    GetDnspolicyRuleMatchClientPortNumberClientPortRange

    End string
    Start string
    End string
    Start string
    end String
    start String
    end string
    start string
    end str
    start str
    end String
    start String

    GetDnspolicyRuleMatchGeoLocation

    GetDnspolicyRuleMatchProtocol

    MatchCriteria string
    Protocol string
    MatchCriteria string
    Protocol string
    matchCriteria String
    protocol String
    matchCriteria string
    protocol string
    matchCriteria String
    protocol String

    GetDnspolicyRuleMatchQueryName

    MatchCriteria string
    QueryDomainNames List<string>
    StringGroupRefs List<string>
    matchCriteria String
    queryDomainNames List<String>
    stringGroupRefs List<String>
    matchCriteria String
    queryDomainNames List<String>
    stringGroupRefs List<String>

    GetDnspolicyRuleMatchQueryType

    MatchCriteria string
    QueryTypes List<string>
    MatchCriteria string
    QueryTypes []string
    matchCriteria String
    queryTypes List<String>
    matchCriteria string
    queryTypes string[]
    match_criteria str
    query_types Sequence[str]
    matchCriteria String
    queryTypes List<String>

    Package Details

    Repository
    avi vmware/terraform-provider-avi
    License
    Notes
    This Pulumi package is based on the avi Terraform Provider.
    avi logo
    avi 31.1.1 published on Monday, Apr 14, 2025 by vmware