adminrules

package
v0.20241126.1110949 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-03-01/adminrules Documentation

The adminrules SDK allows for interaction with Azure Resource Manager network (API Version 2024-03-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-03-01/adminrules"

Client Initialization

client := adminrules.NewAdminRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AdminRulesClient.CreateOrUpdate

ctx := context.TODO()
id := adminrules.NewSecurityAdminConfigurationRuleCollectionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "securityAdminConfigurationName", "ruleCollectionName", "ruleName")

payload := adminrules.BaseAdminRule{
	// ...
}


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: AdminRulesClient.Delete

ctx := context.TODO()
id := adminrules.NewSecurityAdminConfigurationRuleCollectionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "securityAdminConfigurationName", "ruleCollectionName", "ruleName")

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

Example Usage: AdminRulesClient.Get

ctx := context.TODO()
id := adminrules.NewSecurityAdminConfigurationRuleCollectionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "securityAdminConfigurationName", "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: AdminRulesClient.List

ctx := context.TODO()
id := adminrules.NewSecurityAdminConfigurationRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "securityAdminConfigurationName", "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 PossibleValuesForAdminRuleKind

func PossibleValuesForAdminRuleKind() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForSecurityConfigurationRuleAccess

func PossibleValuesForSecurityConfigurationRuleAccess() []string

func PossibleValuesForSecurityConfigurationRuleDirection

func PossibleValuesForSecurityConfigurationRuleDirection() []string

func PossibleValuesForSecurityConfigurationRuleProtocol

func PossibleValuesForSecurityConfigurationRuleProtocol() []string

func ValidateSecurityAdminConfigurationRuleCollectionID

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

ValidateSecurityAdminConfigurationRuleCollectionID checks that 'input' can be parsed as a Security Admin Configuration Rule Collection ID

func ValidateSecurityAdminConfigurationRuleCollectionRuleID

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

ValidateSecurityAdminConfigurationRuleCollectionRuleID checks that 'input' can be parsed as a Security Admin Configuration Rule Collection Rule 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"
	AddressPrefixTypeServiceTag AddressPrefixType = "ServiceTag"
)

func (*AddressPrefixType) UnmarshalJSON

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

type AdminPropertiesFormat

