securitypolicies

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: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-09-01/securitypolicies Documentation

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

Client Initialization

client := securitypolicies.NewSecurityPoliciesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SecurityPoliciesClient.Create

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

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


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

Example Usage: SecurityPoliciesClient.Delete

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

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

Example Usage: SecurityPoliciesClient.Get

ctx := context.TODO()
id := securitypolicies.NewSecurityPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "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: SecurityPoliciesClient.ListByProfile

ctx := context.TODO()
id := securitypolicies.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName")

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

Example Usage: SecurityPoliciesClient.Patch

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

payload := securitypolicies.SecurityPolicyUpdateParameters{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAfdProvisioningState

func PossibleValuesForAfdProvisioningState() []string

func PossibleValuesForDeploymentStatus

func PossibleValuesForDeploymentStatus() []string

func PossibleValuesForSecurityPolicyType

func PossibleValuesForSecurityPolicyType() []string

func ValidateProfileID

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

ValidateProfileID checks that 'input' can be parsed as a Profile ID

func ValidateSecurityPolicyID

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

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

Types

type ActivatedResourceReference

type ActivatedResourceReference struct {
	Id       *string `json:"id,omitempty"`
	IsActive *bool   `json:"isActive,omitempty"`
}

type AfdProvisioningState

type AfdProvisioningState string
const (
	AfdProvisioningStateCreating  AfdProvisioningState = "Creating"
	AfdProvisioningStateDeleting  AfdProvisioningState = "Deleting"
	AfdProvisioningStateFailed    AfdProvisioningState = "Failed"
	AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded"
	AfdProvisioningStateUpdating  AfdProvisioningState = "Updating"
)

func (*AfdProvisioningState) UnmarshalJSON

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

type BaseSecurityPolicyPropertiesParametersImpl

type BaseSecurityPolicyPropertiesParametersImpl struct {
	Type SecurityPolicyType `json:"type"`
}

func (BaseSecurityPolicyPropertiesParametersImpl) SecurityPolicyPropertiesParameters

type CreateOperationResponse

type CreateOperationResponse 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 DeploymentStatus

type DeploymentStatus string
const (
	DeploymentStatusFailed     DeploymentStatus = "Failed"
	DeploymentStatusInProgress DeploymentStatus = "InProgress"
	DeploymentStatusNotStarted DeploymentStatus = "NotStarted"
	DeploymentStatusSucceeded  DeploymentStatus = "Succeeded"
)

func (*DeploymentStatus) UnmarshalJSON

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

type GetOperationResponse

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

type ListByProfileCompleteResult

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

type ListByProfileCustomPager

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

type ListByProfileOperationResponse

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

type PatchOperationResponse

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

type ProfileId

type ProfileId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProfileName       string
}

ProfileId is a struct representing the Resource ID for a Profile

func NewProfileID

func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId

NewProfileID returns a new ProfileId struct

func ParseProfileID

func ParseProfileID(input string) (*ProfileId, error)

ParseProfileID parses 'input' into a ProfileId

func ParseProfileIDInsensitively

func ParseProfileIDInsensitively(input string) (*ProfileId, error)

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

func (*ProfileId) FromParseResult

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

func (ProfileId) ID

func (id ProfileId) ID() string

ID returns the formatted Profile ID

func (ProfileId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Profile ID

func (ProfileId) String

func (id ProfileId) String() string

String returns a human-readable description of this Profile ID

type RawSecurityPolicyPropertiesParametersImpl

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

RawSecurityPolicyPropertiesParametersImpl 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 (RawSecurityPolicyPropertiesParametersImpl) SecurityPolicyPropertiesParameters

type ResourceReference

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

type SecurityPoliciesClient

type SecurityPoliciesClient struct {
	Client *resourcemanager.Client
}

func NewSecurityPoliciesClientWithBaseURI

func NewSecurityPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityPoliciesClient, error)

func (SecurityPoliciesClient) Create

