capacities

package
v0.20230406.1222242 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities Documentation

The capacities SDK allows for interaction with the Azure Resource Manager Service powerbidedicated (API Version 2021-01-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/powerbidedicated/2021-01-01/capacities"

Client Initialization

client := capacities.NewCapacitiesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CapacitiesClient.CheckNameAvailability

ctx := context.TODO()
id := capacities.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue")

payload := capacities.CheckCapacityNameAvailabilityParameters{
	// ...
}


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

Example Usage: CapacitiesClient.Create

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

payload := capacities.DedicatedCapacity{
	// ...
}


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

Example Usage: CapacitiesClient.Delete

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

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

Example Usage: CapacitiesClient.GetDetails

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

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

Example Usage: CapacitiesClient.List

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

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

Example Usage: CapacitiesClient.ListByResourceGroup

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

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

Example Usage: CapacitiesClient.ListSkusForCapacity

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

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

Example Usage: CapacitiesClient.Resume

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

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

Example Usage: CapacitiesClient.Suspend

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

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

Example Usage: CapacitiesClient.Update

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

payload := capacities.DedicatedCapacityUpdateParameters{
	// ...
}


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 PossibleValuesForCapacityProvisioningState

func PossibleValuesForCapacityProvisioningState() []string

func PossibleValuesForCapacitySkuTier

func PossibleValuesForCapacitySkuTier() []string

func PossibleValuesForMode

func PossibleValuesForMode() []string

func PossibleValuesForState

func PossibleValuesForState() []string

func ValidateCapacityID added in v0.20220907.1111434

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

ValidateCapacityID checks that 'input' can be parsed as a Capacity ID

func ValidateLocationID

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

ValidateLocationID checks that 'input' can be parsed as a Location ID

Types

type CapacitiesClient

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

func NewCapacitiesClientWithBaseURI

func NewCapacitiesClientWithBaseURI(endpoint string) CapacitiesClient

func (CapacitiesClient) CheckNameAvailability

CheckNameAvailability ...

func (CapacitiesClient) Create

Create ...

func (CapacitiesClient) CreateThenPoll

func (c CapacitiesClient) CreateThenPoll(ctx context.Context, id CapacityId, input DedicatedCapacity) error

CreateThenPoll performs Create then polls until it's completed

func (CapacitiesClient) Delete

func (c CapacitiesClient) Delete(ctx context.Context, id CapacityId) (result DeleteOperationResponse, err error)

Delete ...

func (CapacitiesClient) DeleteThenPoll

func (c CapacitiesClient) DeleteThenPoll(ctx context.Context, id CapacityId) error

DeleteThenPoll performs Delete then polls until it's completed

func (CapacitiesClient) GetDetails

func (c CapacitiesClient) GetDetails(ctx context.Context, id CapacityId) (result GetDetailsOperationResponse, err error)

GetDetails ...

func (CapacitiesClient) List

List ...

func (CapacitiesClient) ListByResourceGroup

ListByResourceGroup ...

func (CapacitiesClient) ListSkusForCapacity

func (c CapacitiesClient) ListSkusForCapacity(ctx context.Context, id CapacityId) (result ListSkusForCapacityOperationResponse, err error)

ListSkusForCapacity ...

func (CapacitiesClient) Resume

func (c CapacitiesClient) Resume(ctx context.Context, id CapacityId) (result ResumeOperationResponse, err error)

Resume ...

func (CapacitiesClient) ResumeThenPoll

func (c CapacitiesClient) ResumeThenPoll(ctx context.Context, id CapacityId) error

ResumeThenPoll performs Resume then polls until it's completed

func (CapacitiesClient) Suspend

func (c CapacitiesClient) Suspend(ctx context.Context, id CapacityId) (result SuspendOperationResponse, err error)

Suspend ...

func (CapacitiesClient) SuspendThenPoll

func (c CapacitiesClient) SuspendThenPoll(ctx context.Context, id CapacityId) error

SuspendThenPoll performs Suspend then polls until it's completed

func (CapacitiesClient) Update

Update ...

func (CapacitiesClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type CapacityId added in v0.20220907.1111434

type CapacityId struct {
	SubscriptionId    string
	ResourceGroupName string
	CapacityName      string
}

CapacityId is a struct representing the Resource ID for a Capacity

func NewCapacityID added in v0.20220907.1111434

func NewCapacityID(subscriptionId string, resourceGroupName string, capacityName string) CapacityId

NewCapacityID returns a new CapacityId struct

func ParseCapacityID added in v0.20220907.1111434

func ParseCapacityID(input string) (*CapacityId, error)

ParseCapacityID parses 'input' into a CapacityId

func ParseCapacityIDInsensitively added in v0.20220907.1111434

func ParseCapacityIDInsensitively(input string) (*CapacityId, error)

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

func (CapacityId) ID added in v0.20220907.1111434

func (id CapacityId) ID() string

ID returns the formatted Capacity ID

func (CapacityId) Segments added in v0.20220907.1111434

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

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

func (CapacityId) String added in v0.20220907.1111434

func (id CapacityId) String() string

String returns a human-readable description of this Capacity ID

type CapacityProvisioningState

type CapacityProvisioningState string
const (
	CapacityProvisioningStateDeleting     CapacityProvisioningState = "Deleting"
	CapacityProvisioningStateFailed       CapacityProvisioningState = "Failed"
	CapacityProvisioningStatePaused       CapacityProvisioningState = "Paused"
	CapacityProvisioningStatePausing      CapacityProvisioningState = "Pausing"
	CapacityProvisioningStatePreparing    CapacityProvisioningState = "Preparing"
	CapacityProvisioningStateProvisioning CapacityProvisioningState = "Provisioning"
	CapacityProvisioningStateResuming     CapacityProvisioningState = "Resuming"
	CapacityProvisioningStateScaling      CapacityProvisioningState = "Scaling"
	CapacityProvisioningStateSucceeded    CapacityProvisioningState = "Succeeded"
	CapacityProvisioningStateSuspended    CapacityProvisioningState = "Suspended"
	CapacityProvisioningStateSuspending   CapacityProvisioningState = "Suspending"
	CapacityProvisioningStateUpdating     CapacityProvisioningState = "Updating"
)

type CapacitySku

type CapacitySku struct {
	Capacity *int64           `json:"capacity,omitempty"`
	Name     string           `json:"name"`
	Tier     *CapacitySkuTier `json:"tier,omitempty"`
}

type CapacitySkuTier

type CapacitySkuTier string
const (
	CapacitySkuTierAutoPremiumHost CapacitySkuTier = "AutoPremiumHost"
	CapacitySkuTierPBIEAzure       CapacitySkuTier = "PBIE_Azure"
	CapacitySkuTierPremium         CapacitySkuTier = "Premium"
)

type CheckCapacityNameAvailabilityParameters

type CheckCapacityNameAvailabilityParameters struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type CheckCapacityNameAvailabilityResult

type CheckCapacityNameAvailabilityResult struct {
	Message       *string `json:"message,omitempty"`
	NameAvailable *bool   `json:"nameAvailable,omitempty"`
	Reason        *string `json:"reason,omitempty"`
}

type CheckNameAvailabilityOperationResponse

type CheckNameAvailabilityOperationResponse struct {
	HttpResponse *http.Response
	Model        *CheckCapacityNameAvailabilityResult
}

type CreateOperationResponse

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

type DedicatedCapacities

type DedicatedCapacities struct {
	Value []DedicatedCapacity `json:"value"`
}

type DedicatedCapacity

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

type DedicatedCapacityAdministrators

type DedicatedCapacityAdministrators struct {
	Members *[]string `json:"members,omitempty"`
}

type DedicatedCapacityMutableProperties

type DedicatedCapacityMutableProperties struct {
	Administration *DedicatedCapacityAdministrators `json:"administration,omitempty"`
	FriendlyName   *string                          `json:"friendlyName,omitempty"`
	Mode           *Mode                            `json:"mode,omitempty"`
	TenantId       *string                          `json:"tenantId,omitempty"`
}

type DedicatedCapacityProperties

type DedicatedCapacityProperties struct {
	Administration    *DedicatedCapacityAdministrators `json:"administration,omitempty"`
	FriendlyName      *string                          `json:"friendlyName,omitempty"`
	Mode              *Mode                            `json:"mode,omitempty"`
	ProvisioningState *CapacityProvisioningState       `json:"provisioningState,omitempty"`
	State             *State                           `json:"state,omitempty"`
	TenantId          *string                          `json:"tenantId,omitempty"`
}

type DedicatedCapacityUpdateParameters

type DedicatedCapacityUpdateParameters struct {
	Properties *DedicatedCapacityMutableProperties `json:"properties,omitempty"`
	Sku        *CapacitySku                        `json:"sku,omitempty"`
	Tags       *map[string]string                  `json:"tags,omitempty"`
}

type DeleteOperationResponse

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

type GetDetailsOperationResponse

type GetDetailsOperationResponse struct {
	HttpResponse *http.Response
	Model        *DedicatedCapacity
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *DedicatedCapacities
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *DedicatedCapacities
}

type ListSkusForCapacityOperationResponse

type ListSkusForCapacityOperationResponse struct {
	HttpResponse *http.Response
	Model        *SkuEnumerationForExistingResourceResult
}

type LocationId

type LocationId struct {
	SubscriptionId string
	LocationName   string
}

LocationId is a struct representing the Resource ID for a Location

func NewLocationID

func NewLocationID(subscriptionId string, locationName string) LocationId

NewLocationID returns a new LocationId struct

func ParseLocationID

func ParseLocationID(input string) (*LocationId, error)

ParseLocationID parses 'input' into a LocationId

func ParseLocationIDInsensitively

func ParseLocationIDInsensitively(input string) (*LocationId, error)

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

func (LocationId) ID

func (id LocationId) ID() string

ID returns the formatted Location ID

func (LocationId) Segments

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

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

func (LocationId) String

func (id LocationId) String() string

String returns a human-readable description of this Location ID

type Mode

type Mode string
const (
	ModeGenOne Mode = "Gen1"
	ModeGenTwo Mode = "Gen2"
)

type ResumeOperationResponse

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

type SkuDetailsForExistingResource

type SkuDetailsForExistingResource struct {
	ResourceType *string      `json:"resourceType,omitempty"`
	Sku          *CapacitySku `json:"sku,omitempty"`
}

type SkuEnumerationForExistingResourceResult

type SkuEnumerationForExistingResourceResult struct {
	Value *[]SkuDetailsForExistingResource `json:"value,omitempty"`
}

type State

type State string
const (
	StateDeleting     State = "Deleting"
	StateFailed       State = "Failed"
	StatePaused       State = "Paused"
	StatePausing      State = "Pausing"
	StatePreparing    State = "Preparing"
	StateProvisioning State = "Provisioning"
	StateResuming     State = "Resuming"
	StateScaling      State = "Scaling"
	StateSucceeded    State = "Succeeded"
	StateSuspended    State = "Suspended"
	StateSuspending   State = "Suspending"
	StateUpdating     State = "Updating"
)

type SuspendOperationResponse

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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