machinepools

package
v0.20231106.1151347 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-09-04/machinepools Documentation

The machinepools SDK allows for interaction with the Azure Resource Manager Service redhatopenshift (API Version 2023-09-04).

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/redhatopenshift/2023-09-04/machinepools"

Client Initialization

client := machinepools.NewMachinePoolsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MachinePoolsClient.CreateOrUpdate

ctx := context.TODO()
id := machinepools.NewMachinePoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "openShiftClusterValue", "machinePoolValue")

payload := machinepools.MachinePool{
	// ...
}


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

Example Usage: MachinePoolsClient.Delete

ctx := context.TODO()
id := machinepools.NewMachinePoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "openShiftClusterValue", "machinePoolValue")

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

Example Usage: MachinePoolsClient.Get

ctx := context.TODO()
id := machinepools.NewMachinePoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "openShiftClusterValue", "machinePoolValue")

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

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

// 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: MachinePoolsClient.Update

ctx := context.TODO()
id := machinepools.NewMachinePoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "openShiftClusterValue", "machinePoolValue")

payload := machinepools.MachinePoolUpdate{
	// ...
}


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

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

ValidateMachinePoolID checks that 'input' can be parsed as a Machine Pool ID

func ValidateOpenShiftClusterID

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

ValidateOpenShiftClusterID checks that 'input' can be parsed as a Open Shift Cluster ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MachinePool
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []MachinePool
}

type ListOperationResponse

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

type MachinePool

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

type MachinePoolId

type MachinePoolId struct {
	SubscriptionId       string
	ResourceGroupName    string
	OpenShiftClusterName string
	MachinePoolName      string
}

MachinePoolId is a struct representing the Resource ID for a Machine Pool

func NewMachinePoolID

func NewMachinePoolID(subscriptionId string, resourceGroupName string, openShiftClusterName string, machinePoolName string) MachinePoolId

NewMachinePoolID returns a new MachinePoolId struct

func ParseMachinePoolID

func ParseMachinePoolID(input string) (*MachinePoolId, error)

ParseMachinePoolID parses 'input' into a MachinePoolId

func ParseMachinePoolIDInsensitively

func ParseMachinePoolIDInsensitively(input string) (*MachinePoolId, error)

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

func (MachinePoolId) ID

func (id MachinePoolId) ID() string

ID returns the formatted Machine Pool ID

func (MachinePoolId) Segments

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

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

func (MachinePoolId) String

func (id MachinePoolId) String() string

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

type MachinePoolOperationPredicate

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

func (MachinePoolOperationPredicate) Matches

type MachinePoolProperties

type MachinePoolProperties struct {
	Resources *string `json:"resources,omitempty"`
}

type MachinePoolUpdate

type MachinePoolUpdate struct {
	Properties *MachinePoolProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
}

type MachinePoolsClient

type MachinePoolsClient struct {
	Client *resourcemanager.Client
}

func NewMachinePoolsClientWithBaseURI

func NewMachinePoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinePoolsClient, error)

func (MachinePoolsClient) CreateOrUpdate

func (c MachinePoolsClient) CreateOrUpdate(ctx context.Context, id MachinePoolId, input MachinePool) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (MachinePoolsClient) Delete

Delete ...

func (MachinePoolsClient) Get

Get ...

func (MachinePoolsClient) List

List ...

func (MachinePoolsClient) ListComplete

ListComplete retrieves all the results into a single object

func (MachinePoolsClient) ListCompleteMatchingPredicate

func (c MachinePoolsClient) ListCompleteMatchingPredicate(ctx context.Context, id OpenShiftClusterId, predicate MachinePoolOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MachinePoolsClient) Update

Update ...

type OpenShiftClusterId

type OpenShiftClusterId struct {
	SubscriptionId       string
	ResourceGroupName    string
	OpenShiftClusterName string
}

OpenShiftClusterId is a struct representing the Resource ID for a Open Shift Cluster

func NewOpenShiftClusterID

func NewOpenShiftClusterID(subscriptionId string, resourceGroupName string, openShiftClusterName string) OpenShiftClusterId

NewOpenShiftClusterID returns a new OpenShiftClusterId struct

func ParseOpenShiftClusterID

func ParseOpenShiftClusterID(input string) (*OpenShiftClusterId, error)

ParseOpenShiftClusterID parses 'input' into a OpenShiftClusterId

func ParseOpenShiftClusterIDInsensitively

func ParseOpenShiftClusterIDInsensitively(input string) (*OpenShiftClusterId, error)

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

func (OpenShiftClusterId) ID

func (id OpenShiftClusterId) ID() string

ID returns the formatted Open Shift Cluster ID

func (OpenShiftClusterId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Open Shift Cluster ID

func (OpenShiftClusterId) String

func (id OpenShiftClusterId) String() string

String returns a human-readable description of this Open Shift Cluster ID

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MachinePool
}

Jump to

Keyboard shortcuts

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