networkinterfaces

package
v0.20241126.2320 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces Documentation

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

Client Initialization

client := networkinterfaces.NewNetworkInterfacesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: NetworkInterfacesClient.CreateOrUpdate

ctx := context.TODO()
id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceName")

payload := networkinterfaces.NetworkInterfaces{
	// ...
}


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

Example Usage: NetworkInterfacesClient.Delete

ctx := context.TODO()
id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceName")

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

Example Usage: NetworkInterfacesClient.Get

ctx := context.TODO()
id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceName")

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

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

// 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: NetworkInterfacesClient.ListAll

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: NetworkInterfacesClient.Update

ctx := context.TODO()
id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceName")

payload := networkinterfaces.NetworkInterfacesUpdateRequest{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForExtendedLocationTypes

func PossibleValuesForExtendedLocationTypes() []string

func PossibleValuesForProvisioningStateEnum

func PossibleValuesForProvisioningStateEnum() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []string

func ValidateNetworkInterfaceID

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

ValidateNetworkInterfaceID checks that 'input' can be parsed as a Network Interface ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type ExtendedLocation

type ExtendedLocation struct {
	Name *string                `json:"name,omitempty"`
	Type *ExtendedLocationTypes `json:"type,omitempty"`
}

type ExtendedLocationTypes

type ExtendedLocationTypes string
const (
	ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation"
)

func (*ExtendedLocationTypes) UnmarshalJSON

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

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *NetworkInterfaces
}

type IPConfiguration

type IPConfiguration struct {
	Name       *string                    `json:"name,omitempty"`
	Properties *IPConfigurationProperties `json:"properties,omitempty"`
}

type IPConfigurationProperties

type IPConfigurationProperties struct {
	Gateway          *string                          `json:"gateway,omitempty"`
	PrefixLength     *string                          `json:"prefixLength,omitempty"`
	PrivateIPAddress *string                          `json:"privateIPAddress,omitempty"`
	Subnet           *IPConfigurationPropertiesSubnet `json:"subnet,omitempty"`
}

type IPConfigurationPropertiesSubnet

type IPConfigurationPropertiesSubnet struct {
	Id *string `json:"id,omitempty"`
}

type InterfaceDNSSettings

type InterfaceDNSSettings struct {
	DnsServers *[]string `json:"dnsServers,omitempty"`
}

type ListAllCompleteResult

type ListAllCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []NetworkInterfaces
}

type ListAllCustomPager

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

type ListAllOperationResponse

type ListAllOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]NetworkInterfaces
}

type ListCompleteResult

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

type ListCustomPager

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

type NetworkInterfaceId

type NetworkInterfaceId struct {
	SubscriptionId       string
	ResourceGroupName    string
	NetworkInterfaceName string
}

NetworkInterfaceId is a struct representing the Resource ID for a Network Interface

func NewNetworkInterfaceID

func NewNetworkInterfaceID(subscriptionId string, resourceGroupName string, networkInterfaceName string) NetworkInterfaceId

NewNetworkInterfaceID returns a new NetworkInterfaceId struct

func ParseNetworkInterfaceID

func ParseNetworkInterfaceID(input string) (*NetworkInterfaceId, error)

ParseNetworkInterfaceID parses 'input' into a NetworkInterfaceId

func ParseNetworkInterfaceIDInsensitively

func ParseNetworkInterfaceIDInsensitively(input string) (*NetworkInterfaceId, error)

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

func (*NetworkInterfaceId) FromParseResult

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

func (NetworkInterfaceId) ID

func (id NetworkInterfaceId) ID() string

ID returns the formatted Network Interface ID

func (NetworkInterfaceId) Segments

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

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

func (NetworkInterfaceId) String

func (id NetworkInterfaceId) String() string

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

type NetworkInterfaceProperties

type NetworkInterfaceProperties struct {
	DnsSettings       *InterfaceDNSSettings   `json:"dnsSettings,omitempty"`
	IPConfigurations  *[]IPConfiguration      `json:"ipConfigurations,omitempty"`
	MacAddress        *string                 `json:"macAddress,omitempty"`
	ProvisioningState *ProvisioningStateEnum  `json:"provisioningState,omitempty"`
	Status            *NetworkInterfaceStatus `json:"status,omitempty"`
}

type NetworkInterfaceStatus

type NetworkInterfaceStatus struct {
	ErrorCode          *string                                   `json:"errorCode,omitempty"`
	ErrorMessage       *string                                   `json:"errorMessage,omitempty"`
	ProvisioningStatus *NetworkInterfaceStatusProvisioningStatus `json:"provisioningStatus,omitempty"`
}

type NetworkInterfaceStatusProvisioningStatus

type NetworkInterfaceStatusProvisioningStatus struct {
	OperationId *string `json:"operationId,omitempty"`
	Status      *Status `json:"status,omitempty"`
}

type NetworkInterfaces

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

type NetworkInterfacesClient

type NetworkInterfacesClient struct {
	Client *resourcemanager.Client
}

func NewNetworkInterfacesClientWithBaseURI

func NewNetworkInterfacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkInterfacesClient, error)

func (NetworkInterfacesClient) CreateOrUpdate

CreateOrUpdate ...

func (NetworkInterfacesClient) CreateOrUpdateThenPoll

func (c NetworkInterfacesClient) CreateOrUpdateThenPoll(ctx context.Context, id NetworkInterfaceId, input NetworkInterfaces) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (NetworkInterfacesClient) Delete

Delete ...

func (NetworkInterfacesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (NetworkInterfacesClient) Get

Get ...

func (NetworkInterfacesClient) List

List ...

func (NetworkInterfacesClient) ListAll

ListAll ...

func (NetworkInterfacesClient) ListAllComplete

ListAllComplete retrieves all the results into a single object

func (NetworkInterfacesClient) ListAllCompleteMatchingPredicate

func (c NetworkInterfacesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetworkInterfacesOperationPredicate) (result ListAllCompleteResult, err error)

ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (NetworkInterfacesClient) ListComplete

ListComplete retrieves all the results into a single object

func (NetworkInterfacesClient) ListCompleteMatchingPredicate

func (c NetworkInterfacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NetworkInterfacesOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (NetworkInterfacesClient) Update

Update ...

func (NetworkInterfacesClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type NetworkInterfacesOperationPredicate

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

func (NetworkInterfacesOperationPredicate) Matches

type NetworkInterfacesUpdateRequest

type NetworkInterfacesUpdateRequest struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type ProvisioningStateEnum

type ProvisioningStateEnum string
const (
	ProvisioningStateEnumAccepted   ProvisioningStateEnum = "Accepted"
	ProvisioningStateEnumCanceled   ProvisioningStateEnum = "Canceled"
	ProvisioningStateEnumDeleting   ProvisioningStateEnum = "Deleting"
	ProvisioningStateEnumFailed     ProvisioningStateEnum = "Failed"
	ProvisioningStateEnumInProgress ProvisioningStateEnum = "InProgress"
	ProvisioningStateEnumSucceeded  ProvisioningStateEnum = "Succeeded"
)

func (*ProvisioningStateEnum) UnmarshalJSON

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

type Status

type Status string
const (
	StatusFailed     Status = "Failed"
	StatusInProgress Status = "InProgress"
	StatusSucceeded  Status = "Succeeded"
)

func (*Status) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *NetworkInterfaces
}

Jump to

Keyboard shortcuts

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