ipampools

package
v0.20241212.1154051 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-05-01/ipampools Documentation

The ipampools SDK allows for interaction with Azure Resource Manager network (API Version 2024-05-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/2024-05-01/ipampools"

Client Initialization

client := ipampools.NewIPamPoolsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: IPamPoolsClient.Create

ctx := context.TODO()
id := ipampools.NewIPamPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "ipamPoolName")

payload := ipampools.IPamPool{
	// ...
}


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

Example Usage: IPamPoolsClient.Delete

ctx := context.TODO()
id := ipampools.NewIPamPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "ipamPoolName")

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

Example Usage: IPamPoolsClient.Get

ctx := context.TODO()
id := ipampools.NewIPamPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "ipamPoolName")

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: IPamPoolsClient.GetPoolUsage

ctx := context.TODO()
id := ipampools.NewIPamPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "ipamPoolName")

read, err := client.GetPoolUsage(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: IPamPoolsClient.List

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

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

Example Usage: IPamPoolsClient.ListAssociatedResources

ctx := context.TODO()
id := ipampools.NewIPamPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "ipamPoolName")

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

Example Usage: IPamPoolsClient.Update

ctx := context.TODO()
id := ipampools.NewIPamPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "ipamPoolName")

payload := ipampools.IPamPoolUpdate{
	// ...
}


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

func PossibleValuesForIPType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateIPamPoolID

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

ValidateIPamPoolID checks that 'input' can be parsed as a I Pam Pool ID

func ValidateNetworkManagerID

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

ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID

Types

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *IPamPool
}

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

type GetPoolUsageOperationResponse

type GetPoolUsageOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PoolUsage
}

type IPType

type IPType string
const (
	IPTypeIPvFour IPType = "IPv4"
	IPTypeIPvSix  IPType = "IPv6"
)

func (*IPType) UnmarshalJSON

func (s *IPType) UnmarshalJSON(bytes []byte) error

type IPamPool

