avi 31.1.1 published on Monday, Apr 14, 2025 by vmware
avi.getNetworksecuritypolicy
Explore with Pulumi AI
<!–
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 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.
getNetworksecuritypolicy Result
The following output properties are available:
- Cloud
Config stringCksum - 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 List<GetNetworksecuritypolicy Configpb Attribute> - 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 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.
- Geo
Db stringRef - 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.
- Ip
Reputation stringDb Ref - 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<Get
Networksecuritypolicy Marker> - 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<Get
Networksecuritypolicy Rule> - Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Tenant
Ref 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 stringCksum - 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 []GetNetworksecuritypolicy Configpb Attribute - 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 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.
- Geo
Db stringRef - 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.
- Ip
Reputation stringDb Ref - 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
[]Get
Networksecuritypolicy Marker - 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
[]Get
Networksecuritypolicy Rule - Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Tenant
Ref 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 StringCksum - 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 List<GetNetworksecuritypolicy Configpb Attribute> - 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 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.
- geo
Db StringRef - 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.
- ip
Reputation StringDb Ref - 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<Get
Networksecuritypolicy Marker> - 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<Get
Networksecuritypolicy Rule> - Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- tenant
Ref 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 stringCksum - 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 GetNetworksecuritypolicy Configpb Attribute[] - 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 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.
- geo
Db stringRef - 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.
- ip
Reputation stringDb Ref - 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
Get
Networksecuritypolicy Marker[] - 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
Get
Networksecuritypolicy Rule[] - Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- tenant
Ref 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_ strcksum - 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[GetNetworksecuritypolicy Configpb Attribute] - 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_ strref - 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_ strdb_ ref - 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[Get
Networksecuritypolicy Marker] - 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[Get
Networksecuritypolicy Rule] - 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.
- cloud
Config StringCksum - 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 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.
- created
By 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.
- geo
Db StringRef - 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.
- ip
Reputation StringDb Ref - 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.
- tenant
Ref 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 str
- version String
GetNetworksecuritypolicyMarker
GetNetworksecuritypolicyRule
- Action string
- Age string
- Created
By string - Creator name. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Enable string
- Index string
- Log string
- Matches
List<Get
Networksecuritypolicy Rule Match> - Name string
- Search NetworkSecurityPolicy by name.
- Rl
Params List<GetNetworksecuritypolicy Rule Rl Param>
- Action string
- Age string
- Created
By string - Creator name. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Enable string
- Index string
- Log string
- Matches
[]Get
Networksecuritypolicy Rule Match - Name string
- Search NetworkSecurityPolicy by name.
- Rl
Params []GetNetworksecuritypolicy Rule Rl Param
- action String
- age String
- created
By String - Creator name. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- enable String
- index String
- log String
- matches
List<Get
Networksecuritypolicy Rule Match> - name String
- Search NetworkSecurityPolicy by name.
- rl
Params List<GetNetworksecuritypolicy Rule Rl Param>
- action string
- age string
- created
By string - Creator name. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- enable string
- index string
- log string
- matches
Get
Networksecuritypolicy Rule Match[] - name string
- Search NetworkSecurityPolicy by name.
- rl
Params GetNetworksecuritypolicy Rule Rl Param[]
- 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[Get
Networksecuritypolicy Rule Match] - name str
- Search NetworkSecurityPolicy by name.
- rl_
params Sequence[GetNetworksecuritypolicy Rule Rl Param]
GetNetworksecuritypolicyRuleMatch
- Client
Ips List<GetNetworksecuritypolicy Rule Match Client Ip> - Client
Ports List<GetNetworksecuritypolicy Rule Match Client Port> - Geo
Matches List<GetNetworksecuritypolicy Rule Match Geo Match> - Ip
Reputation List<GetTypes Networksecuritypolicy Rule Match Ip Reputation Type> - Microservices
List<Get
Networksecuritypolicy Rule Match Microservice> - Vs
Ports List<GetNetworksecuritypolicy Rule Match Vs Port>
- Client
Ips []GetNetworksecuritypolicy Rule Match Client Ip - Client
Ports []GetNetworksecuritypolicy Rule Match Client Port - Geo
Matches []GetNetworksecuritypolicy Rule Match Geo Match - Ip
Reputation []GetTypes Networksecuritypolicy Rule Match Ip Reputation Type - Microservices
[]Get
Networksecuritypolicy Rule Match Microservice - Vs
Ports []GetNetworksecuritypolicy Rule Match Vs Port
- client
Ips List<GetNetworksecuritypolicy Rule Match Client Ip> - client
Ports List<GetNetworksecuritypolicy Rule Match Client Port> - geo
Matches List<GetNetworksecuritypolicy Rule Match Geo Match> - ip
Reputation List<GetTypes Networksecuritypolicy Rule Match Ip Reputation Type> - microservices
List<Get
Networksecuritypolicy Rule Match Microservice> - vs
Ports List<GetNetworksecuritypolicy Rule Match Vs Port>
- client
Ips GetNetworksecuritypolicy Rule Match Client Ip[] - client
Ports GetNetworksecuritypolicy Rule Match Client Port[] - geo
Matches GetNetworksecuritypolicy Rule Match Geo Match[] - ip
Reputation GetTypes Networksecuritypolicy Rule Match Ip Reputation Type[] - microservices
Get
Networksecuritypolicy Rule Match Microservice[] - vs
Ports GetNetworksecuritypolicy Rule Match Vs Port[]
- client_
ips Sequence[GetNetworksecuritypolicy Rule Match Client Ip] - client_
ports Sequence[GetNetworksecuritypolicy Rule Match Client Port] - geo_
matches Sequence[GetNetworksecuritypolicy Rule Match Geo Match] - ip_
reputation_ Sequence[Gettypes Networksecuritypolicy Rule Match Ip Reputation Type] - microservices
Sequence[Get
Networksecuritypolicy Rule Match Microservice] - vs_
ports Sequence[GetNetworksecuritypolicy Rule Match Vs Port]
GetNetworksecuritypolicyRuleMatchClientIp
GetNetworksecuritypolicyRuleMatchClientIpAddr
GetNetworksecuritypolicyRuleMatchClientIpPrefix
- ip
Addrs List<Property Map> - mask String
GetNetworksecuritypolicyRuleMatchClientIpPrefixIpAddr
GetNetworksecuritypolicyRuleMatchClientIpRange
GetNetworksecuritypolicyRuleMatchClientIpRangeBegin
GetNetworksecuritypolicyRuleMatchClientIpRangeEnd
GetNetworksecuritypolicyRuleMatchClientPort
- Match
Criteria string - Ports List<double>
- Ranges
List<Get
Networksecuritypolicy Rule Match Client Port Range>
- match
Criteria String - ports List<Double>
- ranges
List<Get
Networksecuritypolicy Rule Match Client Port Range>
- match_
criteria str - ports Sequence[float]
- ranges
Sequence[Get
Networksecuritypolicy Rule Match Client Port Range]
- match
Criteria String - ports List<Number>
- ranges List<Property Map>
GetNetworksecuritypolicyRuleMatchClientPortRange
GetNetworksecuritypolicyRuleMatchGeoMatch
- Attribute string
- Match
Operation string - Values List<string>
- Attribute string
- Match
Operation string - Values []string
- attribute String
- match
Operation String - values List<String>
- attribute string
- match
Operation string - values string[]
- attribute str
- match_
operation str - values Sequence[str]
- attribute String
- match
Operation String - values List<String>
GetNetworksecuritypolicyRuleMatchIpReputationType
- Match
Operation string - Reputation
Types List<string>
- Match
Operation string - Reputation
Types []string
- match
Operation String - reputation
Types List<String>
- match
Operation string - reputation
Types string[]
- match_
operation str - reputation_
types Sequence[str]
- match
Operation String - reputation
Types List<String>
GetNetworksecuritypolicyRuleMatchMicroservice
- Group
Ref string - Match
Criteria string
- Group
Ref string - Match
Criteria string
- group
Ref String - match
Criteria String
- group
Ref string - match
Criteria string
- group_
ref str - match_
criteria str
- group
Ref String - match
Criteria String
GetNetworksecuritypolicyRuleMatchVsPort
- Match
Criteria string - Ports List<double>
- Match
Criteria string - Ports []float64
- match
Criteria String - ports List<Double>
- match
Criteria string - ports number[]
- match_
criteria str - ports Sequence[float]
- match
Criteria String - ports List<Number>
GetNetworksecuritypolicyRuleRlParam
- burst_
size str - max_
rate str
Package Details
- Repository
- avi vmware/terraform-provider-avi
- License
- Notes
- This Pulumi package is based on the
avi
Terraform Provider.