machines

package
v0.20240606.1065251 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/machines Documentation

The machines SDK allows for interaction with the Azure Resource Manager Service containerservice (API Version 2023-09-02-preview).

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/containerservice/2023-09-02-preview/machines"

Client Initialization

client := machines.NewMachinesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MachinesClient.Get

ctx := context.TODO()
id := machines.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue", "machineValue")

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

ctx := context.TODO()
id := machines.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue")

// 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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForIPFamily

func PossibleValuesForIPFamily() []string

func ValidateAgentPoolID

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

ValidateAgentPoolID checks that 'input' can be parsed as a Agent Pool ID

func ValidateMachineID

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

ValidateMachineID checks that 'input' can be parsed as a Machine ID

Types

type AgentPoolId

type AgentPoolId struct {
	SubscriptionId     string
	ResourceGroupName  string
	ManagedClusterName string
	AgentPoolName      string
}

AgentPoolId is a struct representing the Resource ID for a Agent Pool

func NewAgentPoolID

func NewAgentPoolID(subscriptionId string, resourceGroupName string, managedClusterName string, agentPoolName string) AgentPoolId

NewAgentPoolID returns a new AgentPoolId struct

func ParseAgentPoolID

func ParseAgentPoolID(input string) (*AgentPoolId, error)

ParseAgentPoolID parses 'input' into a AgentPoolId

func ParseAgentPoolIDInsensitively

func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error)

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

func (*AgentPoolId) FromParseResult

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

func (AgentPoolId) ID

func (id AgentPoolId) ID() string

ID returns the formatted Agent Pool ID

func (AgentPoolId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Agent Pool ID

func (AgentPoolId) String

func (id AgentPoolId) String() string

String returns a human-readable description of this Agent Pool ID

type GetOperationResponse

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

type IPFamily

type IPFamily string
const (
	IPFamilyIPvFour IPFamily = "IPv4"
	IPFamilyIPvSix  IPFamily = "IPv6"
)

func (*IPFamily) UnmarshalJSON

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

type ListCompleteResult

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

type ListOperationResponse

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

type Machine

type Machine struct {
	Id         *string            `json:"id,omitempty"`
	Name       *string            `json:"name,omitempty"`
	Properties *MachineProperties `json:"properties,omitempty"`
	Type       *string            `json:"type,omitempty"`
}

type MachineIPAddress

type MachineIPAddress struct {
	Family *IPFamily `json:"family,omitempty"`
	IP     *string   `json:"ip,omitempty"`
}

type MachineId

type MachineId struct {
	SubscriptionId     string
	ResourceGroupName  string
	ManagedClusterName string
	AgentPoolName      string
	MachineName        string
}

MachineId is a struct representing the Resource ID for a Machine

func NewMachineID

func NewMachineID(subscriptionId string, resourceGroupName string, managedClusterName string, agentPoolName string, machineName string) MachineId

NewMachineID returns a new MachineId struct

func ParseMachineID

func ParseMachineID(input string) (*MachineId, error)

ParseMachineID parses 'input' into a MachineId

func ParseMachineIDInsensitively

func ParseMachineIDInsensitively(input string) (*MachineId, error)

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

func (*MachineId) FromParseResult

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

func (MachineId) ID

func (id MachineId) ID() string

ID returns the formatted Machine ID

func (MachineId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Machine ID

func (MachineId) String

func (id MachineId) String() string

String returns a human-readable description of this Machine ID

type MachineNetworkProperties

type MachineNetworkProperties struct {
	IPAddresses *[]MachineIPAddress `json:"ipAddresses,omitempty"`
}

type MachineOperationPredicate

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

func (MachineOperationPredicate) Matches

func (p MachineOperationPredicate) Matches(input Machine) bool

type MachineProperties

type MachineProperties struct {
	Network    *MachineNetworkProperties `json:"network,omitempty"`
	ResourceId *string                   `json:"resourceId,omitempty"`
}

type MachinesClient

type MachinesClient struct {
	Client *resourcemanager.Client
}

func NewMachinesClientWithBaseURI

func NewMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinesClient, error)

func (MachinesClient) Get

func (c MachinesClient) Get(ctx context.Context, id MachineId) (result GetOperationResponse, err error)

Get ...

func (MachinesClient) List

func (c MachinesClient) List(ctx context.Context, id AgentPoolId) (result ListOperationResponse, err error)

List ...

func (MachinesClient) ListComplete

ListComplete retrieves all the results into a single object

func (MachinesClient) ListCompleteMatchingPredicate

func (c MachinesClient) ListCompleteMatchingPredicate(ctx context.Context, id AgentPoolId, predicate MachineOperationPredicate) (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