localrules

package
v0.20230712.1084117 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MPL-2.0 Imports: 14 Imported by: 2

README

github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrules Documentation

The localrules SDK allows for interaction with the Azure Resource Manager Service paloaltonetworks (API Version 2022-08-29).

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/paloaltonetworks/2022-08-29/localrules"

Client Initialization

client := localrules.NewLocalRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: LocalRulesClient.CreateOrUpdate

ctx := context.TODO()
id := localrules.NewLocalRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRuleStackValue", "localRuleValue")

payload := localrules.LocalRulesResource{
	// ...
}


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

Example Usage: LocalRulesClient.Delete

ctx := context.TODO()
id := localrules.NewLocalRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRuleStackValue", "localRuleValue")

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

Example Usage: LocalRulesClient.Get

ctx := context.TODO()
id := localrules.NewLocalRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRuleStackValue", "localRuleValue")

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: LocalRulesClient.GetCounters

ctx := context.TODO()
id := localrules.NewLocalRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRuleStackValue", "localRuleValue")

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

Example Usage: LocalRulesClient.ListByLocalRulestacks

ctx := context.TODO()
id := localrules.NewLocalRuleStackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRuleStackValue")

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

Example Usage: LocalRulesClient.RefreshCounters

ctx := context.TODO()
id := localrules.NewLocalRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRuleStackValue", "localRuleValue")

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

Example Usage: LocalRulesClient.ResetCounters

ctx := context.TODO()
id := localrules.NewLocalRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRuleStackValue", "localRuleValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForActionEnum

func PossibleValuesForActionEnum() []string

func PossibleValuesForBooleanEnum

func PossibleValuesForBooleanEnum() []string

func PossibleValuesForDecryptionRuleTypeEnum

func PossibleValuesForDecryptionRuleTypeEnum() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForStateEnum

func PossibleValuesForStateEnum() []string

func ValidateLocalRuleID

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

ValidateLocalRuleID checks that 'input' can be parsed as a Local Rule ID

func ValidateLocalRuleStackID

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

ValidateLocalRuleStackID checks that 'input' can be parsed as a Local Rule Stack ID

Types

type ActionEnum

type ActionEnum string
const (
	ActionEnumAllow           ActionEnum = "Allow"
	ActionEnumDenyResetBoth   ActionEnum = "DenyResetBoth"
	ActionEnumDenyResetServer ActionEnum = "DenyResetServer"
	ActionEnumDenySilent      ActionEnum = "DenySilent"
)

func (*ActionEnum) UnmarshalJSON

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

type AppSeenData

type AppSeenData struct {
	AppSeenList []AppSeenInfo `json:"appSeenList"`
	Count       int64         `json:"count"`
}

type AppSeenInfo

type AppSeenInfo struct {
	Category      string `json:"category"`
	Risk          string `json:"risk"`
	StandardPorts string `json:"standardPorts"`
	SubCategory   string `json:"subCategory"`
	Tag           string `json:"tag"`
	Technology    string `json:"technology"`
	Title         string `json:"title"`
}

type BooleanEnum

type BooleanEnum string
const (
	BooleanEnumFALSE BooleanEnum = "FALSE"
	BooleanEnumTRUE  BooleanEnum = "TRUE"
)

func (*BooleanEnum) UnmarshalJSON

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

type Category

type Category struct {
	Feeds     []string `json:"feeds"`
	UrlCustom []string `json:"urlCustom"`
}

type CreateOrUpdateOperationResponse

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

type DecryptionRuleTypeEnum

type DecryptionRuleTypeEnum string
const (
	DecryptionRuleTypeEnumNone                  DecryptionRuleTypeEnum = "None"
	DecryptionRuleTypeEnumSSLInboundInspection  DecryptionRuleTypeEnum = "SSLInboundInspection"
	DecryptionRuleTypeEnumSSLOutboundInspection DecryptionRuleTypeEnum = "SSLOutboundInspection"
)

func (*DecryptionRuleTypeEnum) UnmarshalJSON

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

type DeleteOperationResponse

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

type DestinationAddr

type DestinationAddr struct {
	Cidrs       *[]string `json:"cidrs,omitempty"`
	Countries   *[]string `json:"countries,omitempty"`
	Feeds       *[]string `json:"feeds,omitempty"`
	FqdnLists   *[]string `json:"fqdnLists,omitempty"`
	PrefixLists *[]string `json:"prefixLists,omitempty"`
}

type GetCountersOperationOptions

type GetCountersOperationOptions struct {
	FirewallName *string
}

func DefaultGetCountersOperationOptions

func DefaultGetCountersOperationOptions() GetCountersOperationOptions

func (GetCountersOperationOptions) ToHeaders

func (GetCountersOperationOptions) ToOData

func (GetCountersOperationOptions) ToQuery

type GetCountersOperationResponse

type GetCountersOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *RuleCounter
}

type GetOperationResponse

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

