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

avi.getNetworksecuritypolicy

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.Networksecuritypolicy” sidebar_current: “docs-avi-datasource-networksecuritypolicy” description: |- Get information of Avi NetworkSecurityPolicy.

    avi.Networksecuritypolicy

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as avi from "@pulumi/avi";
    
    const fooNetworksecuritypolicy = avi.getNetworksecuritypolicy({
        name: "foo",
        uuid: "networksecuritypolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
    });
    
    import pulumi
    import pulumi_avi as avi
    
    foo_networksecuritypolicy = avi.get_networksecuritypolicy(name="foo",
        uuid="networksecuritypolicy-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.LookupNetworksecuritypolicy(ctx, &avi.LookupNetworksecuritypolicyArgs{
    			Name: pulumi.StringRef("foo"),
    			Uuid: pulumi.StringRef("networksecuritypolicy-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 fooNetworksecuritypolicy = Avi.GetNetworksecuritypolicy.Invoke(new()
        {
            Name = "foo",
            Uuid = "networksecuritypolicy-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.GetNetworksecuritypolicyArgs;
    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 fooNetworksecuritypolicy = AviFunctions.getNetworksecuritypolicy(GetNetworksecuritypolicyArgs.builder()
                .name("foo")
                .uuid("networksecuritypolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
                .build());
    
        }
    }
    
    variables:
      fooNetworksecuritypolicy:
        fn::invoke:
          function: avi:getNetworksecuritypolicy
          arguments:
            name: foo
            uuid: networksecuritypolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b
    

    Using getNetworksecuritypolicy

    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 getNetworksecuritypolicy(args: GetNetworksecuritypolicyArgs, opts?: InvokeOptions): Promise<GetNetworksecuritypolicyResult>
    function getNetworksecuritypolicyOutput(args: GetNetworksecuritypolicyOutputArgs, opts?: InvokeOptions): Output<GetNetworksecuritypolicyResult>
    def get_networksecuritypolicy(id: Optional[str] = None,
                                  name: Optional[str] = None,
                                  tenant_ref: Optional[str] = None,
                                  uuid: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetNetworksecuritypolicyResult
    def get_networksecuritypolicy_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[GetNetworksecuritypolicyResult]
    func LookupNetworksecuritypolicy(ctx *Context, args *LookupNetworksecuritypolicyArgs, opts ...InvokeOption) (*LookupNetworksecuritypolicyResult, error)
    func LookupNetworksecuritypolicyOutput(ctx *Context, args *LookupNetworksecuritypolicyOutputArgs, opts ...InvokeOption) LookupNetworksecuritypolicyResultOutput

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

    public static class GetNetworksecuritypolicy 
    {
        public static Task<GetNetworksecuritypolicyResult> InvokeAsync(GetNetworksecuritypolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworksecuritypolicyResult> Invoke(GetNetworksecuritypolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworksecuritypolicyResult> getNetworksecuritypolicy(GetNetworksecuritypolicyArgs args, InvokeOptions options)
    public static Output<GetNetworksecuritypolicyResult> getNetworksecuritypolicy(GetNetworksecuritypolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: avi:index/getNetworksecuritypolicy:getNetworksecuritypolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getNetworksecuritypolicy Result

    The following output properties are available:

    CloudConfigCksum string
    Checksum of cloud configuration for network sec policy. Internally set by cloud connector. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    ConfigpbAttributes List<GetNetworksecuritypolicyConfigpbAttribute>
    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. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Description string
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    GeoDbRef string
    Geo database. It is a reference to an object of type geodb. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Id string
    Internal string
    Network security policy is created and modified by internal modules only. Should not be modified by users. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    IpReputationDbRef string
    Ip reputation database. It is a reference to an object of type ipreputationdb. Field introduced in 20.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Markers List<GetNetworksecuritypolicyMarker>
    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
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Rules List<GetNetworksecuritypolicyRule>
    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. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Uuid string
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    CloudConfigCksum string
    Checksum of cloud configuration for network sec policy. Internally set by cloud connector. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    ConfigpbAttributes []GetNetworksecuritypolicyConfigpbAttribute
    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. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Description string
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    GeoDbRef string
    Geo database. It is a reference to an object of type geodb. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Id string
    Internal string
    Network security policy is created and modified by internal modules only. Should not be modified by users. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    IpReputationDbRef string
    Ip reputation database. It is a reference to an object of type ipreputationdb. Field introduced in 20.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Markers []GetNetworksecuritypolicyMarker
    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
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Rules []GetNetworksecuritypolicyRule
    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. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Uuid string
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    cloudConfigCksum String
    Checksum of cloud configuration for network sec policy. Internally set by cloud connector. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    configpbAttributes List<GetNetworksecuritypolicyConfigpbAttribute>
    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. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    description String
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    geoDbRef String
    Geo database. It is a reference to an object of type geodb. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    id String
    internal String
    Network security policy is created and modified by internal modules only. Should not be modified by users. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    ipReputationDbRef String
    Ip reputation database. It is a reference to an object of type ipreputationdb. Field introduced in 20.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    markers List<GetNetworksecuritypolicyMarker>
    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
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    rules List<GetNetworksecuritypolicyRule>
    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. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid String
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    cloudConfigCksum string
    Checksum of cloud configuration for network sec policy. Internally set by cloud connector. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    configpbAttributes GetNetworksecuritypolicyConfigpbAttribute[]
    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. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    description string
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    geoDbRef string
    Geo database. It is a reference to an object of type geodb. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    id string
    internal string
    Network security policy is created and modified by internal modules only. Should not be modified by users. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    ipReputationDbRef string
    Ip reputation database. It is a reference to an object of type ipreputationdb. Field introduced in 20.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    markers GetNetworksecuritypolicyMarker[]
    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
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    rules GetNetworksecuritypolicyRule[]
    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. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid string
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    cloud_config_cksum str
    Checksum of cloud configuration for network sec policy. Internally set by cloud connector. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    configpb_attributes Sequence[GetNetworksecuritypolicyConfigpbAttribute]
    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. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    description str
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    geo_db_ref str
    Geo database. It is a reference to an object of type geodb. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    id str
    internal str
    Network security policy is created and modified by internal modules only. Should not be modified by users. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    ip_reputation_db_ref str
    Ip reputation database. It is a reference to an object of type ipreputationdb. Field introduced in 20.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    markers Sequence[GetNetworksecuritypolicyMarker]
    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
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    rules Sequence[GetNetworksecuritypolicyRule]
    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. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid str
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    cloudConfigCksum String
    Checksum of cloud configuration for network sec policy. Internally set by cloud connector. 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. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    description String
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    geoDbRef String
    Geo database. It is a reference to an object of type geodb. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    id String
    internal String
    Network security policy is created and modified by internal modules only. Should not be modified by users. Field introduced in 21.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    ipReputationDbRef String
    Ip reputation database. It is a reference to an object of type ipreputationdb. Field introduced in 20.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
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    rules List<Property Map>
    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. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid String
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.

    Supporting Types

    GetNetworksecuritypolicyConfigpbAttribute

    Version string
    Version string
    version String
    version string
    version String

    GetNetworksecuritypolicyMarker

    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>

    GetNetworksecuritypolicyRule

    Action string
    Age string
    CreatedBy string
    Creator name. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Enable string
    Index string
    Log string
    Matches List<GetNetworksecuritypolicyRuleMatch>
    Name string
    Search NetworkSecurityPolicy by name.
    RlParams List<GetNetworksecuritypolicyRuleRlParam>
    Action string
    Age string
    CreatedBy string
    Creator name. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Enable string
    Index string
    Log string
    Matches []GetNetworksecuritypolicyRuleMatch
    Name string
    Search NetworkSecurityPolicy by name.
    RlParams []GetNetworksecuritypolicyRuleRlParam
    action String
    age String
    createdBy String
    Creator name. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    enable String
    index String
    log String
    matches List<GetNetworksecuritypolicyRuleMatch>
    name String
    Search NetworkSecurityPolicy by name.
    rlParams List<GetNetworksecuritypolicyRuleRlParam>
    action string
    age string
    createdBy string
    Creator name. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    enable string
    index string
    log string
    matches GetNetworksecuritypolicyRuleMatch[]
    name string
    Search NetworkSecurityPolicy by name.
    rlParams GetNetworksecuritypolicyRuleRlParam[]
    action str
    age str
    created_by str
    Creator name. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    enable str
    index str
    log str
    matches Sequence[GetNetworksecuritypolicyRuleMatch]
    name str
    Search NetworkSecurityPolicy by name.
    rl_params Sequence[GetNetworksecuritypolicyRuleRlParam]
    action String
    age String
    createdBy String
    Creator name. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    enable String
    index String
    log String
    matches List<Property Map>
    name String
    Search NetworkSecurityPolicy by name.
    rlParams List<Property Map>

    GetNetworksecuritypolicyRuleMatch

    GetNetworksecuritypolicyRuleMatchClientIp

    GetNetworksecuritypolicyRuleMatchClientIpAddr

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

    GetNetworksecuritypolicyRuleMatchClientIpPrefix

    GetNetworksecuritypolicyRuleMatchClientIpPrefixIpAddr

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

    GetNetworksecuritypolicyRuleMatchClientIpRange

    GetNetworksecuritypolicyRuleMatchClientIpRangeBegin

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

    GetNetworksecuritypolicyRuleMatchClientIpRangeEnd

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

    GetNetworksecuritypolicyRuleMatchClientPort

    GetNetworksecuritypolicyRuleMatchClientPortRange

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

    GetNetworksecuritypolicyRuleMatchGeoMatch

    Attribute string
    MatchOperation string
    Values List<string>
    Attribute string
    MatchOperation string
    Values []string
    attribute String
    matchOperation String
    values List<String>
    attribute string
    matchOperation string
    values string[]
    attribute str
    match_operation str
    values Sequence[str]
    attribute String
    matchOperation String
    values List<String>

    GetNetworksecuritypolicyRuleMatchIpReputationType

    MatchOperation string
    ReputationTypes List<string>
    matchOperation String
    reputationTypes List<String>
    matchOperation String
    reputationTypes List<String>

    GetNetworksecuritypolicyRuleMatchMicroservice

    GroupRef string
    MatchCriteria string
    GroupRef string
    MatchCriteria string
    groupRef String
    matchCriteria String
    groupRef string
    matchCriteria string
    groupRef String
    matchCriteria String

    GetNetworksecuritypolicyRuleMatchVsPort

    MatchCriteria string
    Ports List<double>
    MatchCriteria string
    Ports []float64
    matchCriteria String
    ports List<Double>
    matchCriteria string
    ports number[]
    match_criteria str
    ports Sequence[float]
    matchCriteria String
    ports List<Number>

    GetNetworksecuritypolicyRuleRlParam

    BurstSize string
    MaxRate string
    BurstSize string
    MaxRate string
    burstSize String
    maxRate String
    burstSize string
    maxRate string
    burstSize String
    maxRate 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