fleets

package
v0.20231214.1094851 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

README

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

The fleets SDK allows for interaction with the Azure Resource Manager Service containerservice (API Version 2022-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/2022-09-02-preview/fleets"

Client Initialization

client := fleets.NewFleetsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: FleetsClient.CreateOrUpdate

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

payload := fleets.Fleet{
	// ...
}


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

Example Usage: FleetsClient.Delete

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

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

Example Usage: FleetsClient.Get

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

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: FleetsClient.ListByResourceGroup

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

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

Example Usage: FleetsClient.ListBySubscription

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

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

Example Usage: FleetsClient.ListCredentials

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

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

Example Usage: FleetsClient.Update

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

payload := fleets.FleetPatch{
	// ...
}


read, err := client.Update(ctx, id, payload, fleets.DefaultUpdateOperationOptions())
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 PossibleValuesForFleetProvisioningState

func PossibleValuesForFleetProvisioningState() []string

func ValidateFleetID

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

ValidateFleetID checks that 'input' can be parsed as a Fleet ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch     *string
	IfNoneMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type Fleet

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

type FleetCredentialResult

type FleetCredentialResult struct {
	Name  *string `json:"name,omitempty"`
	Value *string `json:"value,omitempty"`
}

type FleetCredentialResults

type FleetCredentialResults struct {
	Kubeconfigs *[]FleetCredentialResult `json:"kubeconfigs,omitempty"`
}

type FleetHubProfile

type FleetHubProfile struct {
	DnsPrefix         string  `json:"dnsPrefix"`
	Fqdn              *string `json:"fqdn,omitempty"`
	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
}

type FleetId

type FleetId struct {
	SubscriptionId    string
	ResourceGroupName string
	FleetName         string
}

FleetId is a struct representing the Resource ID for a Fleet

func NewFleetID

func NewFleetID(subscriptionId string, resourceGroupName string, fleetName string) FleetId

NewFleetID returns a new FleetId struct

func ParseFleetID

func ParseFleetID(input string) (*FleetId, error)

ParseFleetID parses 'input' into a FleetId

func ParseFleetIDInsensitively

func ParseFleetIDInsensitively(input string) (*FleetId, error)

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

func (*FleetId) FromParseResult added in v0.20231127.1171502

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

func (FleetId) ID

func (id FleetId) ID() string

ID returns the formatted Fleet ID

func (FleetId) Segments

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

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

func (FleetId) String

func (id FleetId) String() string

String returns a human-readable description of this Fleet ID

type FleetOperationPredicate

type FleetOperationPredicate struct {
	ETag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (FleetOperationPredicate) Matches

func (p FleetOperationPredicate) Matches(input Fleet) bool

type FleetPatch

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

type FleetProperties

type FleetProperties struct {
	HubProfile        *FleetHubProfile        `json:"hubProfile,omitempty"`
	ProvisioningState *FleetProvisioningState `json:"provisioningState,omitempty"`
}

type FleetProvisioningState

type FleetProvisioningState string
const (
	FleetProvisioningStateCanceled  FleetProvisioningState = "Canceled"
	FleetProvisioningStateCreating  FleetProvisioningState = "Creating"
	FleetProvisioningStateDeleting  FleetProvisioningState = "Deleting"
	FleetProvisioningStateFailed    FleetProvisioningState = "Failed"
	FleetProvisioningStateSucceeded FleetProvisioningState = "Succeeded"
	FleetProvisioningStateUpdating  FleetProvisioningState = "Updating"
)

type FleetsClient

type FleetsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewFleetsClientWithBaseURI

func NewFleetsClientWithBaseURI(endpoint string) FleetsClient

func (FleetsClient) CreateOrUpdate

func (c FleetsClient) CreateOrUpdate(ctx context.Context, id FleetId, input Fleet, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (FleetsClient) CreateOrUpdateThenPoll

func (c FleetsClient) CreateOrUpdateThenPoll(ctx context.Context, id FleetId, input Fleet, options CreateOrUpdateOperationOptions) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (FleetsClient) Delete

func (c FleetsClient) Delete(ctx context.Context, id FleetId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)

Delete ...

func (FleetsClient) DeleteThenPoll

func (c FleetsClient) DeleteThenPoll(ctx context.Context, id FleetId, options DeleteOperationOptions) error

DeleteThenPoll performs Delete then polls until it's completed

func (FleetsClient) Get

func (c FleetsClient) Get(ctx context.Context, id FleetId) (result GetOperationResponse, err error)

Get ...

func (FleetsClient) ListByResourceGroup

ListByResourceGroup ...

func (FleetsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (FleetsClient) ListByResourceGroupCompleteMatchingPredicate

func (c FleetsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate FleetOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (FleetsClient) ListBySubscription added in v0.20230518.1152641

ListBySubscription ...

func (FleetsClient) ListBySubscriptionComplete added in v0.20230518.1152641

ListBySubscriptionComplete retrieves all of the results into a single object

func (FleetsClient) ListBySubscriptionCompleteMatchingPredicate added in v0.20230518.1152641

func (c FleetsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate FleetOperationPredicate) (resp ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (FleetsClient) ListCredentials

func (c FleetsClient) ListCredentials(ctx context.Context, id FleetId) (result ListCredentialsOperationResponse, err error)

ListCredentials ...

func (FleetsClient) Update

func (c FleetsClient) Update(ctx context.Context, id FleetId, input FleetPatch, options UpdateOperationOptions) (result UpdateOperationResponse, err error)

Update ...

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *Fleet
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []Fleet
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Fleet
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListBySubscriptionCompleteResult added in v0.20230518.1152641

type ListBySubscriptionCompleteResult struct {
	Items []Fleet
}

type ListBySubscriptionOperationResponse added in v0.20230518.1152641

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Fleet
	// contains filtered or unexported fields
}

func (ListBySubscriptionOperationResponse) HasMore added in v0.20230518.1152641

func (ListBySubscriptionOperationResponse) LoadMore added in v0.20230518.1152641

type ListCredentialsOperationResponse

type ListCredentialsOperationResponse struct {
	HttpResponse *http.Response
	Model        *FleetCredentialResults
}

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Fleet
}

Jump to

Keyboard shortcuts

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