pools

package
v0.20240621.1183335 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/pools Documentation

The pools SDK allows for interaction with the Azure Resource Manager Service devcenter (API Version 2023-04-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-sdk/resource-manager/devcenter/2023-04-01/pools"

Client Initialization

client := pools.NewPoolsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PoolsClient.CreateOrUpdate

ctx := context.TODO()
id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "projectValue", "poolValue")

payload := pools.Pool{
	// ...
}


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

Example Usage: PoolsClient.Delete

ctx := context.TODO()
id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "projectValue", "poolValue")

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

Example Usage: PoolsClient.Get

ctx := context.TODO()
id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "projectValue", "poolValue")

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: PoolsClient.ListByProject

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

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

Example Usage: PoolsClient.RunHealthChecks

ctx := context.TODO()
id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "projectValue", "poolValue")

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

Example Usage: PoolsClient.Update

ctx := context.TODO()
id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "projectValue", "poolValue")

payload := pools.PoolUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForHealthStatus

func PossibleValuesForHealthStatus() []string

func PossibleValuesForLicenseType

func PossibleValuesForLicenseType() []string

func PossibleValuesForLocalAdminStatus

func PossibleValuesForLocalAdminStatus() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForStopOnDisconnectEnableStatus

func PossibleValuesForStopOnDisconnectEnableStatus() []string

func ValidatePoolID

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

ValidatePoolID checks that 'input' can be parsed as a Pool ID

func ValidateProjectID

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

ValidateProjectID checks that 'input' can be parsed as a Project ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type HealthStatus

type HealthStatus string
const (
	HealthStatusHealthy   HealthStatus = "Healthy"
	HealthStatusPending   HealthStatus = "Pending"
	HealthStatusUnhealthy HealthStatus = "Unhealthy"
	HealthStatusUnknown   HealthStatus = "Unknown"
	HealthStatusWarning   HealthStatus = "Warning"
)

func (*HealthStatus) UnmarshalJSON

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

type HealthStatusDetail

type HealthStatusDetail struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

type LicenseType

type LicenseType string
const (
	LicenseTypeWindowsClient LicenseType = "Windows_Client"
)

func (*LicenseType) UnmarshalJSON

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

type ListByProjectCompleteResult

type ListByProjectCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Pool
}

type ListByProjectOperationResponse

type ListByProjectOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Pool
}

type LocalAdminStatus

type LocalAdminStatus string
const (
	LocalAdminStatusDisabled LocalAdminStatus = "Disabled"
	LocalAdminStatusEnabled  LocalAdminStatus = "Enabled"
)

func (*LocalAdminStatus) UnmarshalJSON

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

type Pool

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

type PoolId

type PoolId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProjectName       string
	PoolName          string
}

PoolId is a struct representing the Resource ID for a Pool

func NewPoolID

func NewPoolID(subscriptionId string, resourceGroupName string, projectName string, poolName string) PoolId

NewPoolID returns a new PoolId struct

func ParsePoolID

func ParsePoolID(input string) (*PoolId, error)

ParsePoolID parses 'input' into a PoolId

func ParsePoolIDInsensitively

func ParsePoolIDInsensitively(input string) (*PoolId, error)

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

func (*PoolId) FromParseResult

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

func (PoolId) ID

func (id PoolId) ID() string

ID returns the formatted Pool ID

func (PoolId) Segments

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

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

func (PoolId) String

func (id PoolId) String() string

String returns a human-readable description of this Pool ID

type PoolOperationPredicate

type PoolOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (PoolOperationPredicate) Matches

func (p PoolOperationPredicate) Matches(input Pool) bool

type PoolProperties

type PoolProperties struct {
	DevBoxDefinitionName  *string                        `json:"devBoxDefinitionName,omitempty"`
	HealthStatus          *HealthStatus                  `json:"healthStatus,omitempty"`
	HealthStatusDetails   *[]HealthStatusDetail          `json:"healthStatusDetails,omitempty"`
	LicenseType           *LicenseType                   `json:"licenseType,omitempty"`
	LocalAdministrator    *LocalAdminStatus              `json:"localAdministrator,omitempty"`
	NetworkConnectionName *string                        `json:"networkConnectionName,omitempty"`
	ProvisioningState     *ProvisioningState             `json:"provisioningState,omitempty"`
	StopOnDisconnect      *StopOnDisconnectConfiguration `json:"stopOnDisconnect,omitempty"`
}

type PoolUpdate

type PoolUpdate struct {
	Location   *string               `json:"location,omitempty"`
	Properties *PoolUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string    `json:"tags,omitempty"`
}

type PoolUpdateProperties

type PoolUpdateProperties struct {
	DevBoxDefinitionName  *string                        `json:"devBoxDefinitionName,omitempty"`
	LicenseType           *LicenseType                   `json:"licenseType,omitempty"`
	LocalAdministrator    *LocalAdminStatus              `json:"localAdministrator,omitempty"`
	NetworkConnectionName *string                        `json:"networkConnectionName,omitempty"`
	StopOnDisconnect      *StopOnDisconnectConfiguration `json:"stopOnDisconnect,omitempty"`
}

