ddoscustompolicies

package
v0.20240606.1065251 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/ddoscustompolicies Documentation

The ddoscustompolicies SDK allows for interaction with the Azure Resource Manager Service network (API Version 2022-07-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/2022-07-01/ddoscustompolicies"

Client Initialization

client := ddoscustompolicies.NewDdosCustomPoliciesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DdosCustomPoliciesClient.CreateOrUpdate

ctx := context.TODO()
id := ddoscustompolicies.NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue")

payload := ddoscustompolicies.DdosCustomPolicy{
	// ...
}


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

Example Usage: DdosCustomPoliciesClient.Delete

ctx := context.TODO()
id := ddoscustompolicies.NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue")

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

Example Usage: DdosCustomPoliciesClient.Get

ctx := context.TODO()
id := ddoscustompolicies.NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue")

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: DdosCustomPoliciesClient.UpdateTags

ctx := context.TODO()
id := ddoscustompolicies.NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue")

payload := ddoscustompolicies.TagsObject{
	// ...
}


read, err := client.UpdateTags(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 PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateDdosCustomPolicyID

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

ValidateDdosCustomPolicyID checks that 'input' can be parsed as a Ddos Custom Policy ID

Types

type CreateOrUpdateOperationResponse

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

type DdosCustomPoliciesClient

type DdosCustomPoliciesClient struct {
	Client *resourcemanager.Client
}

func NewDdosCustomPoliciesClientWithBaseURI

func NewDdosCustomPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*DdosCustomPoliciesClient, error)

func (DdosCustomPoliciesClient) CreateOrUpdate

CreateOrUpdate ...

func (DdosCustomPoliciesClient) CreateOrUpdateThenPoll

func (c DdosCustomPoliciesClient) CreateOrUpdateThenPoll(ctx context.Context, id DdosCustomPolicyId, input DdosCustomPolicy) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (DdosCustomPoliciesClient) Delete

Delete ...

func (DdosCustomPoliciesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (DdosCustomPoliciesClient) Get

Get ...

func (DdosCustomPoliciesClient) UpdateTags

UpdateTags ...

type DdosCustomPolicy

type DdosCustomPolicy struct {
	Etag       *string                           `json:"etag,omitempty"`
	Id         *string                           `json:"id,omitempty"`
	Location   *string                           `json:"location,omitempty"`
	Name       *string                           `json:"name,omitempty"`
	Properties *DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
	Tags       *map[string]string                `json:"tags,omitempty"`
	Type       *string                           `json:"type,omitempty"`
}

type DdosCustomPolicyId

type DdosCustomPolicyId struct {
	SubscriptionId       string
	ResourceGroupName    string
	DdosCustomPolicyName string
}

DdosCustomPolicyId is a struct representing the Resource ID for a Ddos Custom Policy

func NewDdosCustomPolicyID

func NewDdosCustomPolicyID(subscriptionId string, resourceGroupName string, ddosCustomPolicyName string) DdosCustomPolicyId

NewDdosCustomPolicyID returns a new DdosCustomPolicyId struct

func ParseDdosCustomPolicyID

func ParseDdosCustomPolicyID(input string) (*DdosCustomPolicyId, error)

ParseDdosCustomPolicyID parses 'input' into a DdosCustomPolicyId

func ParseDdosCustomPolicyIDInsensitively

func ParseDdosCustomPolicyIDInsensitively(input string) (*DdosCustomPolicyId, error)

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

func (*DdosCustomPolicyId) FromParseResult

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

func (DdosCustomPolicyId) ID

func (id DdosCustomPolicyId) ID() string

ID returns the formatted Ddos Custom Policy ID

func (DdosCustomPolicyId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Ddos Custom Policy ID

func (DdosCustomPolicyId) String

func (id DdosCustomPolicyId) String() string

String returns a human-readable description of this Ddos Custom Policy ID

type DdosCustomPolicyPropertiesFormat

type DdosCustomPolicyPropertiesFormat struct {
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	ResourceGuid      *string            `json:"resourceGuid,omitempty"`
}

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

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 TagsObject

type TagsObject struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type UpdateTagsOperationResponse

type UpdateTagsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DdosCustomPolicy
}

Jump to

Keyboard shortcuts

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