type ListByLocalRulestacksCompleteResult

type ListByLocalRulestacksCompleteResult struct {
	Items []LocalRulesResource
}

type ListByLocalRulestacksOperationResponse

type ListByLocalRulestacksOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LocalRulesResource
}

type LocalRuleId

type LocalRuleId struct {
	SubscriptionId     string
	ResourceGroupName  string
	LocalRuleStackName string
	LocalRuleName      string
}

LocalRuleId is a struct representing the Resource ID for a Local Rule

func NewLocalRuleID

func NewLocalRuleID(subscriptionId string, resourceGroupName string, localRuleStackName string, localRuleName string) LocalRuleId

NewLocalRuleID returns a new LocalRuleId struct

func ParseLocalRuleID

func ParseLocalRuleID(input string) (*LocalRuleId, error)

ParseLocalRuleID parses 'input' into a LocalRuleId

func ParseLocalRuleIDInsensitively

func ParseLocalRuleIDInsensitively(input string) (*LocalRuleId, error)

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

func (LocalRuleId) ID

func (id LocalRuleId) ID() string

ID returns the formatted Local Rule ID

func (LocalRuleId) Segments

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

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

func (LocalRuleId) String

func (id LocalRuleId) String() string

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

type LocalRuleStackId

type LocalRuleStackId struct {
	SubscriptionId     string
	ResourceGroupName  string
	LocalRuleStackName string
}

LocalRuleStackId is a struct representing the Resource ID for a Local Rule Stack

func NewLocalRuleStackID

func NewLocalRuleStackID(subscriptionId string, resourceGroupName string, localRuleStackName string) LocalRuleStackId

NewLocalRuleStackID returns a new LocalRuleStackId struct

func ParseLocalRuleStackID

func ParseLocalRuleStackID(input string) (*LocalRuleStackId, error)

ParseLocalRuleStackID parses 'input' into a LocalRuleStackId

func ParseLocalRuleStackIDInsensitively

func ParseLocalRuleStackIDInsensitively(input string) (*LocalRuleStackId, error)

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

func (LocalRuleStackId) ID

func (id LocalRuleStackId) ID() string

ID returns the formatted Local Rule Stack ID

