azure-native.network.getSecurityRule

Explore with Pulumi AI

Get the specified network security rule. API Version: 2020-11-01.

Using getSecurityRule

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 getSecurityRule(args: GetSecurityRuleArgs, opts?: InvokeOptions): Promise<GetSecurityRuleResult>
function getSecurityRuleOutput(args: GetSecurityRuleOutputArgs, opts?: InvokeOptions): Output<GetSecurityRuleResult>
def get_security_rule(network_security_group_name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      security_rule_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetSecurityRuleResult
def get_security_rule_output(network_security_group_name: Optional[pulumi.Input[str]] = None,
                      resource_group_name: Optional[pulumi.Input[str]] = None,
                      security_rule_name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetSecurityRuleResult]
func LookupSecurityRule(ctx *Context, args *LookupSecurityRuleArgs, opts ...InvokeOption) (*LookupSecurityRuleResult, error)
func LookupSecurityRuleOutput(ctx *Context, args *LookupSecurityRuleOutputArgs, opts ...InvokeOption) LookupSecurityRuleResultOutput

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

public static class GetSecurityRule 
{
    public static Task<GetSecurityRuleResult> InvokeAsync(GetSecurityRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetSecurityRuleResult> Invoke(GetSecurityRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSecurityRuleResult> getSecurityRule(GetSecurityRuleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure-native:network:getSecurityRule
  arguments:
    # arguments dictionary

The following arguments are supported:

NetworkSecurityGroupName string

The name of the network security group.

ResourceGroupName string

The name of the resource group.

SecurityRuleName string

The name of the security rule.

NetworkSecurityGroupName string

The name of the network security group.

ResourceGroupName string

The name of the resource group.

SecurityRuleName string

The name of the security rule.

networkSecurityGroupName String

The name of the network security group.

resourceGroupName String

The name of the resource group.

securityRuleName String

The name of the security rule.

networkSecurityGroupName string

The name of the network security group.

resourceGroupName string

The name of the resource group.

securityRuleName string

The name of the security rule.

network_security_group_name str

The name of the network security group.

resource_group_name str

The name of the resource group.

security_rule_name str

The name of the security rule.

networkSecurityGroupName String

The name of the network security group.

resourceGroupName String

The name of the resource group.

securityRuleName String

The name of the security rule.

getSecurityRule Result

The following output properties are available:

Access string

The network traffic is allowed or denied.

Direction string

The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.

Etag string

A unique read-only string that changes whenever the resource is updated.

Protocol string

Network protocol this rule applies to.

ProvisioningState string

The provisioning state of the security rule resource.

Description string

A description for this rule. Restricted to 140 chars.

DestinationAddressPrefix string

The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.

DestinationAddressPrefixes List<string>

The destination address prefixes. CIDR or destination IP ranges.

DestinationApplicationSecurityGroups List<Pulumi.AzureNative.Network.Outputs.ApplicationSecurityGroupResponse>

The application security group specified as destination.

DestinationPortRange string

The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

DestinationPortRanges List<string>

The destination port ranges.

Id string

Resource ID.

Name string

The name of the resource that is unique within a resource group. This name can be used to access the resource.

Priority int

The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

SourceAddressPrefix string

The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.

SourceAddressPrefixes List<string>

The CIDR or source IP ranges.

SourceApplicationSecurityGroups List<Pulumi.AzureNative.Network.Outputs.ApplicationSecurityGroupResponse>

The application security group specified as source.

SourcePortRange string

The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

SourcePortRanges List<string>

The source port ranges.

Type string

The type of the resource.

Access string

The network traffic is allowed or denied.

Direction string

The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.

Etag string

A unique read-only string that changes whenever the resource is updated.

Protocol string

Network protocol this rule applies to.

ProvisioningState string

The provisioning state of the security rule resource.

Description string

A description for this rule. Restricted to 140 chars.

DestinationAddressPrefix string

The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.

DestinationAddressPrefixes []string

The destination address prefixes. CIDR or destination IP ranges.

DestinationApplicationSecurityGroups []ApplicationSecurityGroupResponse

The application security group specified as destination.

DestinationPortRange string

The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

DestinationPortRanges []string

The destination port ranges.

Id string

Resource ID.

Name string

The name of the resource that is unique within a resource group. This name can be used to access the resource.

Priority int

The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

SourceAddressPrefix string

The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.

SourceAddressPrefixes []string

The CIDR or source IP ranges.

SourceApplicationSecurityGroups []ApplicationSecurityGroupResponse

The application security group specified as source.

SourcePortRange string

The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

SourcePortRanges []string

The source port ranges.

Type string

The type of the resource.

access String

The network traffic is allowed or denied.

direction String

The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.

etag String

A unique read-only string that changes whenever the resource is updated.

protocol String

Network protocol this rule applies to.

provisioningState String

The provisioning state of the security rule resource.

description String

A description for this rule. Restricted to 140 chars.

destinationAddressPrefix String

The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.

destinationAddressPrefixes List<String>

The destination address prefixes. CIDR or destination IP ranges.

destinationApplicationSecurityGroups List<ApplicationSecurityGroupResponse>

The application security group specified as destination.

destinationPortRange String

The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

destinationPortRanges List<String>

The destination port ranges.

id String

Resource ID.

name String

The name of the resource that is unique within a resource group. This name can be used to access the resource.

priority Integer

The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

sourceAddressPrefix String

The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.

sourceAddressPrefixes List<String>

The CIDR or source IP ranges.

sourceApplicationSecurityGroups List<ApplicationSecurityGroupResponse>

The application security group specified as source.

sourcePortRange String

The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

sourcePortRanges List<String>

The source port ranges.

type String

The type of the resource.

access string

The network traffic is allowed or denied.

direction string

The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.

etag string

A unique read-only string that changes whenever the resource is updated.

protocol string

Network protocol this rule applies to.

provisioningState string

The provisioning state of the security rule resource.

description string

A description for this rule. Restricted to 140 chars.

destinationAddressPrefix string

The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.

destinationAddressPrefixes string[]

The destination address prefixes. CIDR or destination IP ranges.

destinationApplicationSecurityGroups ApplicationSecurityGroupResponse[]

The application security group specified as destination.

destinationPortRange string

The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

destinationPortRanges string[]

The destination port ranges.

id string

Resource ID.

name string

The name of the resource that is unique within a resource group. This name can be used to access the resource.

priority number

The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

sourceAddressPrefix string

The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.

sourceAddressPrefixes string[]

The CIDR or source IP ranges.

sourceApplicationSecurityGroups ApplicationSecurityGroupResponse[]

The application security group specified as source.

sourcePortRange string

The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

sourcePortRanges string[]

The source port ranges.

type string

The type of the resource.

access str

The network traffic is allowed or denied.

direction str

The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.

etag str

A unique read-only string that changes whenever the resource is updated.

protocol str

Network protocol this rule applies to.

provisioning_state str

The provisioning state of the security rule resource.

description str

A description for this rule. Restricted to 140 chars.

destination_address_prefix str

The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.

destination_address_prefixes Sequence[str]

The destination address prefixes. CIDR or destination IP ranges.

destination_application_security_groups Sequence[ApplicationSecurityGroupResponse]

The application security group specified as destination.

destination_port_range str

The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

destination_port_ranges Sequence[str]

The destination port ranges.

id str

Resource ID.

name str

The name of the resource that is unique within a resource group. This name can be used to access the resource.

priority int

The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

source_address_prefix str

The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.

source_address_prefixes Sequence[str]

The CIDR or source IP ranges.

source_application_security_groups Sequence[ApplicationSecurityGroupResponse]

The application security group specified as source.

source_port_range str

The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

source_port_ranges Sequence[str]

The source port ranges.

type str

The type of the resource.

access String

The network traffic is allowed or denied.

direction String

The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.

etag String

A unique read-only string that changes whenever the resource is updated.

protocol String

Network protocol this rule applies to.

provisioningState String

The provisioning state of the security rule resource.

description String

A description for this rule. Restricted to 140 chars.

destinationAddressPrefix String

The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.

destinationAddressPrefixes List<String>

The destination address prefixes. CIDR or destination IP ranges.

destinationApplicationSecurityGroups List<Property Map>

The application security group specified as destination.

destinationPortRange String

The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

destinationPortRanges List<String>

The destination port ranges.

id String

Resource ID.

name String

The name of the resource that is unique within a resource group. This name can be used to access the resource.

priority Number

The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

sourceAddressPrefix String

The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.

sourceAddressPrefixes List<String>

The CIDR or source IP ranges.

sourceApplicationSecurityGroups List<Property Map>

The application security group specified as source.

sourcePortRange String

The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

sourcePortRanges List<String>

The source port ranges.

type String

The type of the resource.

Supporting Types

ApplicationSecurityGroupResponse

Etag string

A unique read-only string that changes whenever the resource is updated.

Name string

Resource name.

ProvisioningState string

The provisioning state of the application security group resource.

ResourceGuid string

The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.

Type string

Resource type.

Id string

Resource ID.

Location string

Resource location.

Tags Dictionary<string, string>

Resource tags.

Etag string

A unique read-only string that changes whenever the resource is updated.

Name string

Resource name.

ProvisioningState string

The provisioning state of the application security group resource.

ResourceGuid string

The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.

Type string

Resource type.

Id string

Resource ID.

Location string

Resource location.

Tags map[string]string

Resource tags.

etag String

A unique read-only string that changes whenever the resource is updated.

name String

Resource name.

provisioningState String

The provisioning state of the application security group resource.

resourceGuid String

The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.

type String

Resource type.

id String

Resource ID.

location String

Resource location.

tags Map<String,String>

Resource tags.

etag string

A unique read-only string that changes whenever the resource is updated.

name string

Resource name.

provisioningState string

The provisioning state of the application security group resource.

resourceGuid string

The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.

type string

Resource type.

id string

Resource ID.

location string

Resource location.

tags {[key: string]: string}

Resource tags.

etag str

A unique read-only string that changes whenever the resource is updated.

name str

Resource name.

provisioning_state str

The provisioning state of the application security group resource.

resource_guid str

The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.

type str

Resource type.

id str

Resource ID.

location str

Resource location.

tags Mapping[str, str]

Resource tags.

etag String

A unique read-only string that changes whenever the resource is updated.

name String

Resource name.

provisioningState String

The provisioning state of the application security group resource.

resourceGuid String

The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.

type String

Resource type.

id String

Resource ID.

location String

Resource location.

tags Map<String>

Resource tags.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0