securityuserrules

package
v0.20241212.1154051 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-05-01/securityuserrules Documentation

The securityuserrules SDK allows for interaction with Azure Resource Manager network (API Version 2024-05-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-05-01/securityuserrules"

Client Initialization

client := securityuserrules.NewSecurityUserRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SecurityUserRulesClient.CreateOrUpdate

ctx := context.TODO()
id := securityuserrules.NewRuleCollectionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "securityUserConfigurationName", "ruleCollectionName", "ruleName")

payload := securityuserrules.SecurityUserRule{
	// ...
}


read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SecurityUserRulesClient.Delete

ctx := context.TODO()
id := securityuserrules.NewRuleCollectionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "securityUserConfigurationName", "ruleCollectionName", "ruleName")

if err := client.DeleteThenPoll(ctx, id, securityuserrules.DefaultDeleteOperationOptions()); err != nil {
	// handle the error
}

Example Usage: SecurityUserRulesClient.Get

ctx := context.TODO()
id := securityuserrules.NewRuleCollectionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "securityUserConfigurationName", "ruleCollectionName", "ruleName")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SecurityUserRulesClient.List

ctx := context.TODO()
id := securityuserrules.NewSecurityUserConfigurationRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "securityUserConfigurationName", "ruleCollectionName")

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAddressPrefixType

func PossibleValuesForAddressPrefixType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForSecurityConfigurationRuleDirection

func PossibleValuesForSecurityConfigurationRuleDirection() []string

func PossibleValuesForSecurityConfigurationRuleProtocol

func PossibleValuesForSecurityConfigurationRuleProtocol() []string

func ValidateRuleCollectionRuleID

func ValidateRuleCollectionRuleID(input interface{}, key string) (warnings []string, errors []error)

ValidateRuleCollectionRuleID checks that 'input' can be parsed as a Rule Collection Rule ID

func ValidateSecurityUserConfigurationRuleCollectionID

func ValidateSecurityUserConfigurationRuleCollectionID(input interface{}, key string) (warnings []string, errors []error)

ValidateSecurityUserConfigurationRuleCollectionID checks that 'input' can be parsed as a Security User Configuration Rule Collection ID

Types

type AddressPrefixItem

type AddressPrefixItem struct {
	AddressPrefix     *string            `json:"addressPrefix,omitempty"`
	AddressPrefixType *AddressPrefixType `json:"addressPrefixType,omitempty"`
}

type AddressPrefixType

type AddressPrefixType string
const (
	AddressPrefixTypeIPPrefix     AddressPrefixType = "IPPrefix"
	AddressPrefixTypeNetworkGroup AddressPrefixType = "NetworkGroup"
	AddressPrefixTypeServiceTag   AddressPrefixType = "ServiceTag"
)

func (*AddressPrefixType) UnmarshalJSON

func (s *AddressPrefixType) UnmarshalJSON(bytes []byte) error

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SecurityUserRule
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *bool
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SecurityUserRule
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SecurityUserRule
}

type ListCustomPager

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SecurityUserRule
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type RuleCollectionRuleId

type RuleCollectionRuleId struct {
	SubscriptionId                string
	ResourceGroupName             string
	NetworkManagerName            string
	SecurityUserConfigurationName string
	RuleCollectionName            string
	RuleName                      string
}

RuleCollectionRuleId is a struct representing the Resource ID for a Rule Collection Rule

func NewRuleCollectionRuleID

func NewRuleCollectionRuleID(subscriptionId string, resourceGroupName string, networkManagerName string, securityUserConfigurationName string, ruleCollectionName string, ruleName string) RuleCollectionRuleId

NewRuleCollectionRuleID returns a new RuleCollectionRuleId struct

func ParseRuleCollectionRuleID

func ParseRuleCollectionRuleID(input string) (*RuleCollectionRuleId, error)

ParseRuleCollectionRuleID parses 'input' into a RuleCollectionRuleId

func ParseRuleCollectionRuleIDInsensitively

func ParseRuleCollectionRuleIDInsensitively(input string) (*RuleCollectionRuleId, error)

ParseRuleCollectionRuleIDInsensitively parses 'input' case-insensitively into a RuleCollectionRuleId note: this method should only be used for API response data and not user input

func (*RuleCollectionRuleId) FromParseResult

func (id *RuleCollectionRuleId) FromParseResult(input resourceids.ParseResult) error

func (RuleCollectionRuleId) ID

func (id RuleCollectionRuleId) ID() string

ID returns the formatted Rule Collection Rule ID

func (RuleCollectionRuleId) Segments