Create ...

func (SecurityPoliciesClient) CreateThenPoll

CreateThenPoll performs Create then polls until it's completed

func (SecurityPoliciesClient) Delete

Delete ...

func (SecurityPoliciesClient) DeleteThenPoll

func (c SecurityPoliciesClient) DeleteThenPoll(ctx context.Context, id SecurityPolicyId) error

DeleteThenPoll performs Delete then polls until it's completed

func (SecurityPoliciesClient) Get

Get ...

func (SecurityPoliciesClient) ListByProfile

ListByProfile ...

func (SecurityPoliciesClient) ListByProfileComplete

ListByProfileComplete retrieves all the results into a single object

func (SecurityPoliciesClient) ListByProfileCompleteMatchingPredicate

func (c SecurityPoliciesClient) ListByProfileCompleteMatchingPredicate(ctx context.Context, id ProfileId, predicate SecurityPolicyOperationPredicate) (result ListByProfileCompleteResult, err error)

ListByProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SecurityPoliciesClient) Patch

Patch ...

func (SecurityPoliciesClient) PatchThenPoll

PatchThenPoll performs Patch then polls until it's completed

type SecurityPolicy

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

type SecurityPolicyId

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

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

func NewSecurityPolicyID

func NewSecurityPolicyID(subscriptionId string, resourceGroupName string, profileName 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
	Name *string
	Type *string
}

func (SecurityPolicyOperationPredicate) Matches

type SecurityPolicyProperties

type SecurityPolicyProperties struct {
	DeploymentStatus  *DeploymentStatus                  `json:"deploymentStatus,omitempty"`
	Parameters        SecurityPolicyPropertiesParameters `json:"parameters"`
	ProfileName       *string                            `json:"profileName,omitempty"`
	ProvisioningState *AfdProvisioningState              `json:"provisioningState,omitempty"`
}

func (*SecurityPolicyProperties) UnmarshalJSON

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

type SecurityPolicyPropertiesParameters

type SecurityPolicyPropertiesParameters interface {
	SecurityPolicyPropertiesParameters() BaseSecurityPolicyPropertiesParametersImpl
}

func UnmarshalSecurityPolicyPropertiesParametersImplementation

func UnmarshalSecurityPolicyPropertiesParametersImplementation(input []byte) (SecurityPolicyPropertiesParameters, error)

type SecurityPolicyType

type SecurityPolicyType string
const (
	SecurityPolicyTypeWebApplicationFirewall SecurityPolicyType = "WebApplicationFirewall"
)

func (*SecurityPolicyType) UnmarshalJSON

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

type SecurityPolicyUpdateParameters

type SecurityPolicyUpdateParameters struct {
	Properties *SecurityPolicyUpdateProperties `json:"properties,omitempty"`
}

type SecurityPolicyUpdateProperties

type SecurityPolicyUpdateProperties struct {
	Parameters SecurityPolicyPropertiesParameters `json:"parameters"`
}

func (*SecurityPolicyUpdateProperties) UnmarshalJSON

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

type SecurityPolicyWebApplicationFirewallAssociation

type SecurityPolicyWebApplicationFirewallAssociation struct {
	Domains         *[]ActivatedResourceReference `json:"domains,omitempty"`
	PatternsToMatch *[]string                     `json:"patternsToMatch,omitempty"`
}

type SecurityPolicyWebApplicationFirewallParameters

type SecurityPolicyWebApplicationFirewallParameters struct {
	Associations *[]SecurityPolicyWebApplicationFirewallAssociation `json:"associations,omitempty"`
	WafPolicy    *ResourceReference                                 `json:"wafPolicy,omitempty"`

	Type SecurityPolicyType `json:"type"`
}

func (SecurityPolicyWebApplicationFirewallParameters) MarshalJSON

func (SecurityPolicyWebApplicationFirewallParameters) SecurityPolicyPropertiesParameters

Jump to

Keyboard shortcuts

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