postrules

package
v0.20230804.1110546 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MPL-2.0 Imports: 14 Imported by: 1

README

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

The postrules 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/postrules"

Client Initialization

client := postrules.NewPostRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PostRulesClient.CreateOrUpdate

ctx := context.TODO()
id := postrules.NewPostRuleID("globalRulestackValue", "postRuleValue")

payload := postrules.PostRulesResource{
	// ...
}


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

Example Usage: PostRulesClient.Delete

ctx := context.TODO()
id := postrules.NewPostRuleID("globalRulestackValue", "postRuleValue")

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

Example Usage: PostRulesClient.Get

ctx := context.TODO()
id := postrules.NewPostRuleID("globalRulestackValue", "postRuleValue")

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

ctx := context.TODO()
id := postrules.NewPostRuleID("globalRulestackValue", "postRuleValue")

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

Example Usage: PostRulesClient.List

ctx := context.TODO()
id := postrules.NewGlobalRulestackID("globalRulestackValue")

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

Example Usage: PostRulesClient.RefreshCounters

ctx := context.TODO()
id := postrules.NewPostRuleID("globalRulestackValue", "postRuleValue")

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

Example Usage: PostRulesClient.ResetCounters

ctx := context.TODO()
id := postrules.NewPostRuleID("globalRulestackValue", "postRuleValue")

read, err := client.ResetCounters(ctx, id, postrules.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 ValidateGlobalRulestackID added in v0.20230720.1190320

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

ValidateGlobalRulestackID checks that 'input' can be parsed as a Global Rulestack ID

func ValidatePostRuleID

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

ValidatePostRuleID checks that 'input' can be parsed as a Post Rule 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        *PostRulesResource
}

type GlobalRulestackId added in v0.20230720.1190320

type GlobalRulestackId struct {
	GlobalRulestackName string
}

GlobalRulestackId is a struct representing the Resource ID for a Global Rulestack

func NewGlobalRulestackID added in v0.20230720.1190320

func NewGlobalRulestackID(globalRulestackName string) GlobalRulestackId

NewGlobalRulestackID returns a new GlobalRulestackId struct

func ParseGlobalRulestackID added in v0.20230720.1190320

func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error)

ParseGlobalRulestackID parses 'input' into a GlobalRulestackId

func ParseGlobalRulestackIDInsensitively added in v0.20230720.1190320

func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, error)

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

func (GlobalRulestackId) ID added in v0.20230720.1190320

func (id GlobalRulestackId) ID() string

ID returns the formatted Global Rulestack ID

func (GlobalRulestackId) Segments added in v0.20230720.1190320

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

Segments returns a slice of Resource ID Segments which comprise this Global Rulestack ID

func (GlobalRulestackId) String added in v0.20230720.1190320

func (id GlobalRulestackId) String() string

String returns a human-readable description of this Global Rulestack ID

type ListCompleteResult

type ListCompleteResult struct {
	Items []PostRulesResource
}

type ListOperationResponse

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

type PostRuleId

type PostRuleId struct {
	GlobalRulestackName string
	PostRuleName        string
}

PostRuleId is a struct representing the Resource ID for a Post Rule

func NewPostRuleID

func NewPostRuleID(globalRulestackName string, postRuleName string) PostRuleId

NewPostRuleID returns a new PostRuleId struct

func ParsePostRuleID

func ParsePostRuleID(input string) (*PostRuleId, error)

ParsePostRuleID parses 'input' into a PostRuleId

func ParsePostRuleIDInsensitively

func ParsePostRuleIDInsensitively(input string) (*PostRuleId, error)

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

func (PostRuleId) ID

func (id PostRuleId) ID() string

ID returns the formatted Post Rule ID

func (PostRuleId) Segments

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

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

func (PostRuleId) String

func (id PostRuleId) String() string

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

type PostRulesClient

type PostRulesClient struct {
	Client *resourcemanager.Client
}

func NewPostRulesClientWithBaseURI

func NewPostRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*PostRulesClient, error)

func (PostRulesClient) CreateOrUpdate

func (c PostRulesClient) CreateOrUpdate(ctx context.Context, id PostRuleId, input PostRulesResource) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (PostRulesClient) CreateOrUpdateThenPoll

func (c PostRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id PostRuleId, input PostRulesResource) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (PostRulesClient) Delete

func (c PostRulesClient) Delete(ctx context.Context, id PostRuleId) (result DeleteOperationResponse, err error)

Delete ...

func (PostRulesClient) DeleteThenPoll

func (c PostRulesClient) DeleteThenPoll(ctx context.Context, id PostRuleId) error

DeleteThenPoll performs Delete then polls until it's completed

func (PostRulesClient) Get

func (c PostRulesClient) Get(ctx context.Context, id PostRuleId) (result GetOperationResponse, err error)

Get ...

func (PostRulesClient) GetCounters

GetCounters ...

func (PostRulesClient) List

List ...

func (PostRulesClient) ListComplete

ListComplete retrieves all the results into a single object

func (PostRulesClient) ListCompleteMatchingPredicate

func (c PostRulesClient) ListCompleteMatchingPredicate(ctx context.Context, id GlobalRulestackId, predicate PostRulesResourceOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (PostRulesClient) RefreshCounters

RefreshCounters ...

func (PostRulesClient) ResetCounters

ResetCounters ...

type PostRulesResource

type PostRulesResource 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 PostRulesResourceOperationPredicate

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

func (PostRulesResourceOperationPredicate) 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