ipgroups

package
v0.20241104.1140654 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/ipgroups Documentation

The ipgroups SDK allows for interaction with Azure Resource Manager network (API Version 2023-11-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-11-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", "ipGroupName")

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", "ipGroupName")

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", "ipGroupName")

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", "ipGroupName")

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateIPGroupID

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

ValidateIPGroupID checks that 'input' can be parsed as a I P Group ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

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 GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *IPGroup
}

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

type IPGroupId struct {
	SubscriptionId    string
	ResourceGroupName string
	IpGroupName       string
}

IPGroupId is a struct representing the Resource ID for a I P Group

func NewIPGroupID

func NewIPGroupID(subscriptionId string, resourceGroupName string, ipGroupName string) IPGroupId

NewIPGroupID returns a new IPGroupId struct

func ParseIPGroupID

func ParseIPGroupID(input string) (*IPGroupId, error)

ParseIPGroupID parses 'input' into a IPGroupId

func ParseIPGroupIDInsensitively

func ParseIPGroupIDInsensitively(input string) (*IPGroupId, error)

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) ID

func (id IPGroupId) ID() string

ID returns the formatted I P Group ID

func (IPGroupId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this I P Group ID

func (IPGroupId) String

func (id IPGroupId) String() string

String returns a human-readable description of 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

Get ...

func (IPGroupsClient) List

List ...

func (IPGroupsClient) ListByResourceGroup

ListByResourceGroup ...

func (IPGroupsClient) ListByResourceGroupComplete

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

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 ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []IPGroup
}

type ListByResourceGroupCustomPager added in v0.20240628.1153531

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

type ListByResourceGroupOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []IPGroup
}

type ListCustomPager added in v0.20240628.1153531

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

type ListOperationResponse

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

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 UpdateGroupsOperationResponse

type UpdateGroupsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *IPGroup
}

Jump to

Keyboard shortcuts

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