staticcidrs

package
v0.20241209.1115630 Latest Latest
Warning

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

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

README

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

The staticcidrs 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/staticcidrs"

Client Initialization

client := staticcidrs.NewStaticCidrsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: StaticCidrsClient.Create

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

payload := staticcidrs.StaticCidr{
	// ...
}


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

Example Usage: StaticCidrsClient.Delete

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

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

Example Usage: StaticCidrsClient.Get

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

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 ValidateStaticCidrID

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

ValidateStaticCidrID checks that 'input' can be parsed as a Static Cidr ID

Types

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *StaticCidr
}

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

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 ListCompleteResult

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

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        *[]StaticCidr
}

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 StaticCidr

type StaticCidr struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *StaticCidrProperties  `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type StaticCidrId

type StaticCidrId struct {
	SubscriptionId     string
	ResourceGroupName  string
	NetworkManagerName string
	IpamPoolName       string
	StaticCidrName     string
}

StaticCidrId is a struct representing the Resource ID for a Static Cidr

func NewStaticCidrID

func NewStaticCidrID(subscriptionId string, resourceGroupName string, networkManagerName string, ipamPoolName string, staticCidrName string) StaticCidrId

NewStaticCidrID returns a new StaticCidrId struct

func ParseStaticCidrID

func ParseStaticCidrID(input string) (*StaticCidrId, error)

ParseStaticCidrID parses 'input' into a StaticCidrId

func ParseStaticCidrIDInsensitively

func ParseStaticCidrIDInsensitively(input string) (*StaticCidrId, error)

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

func (*StaticCidrId) FromParseResult

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

func (StaticCidrId) ID

func (id StaticCidrId) ID() string

ID returns the formatted Static Cidr ID

func (StaticCidrId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Static Cidr ID

func (StaticCidrId) String

func (id StaticCidrId) String() string

String returns a human-readable description of this Static Cidr ID

type StaticCidrOperationPredicate

type StaticCidrOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (StaticCidrOperationPredicate) Matches

func (p StaticCidrOperationPredicate) Matches(input StaticCidr) bool

type StaticCidrProperties

type StaticCidrProperties struct {
	AddressPrefixes               *[]string          `json:"addressPrefixes,omitempty"`
	Description                   *string            `json:"description,omitempty"`
	NumberOfIPAddressesToAllocate *string            `json:"numberOfIPAddressesToAllocate,omitempty"`
	ProvisioningState             *ProvisioningState `json:"provisioningState,omitempty"`
	TotalNumberOfIPAddresses      *string            `json:"totalNumberOfIPAddresses,omitempty"`
}

type StaticCidrsClient

type StaticCidrsClient struct {
	Client *resourcemanager.Client
}

func NewStaticCidrsClientWithBaseURI

func NewStaticCidrsClientWithBaseURI(sdkApi sdkEnv.Api) (*StaticCidrsClient, error)

func (StaticCidrsClient) Create

func (c StaticCidrsClient) Create(ctx context.Context, id StaticCidrId, input StaticCidr) (result CreateOperationResponse, err error)

Create ...

func (StaticCidrsClient) Delete

Delete ...

func (StaticCidrsClient) DeleteThenPoll

func (c StaticCidrsClient) DeleteThenPoll(ctx context.Context, id StaticCidrId) error

DeleteThenPoll performs Delete then polls until it's completed

func (StaticCidrsClient) Get

Get ...

func (StaticCidrsClient) List

List ...

func (StaticCidrsClient) ListComplete

ListComplete retrieves all the results into a single object

func (StaticCidrsClient) ListCompleteMatchingPredicate

func (c StaticCidrsClient) ListCompleteMatchingPredicate(ctx context.Context, id IPamPoolId, options ListOperationOptions, predicate StaticCidrOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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