...

Package networksecuritygroup

import "github.com/Azure/azure-sdk-for-go/services/classic/management/networksecuritygroup"
Overview
Index

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

type RuleAction

RuleAction represents a rule action

type RuleAction string

These constants represent the possible rule actions

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

type RuleProtocol

RuleProtocol represents a rule protocol

type RuleProtocol string

These constants represent the possible rule types

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

type RuleRequest

RuleRequest represents a single rule of a network security group

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

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
}

type RuleResponse

RuleResponse represents a single rule of a network security group

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

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"`
}

type RuleType

RuleType represents a rule type

type RuleType string

These constants represent the possible rule types

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

type SecurityGroupClient

SecurityGroupClient is used to perform operations on network security groups

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

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

SecurityGroupList represents a list of security groups

type SecurityGroupList []SecurityGroupResponse

type SecurityGroupRequest

SecurityGroupRequest represents a network security group

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

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

type SecurityGroupResponse

SecurityGroupResponse represents a network security group

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

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"`
}

type SecurityGroupState

SecurityGroupState represents a security group state

type SecurityGroupState string

These constants represent the possible security group states

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