type PoolsClient

type PoolsClient struct {
	Client *resourcemanager.Client
}

func NewPoolsClientWithBaseURI

func NewPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolsClient, error)

func (PoolsClient) CreateOrUpdate

func (c PoolsClient) CreateOrUpdate(ctx context.Context, id PoolId, input Pool) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (PoolsClient) CreateOrUpdateThenPoll

func (c PoolsClient) CreateOrUpdateThenPoll(ctx context.Context, id PoolId, input Pool) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (PoolsClient) Delete

func (c PoolsClient) Delete(ctx context.Context, id PoolId) (result DeleteOperationResponse, err error)

Delete ...

func (PoolsClient) DeleteThenPoll

func (c PoolsClient) DeleteThenPoll(ctx context.Context, id PoolId) error

DeleteThenPoll performs Delete then polls until it's completed

func (PoolsClient) Get

func (c PoolsClient) Get(ctx context.Context, id PoolId) (result GetOperationResponse, err error)

Get ...

func (PoolsClient) ListByProject

func (c PoolsClient) ListByProject(ctx context.Context, id ProjectId) (result ListByProjectOperationResponse, err error)

ListByProject ...

func (PoolsClient) ListByProjectComplete

func (c PoolsClient) ListByProjectComplete(ctx context.Context, id ProjectId) (ListByProjectCompleteResult, error)

ListByProjectComplete retrieves all the results into a single object

func (PoolsClient) ListByProjectCompleteMatchingPredicate

func (c PoolsClient) ListByProjectCompleteMatchingPredicate(ctx context.Context, id ProjectId, predicate PoolOperationPredicate) (result ListByProjectCompleteResult, err error)

ListByProjectCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (PoolsClient) RunHealthChecks

func (c PoolsClient) RunHealthChecks(ctx context.Context, id PoolId) (result RunHealthChecksOperationResponse, err error)

RunHealthChecks ...

func (PoolsClient) RunHealthChecksThenPoll

func (c PoolsClient) RunHealthChecksThenPoll(ctx context.Context, id PoolId) error

RunHealthChecksThenPoll performs RunHealthChecks then polls until it's completed

func (PoolsClient) Update

func (c PoolsClient) Update(ctx context.Context, id PoolId, input PoolUpdate) (result UpdateOperationResponse, err error)

Update ...

func (PoolsClient) UpdateThenPoll

func (c PoolsClient) UpdateThenPoll(ctx context.Context, id PoolId, input PoolUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type ProjectId

type ProjectId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProjectName       string
}

ProjectId is a struct representing the Resource ID for a Project

func NewProjectID

func NewProjectID(subscriptionId string, resourceGroupName string, projectName string) ProjectId

NewProjectID returns a new ProjectId struct

func ParseProjectID

func ParseProjectID(input string) (*ProjectId, error)

ParseProjectID parses 'input' into a ProjectId

func ParseProjectIDInsensitively

func ParseProjectIDInsensitively(input string) (*ProjectId, error)

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

func (*ProjectId) FromParseResult

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

func (ProjectId) ID

func (id ProjectId) ID() string

ID returns the formatted Project ID

func (ProjectId) Segments

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

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

func (ProjectId) String

func (id ProjectId) String() string

String returns a human-readable description of this Project ID

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted                  ProvisioningState = "Accepted"
	ProvisioningStateCanceled                  ProvisioningState = "Canceled"
	ProvisioningStateCreated                   ProvisioningState = "Created"
	ProvisioningStateCreating                  ProvisioningState = "Creating"
	ProvisioningStateDeleted                   ProvisioningState = "Deleted"
	ProvisioningStateDeleting                  ProvisioningState = "Deleting"
	ProvisioningStateFailed                    ProvisioningState = "Failed"
	ProvisioningStateMovingResources           ProvisioningState = "MovingResources"
	ProvisioningStateNotSpecified              ProvisioningState = "NotSpecified"
	ProvisioningStateRolloutInProgress         ProvisioningState = "RolloutInProgress"
	ProvisioningStateRunning                   ProvisioningState = "Running"
	ProvisioningStateStorageProvisioningFailed ProvisioningState = "StorageProvisioningFailed"
	ProvisioningStateSucceeded                 ProvisioningState = "Succeeded"
	ProvisioningStateTransientFailure          ProvisioningState = "TransientFailure"
	ProvisioningStateUpdated                   ProvisioningState = "Updated"
	ProvisioningStateUpdating                  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type RunHealthChecksOperationResponse

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

type StopOnDisconnectConfiguration

type StopOnDisconnectConfiguration struct {
	GracePeriodMinutes *int64                        `json:"gracePeriodMinutes,omitempty"`
	Status             *StopOnDisconnectEnableStatus `json:"status,omitempty"`
}

type StopOnDisconnectEnableStatus

type StopOnDisconnectEnableStatus string
const (
	StopOnDisconnectEnableStatusDisabled StopOnDisconnectEnableStatus = "Disabled"
	StopOnDisconnectEnableStatusEnabled  StopOnDisconnectEnableStatus = "Enabled"
)

func (*StopOnDisconnectEnableStatus) UnmarshalJSON

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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