func (LocalRuleStackId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Local Rule Stack ID

func (LocalRuleStackId) String

func (id LocalRuleStackId) String() string

String returns a human-readable description of this Local Rule Stack ID

type LocalRulesClient

type LocalRulesClient struct {
	Client *resourcemanager.Client
}

func NewLocalRulesClientWithBaseURI

func NewLocalRulesClientWithBaseURI(api environments.Api) (*LocalRulesClient, error)

func (LocalRulesClient) CreateOrUpdate

CreateOrUpdate ...

func (LocalRulesClient) CreateOrUpdateThenPoll

func (c LocalRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id LocalRuleId, input LocalRulesResource) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (LocalRulesClient) Delete

func (c LocalRulesClient) Delete(ctx context.Context, id LocalRuleId) (result DeleteOperationResponse, err error)

Delete ...

func (LocalRulesClient) DeleteThenPoll

func (c LocalRulesClient) DeleteThenPoll(ctx context.Context, id LocalRuleId) error

DeleteThenPoll performs Delete then polls until it's completed

func (LocalRulesClient) Get

Get ...

func (LocalRulesClient) GetCounters

GetCounters ...

func (LocalRulesClient) ListByLocalRulestacks

func (c LocalRulesClient) ListByLocalRulestacks(ctx context.Context, id LocalRuleStackId) (result ListByLocalRulestacksOperationResponse, err error)

ListByLocalRulestacks ...

func (LocalRulesClient) ListByLocalRulestacksComplete

func (c LocalRulesClient) ListByLocalRulestacksComplete(ctx context.Context, id LocalRuleStackId) (ListByLocalRulestacksCompleteResult, error)

ListByLocalRulestacksComplete retrieves all the results into a single object

func (LocalRulesClient) ListByLocalRulestacksCompleteMatchingPredicate

func (c LocalRulesClient) ListByLocalRulestacksCompleteMatchingPredicate(ctx context.Context, id LocalRuleStackId, predicate LocalRulesResourceOperationPredicate) (result ListByLocalRulestacksCompleteResult, err error)

ListByLocalRulestacksCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (LocalRulesClient) RefreshCounters

RefreshCounters ...

func (LocalRulesClient) ResetCounters

ResetCounters ...

type LocalRulesResource

type LocalRulesResource struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties RuleEntry              `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type LocalRulesResourceOperationPredicate

type LocalRulesResourceOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (LocalRulesResourceOperationPredicate) Matches

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreating     ProvisioningState = "Creating"
	ProvisioningStateDeleted      ProvisioningState = "Deleted"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateNotSpecified ProvisioningState = "NotSpecified"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type RefreshCountersOperationOptions

type RefreshCountersOperationOptions struct {
	FirewallName *string
}

func DefaultRefreshCountersOperationOptions

func DefaultRefreshCountersOperationOptions() RefreshCountersOperationOptions

func (RefreshCountersOperationOptions) ToHeaders

func (RefreshCountersOperationOptions) ToOData

func (RefreshCountersOperationOptions) ToQuery

type RefreshCountersOperationResponse

type RefreshCountersOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type ResetCountersOperationOptions

type ResetCountersOperationOptions struct {
	FirewallName *string
}

func DefaultResetCountersOperationOptions

func DefaultResetCountersOperationOptions() ResetCountersOperationOptions

func (ResetCountersOperationOptions) ToHeaders

func (ResetCountersOperationOptions) ToOData

func (ResetCountersOperationOptions) ToQuery

type ResetCountersOperationResponse

type ResetCountersOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *RuleCounterReset
}

type RuleCounter

type RuleCounter struct {
	AppSeen              *AppSeenData `json:"appSeen,omitempty"`
	FirewallName         *string      `json:"firewallName,omitempty"`
	HitCount             *int64       `json:"hitCount,omitempty"`
	LastUpdatedTimestamp *string      `json:"lastUpdatedTimestamp,omitempty"`
	Priority             string       `json:"priority"`
	RequestTimestamp     *string      `json:"requestTimestamp,omitempty"`
	RuleListName         *string      `json:"ruleListName,omitempty"`
	RuleName             string       `json:"ruleName"`
	RuleStackName        *string      `json:"ruleStackName,omitempty"`
	Timestamp            *string      `json:"timestamp,omitempty"`
}

func (*RuleCounter) GetLastUpdatedTimestampAsTime

func (o *RuleCounter) GetLastUpdatedTimestampAsTime() (*time.Time, error)

func (*RuleCounter) GetRequestTimestampAsTime

func (o *RuleCounter) GetRequestTimestampAsTime() (*time.Time, error)

func (*RuleCounter) GetTimestampAsTime

func (o *RuleCounter) GetTimestampAsTime() (*time.Time, error)

func (*RuleCounter) SetLastUpdatedTimestampAsTime

func (o *RuleCounter) SetLastUpdatedTimestampAsTime(input time.Time)

func (*RuleCounter) SetRequestTimestampAsTime

func (o *RuleCounter) SetRequestTimestampAsTime(input time.Time)

func (*RuleCounter) SetTimestampAsTime

func (o *RuleCounter) SetTimestampAsTime(input time.Time)

type RuleCounterReset

type RuleCounterReset struct {
	FirewallName  *string `json:"firewallName,omitempty"`
	Priority      *string `json:"priority,omitempty"`
	RuleListName  *string `json:"ruleListName,omitempty"`
	RuleName      *string `json:"ruleName,omitempty"`
	RuleStackName *string `json:"ruleStackName,omitempty"`
}

type RuleEntry

type RuleEntry struct {
	ActionType                   *ActionEnum             `json:"actionType,omitempty"`
	Applications                 *[]string               `json:"applications,omitempty"`
	AuditComment                 *string                 `json:"auditComment,omitempty"`
	Category                     *Category               `json:"category,omitempty"`
	DecryptionRuleType           *DecryptionRuleTypeEnum `json:"decryptionRuleType,omitempty"`
	Description                  *string                 `json:"description,omitempty"`
	Destination                  *DestinationAddr        `json:"destination,omitempty"`
	EnableLogging                *StateEnum              `json:"enableLogging,omitempty"`
	Etag                         *string                 `json:"etag,omitempty"`
	InboundInspectionCertificate *string                 `json:"inboundInspectionCertificate,omitempty"`
	NegateDestination            *BooleanEnum            `json:"negateDestination,omitempty"`
	NegateSource                 *BooleanEnum            `json:"negateSource,omitempty"`
	Priority                     *int64                  `json:"priority,omitempty"`
	Protocol                     *string                 `json:"protocol,omitempty"`
	ProtocolPortList             *[]string               `json:"protocolPortList,omitempty"`
	ProvisioningState            *ProvisioningState      `json:"provisioningState,omitempty"`
	RuleName                     string                  `json:"ruleName"`
	RuleState                    *StateEnum              `json:"ruleState,omitempty"`
	Source                       *SourceAddr             `json:"source,omitempty"`
	Tags                         *[]TagInfo              `json:"tags,omitempty"`
}

type SourceAddr

type SourceAddr struct {
	Cidrs       *[]string `json:"cidrs,omitempty"`
	Countries   *[]string `json:"countries,omitempty"`
	Feeds       *[]string `json:"feeds,omitempty"`
	PrefixLists *[]string `json:"prefixLists,omitempty"`
}

type StateEnum

type StateEnum string
const (
	StateEnumDISABLED StateEnum = "DISABLED"
	StateEnumENABLED  StateEnum = "ENABLED"
)

func (*StateEnum) UnmarshalJSON

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

type TagInfo

type TagInfo struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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