README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/ipgroups
Documentation
The ipgroups
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/ipgroups"
Client Initialization
client := ipgroups.NewIPGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: IPGroupsClient.CreateOrUpdate
ctx := context.TODO()
id := ipgroups.NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue")
payload := ipgroups.IPGroup{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: IPGroupsClient.Delete
ctx := context.TODO()
id := ipgroups.NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: IPGroupsClient.Get
ctx := context.TODO()
id := ipgroups.NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue")
read, err := client.Get(ctx, id, ipgroups.DefaultGetOperationOptions())
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: IPGroupsClient.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: IPGroupsClient.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: IPGroupsClient.UpdateGroups
ctx := context.TODO()
id := ipgroups.NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue")
payload := ipgroups.TagsObject{
// ...
}
read, err := client.UpdateGroups(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 ValidateIPGroupID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationOptions
- type GetOperationResponse
- type IPGroup
- type IPGroupId
- type IPGroupOperationPredicate
- type IPGroupPropertiesFormat
- type IPGroupsClient
- func (c IPGroupsClient) CreateOrUpdate(ctx context.Context, id IPGroupId, input IPGroup) (result CreateOrUpdateOperationResponse, err error)
- func (c IPGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id IPGroupId, input IPGroup) error
- func (c IPGroupsClient) Delete(ctx context.Context, id IPGroupId) (result DeleteOperationResponse, err error)
- func (c IPGroupsClient) DeleteThenPoll(ctx context.Context, id IPGroupId) error
- func (c IPGroupsClient) Get(ctx context.Context, id IPGroupId, options GetOperationOptions) (result GetOperationResponse, err error)
- func (c IPGroupsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error)
- func (c IPGroupsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
- func (c IPGroupsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c IPGroupsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupCompleteResult, err error)
- func (c IPGroupsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
- func (c IPGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (result ListCompleteResult, err error)
- func (c IPGroupsClient) UpdateGroups(ctx context.Context, id IPGroupId, input TagsObject) (result UpdateGroupsOperationResponse, err error)
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListCompleteResult
- type ListOperationResponse
- type ProvisioningState
- type SubResource
- type TagsObject
- type UpdateGroupsOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForProvisioningState ¶
func PossibleValuesForProvisioningState() []string
func ValidateIPGroupID ¶
ValidateIPGroupID checks that 'input' can be parsed as a I P Group ID
Types ¶
type DeleteOperationResponse ¶
type GetOperationOptions ¶
type GetOperationOptions struct {
Expand *string
}
func DefaultGetOperationOptions ¶
func DefaultGetOperationOptions() GetOperationOptions
func (GetOperationOptions) ToHeaders ¶
func (o GetOperationOptions) ToHeaders() *client.Headers
func (GetOperationOptions) ToOData ¶
func (o GetOperationOptions) ToOData() *odata.Query
func (GetOperationOptions) ToQuery ¶
func (o GetOperationOptions) ToQuery() *client.QueryParams
type GetOperationResponse ¶
type IPGroup ¶
type IPGroup struct { Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` Location *string `json:"location,omitempty"` Name *string `json:"name,omitempty"` Properties *IPGroupPropertiesFormat `json:"properties,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` }
type IPGroupId ¶
IPGroupId is a struct representing the Resource ID for a I P Group
func NewIPGroupID ¶
NewIPGroupID returns a new IPGroupId struct
func ParseIPGroupID ¶
ParseIPGroupID parses 'input' into a IPGroupId
func ParseIPGroupIDInsensitively ¶
ParseIPGroupIDInsensitively parses 'input' case-insensitively into a IPGroupId note: this method should only be used for API response data and not user input
func (*IPGroupId) FromParseResult ¶
func (id *IPGroupId) FromParseResult(input resourceids.ParseResult) error
func (IPGroupId) Segments ¶
func (id IPGroupId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this I P Group ID
type IPGroupOperationPredicate ¶
type IPGroupOperationPredicate struct { Etag *string Id *string Location *string Name *string Type *string }
func (IPGroupOperationPredicate) Matches ¶
func (p IPGroupOperationPredicate) Matches(input IPGroup) bool
type IPGroupPropertiesFormat ¶
type IPGroupPropertiesFormat struct { FirewallPolicies *[]SubResource `json:"firewallPolicies,omitempty"` Firewalls *[]SubResource `json:"firewalls,omitempty"` IPAddresses *[]string `json:"ipAddresses,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` }
type IPGroupsClient ¶
type IPGroupsClient struct {
Client *resourcemanager.Client
}
func NewIPGroupsClientWithBaseURI ¶
func NewIPGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*IPGroupsClient, error)
func (IPGroupsClient) CreateOrUpdate ¶
func (c IPGroupsClient) CreateOrUpdate(ctx context.Context, id IPGroupId, input IPGroup) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (IPGroupsClient) CreateOrUpdateThenPoll ¶
func (c IPGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id IPGroupId, input IPGroup) error
CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed
func (IPGroupsClient) Delete ¶
func (c IPGroupsClient) Delete(ctx context.Context, id IPGroupId) (result DeleteOperationResponse, err error)
Delete ...
func (IPGroupsClient) DeleteThenPoll ¶
func (c IPGroupsClient) DeleteThenPoll(ctx context.Context, id IPGroupId) error
DeleteThenPoll performs Delete then polls until it's completed
func (IPGroupsClient) Get ¶
func (c IPGroupsClient) Get(ctx context.Context, id IPGroupId, options GetOperationOptions) (result GetOperationResponse, err error)
Get ...
func (IPGroupsClient) List ¶
func (c IPGroupsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error)
List ...
func (IPGroupsClient) ListByResourceGroup ¶
func (c IPGroupsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (IPGroupsClient) ListByResourceGroupComplete ¶
func (c IPGroupsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
ListByResourceGroupComplete retrieves all the results into a single object
func (IPGroupsClient) ListByResourceGroupCompleteMatchingPredicate ¶
func (c IPGroupsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate IPGroupOperationPredicate) (result ListByResourceGroupCompleteResult, err error)
ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (IPGroupsClient) ListComplete ¶
func (c IPGroupsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
ListComplete retrieves all the results into a single object
func (IPGroupsClient) ListCompleteMatchingPredicate ¶
func (c IPGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate IPGroupOperationPredicate) (result ListCompleteResult, err error)
ListCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (IPGroupsClient) UpdateGroups ¶
func (c IPGroupsClient) UpdateGroups(ctx context.Context, id IPGroupId, input TagsObject) (result UpdateGroupsOperationResponse, err error)
UpdateGroups ...
type ListCompleteResult ¶
type ListOperationResponse ¶
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"`
}