ddosprotectionplans

package
v0.20231214.1143116 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/ddosprotectionplans Documentation

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

Client Initialization

client := ddosprotectionplans.NewDdosProtectionPlansClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DdosProtectionPlansClient.CreateOrUpdate

ctx := context.TODO()
id := ddosprotectionplans.NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue")

payload := ddosprotectionplans.DdosProtectionPlan{
	// ...
}


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

Example Usage: DdosProtectionPlansClient.Delete

ctx := context.TODO()
id := ddosprotectionplans.NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue")

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

Example Usage: DdosProtectionPlansClient.Get

ctx := context.TODO()
id := ddosprotectionplans.NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue")

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: DdosProtectionPlansClient.List

ctx := context.TODO()
id := ddosprotectionplans.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// 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: DdosProtectionPlansClient.ListByResourceGroup

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

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

Example Usage: DdosProtectionPlansClient.UpdateTags

ctx := context.TODO()
id := ddosprotectionplans.NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue")

payload := ddosprotectionplans.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 ValidateDdosProtectionPlanID

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

ValidateDdosProtectionPlanID checks that 'input' can be parsed as a Ddos Protection Plan ID

Types

type CreateOrUpdateOperationResponse

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

type DdosProtectionPlan

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

type DdosProtectionPlanId

type DdosProtectionPlanId struct {
	SubscriptionId         string
	ResourceGroupName      string
	DdosProtectionPlanName string
}

DdosProtectionPlanId is a struct representing the Resource ID for a Ddos Protection Plan

func NewDdosProtectionPlanID

func NewDdosProtectionPlanID(subscriptionId string, resourceGroupName string, ddosProtectionPlanName string) DdosProtectionPlanId

NewDdosProtectionPlanID returns a new DdosProtectionPlanId struct

func ParseDdosProtectionPlanID

func ParseDdosProtectionPlanID(input string) (*DdosProtectionPlanId, error)

ParseDdosProtectionPlanID parses 'input' into a DdosProtectionPlanId

func ParseDdosProtectionPlanIDInsensitively

func ParseDdosProtectionPlanIDInsensitively(input string) (*DdosProtectionPlanId, error)

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

func (*DdosProtectionPlanId) FromParseResult added in v0.20231127.1171502

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

func (DdosProtectionPlanId) ID

func (id DdosProtectionPlanId) ID() string

ID returns the formatted Ddos Protection Plan ID

func (DdosProtectionPlanId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Ddos Protection Plan ID

func (DdosProtectionPlanId) String

func (id DdosProtectionPlanId) String() string

String returns a human-readable description of this Ddos Protection Plan ID

type DdosProtectionPlanOperationPredicate

type DdosProtectionPlanOperationPredicate struct {
	Etag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (DdosProtectionPlanOperationPredicate) Matches

type DdosProtectionPlanPropertiesFormat

type DdosProtectionPlanPropertiesFormat struct {
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	PublicIPAddresses *[]SubResource     `json:"publicIPAddresses,omitempty"`
	ResourceGuid      *string            `json:"resourceGuid,omitempty"`
	VirtualNetworks   *[]SubResource     `json:"virtualNetworks,omitempty"`
}

type DdosProtectionPlansClient

type DdosProtectionPlansClient struct {
	Client *resourcemanager.Client
}

func NewDdosProtectionPlansClientWithBaseURI

func NewDdosProtectionPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*DdosProtectionPlansClient, error)

func (DdosProtectionPlansClient) CreateOrUpdate

CreateOrUpdate ...

func (DdosProtectionPlansClient) CreateOrUpdateThenPoll

func (c DdosProtectionPlansClient) CreateOrUpdateThenPoll(ctx context.Context, id DdosProtectionPlanId, input DdosProtectionPlan) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (DdosProtectionPlansClient) Delete

Delete ...

func (DdosProtectionPlansClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (DdosProtectionPlansClient) Get

Get ...

func (DdosProtectionPlansClient) List

List ...

func (DdosProtectionPlansClient) ListByResourceGroup

ListByResourceGroup ...

func (DdosProtectionPlansClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (DdosProtectionPlansClient) ListByResourceGroupCompleteMatchingPredicate

func (c DdosProtectionPlansClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DdosProtectionPlanOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DdosProtectionPlansClient) ListComplete

ListComplete retrieves all the results into a single object

func (DdosProtectionPlansClient) ListCompleteMatchingPredicate

func (c DdosProtectionPlansClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DdosProtectionPlanOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DdosProtectionPlansClient) UpdateTags

UpdateTags ...

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []DdosProtectionPlan
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DdosProtectionPlan
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []DdosProtectionPlan
}

type ListOperationResponse

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

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 SubResource

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

type TagsObject

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

type UpdateTagsOperationResponse

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

Jump to

Keyboard shortcuts

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