securitypoliciesinterface

package
v0.20250310.1130319 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2025-01-01/securitypoliciesinterface Documentation

The securitypoliciesinterface SDK allows for interaction with Azure Resource Manager servicenetworking (API Version 2025-01-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/servicenetworking/2025-01-01/securitypoliciesinterface"

Client Initialization

client := securitypoliciesinterface.NewSecurityPoliciesInterfaceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SecurityPoliciesInterfaceClient.CreateOrUpdate

ctx := context.TODO()
id := securitypoliciesinterface.NewSecurityPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "trafficControllerName", "securityPolicyName")

payload := securitypoliciesinterface.SecurityPolicy{
	// ...
}


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

Example Usage: SecurityPoliciesInterfaceClient.Delete

ctx := context.TODO()
id := securitypoliciesinterface.NewSecurityPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "trafficControllerName", "securityPolicyName")

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

Example Usage: SecurityPoliciesInterfaceClient.Get

ctx := context.TODO()
id := securitypoliciesinterface.NewSecurityPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "trafficControllerName", "securityPolicyName")

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: SecurityPoliciesInterfaceClient.ListByTrafficController

ctx := context.TODO()
id := securitypoliciesinterface.NewTrafficControllerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "trafficControllerName")

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

Example Usage: SecurityPoliciesInterfaceClient.Update

ctx := context.TODO()
id := securitypoliciesinterface.NewSecurityPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "trafficControllerName", "securityPolicyName")

payload := securitypoliciesinterface.SecurityPolicyUpdate{
	// ...
}


read, err := client.Update(ctx, id, payload)
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 PossibleValuesForPolicyType

func PossibleValuesForPolicyType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateSecurityPolicyID

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

ValidateSecurityPolicyID checks that 'input' can be parsed as a Security Policy ID

func ValidateTrafficControllerID

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

ValidateTrafficControllerID checks that 'input' can be parsed as a Traffic Controller ID

Types

type CreateOrUpdateOperationResponse

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

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        *SecurityPolicy
}

type ListByTrafficControllerCompleteResult

type ListByTrafficControllerCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SecurityPolicy
}

type ListByTrafficControllerCustomPager

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

type ListByTrafficControllerOperationResponse

type ListByTrafficControllerOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SecurityPolicy
}

type PolicyType

type PolicyType string
const (
	PolicyTypeWaf PolicyType = "waf"
)

func (*PolicyType) UnmarshalJSON

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type SecurityPoliciesInterfaceClient

type SecurityPoliciesInterfaceClient struct {
	Client *resourcemanager.Client
}

func NewSecurityPoliciesInterfaceClientWithBaseURI

func NewSecurityPoliciesInterfaceClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityPoliciesInterfaceClient, error)

func (SecurityPoliciesInterfaceClient) CreateOrUpdate

CreateOrUpdate ...

func (SecurityPoliciesInterfaceClient) CreateOrUpdateThenPoll

func (c SecurityPoliciesInterfaceClient) CreateOrUpdateThenPoll(ctx context.Context, id SecurityPolicyId, input SecurityPolicy) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (SecurityPoliciesInterfaceClient) Delete

Delete ...

func (SecurityPoliciesInterfaceClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (SecurityPoliciesInterfaceClient) Get

Get ...

func (SecurityPoliciesInterfaceClient) ListByTrafficController

ListByTrafficController ...

func (SecurityPoliciesInterfaceClient) ListByTrafficControllerComplete

ListByTrafficControllerComplete retrieves all the results into a single object

func (SecurityPoliciesInterfaceClient) ListByTrafficControllerCompleteMatchingPredicate

func (c SecurityPoliciesInterfaceClient) ListByTrafficControllerCompleteMatchingPredicate(ctx context.Context, id TrafficControllerId, predicate SecurityPolicyOperationPredicate) (result ListByTrafficControllerCompleteResult, err error)

ListByTrafficControllerCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SecurityPoliciesInterfaceClient) Update

Update ...

type SecurityPolicy

type SecurityPolicy struct {
	Id         *string                   `json:"id,omitempty"`
	Location   string                    `json:"location"`
	Name       *string                   `json:"name,omitempty"`
	Properties *SecurityPolicyProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData    `json:"systemData,omitempty"`
	Tags       *map[string]string        `json:"tags,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type SecurityPolicyId

type SecurityPolicyId struct {
	SubscriptionId        string
	ResourceGroupName     string
	TrafficControllerName string
	SecurityPolicyName    string
}

SecurityPolicyId is a struct representing the Resource ID for a Security Policy

func NewSecurityPolicyID

func NewSecurityPolicyID(subscriptionId string, resourceGroupName string, trafficControllerName string, securityPolicyName string) SecurityPolicyId

NewSecurityPolicyID returns a new SecurityPolicyId struct

func ParseSecurityPolicyID

func ParseSecurityPolicyID(input string) (*SecurityPolicyId, error)

ParseSecurityPolicyID parses 'input' into a SecurityPolicyId

func ParseSecurityPolicyIDInsensitively

func ParseSecurityPolicyIDInsensitively(input string) (*SecurityPolicyId, error)

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

func (*SecurityPolicyId) FromParseResult

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

func (SecurityPolicyId) ID

func (id SecurityPolicyId) ID() string

ID returns the formatted Security Policy ID

func (SecurityPolicyId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Security Policy ID

func (SecurityPolicyId) String

func (id SecurityPolicyId) String() string

String returns a human-readable description of this Security Policy ID

type SecurityPolicyOperationPredicate

type SecurityPolicyOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (SecurityPolicyOperationPredicate) Matches

type SecurityPolicyProperties

type SecurityPolicyProperties struct {
	PolicyType        *PolicyType        `json:"policyType,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	WafPolicy         *WafPolicy         `json:"wafPolicy,omitempty"`
}

type SecurityPolicyUpdate

type SecurityPolicyUpdate struct {
	Properties *SecurityPolicyUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string              `json:"tags,omitempty"`
}

type SecurityPolicyUpdateProperties

type SecurityPolicyUpdateProperties struct {
	WafPolicy *WafPolicyUpdate `json:"wafPolicy,omitempty"`
}

type TrafficControllerId

type TrafficControllerId struct {
	SubscriptionId        string
	ResourceGroupName     string
	TrafficControllerName string
}

TrafficControllerId is a struct representing the Resource ID for a Traffic Controller

func NewTrafficControllerID

func NewTrafficControllerID(subscriptionId string, resourceGroupName string, trafficControllerName string) TrafficControllerId

NewTrafficControllerID returns a new TrafficControllerId struct

func ParseTrafficControllerID

func ParseTrafficControllerID(input string) (*TrafficControllerId, error)

ParseTrafficControllerID parses 'input' into a TrafficControllerId

func ParseTrafficControllerIDInsensitively

func ParseTrafficControllerIDInsensitively(input string) (*TrafficControllerId, error)

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

func (*TrafficControllerId) FromParseResult

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

func (TrafficControllerId) ID

func (id TrafficControllerId) ID() string

ID returns the formatted Traffic Controller ID

func (TrafficControllerId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Traffic Controller ID

func (TrafficControllerId) String

func (id TrafficControllerId) String() string

String returns a human-readable description of this Traffic Controller ID

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SecurityPolicy
}

type WafPolicy

type WafPolicy struct {
	Id string `json:"id"`
}

type WafPolicyUpdate

type WafPolicyUpdate struct {
	Id *string `json:"id,omitempty"`
}

Jump to

Keyboard shortcuts

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