README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/clusters
Documentation
The clusters
SDK allows for interaction with the Azure Resource Manager Service operationalinsights
(API Version 2020-08-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/operationalinsights/2020-08-01/clusters"
Client Initialization
client := clusters.NewClustersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ClustersClient.CreateOrUpdate
ctx := context.TODO()
id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue")
payload := clusters.Cluster{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ClustersClient.Delete
ctx := context.TODO()
id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: ClustersClient.Get
ctx := context.TODO()
id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue")
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: ClustersClient.List
ctx := context.TODO()
id := clusters.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: ClustersClient.ListByResourceGroup
ctx := context.TODO()
id := clusters.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: ClustersClient.Update
ctx := context.TODO()
id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue")
payload := clusters.ClusterPatch{
// ...
}
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 PossibleValuesForClusterEntityStatus() []string
- func PossibleValuesForClusterSkuNameEnum() []string
- func ValidateClusterID(input interface{}, key string) (warnings []string, errors []error)
- type Cluster
- type ClusterEntityStatus
- type ClusterId
- type ClusterOperationPredicate
- type ClusterPatch
- type ClusterPatchProperties
- type ClusterProperties
- type ClusterSku
- type ClusterSkuNameEnum
- type ClustersClient
- func (c ClustersClient) CreateOrUpdate(ctx context.Context, id ClusterId, input Cluster) (result CreateOrUpdateOperationResponse, err error)
- func (c ClustersClient) CreateOrUpdateThenPoll(ctx context.Context, id ClusterId, input Cluster) error
- func (c ClustersClient) Delete(ctx context.Context, id ClusterId) (result DeleteOperationResponse, err error)
- func (c ClustersClient) DeleteThenPoll(ctx context.Context, id ClusterId) error
- func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperationResponse, err error)
- func (c ClustersClient) List(ctx context.Context, id commonids.SubscriptionId) (resp ListOperationResponse, err error)
- func (c ClustersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp ListByResourceGroupOperationResponse, err error)
- func (c ClustersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c ClustersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (resp ListByResourceGroupCompleteResult, err error)
- func (c ClustersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
- func (c ClustersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (resp ListCompleteResult, err error)
- func (c ClustersClient) Update(ctx context.Context, id ClusterId, input ClusterPatch) (result UpdateOperationResponse, err error)
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type KeyVaultProperties
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListCompleteResult
- type ListOperationResponse
- type UpdateOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForClusterEntityStatus ¶
func PossibleValuesForClusterEntityStatus() []string
func PossibleValuesForClusterSkuNameEnum ¶
func PossibleValuesForClusterSkuNameEnum() []string
func ValidateClusterID ¶
ValidateClusterID checks that 'input' can be parsed as a Cluster ID
Types ¶
type Cluster ¶
type Cluster struct { Id *string `json:"id,omitempty"` Identity *identity.SystemAssigned `json:"identity,omitempty"` Location string `json:"location"` Name *string `json:"name,omitempty"` Properties *ClusterProperties `json:"properties,omitempty"` Sku *ClusterSku `json:"sku,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` }
type ClusterEntityStatus ¶
type ClusterEntityStatus string
const ( ClusterEntityStatusCanceled ClusterEntityStatus = "Canceled" ClusterEntityStatusCreating ClusterEntityStatus = "Creating" ClusterEntityStatusDeleting ClusterEntityStatus = "Deleting" ClusterEntityStatusFailed ClusterEntityStatus = "Failed" ClusterEntityStatusProvisioningAccount ClusterEntityStatus = "ProvisioningAccount" ClusterEntityStatusSucceeded ClusterEntityStatus = "Succeeded" ClusterEntityStatusUpdating ClusterEntityStatus = "Updating" )
type ClusterId ¶
ClusterId is a struct representing the Resource ID for a Cluster
func NewClusterID ¶
NewClusterID returns a new ClusterId struct
func ParseClusterID ¶
ParseClusterID parses 'input' into a ClusterId
func ParseClusterIDInsensitively ¶
ParseClusterIDInsensitively parses 'input' case-insensitively into a ClusterId note: this method should only be used for API response data and not user input
func (ClusterId) Segments ¶
func (id ClusterId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Cluster ID
type ClusterOperationPredicate ¶
func (ClusterOperationPredicate) Matches ¶
func (p ClusterOperationPredicate) Matches(input Cluster) bool
type ClusterPatch ¶
type ClusterPatch struct { Properties *ClusterPatchProperties `json:"properties,omitempty"` Sku *ClusterSku `json:"sku,omitempty"` Tags *map[string]string `json:"tags,omitempty"` }
type ClusterPatchProperties ¶
type ClusterPatchProperties struct {
KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"`
}
type ClusterProperties ¶
type ClusterProperties struct { ClusterId *string `json:"clusterId,omitempty"` KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"` NextLink *string `json:"nextLink,omitempty"` ProvisioningState *ClusterEntityStatus `json:"provisioningState,omitempty"` }
type ClusterSku ¶
type ClusterSku struct { Capacity *int64 `json:"capacity,omitempty"` Name *ClusterSkuNameEnum `json:"name,omitempty"` }
type ClusterSkuNameEnum ¶
type ClusterSkuNameEnum string
const (
ClusterSkuNameEnumCapacityReservation ClusterSkuNameEnum = "CapacityReservation"
)
type ClustersClient ¶
func NewClustersClientWithBaseURI ¶
func NewClustersClientWithBaseURI(endpoint string) ClustersClient
func (ClustersClient) CreateOrUpdate ¶
func (c ClustersClient) CreateOrUpdate(ctx context.Context, id ClusterId, input Cluster) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (ClustersClient) CreateOrUpdateThenPoll ¶
func (c ClustersClient) CreateOrUpdateThenPoll(ctx context.Context, id ClusterId, input Cluster) error
CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed
func (ClustersClient) Delete ¶
func (c ClustersClient) Delete(ctx context.Context, id ClusterId) (result DeleteOperationResponse, err error)
Delete ...
func (ClustersClient) DeleteThenPoll ¶
func (c ClustersClient) DeleteThenPoll(ctx context.Context, id ClusterId) error
DeleteThenPoll performs Delete then polls until it's completed
func (ClustersClient) Get ¶
func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperationResponse, err error)
Get ...
func (ClustersClient) List ¶
func (c ClustersClient) List(ctx context.Context, id commonids.SubscriptionId) (resp ListOperationResponse, err error)
List ...
func (ClustersClient) ListByResourceGroup ¶
func (c ClustersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (ClustersClient) ListByResourceGroupComplete ¶
func (c ClustersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
ListByResourceGroupComplete retrieves all of the results into a single object
func (ClustersClient) ListByResourceGroupCompleteMatchingPredicate ¶
func (c ClustersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ClusterOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)
ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (ClustersClient) ListComplete ¶
func (c ClustersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
ListComplete retrieves all of the results into a single object
func (ClustersClient) ListCompleteMatchingPredicate ¶
func (c ClustersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ClusterOperationPredicate) (resp ListCompleteResult, err error)
ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (ClustersClient) Update ¶
func (c ClustersClient) Update(ctx context.Context, id ClusterId, input ClusterPatch) (result UpdateOperationResponse, err error)
Update ...
type CreateOrUpdateOperationResponse ¶
type CreateOrUpdateOperationResponse struct { Poller polling.LongRunningPoller HttpResponse *http.Response }
type DeleteOperationResponse ¶
type DeleteOperationResponse struct { Poller polling.LongRunningPoller HttpResponse *http.Response }
type GetOperationResponse ¶
type KeyVaultProperties ¶
type ListByResourceGroupCompleteResult ¶
type ListByResourceGroupCompleteResult struct {
Items []Cluster
}
type ListByResourceGroupOperationResponse ¶
type ListByResourceGroupOperationResponse struct { HttpResponse *http.Response Model *[]Cluster // 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 ListCompleteResult ¶
type ListCompleteResult struct {
Items []Cluster
}
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response Model *[]Cluster // contains filtered or unexported fields }
func (ListOperationResponse) HasMore ¶
func (r ListOperationResponse) HasMore() bool
func (ListOperationResponse) LoadMore ¶
func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)
type UpdateOperationResponse ¶
Source Files ¶
- client.go
- constants.go
- id_cluster.go
- method_createorupdate_autorest.go
- method_delete_autorest.go
- method_get_autorest.go
- method_list_autorest.go
- method_listbyresourcegroup_autorest.go
- method_update_autorest.go
- model_cluster.go
- model_clusterpatch.go
- model_clusterpatchproperties.go
- model_clusterproperties.go
- model_clustersku.go
- model_keyvaultproperties.go
- predicates.go
- version.go