README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups
Documentation
The dedicatedhostgroups
SDK allows for interaction with the Azure Resource Manager Service compute
(API Version 2021-11-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/compute/2021-11-01/dedicatedhostgroups"
Client Initialization
client := dedicatedhostgroups.NewDedicatedHostGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: DedicatedHostGroupsClient.CreateOrUpdate
ctx := context.TODO()
id := dedicatedhostgroups.NewHostGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostGroupValue")
payload := dedicatedhostgroups.DedicatedHostGroup{
// ...
}
read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: DedicatedHostGroupsClient.Delete
ctx := context.TODO()
id := dedicatedhostgroups.NewHostGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostGroupValue")
read, err := client.Delete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: DedicatedHostGroupsClient.Get
ctx := context.TODO()
id := dedicatedhostgroups.NewHostGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostGroupValue")
read, err := client.Get(ctx, id, dedicatedhostgroups.DefaultGetOperationOptions())
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: DedicatedHostGroupsClient.ListByResourceGroup
ctx := context.TODO()
id := dedicatedhostgroups.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: DedicatedHostGroupsClient.ListBySubscription
ctx := context.TODO()
id := dedicatedhostgroups.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: DedicatedHostGroupsClient.Update
ctx := context.TODO()
id := dedicatedhostgroups.NewHostGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostGroupValue")
payload := dedicatedhostgroups.DedicatedHostGroupUpdate{
// ...
}
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 PossibleValuesForInstanceViewTypes() []string
- func PossibleValuesForStatusLevelTypes() []string
- func ValidateHostGroupID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type DedicatedHostAllocatableVM
- type DedicatedHostAvailableCapacity
- type DedicatedHostGroup
- type DedicatedHostGroupInstanceView
- type DedicatedHostGroupOperationPredicate
- type DedicatedHostGroupProperties
- type DedicatedHostGroupUpdate
- type DedicatedHostGroupsClient
- func (c DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, id HostGroupId, input DedicatedHostGroup) (result CreateOrUpdateOperationResponse, err error)
- func (c DedicatedHostGroupsClient) Delete(ctx context.Context, id HostGroupId) (result DeleteOperationResponse, err error)
- func (c DedicatedHostGroupsClient) Get(ctx context.Context, id HostGroupId, options GetOperationOptions) (result GetOperationResponse, err error)
- func (c DedicatedHostGroupsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp ListByResourceGroupOperationResponse, err error)
- func (c DedicatedHostGroupsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c DedicatedHostGroupsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (resp ListByResourceGroupCompleteResult, err error)
- func (c DedicatedHostGroupsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (resp ListBySubscriptionOperationResponse, err error)
- func (c DedicatedHostGroupsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
- func (c DedicatedHostGroupsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (resp ListBySubscriptionCompleteResult, err error)
- func (c DedicatedHostGroupsClient) Update(ctx context.Context, id HostGroupId, input DedicatedHostGroupUpdate) (result UpdateOperationResponse, err error)
- type DedicatedHostInstanceViewWithName
- type DeleteOperationResponse
- type GetOperationOptions
- type GetOperationResponse
- type HostGroupId
- type InstanceViewStatus
- type InstanceViewTypes
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListBySubscriptionCompleteResult
- type ListBySubscriptionOperationResponse
- type StatusLevelTypes
- type SubResourceReadOnly
- type UpdateOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForInstanceViewTypes ¶
func PossibleValuesForInstanceViewTypes() []string
func PossibleValuesForStatusLevelTypes ¶
func PossibleValuesForStatusLevelTypes() []string
func ValidateHostGroupID ¶
ValidateHostGroupID checks that 'input' can be parsed as a Host Group ID
Types ¶
type CreateOrUpdateOperationResponse ¶
type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response Model *DedicatedHostGroup }
type DedicatedHostAvailableCapacity ¶
type DedicatedHostAvailableCapacity struct {
AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"`
}
type DedicatedHostGroup ¶
type DedicatedHostGroup struct { Id *string `json:"id,omitempty"` Location string `json:"location"` Name *string `json:"name,omitempty"` Properties *DedicatedHostGroupProperties `json:"properties,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` Zones *zones.Schema `json:"zones,omitempty"` }
type DedicatedHostGroupInstanceView ¶
type DedicatedHostGroupInstanceView struct {
Hosts *[]DedicatedHostInstanceViewWithName `json:"hosts,omitempty"`
}
type DedicatedHostGroupOperationPredicate ¶
type DedicatedHostGroupOperationPredicate struct { Id *string Location *string Name *string Type *string }
func (DedicatedHostGroupOperationPredicate) Matches ¶
func (p DedicatedHostGroupOperationPredicate) Matches(input DedicatedHostGroup) bool
type DedicatedHostGroupProperties ¶
type DedicatedHostGroupProperties struct { Hosts *[]SubResourceReadOnly `json:"hosts,omitempty"` InstanceView *DedicatedHostGroupInstanceView `json:"instanceView,omitempty"` PlatformFaultDomainCount int64 `json:"platformFaultDomainCount"` SupportAutomaticPlacement *bool `json:"supportAutomaticPlacement,omitempty"` }
type DedicatedHostGroupUpdate ¶
type DedicatedHostGroupUpdate struct { Properties *DedicatedHostGroupProperties `json:"properties,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Zones *zones.Schema `json:"zones,omitempty"` }
type DedicatedHostGroupsClient ¶
type DedicatedHostGroupsClient struct { Client autorest.Client // contains filtered or unexported fields }
func NewDedicatedHostGroupsClientWithBaseURI ¶
func NewDedicatedHostGroupsClientWithBaseURI(endpoint string) DedicatedHostGroupsClient
func (DedicatedHostGroupsClient) CreateOrUpdate ¶
func (c DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, id HostGroupId, input DedicatedHostGroup) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (DedicatedHostGroupsClient) Delete ¶
func (c DedicatedHostGroupsClient) Delete(ctx context.Context, id HostGroupId) (result DeleteOperationResponse, err error)
Delete ...
func (DedicatedHostGroupsClient) Get ¶
func (c DedicatedHostGroupsClient) Get(ctx context.Context, id HostGroupId, options GetOperationOptions) (result GetOperationResponse, err error)
Get ...
func (DedicatedHostGroupsClient) ListByResourceGroup ¶
func (c DedicatedHostGroupsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (DedicatedHostGroupsClient) ListByResourceGroupComplete ¶
func (c DedicatedHostGroupsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
ListByResourceGroupComplete retrieves all of the results into a single object
func (DedicatedHostGroupsClient) ListByResourceGroupCompleteMatchingPredicate ¶
func (c DedicatedHostGroupsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DedicatedHostGroupOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)
ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (DedicatedHostGroupsClient) ListBySubscription ¶
func (c DedicatedHostGroupsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (resp ListBySubscriptionOperationResponse, err error)
ListBySubscription ...
func (DedicatedHostGroupsClient) ListBySubscriptionComplete ¶
func (c DedicatedHostGroupsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
ListBySubscriptionComplete retrieves all of the results into a single object
func (DedicatedHostGroupsClient) ListBySubscriptionCompleteMatchingPredicate ¶
func (c DedicatedHostGroupsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DedicatedHostGroupOperationPredicate) (resp ListBySubscriptionCompleteResult, err error)
ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (DedicatedHostGroupsClient) Update ¶
func (c DedicatedHostGroupsClient) Update(ctx context.Context, id HostGroupId, input DedicatedHostGroupUpdate) (result UpdateOperationResponse, err error)
Update ...
type DedicatedHostInstanceViewWithName ¶
type DedicatedHostInstanceViewWithName struct { AssetId *string `json:"assetId,omitempty"` AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"` Name *string `json:"name,omitempty"` Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` }
type DeleteOperationResponse ¶
type GetOperationOptions ¶
type GetOperationOptions struct {
Expand *InstanceViewTypes
}
func DefaultGetOperationOptions ¶
func DefaultGetOperationOptions() GetOperationOptions
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response Model *DedicatedHostGroup }
type HostGroupId ¶
HostGroupId is a struct representing the Resource ID for a Host Group
func NewHostGroupID ¶
func NewHostGroupID(subscriptionId string, resourceGroupName string, hostGroupName string) HostGroupId
NewHostGroupID returns a new HostGroupId struct
func ParseHostGroupID ¶
func ParseHostGroupID(input string) (*HostGroupId, error)
ParseHostGroupID parses 'input' into a HostGroupId
func ParseHostGroupIDInsensitively ¶
func ParseHostGroupIDInsensitively(input string) (*HostGroupId, error)
ParseHostGroupIDInsensitively parses 'input' case-insensitively into a HostGroupId note: this method should only be used for API response data and not user input
func (HostGroupId) Segments ¶
func (id HostGroupId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Host Group ID
func (HostGroupId) String ¶
func (id HostGroupId) String() string
String returns a human-readable description of this Host Group ID
type InstanceViewStatus ¶
type InstanceViewStatus struct { Code *string `json:"code,omitempty"` DisplayStatus *string `json:"displayStatus,omitempty"` Level *StatusLevelTypes `json:"level,omitempty"` Message *string `json:"message,omitempty"` Time *string `json:"time,omitempty"` }
func (*InstanceViewStatus) GetTimeAsTime ¶
func (o *InstanceViewStatus) GetTimeAsTime() (*time.Time, error)
func (*InstanceViewStatus) SetTimeAsTime ¶
func (o *InstanceViewStatus) SetTimeAsTime(input time.Time)
type InstanceViewTypes ¶
type InstanceViewTypes string
const ( InstanceViewTypesInstanceView InstanceViewTypes = "instanceView" InstanceViewTypesUserData InstanceViewTypes = "userData" )
type ListByResourceGroupCompleteResult ¶
type ListByResourceGroupCompleteResult struct {
Items []DedicatedHostGroup
}
type ListByResourceGroupOperationResponse ¶
type ListByResourceGroupOperationResponse struct { HttpResponse *http.Response Model *[]DedicatedHostGroup // contains filtered or unexported fields }
func (ListByResourceGroupOperationResponse) HasMore ¶
func (r ListByResourceGroupOperationResponse) HasMore() bool
func (ListByResourceGroupOperationResponse) LoadMore ¶
func (r ListByResourceGroupOperationResponse) LoadMore(ctx context.Context) (resp ListByResourceGroupOperationResponse, err error)
type ListBySubscriptionCompleteResult ¶
type ListBySubscriptionCompleteResult struct {
Items []DedicatedHostGroup
}
type ListBySubscriptionOperationResponse ¶
type ListBySubscriptionOperationResponse struct { HttpResponse *http.Response Model *[]DedicatedHostGroup // contains filtered or unexported fields }
func (ListBySubscriptionOperationResponse) HasMore ¶
func (r ListBySubscriptionOperationResponse) HasMore() bool
func (ListBySubscriptionOperationResponse) LoadMore ¶
func (r ListBySubscriptionOperationResponse) LoadMore(ctx context.Context) (resp ListBySubscriptionOperationResponse, err error)
type StatusLevelTypes ¶
type StatusLevelTypes string
const ( StatusLevelTypesError StatusLevelTypes = "Error" StatusLevelTypesInfo StatusLevelTypes = "Info" StatusLevelTypesWarning StatusLevelTypes = "Warning" )
type SubResourceReadOnly ¶
type SubResourceReadOnly struct {
Id *string `json:"id,omitempty"`
}
type UpdateOperationResponse ¶
type UpdateOperationResponse struct { HttpResponse *http.Response Model *DedicatedHostGroup }
Source Files ¶
- client.go
- constants.go
- id_hostgroup.go
- method_createorupdate_autorest.go
- method_delete_autorest.go
- method_get_autorest.go
- method_listbyresourcegroup_autorest.go
- method_listbysubscription_autorest.go
- method_update_autorest.go
- model_dedicatedhostallocatablevm.go
- model_dedicatedhostavailablecapacity.go
- model_dedicatedhostgroup.go
- model_dedicatedhostgroupinstanceview.go
- model_dedicatedhostgroupproperties.go
- model_dedicatedhostgroupupdate.go
- model_dedicatedhostinstanceviewwithname.go
- model_instanceviewstatus.go
- model_subresourcereadonly.go
- predicates.go
- version.go