README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/resourcepools
Documentation
The resourcepools
SDK allows for interaction with the Azure Resource Manager Service connectedvmware
(API Version 2023-10-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/connectedvmware/2023-10-01/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", "resourcePoolValue")
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", "resourcePoolValue")
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", "resourcePoolValue")
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 := resourcepools.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 := resourcepools.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", "resourcePoolValue")
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 ¶
- func PossibleValuesForProvisioningState() []string
- func ValidateResourcePoolID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOperationResponse
- type DeleteOperationOptions
- type DeleteOperationResponse
- type ExtendedLocation
- type GetOperationResponse
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListCompleteResult
- type ListOperationResponse
- type ProvisioningState
- type ResourcePatch
- type ResourcePool
- type ResourcePoolId
- type ResourcePoolOperationPredicate
- type ResourcePoolProperties
- type ResourcePoolsClient
- func (c ResourcePoolsClient) Create(ctx context.Context, id ResourcePoolId, input ResourcePool) (result CreateOperationResponse, err error)
- func (c ResourcePoolsClient) CreateThenPoll(ctx context.Context, id ResourcePoolId, input ResourcePool) error
- func (c ResourcePoolsClient) Delete(ctx context.Context, id ResourcePoolId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)
- func (c ResourcePoolsClient) DeleteThenPoll(ctx context.Context, id ResourcePoolId, options DeleteOperationOptions) error
- func (c ResourcePoolsClient) Get(ctx context.Context, id ResourcePoolId) (result GetOperationResponse, err error)
- func (c ResourcePoolsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error)
- func (c ResourcePoolsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
- func (c ResourcePoolsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c ResourcePoolsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupCompleteResult, err error)
- func (c ResourcePoolsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
- func (c ResourcePoolsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (result ListCompleteResult, err error)
- func (c ResourcePoolsClient) Update(ctx context.Context, id ResourcePoolId, input ResourcePatch) (result UpdateOperationResponse, err error)
- type ResourceStatus
- type UpdateOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForProvisioningState ¶
func PossibleValuesForProvisioningState() []string
func ValidateResourcePoolID ¶
ValidateResourcePoolID checks that 'input' can be parsed as a Resource Pool ID
Types ¶
type CreateOperationResponse ¶
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 ¶
func (o DeleteOperationOptions) ToQuery() *client.QueryParams
type DeleteOperationResponse ¶
type ExtendedLocation ¶
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *ResourcePool }
type ListByResourceGroupCompleteResult ¶
type ListByResourceGroupCompleteResult struct { LatestHttpResponse *http.Response Items []ResourcePool }
type ListByResourceGroupOperationResponse ¶
type ListByResourceGroupOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]ResourcePool }
type ListCompleteResult ¶
type ListCompleteResult struct { LatestHttpResponse *http.Response Items []ResourcePool }
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]ResourcePool }
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 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 ¶ added in v0.20231127.1171502
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 ¶
func (p ResourcePoolOperationPredicate) Matches(input ResourcePool) bool
type ResourcePoolProperties ¶
type ResourcePoolProperties struct { CpuCapacityMHz *int64 `json:"cpuCapacityMHz,omitempty"` CpuLimitMHz *int64 `json:"cpuLimitMHz,omitempty"` CpuOverallUsageMHz *int64 `json:"cpuOverallUsageMHz,omitempty"` CpuReservationMHz *int64 `json:"cpuReservationMHz,omitempty"` CustomResourceName *string `json:"customResourceName,omitempty"` DatastoreIds *[]string `json:"datastoreIds,omitempty"` InventoryItemId *string `json:"inventoryItemId,omitempty"` MemCapacityGB *int64 `json:"memCapacityGB,omitempty"` MemLimitMB *int64 `json:"memLimitMB,omitempty"` MemOverallUsageGB *int64 `json:"memOverallUsageGB,omitempty"` MemReservationMB *int64 `json:"memReservationMB,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` NetworkIds *[]string `json:"networkIds,omitempty"` ProvisioningState *ProvisioningState `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 ¶
func (c ResourcePoolsClient) Create(ctx context.Context, id ResourcePoolId, input ResourcePool) (result CreateOperationResponse, err error)
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 ¶
func (c ResourcePoolsClient) Delete(ctx context.Context, id ResourcePoolId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)
Delete ...
func (ResourcePoolsClient) DeleteThenPoll ¶
func (c ResourcePoolsClient) DeleteThenPoll(ctx context.Context, id ResourcePoolId, options DeleteOperationOptions) error
DeleteThenPoll performs Delete then polls until it's completed
func (ResourcePoolsClient) Get ¶
func (c ResourcePoolsClient) Get(ctx context.Context, id ResourcePoolId) (result GetOperationResponse, err error)
Get ...
func (ResourcePoolsClient) List ¶
func (c ResourcePoolsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error)
List ...
func (ResourcePoolsClient) ListByResourceGroup ¶
func (c ResourcePoolsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (ResourcePoolsClient) ListByResourceGroupComplete ¶
func (c ResourcePoolsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
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 ¶
func (c ResourcePoolsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
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 ¶
func (c ResourcePoolsClient) Update(ctx context.Context, id ResourcePoolId, input ResourcePatch) (result UpdateOperationResponse, err error)
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 }
Source Files ¶
- client.go
- constants.go
- id_resourcepool.go
- method_create.go
- method_delete.go
- method_get.go
- method_list.go
- method_listbyresourcegroup.go
- method_update.go
- model_extendedlocation.go
- model_resourcepatch.go
- model_resourcepool.go
- model_resourcepoolproperties.go
- model_resourcestatus.go
- predicates.go
- version.go