networksecuritygroup

package
v60.2.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package networksecuritygroup provides a client for Network Security Groups.

Package networksecuritygroup implements operations for managing network security groups using the Service Management REST API

https://msdn.microsoft.com/en-us/library/azure/dn913824.aspx

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RuleAction

type RuleAction string

RuleAction represents a rule action

const (
	RuleActionAllow RuleAction = "Allow"
	RuleActionDeny  RuleAction = "Deny"
)

These constants represent the possible rule actions

type RuleProtocol

type RuleProtocol string

RuleProtocol represents a rule protocol

const (
	RuleProtocolTCP RuleProtocol = "TCP"
	RuleProtocolUDP RuleProtocol = "UDP"
	RuleProtocolAll RuleProtocol = "*"
)

These constants represent the possible rule types

type RuleRequest

type RuleRequest struct {
	XMLName                  xml.Name `xml:"http://schemas.microsoft.com/windowsazure Rule"`
	Name                     string
	Type                     RuleType
	Priority                 int
	Action                   RuleAction
	SourceAddressPrefix      string
	SourcePortRange          string
	DestinationAddressPrefix string
	DestinationPortRange     string
	Protocol                 RuleProtocol
}

RuleRequest represents a single rule of a network security group

https://msdn.microsoft.com/en-us/library/azure/dn913821.aspx#bk_rules

type RuleResponse

type RuleResponse struct {
	XMLName                  xml.Name `xml:"http://schemas.microsoft.com/windowsazure Rule"`
	Name                     string
	Type                     RuleType
	Priority                 int
	Action                   RuleAction
	SourceAddressPrefix      string
	SourcePortRange          string
	DestinationAddressPrefix string
	DestinationPortRange     string
	Protocol                 RuleProtocol
	State                    string `xml:",omitempty"`
	IsDefault                bool   `xml:",omitempty"`
}

RuleResponse represents a single rule of a network security group

https://msdn.microsoft.com/en-us/library/azure/dn913821.aspx#bk_rules

type RuleType

type RuleType string

RuleType represents a rule type

const (
	RuleTypeInbound  RuleType = "Inbound"
	RuleTypeOutbound RuleType = "Outbound"
)

These constants represent the possible rule types

type SecurityGroupClient

type SecurityGroupClient struct {
	// contains filtered or unexported fields
}

SecurityGroupClient is used to perform operations on network security groups

func NewClient

func NewClient(client management.Client) SecurityGroupClient

NewClient is used to instantiate a new SecurityGroupClient from an Azure client

func (SecurityGroupClient) AddNetworkSecurityToSubnet

func (sg SecurityGroupClient) AddNetworkSecurityToSubnet(
	name string,
	subnet string,
	virtualNetwork string) (management.OperationID, error)

AddNetworkSecurityToSubnet associates the network security group with specified subnet in a virtual network

https://msdn.microsoft.com/en-us/library/azure/dn913822.aspx

func (SecurityGroupClient) CreateNetworkSecurityGroup

func (sg SecurityGroupClient) CreateNetworkSecurityGroup(
	name string,
	label string,
	location string) (management.OperationID, error)

CreateNetworkSecurityGroup creates a new network security group within the context of the specified subscription

https://msdn.microsoft.com/en-us/library/azure/dn913818.aspx

func (SecurityGroupClient) DeleteNetworkSecurityGroup

func (sg SecurityGroupClient) DeleteNetworkSecurityGroup(
	name string) (management.OperationID, error)

DeleteNetworkSecurityGroup deletes the specified network security group from the subscription

https://msdn.microsoft.com/en-us/library/azure/dn913825.aspx

func (SecurityGroupClient) DeleteNetworkSecurityGroupRule

func (sg SecurityGroupClient) DeleteNetworkSecurityGroupRule(
	securityGroup string,
	rule string) (management.OperationID, error)

DeleteNetworkSecurityGroupRule deletes a network security group rule from the specified network security group

https://msdn.microsoft.com/en-us/library/azure/dn913816.aspx

func (SecurityGroupClient) GetNetworkSecurityGroup

func (sg SecurityGroupClient) GetNetworkSecurityGroup(name string) (SecurityGroupResponse, error)

GetNetworkSecurityGroup returns information about the specified network security group

https://msdn.microsoft.com/en-us/library/azure/dn913821.aspx

func (SecurityGroupClient) GetNetworkSecurityGroupForSubnet

func (sg SecurityGroupClient) GetNetworkSecurityGroupForSubnet(
	subnet string,
	virtualNetwork string) (SecurityGroupResponse, error)

GetNetworkSecurityGroupForSubnet returns information about the network security group associated with a subnet

https://msdn.microsoft.com/en-us/library/azure/dn913817.aspx

func (SecurityGroupClient) ListNetworkSecurityGroups

func (sg SecurityGroupClient) ListNetworkSecurityGroups() (SecurityGroupList, error)

ListNetworkSecurityGroups returns a list of the network security groups in the specified subscription

https://msdn.microsoft.com/en-us/library/azure/dn913815.aspx

func (SecurityGroupClient) RemoveNetworkSecurityGroupFromSubnet

func (sg SecurityGroupClient) RemoveNetworkSecurityGroupFromSubnet(
	name string,
	subnet string,
	virtualNetwork string) (management.OperationID, error)

RemoveNetworkSecurityGroupFromSubnet removes the association of the specified network security group from the specified subnet

https://msdn.microsoft.com/en-us/library/azure/dn913820.aspx

func (SecurityGroupClient) SetNetworkSecurityGroupRule

func (sg SecurityGroupClient) SetNetworkSecurityGroupRule(
	securityGroup string,
	rule RuleRequest) (management.OperationID, error)

SetNetworkSecurityGroupRule adds or updates a network security rule that is associated with the specified network security group

https://msdn.microsoft.com/en-us/library/azure/dn913819.aspx

type SecurityGroupList

type SecurityGroupList []SecurityGroupResponse

SecurityGroupList represents a list of security groups

type SecurityGroupRequest

type SecurityGroupRequest struct {
	XMLName  xml.Name `xml:"http://schemas.microsoft.com/windowsazure NetworkSecurityGroup"`
	Name     string
	Label    string `xml:",omitempty"`
	Location string `xml:",omitempty"`
}

SecurityGroupRequest represents a network security group

https://msdn.microsoft.com/en-us/library/azure/dn913821.aspx

type SecurityGroupResponse

type SecurityGroupResponse struct {
	XMLName  xml.Name `xml:"http://schemas.microsoft.com/windowsazure NetworkSecurityGroup"`
	Name     string
	Label    string             `xml:",omitempty"`
	Location string             `xml:",omitempty"`
	State    SecurityGroupState `xml:",omitempty"`
	Rules    []RuleResponse     `xml:">Rule,omitempty"`
}

SecurityGroupResponse represents a network security group

https://msdn.microsoft.com/en-us/library/azure/dn913821.aspx

type SecurityGroupState

type SecurityGroupState string

SecurityGroupState represents a security group state

const (
	SecurityGroupStateCreated     SecurityGroupState = "Created"
	SecurityGroupStateCreating    SecurityGroupState = "Creating"
	SecurityGroupStateUpdating    SecurityGroupState = "Updating"
	SecurityGroupStateDeleting    SecurityGroupState = "Deleting"
	SecurityGroupStateUnavailable SecurityGroupState = "Unavailable"
)

These constants represent the possible security group states

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL