devboxdefinitions

package
v0.20240304.1112406 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

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

The devboxdefinitions 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/devboxdefinitions"

Client Initialization

client := devboxdefinitions.NewDevBoxDefinitionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DevBoxDefinitionsClient.CreateOrUpdate

ctx := context.TODO()
id := devboxdefinitions.NewDevCenterDevBoxDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "devCenterValue", "devBoxDefinitionValue")

payload := devboxdefinitions.DevBoxDefinition{
	// ...
}


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

Example Usage: DevBoxDefinitionsClient.Delete

ctx := context.TODO()
id := devboxdefinitions.NewDevCenterDevBoxDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "devCenterValue", "devBoxDefinitionValue")

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

Example Usage: DevBoxDefinitionsClient.Get

ctx := context.TODO()
id := devboxdefinitions.NewDevCenterDevBoxDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "devCenterValue", "devBoxDefinitionValue")

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: DevBoxDefinitionsClient.GetByProject

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

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

Example Usage: DevBoxDefinitionsClient.ListByDevCenter

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

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

Example Usage: DevBoxDefinitionsClient.ListByProject

ctx := context.TODO()
id := devboxdefinitions.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: DevBoxDefinitionsClient.Update

ctx := context.TODO()
id := devboxdefinitions.NewDevCenterDevBoxDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "devCenterValue", "devBoxDefinitionValue")

payload := devboxdefinitions.DevBoxDefinitionUpdate{
	// ...
}


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 PossibleValuesForHibernateSupport

func PossibleValuesForHibernateSupport() []string

func PossibleValuesForImageValidationStatus

func PossibleValuesForImageValidationStatus() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForSkuTier

func PossibleValuesForSkuTier() []string

func ValidateDevBoxDefinitionID

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

ValidateDevBoxDefinitionID checks that 'input' can be parsed as a Dev Box Definition ID

func ValidateDevCenterDevBoxDefinitionID

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

ValidateDevCenterDevBoxDefinitionID checks that 'input' can be parsed as a Dev Center Dev Box Definition ID

func ValidateDevCenterID

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

ValidateDevCenterID checks that 'input' can be parsed as a Dev Center 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        *DevBoxDefinition
}

type DeleteOperationResponse

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

type DevBoxDefinition

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

type DevBoxDefinitionId

type DevBoxDefinitionId struct {
	SubscriptionId       string
	ResourceGroupName    string
	ProjectName          string
	DevBoxDefinitionName string
}

DevBoxDefinitionId is a struct representing the Resource ID for a Dev Box Definition

func NewDevBoxDefinitionID

func NewDevBoxDefinitionID(subscriptionId string, resourceGroupName string, projectName string, devBoxDefinitionName string) DevBoxDefinitionId

NewDevBoxDefinitionID returns a new DevBoxDefinitionId struct

func ParseDevBoxDefinitionID

func ParseDevBoxDefinitionID(input string) (*DevBoxDefinitionId, error)

ParseDevBoxDefinitionID parses 'input' into a DevBoxDefinitionId

func ParseDevBoxDefinitionIDInsensitively

func ParseDevBoxDefinitionIDInsensitively(input string) (*DevBoxDefinitionId, error)

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

func (*DevBoxDefinitionId) FromParseResult

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

func (DevBoxDefinitionId) ID

func (id DevBoxDefinitionId) ID() string

ID returns the formatted Dev Box Definition ID

func (DevBoxDefinitionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Dev Box Definition ID

func (DevBoxDefinitionId) String

func (id DevBoxDefinitionId) String() string

String returns a human-readable description of this Dev Box Definition ID

type DevBoxDefinitionOperationPredicate

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

func (DevBoxDefinitionOperationPredicate) Matches

type DevBoxDefinitionProperties

type DevBoxDefinitionProperties struct {
	ActiveImageReference        *ImageReference              `json:"activeImageReference,omitempty"`
	HibernateSupport            *HibernateSupport            `json:"hibernateSupport,omitempty"`
	ImageReference              *ImageReference              `json:"imageReference,omitempty"`
	ImageValidationErrorDetails *ImageValidationErrorDetails `json:"imageValidationErrorDetails,omitempty"`
	ImageValidationStatus       *ImageValidationStatus       `json:"imageValidationStatus,omitempty"`
	OsStorageType               *string                      `json:"osStorageType,omitempty"`
	ProvisioningState           *ProvisioningState           `json:"provisioningState,omitempty"`
	Sku                         *Sku                         `json:"sku,omitempty"`
}

type DevBoxDefinitionUpdate

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

type DevBoxDefinitionUpdateProperties

type DevBoxDefinitionUpdateProperties struct {
	HibernateSupport *HibernateSupport `json:"hibernateSupport,omitempty"`
	ImageReference   *ImageReference   `json:"imageReference,omitempty"`
	OsStorageType    *string           `json:"osStorageType,omitempty"`
	Sku              *Sku              `json:"sku,omitempty"`
}

type DevBoxDefinitionsClient

type DevBoxDefinitionsClient struct {
	Client *resourcemanager.Client
}

func NewDevBoxDefinitionsClientWithBaseURI

func NewDevBoxDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DevBoxDefinitionsClient, error)

func (DevBoxDefinitionsClient) CreateOrUpdate

CreateOrUpdate ...

