README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/ddosprotectionplans
Documentation
The ddosprotectionplans
SDK allows for interaction with the Azure Resource Manager Service network
(API Version 2023-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-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 := commonids.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 := commonids.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 ¶
- func PossibleValuesForProvisioningState() []string
- func ValidateDdosProtectionPlanID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type DdosProtectionPlan
- type DdosProtectionPlanId
- type DdosProtectionPlanOperationPredicate
- type DdosProtectionPlanPropertiesFormat
- type DdosProtectionPlansClient
- func (c DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, id DdosProtectionPlanId, input DdosProtectionPlan) (result CreateOrUpdateOperationResponse, err error)
- func (c DdosProtectionPlansClient) CreateOrUpdateThenPoll(ctx context.Context, id DdosProtectionPlanId, input DdosProtectionPlan) error
- func (c DdosProtectionPlansClient) Delete(ctx context.Context, id DdosProtectionPlanId) (result DeleteOperationResponse, err error)
- func (c DdosProtectionPlansClient) DeleteThenPoll(ctx context.Context, id DdosProtectionPlanId) error
- func (c DdosProtectionPlansClient) Get(ctx context.Context, id DdosProtectionPlanId) (result GetOperationResponse, err error)
- func (c DdosProtectionPlansClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error)
- func (c DdosProtectionPlansClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
- func (c DdosProtectionPlansClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c DdosProtectionPlansClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupCompleteResult, err error)
- func (c DdosProtectionPlansClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
- func (c DdosProtectionPlansClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (result ListCompleteResult, err error)
- func (c DdosProtectionPlansClient) UpdateTags(ctx context.Context, id DdosProtectionPlanId, input TagsObject) (result UpdateTagsOperationResponse, err error)
- type DeleteOperationResponse
- type GetOperationResponse
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListCompleteResult
- type ListOperationResponse
- type ProvisioningState
- type SubResource
- type TagsObject
- type UpdateTagsOperationResponse
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 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 ¶
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 ¶
func (p DdosProtectionPlanOperationPredicate) Matches(input DdosProtectionPlan) bool
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 ¶
func (c DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, id DdosProtectionPlanId, input DdosProtectionPlan) (result CreateOrUpdateOperationResponse, err error)
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 ¶
func (c DdosProtectionPlansClient) Delete(ctx context.Context, id DdosProtectionPlanId) (result DeleteOperationResponse, err error)
Delete ...
func (DdosProtectionPlansClient) DeleteThenPoll ¶
func (c DdosProtectionPlansClient) DeleteThenPoll(ctx context.Context, id DdosProtectionPlanId) error
DeleteThenPoll performs Delete then polls until it's completed
func (DdosProtectionPlansClient) Get ¶
func (c DdosProtectionPlansClient) Get(ctx context.Context, id DdosProtectionPlanId) (result GetOperationResponse, err error)
Get ...
func (DdosProtectionPlansClient) List ¶
func (c DdosProtectionPlansClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error)
List ...
func (DdosProtectionPlansClient) ListByResourceGroup ¶
func (c DdosProtectionPlansClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (DdosProtectionPlansClient) ListByResourceGroupComplete ¶
func (c DdosProtectionPlansClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
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 ¶
func (c DdosProtectionPlansClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
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 ¶
func (c DdosProtectionPlansClient) UpdateTags(ctx context.Context, id DdosProtectionPlanId, input TagsObject) (result UpdateTagsOperationResponse, err error)
UpdateTags ...
type DeleteOperationResponse ¶
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *DdosProtectionPlan }
type ListByResourceGroupCompleteResult ¶
type ListByResourceGroupCompleteResult struct { LatestHttpResponse *http.Response Items []DdosProtectionPlan }
type ListByResourceGroupOperationResponse ¶
type ListByResourceGroupOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]DdosProtectionPlan }
type ListCompleteResult ¶
type ListCompleteResult struct { LatestHttpResponse *http.Response 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 UpdateTagsOperationResponse ¶
type UpdateTagsOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *DdosProtectionPlan }
Source Files ¶
- client.go
- constants.go
- id_ddosprotectionplan.go
- method_createorupdate.go
- method_delete.go
- method_get.go
- method_list.go
- method_listbyresourcegroup.go
- method_updatetags.go
- model_ddosprotectionplan.go
- model_ddosprotectionplanpropertiesformat.go
- model_subresource.go
- model_tagsobject.go
- predicates.go
- version.go