type AdminPropertiesFormat struct {
	Access                SecurityConfigurationRuleAccess    `json:"access"`
	Description           *string                            `json:"description,omitempty"`
	DestinationPortRanges *[]string                          `json:"destinationPortRanges,omitempty"`
	Destinations          *[]AddressPrefixItem               `json:"destinations,omitempty"`
	Direction             SecurityConfigurationRuleDirection `json:"direction"`
	Priority              int64                              `json:"priority"`
	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 AdminRule

type AdminRule struct {
	Properties *AdminPropertiesFormat `json:"properties,omitempty"`

	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Kind       AdminRuleKind          `json:"kind"`
	Name       *string                `json:"name,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

func (AdminRule) BaseAdminRule

func (s AdminRule) BaseAdminRule() BaseBaseAdminRuleImpl

func (AdminRule) MarshalJSON

func (s AdminRule) MarshalJSON() ([]byte, error)

type AdminRuleKind

type AdminRuleKind string
const (
	AdminRuleKindCustom  AdminRuleKind = "Custom"
	AdminRuleKindDefault AdminRuleKind = "Default"
)

func (*AdminRuleKind) UnmarshalJSON

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

type AdminRulesClient

type AdminRulesClient struct {
	Client *resourcemanager.Client
}

func NewAdminRulesClientWithBaseURI

func NewAdminRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AdminRulesClient, error)

func (AdminRulesClient) CreateOrUpdate

CreateOrUpdate ...

func (AdminRulesClient) Delete

Delete ...

func (AdminRulesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (AdminRulesClient) Get

Get ...

func (AdminRulesClient) List

List ...

func (AdminRulesClient) ListComplete

ListComplete retrieves all the results into a single object

func (AdminRulesClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type BaseAdminRule

type BaseAdminRule interface {
	BaseAdminRule() BaseBaseAdminRuleImpl
}

func UnmarshalBaseAdminRuleImplementation

func UnmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error)

type BaseAdminRuleOperationPredicate

type BaseAdminRuleOperationPredicate struct {
}

func (BaseAdminRuleOperationPredicate) Matches

type BaseBaseAdminRuleImpl

type BaseBaseAdminRuleImpl struct {
	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Kind       AdminRuleKind          `json:"kind"`
	Name       *string                `json:"name,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

func (BaseBaseAdminRuleImpl) BaseAdminRule

func (s BaseBaseAdminRuleImpl) BaseAdminRule() BaseBaseAdminRuleImpl

type CreateOrUpdateOperationResponse

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

type DefaultAdminPropertiesFormat

type DefaultAdminPropertiesFormat struct {
	Access                *SecurityConfigurationRuleAccess    `json:"access,omitempty"`
	Description           *string                             `json:"description,omitempty"`
	DestinationPortRanges *[]string                           `json:"destinationPortRanges,omitempty"`
	Destinations          *[]AddressPrefixItem                `json:"destinations,omitempty"`
	Direction             *SecurityConfigurationRuleDirection `json:"direction,omitempty"`
	Flag                  *string                             `json:"flag,omitempty"`
	Priority              *int64                              `json:"priority,omitempty"`
	Protocol              *SecurityConfigurationRuleProtocol  `json:"protocol,omitempty"`
	ProvisioningState     *ProvisioningState                  `json:"provisioningState,omitempty"`
	ResourceGuid          *string                             `json:"resourceGuid,omitempty"`
	SourcePortRanges      *[]string                           `json:"sourcePortRanges,omitempty"`
	Sources               *[]AddressPrefixItem                `json:"sources,omitempty"`
}

type DefaultAdminRule

type DefaultAdminRule struct {
	Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"`

	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Kind       AdminRuleKind          `json:"kind"`
	Name       *string                `json:"name,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

func (DefaultAdminRule) BaseAdminRule

func (s DefaultAdminRule) BaseAdminRule() BaseBaseAdminRuleImpl

func (DefaultAdminRule) MarshalJSON

func (s DefaultAdminRule) MarshalJSON() ([]byte, error)

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        BaseAdminRule
}

type ListCompleteResult

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

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        *[]BaseAdminRule
}

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 RawBaseAdminRuleImpl

type RawBaseAdminRuleImpl struct {
	Type   string
	Values map[string]interface{}
	// contains filtered or unexported fields
}

RawBaseAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

func (RawBaseAdminRuleImpl) BaseAdminRule

func (s RawBaseAdminRuleImpl) BaseAdminRule() BaseBaseAdminRuleImpl

type SecurityAdminConfigurationRuleCollectionId

type SecurityAdminConfigurationRuleCollectionId struct {
	SubscriptionId                 string
	ResourceGroupName              string
	NetworkManagerName             string
	SecurityAdminConfigurationName string
	RuleCollectionName             string
}

SecurityAdminConfigurationRuleCollectionId is a struct representing the Resource ID for a Security Admin Configuration Rule Collection

func NewSecurityAdminConfigurationRuleCollectionID

func NewSecurityAdminConfigurationRuleCollectionID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string, ruleCollectionName string) SecurityAdminConfigurationRuleCollectionId

NewSecurityAdminConfigurationRuleCollectionID returns a new SecurityAdminConfigurationRuleCollectionId struct

func ParseSecurityAdminConfigurationRuleCollectionID

func ParseSecurityAdminConfigurationRuleCollectionID(input string) (*SecurityAdminConfigurationRuleCollectionId, error)

ParseSecurityAdminConfigurationRuleCollectionID parses 'input' into a SecurityAdminConfigurationRuleCollectionId

func ParseSecurityAdminConfigurationRuleCollectionIDInsensitively

func ParseSecurityAdminConfigurationRuleCollectionIDInsensitively(input string) (*SecurityAdminConfigurationRuleCollectionId, error)

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

func (*SecurityAdminConfigurationRuleCollectionId) FromParseResult

func (SecurityAdminConfigurationRuleCollectionId) ID

ID returns the formatted Security Admin Configuration Rule Collection ID

func (SecurityAdminConfigurationRuleCollectionId) Segments

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

func (SecurityAdminConfigurationRuleCollectionId) String

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

type SecurityAdminConfigurationRuleCollectionRuleId

type SecurityAdminConfigurationRuleCollectionRuleId struct {
	SubscriptionId                 string
	ResourceGroupName              string
	NetworkManagerName             string
	SecurityAdminConfigurationName string
	RuleCollectionName             string
	RuleName                       string
}

SecurityAdminConfigurationRuleCollectionRuleId is a struct representing the Resource ID for a Security Admin Configuration Rule Collection Rule

func NewSecurityAdminConfigurationRuleCollectionRuleID

func NewSecurityAdminConfigurationRuleCollectionRuleID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string, ruleCollectionName string, ruleName string) SecurityAdminConfigurationRuleCollectionRuleId

NewSecurityAdminConfigurationRuleCollectionRuleID returns a new SecurityAdminConfigurationRuleCollectionRuleId struct

func ParseSecurityAdminConfigurationRuleCollectionRuleID

func ParseSecurityAdminConfigurationRuleCollectionRuleID(input string) (*SecurityAdminConfigurationRuleCollectionRuleId, error)

ParseSecurityAdminConfigurationRuleCollectionRuleID parses 'input' into a SecurityAdminConfigurationRuleCollectionRuleId

func ParseSecurityAdminConfigurationRuleCollectionRuleIDInsensitively

func ParseSecurityAdminConfigurationRuleCollectionRuleIDInsensitively(input string) (*SecurityAdminConfigurationRuleCollectionRuleId, error)

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

func (*SecurityAdminConfigurationRuleCollectionRuleId) FromParseResult

func (SecurityAdminConfigurationRuleCollectionRuleId) ID

ID returns the formatted Security Admin Configuration Rule Collection Rule ID

func (SecurityAdminConfigurationRuleCollectionRuleId) Segments

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

func (SecurityAdminConfigurationRuleCollectionRuleId) String

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

type SecurityConfigurationRuleAccess

type SecurityConfigurationRuleAccess string
const (
	SecurityConfigurationRuleAccessAllow       SecurityConfigurationRuleAccess = "Allow"
	SecurityConfigurationRuleAccessAlwaysAllow SecurityConfigurationRuleAccess = "AlwaysAllow"
	SecurityConfigurationRuleAccessDeny        SecurityConfigurationRuleAccess = "Deny"
)

func (*SecurityConfigurationRuleAccess) UnmarshalJSON

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

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

Jump to

Keyboard shortcuts

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