edgedevices

package
v0.20240819.1075239 Latest Latest
Warning

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

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

README

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

The edgedevices SDK allows for interaction with the Azure Resource Manager Service 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/edgedevices"

Client Initialization

client := edgedevices.NewEdgeDevicesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: EdgeDevicesClient.CreateOrUpdate

ctx := context.TODO()
id := edgedevices.NewScopedEdgeDeviceID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "edgeDeviceValue")

payload := edgedevices.EdgeDevice{
	// ...
}


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

Example Usage: EdgeDevicesClient.Delete

ctx := context.TODO()
id := edgedevices.NewScopedEdgeDeviceID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "edgeDeviceValue")

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

Example Usage: EdgeDevicesClient.Get

ctx := context.TODO()
id := edgedevices.NewScopedEdgeDeviceID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "edgeDeviceValue")

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

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-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: EdgeDevicesClient.Validate

ctx := context.TODO()
id := edgedevices.NewScopedEdgeDeviceID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "edgeDeviceValue")

payload := edgedevices.ValidateRequest{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateScopedEdgeDeviceID

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

ValidateScopedEdgeDeviceID checks that 'input' can be parsed as a Scoped Edge Device ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type DeviceConfiguration

type DeviceConfiguration struct {
	DeviceMetadata *string      `json:"deviceMetadata,omitempty"`
	NicDetails     *[]NicDetail `json:"nicDetails,omitempty"`
}

type EdgeDevice

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

type EdgeDeviceOperationPredicate

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

func (EdgeDeviceOperationPredicate) Matches

func (p EdgeDeviceOperationPredicate) Matches(input EdgeDevice) bool

type EdgeDeviceProperties

type EdgeDeviceProperties struct {
	DeviceConfiguration *DeviceConfiguration `json:"deviceConfiguration,omitempty"`
	ProvisioningState   *ProvisioningState   `json:"provisioningState,omitempty"`
}

type EdgeDevicesClient

type EdgeDevicesClient struct {
	Client *resourcemanager.Client
}

func NewEdgeDevicesClientWithBaseURI

func NewEdgeDevicesClientWithBaseURI(sdkApi sdkEnv.Api) (*EdgeDevicesClient, error)

func (EdgeDevicesClient) CreateOrUpdate

CreateOrUpdate ...

func (EdgeDevicesClient) CreateOrUpdateThenPoll

func (c EdgeDevicesClient) CreateOrUpdateThenPoll(ctx context.Context, id ScopedEdgeDeviceId, input EdgeDevice) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (EdgeDevicesClient) Delete

Delete ...

func (EdgeDevicesClient) DeleteThenPoll

func (c EdgeDevicesClient) DeleteThenPoll(ctx context.Context, id ScopedEdgeDeviceId) error

DeleteThenPoll performs Delete then polls until it's completed

func (EdgeDevicesClient) Get

Get ...

func (EdgeDevicesClient) List

List ...

func (EdgeDevicesClient) ListComplete

ListComplete retrieves all the results into a single object

func (EdgeDevicesClient) ListCompleteMatchingPredicate

func (c EdgeDevicesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate EdgeDeviceOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (EdgeDevicesClient) Validate

Validate ...

func (EdgeDevicesClient) ValidateThenPoll

func (c EdgeDevicesClient) ValidateThenPoll(ctx context.Context, id ScopedEdgeDeviceId, input ValidateRequest) error

ValidateThenPoll performs Validate then polls until it's completed

type GetOperationResponse

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

type ListCompleteResult

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

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

type NicDetail

type NicDetail struct {
	AdapterName          string    `json:"adapterName"`
	ComponentId          *string   `json:"componentId,omitempty"`
	DefaultGateway       *string   `json:"defaultGateway,omitempty"`
	DefaultIsolationId   *string   `json:"defaultIsolationId,omitempty"`
	DnsServers           *[]string `json:"dnsServers,omitempty"`
	DriverVersion        *string   `json:"driverVersion,omitempty"`
	IP4Address           *string   `json:"ip4Address,omitempty"`
	InterfaceDescription *string   `json:"interfaceDescription,omitempty"`
	SubnetMask           *string   `json:"subnetMask,omitempty"`
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateNotSpecified ProvisioningState = "NotSpecified"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type ScopedEdgeDeviceId

type ScopedEdgeDeviceId struct {
	ResourceUri    string
	EdgeDeviceName string
}

ScopedEdgeDeviceId is a struct representing the Resource ID for a Scoped Edge Device

func NewScopedEdgeDeviceID

func NewScopedEdgeDeviceID(resourceUri string, edgeDeviceName string) ScopedEdgeDeviceId

NewScopedEdgeDeviceID returns a new ScopedEdgeDeviceId struct

func ParseScopedEdgeDeviceID

func ParseScopedEdgeDeviceID(input string) (*ScopedEdgeDeviceId, error)

ParseScopedEdgeDeviceID parses 'input' into a ScopedEdgeDeviceId

func ParseScopedEdgeDeviceIDInsensitively

func ParseScopedEdgeDeviceIDInsensitively(input string) (*ScopedEdgeDeviceId, error)

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

func (*ScopedEdgeDeviceId) FromParseResult

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

func (ScopedEdgeDeviceId) ID

func (id ScopedEdgeDeviceId) ID() string

ID returns the formatted Scoped Edge Device ID

func (ScopedEdgeDeviceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scoped Edge Device ID

func (ScopedEdgeDeviceId) String

func (id ScopedEdgeDeviceId) String() string

String returns a human-readable description of this Scoped Edge Device ID

type ValidateOperationResponse

type ValidateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ValidateResponse
}

type ValidateRequest

type ValidateRequest struct {
	AdditionalInfo *string  `json:"additionalInfo,omitempty"`
	EdgeDeviceIds  []string `json:"edgeDeviceIds"`
}

type ValidateResponse

type ValidateResponse struct {
	Status *string `json:"status,omitempty"`
}

Jump to

Keyboard shortcuts

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