resourcepools

package
v0.20241023.1122425 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/resourcepools Documentation

The resourcepools SDK allows for interaction with Azure Resource Manager connectedvmware (API Version 2022-01-10-preview).

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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/resourcepools"

Client Initialization

client := resourcepools.NewResourcePoolsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ResourcePoolsClient.Create

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

payload := resourcepools.ResourcePool{
	// ...
}


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

Example Usage: ResourcePoolsClient.Delete

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

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

Example Usage: ResourcePoolsClient.Get

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

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

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

// 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: ResourcePoolsClient.ListByResourceGroup

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

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

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


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 ValidateResourcePoolID

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

ValidateResourcePoolID checks that 'input' can be parsed as a Resource Pool ID

Types

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ResourcePool
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *bool
}

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 GetOperationResponse

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

type ListByResourceGroupCompleteResult

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

type ListByResourceGroupCustomPager added in v0.20240628.1153531

type ListByResourceGroupCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link

type ListByResourceGroupOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ResourcePool
}

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationResponse

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

type ResourcePatch

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

type ResourcePool

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

type ResourcePoolId

type ResourcePoolId struct {
	SubscriptionId    string
	ResourceGroupName string
	ResourcePoolName  string
}

ResourcePoolId is a struct representing the Resource ID for a Resource Pool

func NewResourcePoolID

func NewResourcePoolID(subscriptionId string, resourceGroupName string, resourcePoolName string) ResourcePoolId

NewResourcePoolID returns a new ResourcePoolId struct

func ParseResourcePoolID

func ParseResourcePoolID(input string) (*ResourcePoolId, error)

ParseResourcePoolID parses 'input' into a ResourcePoolId

func ParseResourcePoolIDInsensitively

func ParseResourcePoolIDInsensitively(input string) (*ResourcePoolId, error)

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

func (*ResourcePoolId) FromParseResult

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

func (ResourcePoolId) ID

func (id ResourcePoolId) ID() string

ID returns the formatted Resource Pool ID

func (ResourcePoolId) Segments

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

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

func (ResourcePoolId) String

func (id ResourcePoolId) String() string

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

type ResourcePoolOperationPredicate

type ResourcePoolOperationPredicate struct {
	Id       *string
	Kind     *string
	Location *string
	Name     *string
	Type     *string
}

func (ResourcePoolOperationPredicate) Matches

type ResourcePoolProperties

type ResourcePoolProperties struct {
	CpuLimitMHz        *int64            `json:"cpuLimitMHz,omitempty"`
	CpuReservationMHz  *int64            `json:"cpuReservationMHz,omitempty"`
	CpuSharesLevel     *string           `json:"cpuSharesLevel,omitempty"`
	CustomResourceName *string           `json:"customResourceName,omitempty"`
	InventoryItemId    *string           `json:"inventoryItemId,omitempty"`
	MemLimitMB         *int64            `json:"memLimitMB,omitempty"`
	MemReservationMB   *int64            `json:"memReservationMB,omitempty"`
	MemSharesLevel     *string           `json:"memSharesLevel,omitempty"`
	MoName             *string           `json:"moName,omitempty"`
	MoRefId            *string           `json:"moRefId,omitempty"`
	ProvisioningState  *string           `json:"provisioningState,omitempty"`
	Statuses           *[]ResourceStatus `json:"statuses,omitempty"`
	Uuid               *string           `json:"uuid,omitempty"`
	VCenterId          *string           `json:"vCenterId,omitempty"`
}

type ResourcePoolsClient

type ResourcePoolsClient struct {
	Client *resourcemanager.Client
}

func NewResourcePoolsClientWithBaseURI

func NewResourcePoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcePoolsClient, error)

func (ResourcePoolsClient) Create

Create ...

func (ResourcePoolsClient) CreateThenPoll

func (c ResourcePoolsClient) CreateThenPoll(ctx context.Context, id ResourcePoolId, input ResourcePool) error

CreateThenPoll performs Create then polls until it's completed

func (ResourcePoolsClient) Delete

Delete ...

func (ResourcePoolsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (ResourcePoolsClient) Get

Get ...

func (ResourcePoolsClient) List

List ...

func (ResourcePoolsClient) ListByResourceGroup

ListByResourceGroup ...

func (ResourcePoolsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (ResourcePoolsClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ResourcePoolsClient) ListComplete

ListComplete retrieves all the results into a single object

func (ResourcePoolsClient) ListCompleteMatchingPredicate

func (c ResourcePoolsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ResourcePoolOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ResourcePoolsClient) Update

Update ...

type ResourceStatus

type ResourceStatus struct {
	LastUpdatedAt *string `json:"lastUpdatedAt,omitempty"`
	Message       *string `json:"message,omitempty"`
	Reason        *string `json:"reason,omitempty"`
	Severity      *string `json:"severity,omitempty"`
	Status        *string `json:"status,omitempty"`
	Type          *string `json:"type,omitempty"`
}

func (*ResourceStatus) GetLastUpdatedAtAsTime

func (o *ResourceStatus) GetLastUpdatedAtAsTime() (*time.Time, error)

func (*ResourceStatus) SetLastUpdatedAtAsTime

func (o *ResourceStatus) SetLastUpdatedAtAsTime(input time.Time)

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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