fleets

package
v0.20240923.1151247 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-15/fleets Documentation

The fleets SDK allows for interaction with Azure Resource Manager containerservice (API Version 2023-10-15).

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/containerservice/2023-10-15/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", "fleetName")

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", "fleetName")

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", "fleetName")

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 := commonids.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 := commonids.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", "fleetName")

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", "fleetName")

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


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

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

func (CreateOrUpdateOperationOptions) ToHeaders added in v0.20240213.1120950

func (CreateOrUpdateOperationOptions) ToOData added in v0.20240213.1120950

func (CreateOrUpdateOperationOptions) ToQuery added in v0.20240213.1120950

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders added in v0.20240213.1120950

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData added in v0.20240213.1120950

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery added in v0.20240213.1120950

type DeleteOperationResponse

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

type Fleet

type Fleet struct {
	ETag       *string                            `json:"eTag,omitempty"`
	Id         *string                            `json:"id,omitempty"`
	Identity   *identity.SystemAndUserAssignedMap `json:"identity,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 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

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 {
	Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"`
	Tags     *map[string]string                 `json:"tags,omitempty"`
}

type FleetProperties

type FleetProperties struct {
	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"
)

func (*FleetProvisioningState) UnmarshalJSON added in v0.20240213.1120950

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

type FleetsClient

type FleetsClient struct {
	Client *resourcemanager.Client
}

func NewFleetsClientWithBaseURI

func NewFleetsClientWithBaseURI(sdkApi sdkEnv.Api) (*FleetsClient, error)

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 the results into a single object

func (FleetsClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (FleetsClient) ListBySubscription

ListBySubscription ...

func (FleetsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (FleetsClient) ListBySubscriptionCompleteMatchingPredicate

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

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies 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 ...

func (FleetsClient) UpdateThenPoll

func (c FleetsClient) UpdateThenPoll(ctx context.Context, id FleetId, input FleetPatch, options UpdateOperationOptions) error

UpdateThenPoll performs Update then polls until it's completed

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Fleet
}

type ListByResourceGroupCustomPager added in v0.20240628.1153531

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

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Fleet
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Fleet
}

type ListBySubscriptionCustomPager added in v0.20240628.1153531

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

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Fleet
}

type ListCredentialsOperationResponse

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

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

func (UpdateOperationOptions) ToHeaders added in v0.20240213.1120950

func (o UpdateOperationOptions) ToHeaders() *client.Headers

func (UpdateOperationOptions) ToOData added in v0.20240213.1120950

func (o UpdateOperationOptions) ToOData() *odata.Query

func (UpdateOperationOptions) ToQuery added in v0.20240213.1120950

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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