func (DevBoxDefinitionsClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (DevBoxDefinitionsClient) Delete

Delete ...

func (DevBoxDefinitionsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (DevBoxDefinitionsClient) Get

Get ...

func (DevBoxDefinitionsClient) GetByProject

GetByProject ...

func (DevBoxDefinitionsClient) ListByDevCenter

ListByDevCenter ...

func (DevBoxDefinitionsClient) ListByDevCenterComplete

ListByDevCenterComplete retrieves all the results into a single object

func (DevBoxDefinitionsClient) ListByDevCenterCompleteMatchingPredicate

func (c DevBoxDefinitionsClient) ListByDevCenterCompleteMatchingPredicate(ctx context.Context, id DevCenterId, predicate DevBoxDefinitionOperationPredicate) (result ListByDevCenterCompleteResult, err error)

ListByDevCenterCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DevBoxDefinitionsClient) ListByProject

ListByProject ...

func (DevBoxDefinitionsClient) ListByProjectComplete

ListByProjectComplete retrieves all the results into a single object

func (DevBoxDefinitionsClient) ListByProjectCompleteMatchingPredicate

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

ListByProjectCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DevBoxDefinitionsClient) Update

Update ...

func (DevBoxDefinitionsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type DevCenterDevBoxDefinitionId

type DevCenterDevBoxDefinitionId struct {
	SubscriptionId       string
	ResourceGroupName    string
	DevCenterName        string
	DevBoxDefinitionName string
}

DevCenterDevBoxDefinitionId is a struct representing the Resource ID for a Dev Center Dev Box Definition

func NewDevCenterDevBoxDefinitionID

func NewDevCenterDevBoxDefinitionID(subscriptionId string, resourceGroupName string, devCenterName string, devBoxDefinitionName string) DevCenterDevBoxDefinitionId

NewDevCenterDevBoxDefinitionID returns a new DevCenterDevBoxDefinitionId struct

func ParseDevCenterDevBoxDefinitionID

func ParseDevCenterDevBoxDefinitionID(input string) (*DevCenterDevBoxDefinitionId, error)

ParseDevCenterDevBoxDefinitionID parses 'input' into a DevCenterDevBoxDefinitionId

func ParseDevCenterDevBoxDefinitionIDInsensitively

func ParseDevCenterDevBoxDefinitionIDInsensitively(input string) (*DevCenterDevBoxDefinitionId, error)

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

func (*DevCenterDevBoxDefinitionId) FromParseResult

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

func (DevCenterDevBoxDefinitionId) ID

ID returns the formatted Dev Center Dev Box Definition ID

func (DevCenterDevBoxDefinitionId) Segments

Segments returns a slice of Resource ID Segments which comprise this Dev Center Dev Box Definition ID

func (DevCenterDevBoxDefinitionId) String

func (id DevCenterDevBoxDefinitionId) String() string

String returns a human-readable description of this Dev Center Dev Box Definition ID

type DevCenterId

type DevCenterId struct {
	SubscriptionId    string
	ResourceGroupName string
	DevCenterName     string
}

DevCenterId is a struct representing the Resource ID for a Dev Center

func NewDevCenterID

func NewDevCenterID(subscriptionId string, resourceGroupName string, devCenterName string) DevCenterId

NewDevCenterID returns a new DevCenterId struct

func ParseDevCenterID

func ParseDevCenterID(input string) (*DevCenterId, error)

ParseDevCenterID parses 'input' into a DevCenterId

func ParseDevCenterIDInsensitively

func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error)

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

func (*DevCenterId) FromParseResult

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

func (DevCenterId) ID

func (id DevCenterId) ID() string

ID returns the formatted Dev Center ID

func (DevCenterId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Dev Center ID

func (DevCenterId) String

func (id DevCenterId) String() string

String returns a human-readable description of this Dev Center ID

type GetByProjectOperationResponse

type GetByProjectOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DevBoxDefinition
}

type GetOperationResponse

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

type HibernateSupport

type HibernateSupport string
const (
	HibernateSupportDisabled HibernateSupport = "Disabled"
	HibernateSupportEnabled  HibernateSupport = "Enabled"
)

func (*HibernateSupport) UnmarshalJSON

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

type ImageReference

type ImageReference struct {
	ExactVersion *string `json:"exactVersion,omitempty"`
	Id           *string `json:"id,omitempty"`
}

type ImageValidationErrorDetails

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

type ImageValidationStatus

type ImageValidationStatus string
const (
	ImageValidationStatusFailed    ImageValidationStatus = "Failed"
	ImageValidationStatusPending   ImageValidationStatus = "Pending"
	ImageValidationStatusSucceeded ImageValidationStatus = "Succeeded"
	ImageValidationStatusTimedOut  ImageValidationStatus = "TimedOut"
	ImageValidationStatusUnknown   ImageValidationStatus = "Unknown"
)

func (*ImageValidationStatus) UnmarshalJSON

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

type ListByDevCenterCompleteResult

type ListByDevCenterCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DevBoxDefinition
}

type ListByDevCenterOperationResponse

type ListByDevCenterOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DevBoxDefinition
}

type ListByProjectCompleteResult

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

type ListByProjectOperationResponse

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

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 Sku

type Sku struct {
	Capacity *int64   `json:"capacity,omitempty"`
	Family   *string  `json:"family,omitempty"`
	Name     string   `json:"name"`
	Size     *string  `json:"size,omitempty"`
	Tier     *SkuTier `json:"tier,omitempty"`
}

type SkuTier

type SkuTier string
const (
	SkuTierBasic    SkuTier = "Basic"
	SkuTierFree     SkuTier = "Free"
	SkuTierPremium  SkuTier = "Premium"
	SkuTierStandard SkuTier = "Standard"
)

func (*SkuTier) UnmarshalJSON

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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