type IPamPool struct {
	Id         *string                `json:"id,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties IPamPoolProperties     `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type IPamPoolId

type IPamPoolId struct {
	SubscriptionId     string
	ResourceGroupName  string
	NetworkManagerName string
	IpamPoolName       string
}

IPamPoolId is a struct representing the Resource ID for a I Pam Pool

func NewIPamPoolID

func NewIPamPoolID(subscriptionId string, resourceGroupName string, networkManagerName string, ipamPoolName string) IPamPoolId

NewIPamPoolID returns a new IPamPoolId struct

func ParseIPamPoolID

func ParseIPamPoolID(input string) (*IPamPoolId, error)

ParseIPamPoolID parses 'input' into a IPamPoolId

func ParseIPamPoolIDInsensitively

func ParseIPamPoolIDInsensitively(input string) (*IPamPoolId, error)

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

func (*IPamPoolId) FromParseResult

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

func (IPamPoolId) ID

func (id IPamPoolId) ID() string

ID returns the formatted I Pam Pool ID

func (IPamPoolId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this I Pam Pool ID

func (IPamPoolId) String

func (id IPamPoolId) String() string

String returns a human-readable description of this I Pam Pool ID

type IPamPoolOperationPredicate

type IPamPoolOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (IPamPoolOperationPredicate) Matches

func (p IPamPoolOperationPredicate) Matches(input IPamPool) bool

type IPamPoolProperties

type IPamPoolProperties struct {
	AddressPrefixes   []string           `json:"addressPrefixes"`
	Description       *string            `json:"description,omitempty"`
	DisplayName       *string            `json:"displayName,omitempty"`
	IPAddressType     *[]IPType          `json:"ipAddressType,omitempty"`
	ParentPoolName    *string            `json:"parentPoolName,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

type IPamPoolUpdate

type IPamPoolUpdate struct {
	Properties *IPamPoolUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string        `json:"tags,omitempty"`
}

type IPamPoolUpdateProperties

type IPamPoolUpdateProperties struct {
	Description *string `json:"description,omitempty"`
	DisplayName *string `json:"displayName,omitempty"`
}

type IPamPoolsClient

type IPamPoolsClient struct {
	Client *resourcemanager.Client
}

func NewIPamPoolsClientWithBaseURI

func NewIPamPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*IPamPoolsClient, error)

func (IPamPoolsClient) Create

func (c IPamPoolsClient) Create(ctx context.Context, id IPamPoolId, input IPamPool) (result CreateOperationResponse, err error)

Create ...

func (IPamPoolsClient) CreateThenPoll

func (c IPamPoolsClient) CreateThenPoll(ctx context.Context, id IPamPoolId, input IPamPool) error

CreateThenPoll performs Create then polls until it's completed

func (IPamPoolsClient) Delete

func (c IPamPoolsClient) Delete(ctx context.Context, id IPamPoolId) (result DeleteOperationResponse, err error)

Delete ...

func (IPamPoolsClient) DeleteThenPoll

func (c IPamPoolsClient) DeleteThenPoll(ctx context.Context, id IPamPoolId) error

DeleteThenPoll performs Delete then polls until it's completed

func (IPamPoolsClient) Get

func (c IPamPoolsClient) Get(ctx context.Context, id IPamPoolId) (result GetOperationResponse, err error)

Get ...

func (IPamPoolsClient) GetPoolUsage

func (c IPamPoolsClient) GetPoolUsage(ctx context.Context, id IPamPoolId) (result GetPoolUsageOperationResponse, err error)

GetPoolUsage ...

func (IPamPoolsClient) List

List ...

func (IPamPoolsClient) ListAssociatedResources

func (c IPamPoolsClient) ListAssociatedResources(ctx context.Context, id IPamPoolId) (result ListAssociatedResourcesOperationResponse, err error)

ListAssociatedResources ...

func (IPamPoolsClient) ListAssociatedResourcesComplete

func (c IPamPoolsClient) ListAssociatedResourcesComplete(ctx context.Context, id IPamPoolId) (ListAssociatedResourcesCompleteResult, error)

ListAssociatedResourcesComplete retrieves all the results into a single object

func (IPamPoolsClient) ListAssociatedResourcesCompleteMatchingPredicate

func (c IPamPoolsClient) ListAssociatedResourcesCompleteMatchingPredicate(ctx context.Context, id IPamPoolId, predicate PoolAssociationOperationPredicate) (result ListAssociatedResourcesCompleteResult, err error)

ListAssociatedResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (IPamPoolsClient) ListComplete

ListComplete retrieves all the results into a single object

func (IPamPoolsClient) ListCompleteMatchingPredicate

func (c IPamPoolsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkManagerId, options ListOperationOptions, predicate IPamPoolOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (IPamPoolsClient) Update

func (c IPamPoolsClient) Update(ctx context.Context, id IPamPoolId, input IPamPoolUpdate) (result UpdateOperationResponse, err error)

Update ...

type ListAssociatedResourcesCompleteResult

type ListAssociatedResourcesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []PoolAssociation
}

type ListAssociatedResourcesCustomPager

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

type ListAssociatedResourcesOperationResponse

type ListAssociatedResourcesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]PoolAssociation
}

type ListCompleteResult

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

type ListCustomPager

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

type ListOperationOptions

type ListOperationOptions struct {
	Skip      *int64
	SkipToken *string
	SortKey   *string
	SortValue *string
	Top       *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

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

type NetworkManagerId

type NetworkManagerId struct {
	SubscriptionId     string
	ResourceGroupName  string
	NetworkManagerName string
}

NetworkManagerId is a struct representing the Resource ID for a Network Manager

func NewNetworkManagerID

func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId

NewNetworkManagerID returns a new NetworkManagerId struct

func ParseNetworkManagerID

func ParseNetworkManagerID(input string) (*NetworkManagerId, error)

ParseNetworkManagerID parses 'input' into a NetworkManagerId

func ParseNetworkManagerIDInsensitively

func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error)

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

func (*NetworkManagerId) FromParseResult

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

func (NetworkManagerId) ID

func (id NetworkManagerId) ID() string

ID returns the formatted Network Manager ID

func (NetworkManagerId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Network Manager ID

func (NetworkManagerId) String

func (id NetworkManagerId) String() string

String returns a human-readable description of this Network Manager ID

type PoolAssociation

type PoolAssociation struct {
	AddressPrefixes             *[]string `json:"addressPrefixes,omitempty"`
	CreatedAt                   *string   `json:"createdAt,omitempty"`
	Description                 *string   `json:"description,omitempty"`
	NumberOfReservedIPAddresses *string   `json:"numberOfReservedIPAddresses,omitempty"`
	PoolId                      *string   `json:"poolId,omitempty"`
	ReservationExpiresAt        *string   `json:"reservationExpiresAt,omitempty"`
	ReservedPrefixes            *[]string `json:"reservedPrefixes,omitempty"`
	ResourceId                  string    `json:"resourceId"`
	TotalNumberOfIPAddresses    *string   `json:"totalNumberOfIPAddresses,omitempty"`
}

func (*PoolAssociation) GetCreatedAtAsTime

func (o *PoolAssociation) GetCreatedAtAsTime() (*time.Time, error)

func (*PoolAssociation) GetReservationExpiresAtAsTime

func (o *PoolAssociation) GetReservationExpiresAtAsTime() (*time.Time, error)

func (*PoolAssociation) SetCreatedAtAsTime

func (o *PoolAssociation) SetCreatedAtAsTime(input time.Time)

func (*PoolAssociation) SetReservationExpiresAtAsTime

func (o *PoolAssociation) SetReservationExpiresAtAsTime(input time.Time)

type PoolAssociationOperationPredicate

type PoolAssociationOperationPredicate struct {
	CreatedAt                   *string
	Description                 *string
	NumberOfReservedIPAddresses *string
	PoolId                      *string
	ReservationExpiresAt        *string
	ResourceId                  *string
	TotalNumberOfIPAddresses    *string
}

func (PoolAssociationOperationPredicate) Matches

type PoolUsage

type PoolUsage struct {
	AddressPrefixes              *[]string         `json:"addressPrefixes,omitempty"`
	AllocatedAddressPrefixes     *[]string         `json:"allocatedAddressPrefixes,omitempty"`
	AvailableAddressPrefixes     *[]string         `json:"availableAddressPrefixes,omitempty"`
	ChildPools                   *[]ResourceBasics `json:"childPools,omitempty"`
	NumberOfAllocatedIPAddresses *string           `json:"numberOfAllocatedIPAddresses,omitempty"`
	NumberOfAvailableIPAddresses *string           `json:"numberOfAvailableIPAddresses,omitempty"`
	NumberOfReservedIPAddresses  *string           `json:"numberOfReservedIPAddresses,omitempty"`
	ReservedAddressPrefixes      *[]string         `json:"reservedAddressPrefixes,omitempty"`
	TotalNumberOfIPAddresses     *string           `json:"totalNumberOfIPAddresses,omitempty"`
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type ResourceBasics

type ResourceBasics struct {
	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
	ResourceId      *string   `json:"resourceId,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *IPamPool
}

Jump to

Keyboard shortcuts

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