func (id RuleCollectionRuleId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Rule Collection Rule ID

func (RuleCollectionRuleId) String

func (id RuleCollectionRuleId) String() string

String returns a human-readable description of this Rule Collection Rule ID

type SecurityConfigurationRuleDirection

type SecurityConfigurationRuleDirection string
const (
	SecurityConfigurationRuleDirectionInbound  SecurityConfigurationRuleDirection = "Inbound"
	SecurityConfigurationRuleDirectionOutbound SecurityConfigurationRuleDirection = "Outbound"
)

func (*SecurityConfigurationRuleDirection) UnmarshalJSON

func (s *SecurityConfigurationRuleDirection) UnmarshalJSON(bytes []byte) error

type SecurityConfigurationRuleProtocol

type SecurityConfigurationRuleProtocol string
const (
	SecurityConfigurationRuleProtocolAh   SecurityConfigurationRuleProtocol = "Ah"
	SecurityConfigurationRuleProtocolAny  SecurityConfigurationRuleProtocol = "Any"
	SecurityConfigurationRuleProtocolEsp  SecurityConfigurationRuleProtocol = "Esp"
	SecurityConfigurationRuleProtocolIcmp SecurityConfigurationRuleProtocol = "Icmp"
	SecurityConfigurationRuleProtocolTcp  SecurityConfigurationRuleProtocol = "Tcp"
	SecurityConfigurationRuleProtocolUdp  SecurityConfigurationRuleProtocol = "Udp"
)

func (*SecurityConfigurationRuleProtocol) UnmarshalJSON

func (s *SecurityConfigurationRuleProtocol) UnmarshalJSON(bytes []byte) error

type SecurityUserConfigurationRuleCollectionId

type SecurityUserConfigurationRuleCollectionId struct {
	SubscriptionId                string
	ResourceGroupName             string
	NetworkManagerName            string
	SecurityUserConfigurationName string
	RuleCollectionName            string
}

SecurityUserConfigurationRuleCollectionId is a struct representing the Resource ID for a Security User Configuration Rule Collection

func NewSecurityUserConfigurationRuleCollectionID

func NewSecurityUserConfigurationRuleCollectionID(subscriptionId string, resourceGroupName string, networkManagerName string, securityUserConfigurationName string, ruleCollectionName string) SecurityUserConfigurationRuleCollectionId

NewSecurityUserConfigurationRuleCollectionID returns a new SecurityUserConfigurationRuleCollectionId struct

func ParseSecurityUserConfigurationRuleCollectionID

func ParseSecurityUserConfigurationRuleCollectionID(input string) (*SecurityUserConfigurationRuleCollectionId, error)

ParseSecurityUserConfigurationRuleCollectionID parses 'input' into a SecurityUserConfigurationRuleCollectionId

func ParseSecurityUserConfigurationRuleCollectionIDInsensitively

func ParseSecurityUserConfigurationRuleCollectionIDInsensitively(input string) (*SecurityUserConfigurationRuleCollectionId, error)

ParseSecurityUserConfigurationRuleCollectionIDInsensitively parses 'input' case-insensitively into a SecurityUserConfigurationRuleCollectionId note: this method should only be used for API response data and not user input

func (*SecurityUserConfigurationRuleCollectionId) FromParseResult

func (SecurityUserConfigurationRuleCollectionId) ID

ID returns the formatted Security User Configuration Rule Collection ID

func (SecurityUserConfigurationRuleCollectionId) Segments

Segments returns a slice of Resource ID Segments which comprise this Security User Configuration Rule Collection ID

func (SecurityUserConfigurationRuleCollectionId) String

String returns a human-readable description of this Security User Configuration Rule Collection ID

type SecurityUserRule

type SecurityUserRule struct {
	Etag       *string                           `json:"etag,omitempty"`
	Id         *string                           `json:"id,omitempty"`
	Name       *string                           `json:"name,omitempty"`
	Properties *SecurityUserRulePropertiesFormat `json:"properties,omitempty"`
	SystemData *systemdata.SystemData            `json:"systemData,omitempty"`
	Type       *string                           `json:"type,omitempty"`
}

type SecurityUserRuleOperationPredicate

type SecurityUserRuleOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (SecurityUserRuleOperationPredicate) Matches

type SecurityUserRulePropertiesFormat

type SecurityUserRulePropertiesFormat struct {
	Description           *string                            `json:"description,omitempty"`
	DestinationPortRanges *[]string                          `json:"destinationPortRanges,omitempty"`
	Destinations          *[]AddressPrefixItem               `json:"destinations,omitempty"`
	Direction             SecurityConfigurationRuleDirection `json:"direction"`
	Protocol              SecurityConfigurationRuleProtocol  `json:"protocol"`
	ProvisioningState     *ProvisioningState                 `json:"provisioningState,omitempty"`
	ResourceGuid          *string                            `json:"resourceGuid,omitempty"`
	SourcePortRanges      *[]string                          `json:"sourcePortRanges,omitempty"`
	Sources               *[]AddressPrefixItem               `json:"sources,omitempty"`
}

type SecurityUserRulesClient

type SecurityUserRulesClient struct {
	Client *resourcemanager.Client
}

func NewSecurityUserRulesClientWithBaseURI

func NewSecurityUserRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityUserRulesClient, error)

func (SecurityUserRulesClient) CreateOrUpdate

CreateOrUpdate ...

func (SecurityUserRulesClient) Delete

Delete ...

func (SecurityUserRulesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (SecurityUserRulesClient) Get

Get ...

func (SecurityUserRulesClient) List

List ...

func (SecurityUserRulesClient) ListComplete

ListComplete retrieves all the results into a single object

func (SecurityUserRulesClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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