clouds

package
v0.20240110.1133510 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds Documentation

The clouds SDK allows for interaction with the Azure Resource Manager Service systemcentervirtualmachinemanager (API Version 2023-10-07).

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/systemcentervirtualmachinemanager/2023-10-07/clouds"

Client Initialization

client := clouds.NewCloudsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CloudsClient.CreateOrUpdate

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

payload := clouds.Cloud{
	// ...
}


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

Example Usage: CloudsClient.Delete

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

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

Example Usage: CloudsClient.Get

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

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: CloudsClient.ListByResourceGroup

ctx := context.TODO()
id := clouds.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: CloudsClient.ListBySubscription

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

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

payload := clouds.ResourcePatch{
	// ...
}


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 PossibleValuesForForce

func PossibleValuesForForce() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateCloudID

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

ValidateCloudID checks that 'input' can be parsed as a Cloud ID

Types

type Cloud

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

type CloudCapacity

type CloudCapacity struct {
	CpuCount *int64 `json:"cpuCount,omitempty"`
	MemoryMB *int64 `json:"memoryMB,omitempty"`
	VMCount  *int64 `json:"vmCount,omitempty"`
}

type CloudId

type CloudId struct {
	SubscriptionId    string
	ResourceGroupName string
	CloudName         string
}

CloudId is a struct representing the Resource ID for a Cloud

func NewCloudID

func NewCloudID(subscriptionId string, resourceGroupName string, cloudName string) CloudId

NewCloudID returns a new CloudId struct

func ParseCloudID

func ParseCloudID(input string) (*CloudId, error)

ParseCloudID parses 'input' into a CloudId

func ParseCloudIDInsensitively

func ParseCloudIDInsensitively(input string) (*CloudId, error)

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

func (*CloudId) FromParseResult added in v0.20231127.1171502

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

func (CloudId) ID

func (id CloudId) ID() string

ID returns the formatted Cloud ID

func (CloudId) Segments

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

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

func (CloudId) String

func (id CloudId) String() string

String returns a human-readable description of this Cloud ID

type CloudOperationPredicate

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

func (CloudOperationPredicate) Matches

func (p CloudOperationPredicate) Matches(input Cloud) bool

type CloudProperties

type CloudProperties struct {
	CloudCapacity      *CloudCapacity      `json:"cloudCapacity,omitempty"`
	CloudName          *string             `json:"cloudName,omitempty"`
	InventoryItemId    *string             `json:"inventoryItemId,omitempty"`
	ProvisioningState  *ProvisioningState  `json:"provisioningState,omitempty"`
	StorageQoSPolicies *[]StorageQoSPolicy `json:"storageQoSPolicies,omitempty"`
	Uuid               *string             `json:"uuid,omitempty"`
	VMmServerId        *string             `json:"vmmServerId,omitempty"`
}

type CloudsClient

type CloudsClient struct {
	Client *resourcemanager.Client
}

func NewCloudsClientWithBaseURI

func NewCloudsClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudsClient, error)

func (CloudsClient) CreateOrUpdate

func (c CloudsClient) CreateOrUpdate(ctx context.Context, id CloudId, input Cloud) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (CloudsClient) CreateOrUpdateThenPoll

func (c CloudsClient) CreateOrUpdateThenPoll(ctx context.Context, id CloudId, input Cloud) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (CloudsClient) Delete

func (c CloudsClient) Delete(ctx context.Context, id CloudId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)

Delete ...

func (CloudsClient) DeleteThenPoll

func (c CloudsClient) DeleteThenPoll(ctx context.Context, id CloudId, options DeleteOperationOptions) error

DeleteThenPoll performs Delete then polls until it's completed

func (CloudsClient) Get

func (c CloudsClient) Get(ctx context.Context, id CloudId) (result GetOperationResponse, err error)

Get ...

func (CloudsClient) ListByResourceGroup

ListByResourceGroup ...

func (CloudsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (CloudsClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CloudsClient) ListBySubscription

ListBySubscription ...

func (CloudsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (CloudsClient) ListBySubscriptionCompleteMatchingPredicate

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

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CloudsClient) Update

func (c CloudsClient) Update(ctx context.Context, id CloudId, input ResourcePatch) (result UpdateOperationResponse, err error)

Update ...

func (CloudsClient) UpdateThenPoll

func (c CloudsClient) UpdateThenPoll(ctx context.Context, id CloudId, input ResourcePatch) error

UpdateThenPoll performs Update then polls until it's completed

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *Force
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

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

func (DeleteOperationOptions) ToOData

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

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type ExtendedLocation

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

type Force

type Force string
const (
	ForceFalse Force = "false"
	ForceTrue  Force = "true"
)

func (*Force) UnmarshalJSON

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

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

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

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

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

type ListBySubscriptionOperationResponse

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreated      ProvisioningState = "Created"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type ResourcePatch

type ResourcePatch struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type StorageQoSPolicy

type StorageQoSPolicy struct {
	BandwidthLimit *int64  `json:"bandwidthLimit,omitempty"`
	Id             *string `json:"id,omitempty"`
	IopsMaximum    *int64  `json:"iopsMaximum,omitempty"`
	IopsMinimum    *int64  `json:"iopsMinimum,omitempty"`
	Name           *string `json:"name,omitempty"`
	PolicyId       *string `json:"policyId,omitempty"`
}

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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