This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi
azure-native.azurestackhci.getSecurityRule
Explore with Pulumi AI
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi
Gets the specified security rule. Azure REST API version: 2024-02-01-preview.
Other available API versions: 2024-05-01-preview, 2024-07-15-preview, 2024-08-01-preview, 2024-10-01-preview, 2025-02-01-preview.
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)
public static Output<GetSecurityRuleResult> getSecurityRule(GetSecurityRuleArgs args, InvokeOptions options)
fn::invoke:
  function: azure-native:azurestackhci:getSecurityRule
  arguments:
    # arguments dictionaryThe following arguments are supported:
- NetworkSecurity stringGroup Name 
- Name of the network security group
- ResourceGroup stringName 
- The name of the resource group. The name is case insensitive.
- SecurityRule stringName 
- Name of the security rule.
- NetworkSecurity stringGroup Name 
- Name of the network security group
- ResourceGroup stringName 
- The name of the resource group. The name is case insensitive.
- SecurityRule stringName 
- Name of the security rule.
- networkSecurity StringGroup Name 
- Name of the network security group
- resourceGroup StringName 
- The name of the resource group. The name is case insensitive.
- securityRule StringName 
- Name of the security rule.
- networkSecurity stringGroup Name 
- Name of the network security group
- resourceGroup stringName 
- The name of the resource group. The name is case insensitive.
- securityRule stringName 
- Name of the security rule.
- network_security_ strgroup_ name 
- Name of the network security group
- resource_group_ strname 
- The name of the resource group. The name is case insensitive.
- security_rule_ strname 
- Name of the security rule.
- networkSecurity StringGroup Name 
- Name of the network security group
- resourceGroup StringName 
- The name of the resource group. The name is case insensitive.
- securityRule StringName 
- 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.
- Id string
- Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
- Name string
- The name of 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.
- Protocol string
- Network protocol this rule applies to.
- ProvisioningState string
- Provisioning state of the SR
- SystemData Pulumi.Azure Native. Azure Stack HCI. Outputs. System Data Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Description string
- A description for this rule. Restricted to 140 chars.
- DestinationAddress List<string>Prefixes 
- The destination address prefixes. CIDR or destination IP ranges.
- DestinationPort List<string>Ranges 
- The destination port ranges. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- ExtendedLocation Pulumi.Azure Native. Azure Stack HCI. Outputs. Extended Location Response 
- The extendedLocation of the resource.
- SourceAddress List<string>Prefixes 
- The CIDR or source IP ranges.
- SourcePort List<string>Ranges 
- The source port ranges. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- 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.
- Id string
- Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
- Name string
- The name of 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.
- Protocol string
- Network protocol this rule applies to.
- ProvisioningState string
- Provisioning state of the SR
- SystemData SystemData Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Description string
- A description for this rule. Restricted to 140 chars.
- DestinationAddress []stringPrefixes 
- The destination address prefixes. CIDR or destination IP ranges.
- DestinationPort []stringRanges 
- The destination port ranges. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- ExtendedLocation ExtendedLocation Response 
- The extendedLocation of the resource.
- SourceAddress []stringPrefixes 
- The CIDR or source IP ranges.
- SourcePort []stringRanges 
- The source port ranges. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- 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.
- id String
- Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
- name String
- The name of 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.
- protocol String
- Network protocol this rule applies to.
- provisioningState String
- Provisioning state of the SR
- systemData SystemData Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- description String
- A description for this rule. Restricted to 140 chars.
- destinationAddress List<String>Prefixes 
- The destination address prefixes. CIDR or destination IP ranges.
- destinationPort List<String>Ranges 
- The destination port ranges. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- extendedLocation ExtendedLocation Response 
- The extendedLocation of the resource.
- sourceAddress List<String>Prefixes 
- The CIDR or source IP ranges.
- sourcePort List<String>Ranges 
- The source port ranges. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- 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.
- id string
- Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
- name string
- The name of 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.
- protocol string
- Network protocol this rule applies to.
- provisioningState string
- Provisioning state of the SR
- systemData SystemData Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- description string
- A description for this rule. Restricted to 140 chars.
- destinationAddress string[]Prefixes 
- The destination address prefixes. CIDR or destination IP ranges.
- destinationPort string[]Ranges 
- The destination port ranges. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- extendedLocation ExtendedLocation Response 
- The extendedLocation of the resource.
- sourceAddress string[]Prefixes 
- The CIDR or source IP ranges.
- sourcePort string[]Ranges 
- The source port ranges. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- 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.
- id str
- Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
- name str
- The name of 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.
- protocol str
- Network protocol this rule applies to.
- provisioning_state str
- Provisioning state of the SR
- system_data SystemData Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- description str
- A description for this rule. Restricted to 140 chars.
- destination_address_ Sequence[str]prefixes 
- The destination address prefixes. CIDR or destination IP ranges.
- destination_port_ Sequence[str]ranges 
- The destination port ranges. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- extended_location ExtendedLocation Response 
- The extendedLocation of the resource.
- source_address_ Sequence[str]prefixes 
- The CIDR or source IP ranges.
- source_port_ Sequence[str]ranges 
- The source port ranges. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- 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.
- id String
- Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
- name String
- The name of 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.
- protocol String
- Network protocol this rule applies to.
- provisioningState String
- Provisioning state of the SR
- systemData Property Map
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- description String
- A description for this rule. Restricted to 140 chars.
- destinationAddress List<String>Prefixes 
- The destination address prefixes. CIDR or destination IP ranges.
- destinationPort List<String>Ranges 
- The destination port ranges. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- extendedLocation Property Map
- The extendedLocation of the resource.
- sourceAddress List<String>Prefixes 
- The CIDR or source IP ranges.
- sourcePort List<String>Ranges 
- The source port ranges. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
Supporting Types
ExtendedLocationResponse  
SystemDataResponse  
- CreatedAt string
- The timestamp of resource creation (UTC).
- CreatedBy string
- The identity that created the resource.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- The type of identity that last modified the resource.
- CreatedAt string
- The timestamp of resource creation (UTC).
- CreatedBy string
- The identity that created the resource.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- The type of identity that last modified the resource.
- createdAt String
- The timestamp of resource creation (UTC).
- createdBy String
- The identity that created the resource.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- The type of identity that last modified the resource.
- createdAt string
- The timestamp of resource creation (UTC).
- createdBy string
- The identity that created the resource.
- createdBy stringType 
- The type of identity that created the resource.
- lastModified stringAt 
- The timestamp of resource last modification (UTC)
- lastModified stringBy 
- The identity that last modified the resource.
- lastModified stringBy Type 
- The type of identity that last modified the resource.
- created_at str
- The timestamp of resource creation (UTC).
- created_by str
- The identity that created the resource.
- created_by_ strtype 
- The type of identity that created the resource.
- last_modified_ strat 
- The timestamp of resource last modification (UTC)
- last_modified_ strby 
- The identity that last modified the resource.
- last_modified_ strby_ type 
- The type of identity that last modified the resource.
- createdAt String
- The timestamp of resource creation (UTC).
- createdBy String
- The identity that created the resource.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- The type of identity that last modified the resource.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi