README
¶
github.com/hashicorp/go-azure-sdk/resource-manager/extendedlocation/2021-08-15/customlocations
Documentation
The customlocations
SDK allows for interaction with the Azure Resource Manager Service extendedlocation
(API Version 2021-08-15
).
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/extendedlocation/2021-08-15/customlocations"
Client Initialization
client := customlocations.NewCustomLocationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: CustomLocationsClient.CreateOrUpdate
ctx := context.TODO()
id := customlocations.NewCustomLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customLocationValue")
payload := customlocations.CustomLocation{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: CustomLocationsClient.Delete
ctx := context.TODO()
id := customlocations.NewCustomLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customLocationValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: CustomLocationsClient.Get
ctx := context.TODO()
id := customlocations.NewCustomLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customLocationValue")
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: CustomLocationsClient.ListByResourceGroup
ctx := context.TODO()
id := customlocations.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: CustomLocationsClient.ListBySubscription
ctx := context.TODO()
id := customlocations.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: CustomLocationsClient.ListEnabledResourceTypes
ctx := context.TODO()
id := customlocations.NewCustomLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customLocationValue")
// alternatively `client.ListEnabledResourceTypes(ctx, id)` can be used to do batched pagination
items, err := client.ListEnabledResourceTypesComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: CustomLocationsClient.Update
ctx := context.TODO()
id := customlocations.NewCustomLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customLocationValue")
payload := customlocations.PatchableCustomLocations{
// ...
}
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 PossibleValuesForHostType() []string
- func ValidateCustomLocationID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type CustomLocation
- type CustomLocationId
- type CustomLocationOperationPredicate
- type CustomLocationProperties
- type CustomLocationPropertiesAuthentication
- type CustomLocationsClient
- func (c CustomLocationsClient) CreateOrUpdate(ctx context.Context, id CustomLocationId, input CustomLocation) (result CreateOrUpdateOperationResponse, err error)
- func (c CustomLocationsClient) CreateOrUpdateThenPoll(ctx context.Context, id CustomLocationId, input CustomLocation) error
- func (c CustomLocationsClient) Delete(ctx context.Context, id CustomLocationId) (result DeleteOperationResponse, err error)
- func (c CustomLocationsClient) DeleteThenPoll(ctx context.Context, id CustomLocationId) error
- func (c CustomLocationsClient) Get(ctx context.Context, id CustomLocationId) (result GetOperationResponse, err error)
- func (c CustomLocationsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp ListByResourceGroupOperationResponse, err error)
- func (c CustomLocationsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c CustomLocationsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (resp ListByResourceGroupCompleteResult, err error)
- func (c CustomLocationsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (resp ListBySubscriptionOperationResponse, err error)
- func (c CustomLocationsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
- func (c CustomLocationsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (resp ListBySubscriptionCompleteResult, err error)
- func (c CustomLocationsClient) ListEnabledResourceTypes(ctx context.Context, id CustomLocationId) (resp ListEnabledResourceTypesOperationResponse, err error)
- func (c CustomLocationsClient) ListEnabledResourceTypesComplete(ctx context.Context, id CustomLocationId) (ListEnabledResourceTypesCompleteResult, error)
- func (c CustomLocationsClient) ListEnabledResourceTypesCompleteMatchingPredicate(ctx context.Context, id CustomLocationId, ...) (resp ListEnabledResourceTypesCompleteResult, err error)
- func (c CustomLocationsClient) Update(ctx context.Context, id CustomLocationId, input PatchableCustomLocations) (result UpdateOperationResponse, err error)
- type DeleteOperationResponse
- type EnabledResourceType
- type EnabledResourceTypeOperationPredicate
- type EnabledResourceTypeProperties
- type EnabledResourceTypePropertiesTypesMetadataInlined
- type GetOperationResponse
- type HostType
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListBySubscriptionCompleteResult
- type ListBySubscriptionOperationResponse
- type ListEnabledResourceTypesCompleteResult
- type ListEnabledResourceTypesOperationResponse
- type PatchableCustomLocations
- type UpdateOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForHostType ¶
func PossibleValuesForHostType() []string
func ValidateCustomLocationID ¶
ValidateCustomLocationID checks that 'input' can be parsed as a Custom Location ID
Types ¶
type CreateOrUpdateOperationResponse ¶
type CreateOrUpdateOperationResponse struct { Poller polling.LongRunningPoller HttpResponse *http.Response }
type CustomLocation ¶
type CustomLocation struct { Id *string `json:"id,omitempty"` Identity *identity.SystemAssigned `json:"identity,omitempty"` Location string `json:"location"` Name *string `json:"name,omitempty"` Properties *CustomLocationProperties `json:"properties,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` }
type CustomLocationId ¶
type CustomLocationId struct { SubscriptionId string ResourceGroupName string CustomLocationName string }
CustomLocationId is a struct representing the Resource ID for a Custom Location
func NewCustomLocationID ¶
func NewCustomLocationID(subscriptionId string, resourceGroupName string, customLocationName string) CustomLocationId
NewCustomLocationID returns a new CustomLocationId struct
func ParseCustomLocationID ¶
func ParseCustomLocationID(input string) (*CustomLocationId, error)
ParseCustomLocationID parses 'input' into a CustomLocationId
func ParseCustomLocationIDInsensitively ¶
func ParseCustomLocationIDInsensitively(input string) (*CustomLocationId, error)
ParseCustomLocationIDInsensitively parses 'input' case-insensitively into a CustomLocationId note: this method should only be used for API response data and not user input
func (CustomLocationId) ID ¶
func (id CustomLocationId) ID() string
ID returns the formatted Custom Location ID
func (CustomLocationId) Segments ¶
func (id CustomLocationId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Custom Location ID
func (CustomLocationId) String ¶
func (id CustomLocationId) String() string
String returns a human-readable description of this Custom Location ID
type CustomLocationOperationPredicate ¶
type CustomLocationOperationPredicate struct { Id *string Location *string Name *string Type *string }
func (CustomLocationOperationPredicate) Matches ¶
func (p CustomLocationOperationPredicate) Matches(input CustomLocation) bool
type CustomLocationProperties ¶
type CustomLocationProperties struct { Authentication *CustomLocationPropertiesAuthentication `json:"authentication,omitempty"` ClusterExtensionIds *[]string `json:"clusterExtensionIds,omitempty"` DisplayName *string `json:"displayName,omitempty"` HostResourceId *string `json:"hostResourceId,omitempty"` HostType *HostType `json:"hostType,omitempty"` Namespace *string `json:"namespace,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` }
type CustomLocationsClient ¶
type CustomLocationsClient struct { Client autorest.Client // contains filtered or unexported fields }
func NewCustomLocationsClientWithBaseURI ¶
func NewCustomLocationsClientWithBaseURI(endpoint string) CustomLocationsClient
func (CustomLocationsClient) CreateOrUpdate ¶
func (c CustomLocationsClient) CreateOrUpdate(ctx context.Context, id CustomLocationId, input CustomLocation) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (CustomLocationsClient) CreateOrUpdateThenPoll ¶
func (c CustomLocationsClient) CreateOrUpdateThenPoll(ctx context.Context, id CustomLocationId, input CustomLocation) error
CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed
func (CustomLocationsClient) Delete ¶
func (c CustomLocationsClient) Delete(ctx context.Context, id CustomLocationId) (result DeleteOperationResponse, err error)
Delete ...
func (CustomLocationsClient) DeleteThenPoll ¶
func (c CustomLocationsClient) DeleteThenPoll(ctx context.Context, id CustomLocationId) error
DeleteThenPoll performs Delete then polls until it's completed
func (CustomLocationsClient) Get ¶
func (c CustomLocationsClient) Get(ctx context.Context, id CustomLocationId) (result GetOperationResponse, err error)
Get ...
func (CustomLocationsClient) ListByResourceGroup ¶
func (c CustomLocationsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (CustomLocationsClient) ListByResourceGroupComplete ¶
func (c CustomLocationsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
ListByResourceGroupComplete retrieves all of the results into a single object
func (CustomLocationsClient) ListByResourceGroupCompleteMatchingPredicate ¶
func (c CustomLocationsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate CustomLocationOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)
ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (CustomLocationsClient) ListBySubscription ¶
func (c CustomLocationsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (resp ListBySubscriptionOperationResponse, err error)
ListBySubscription ...
func (CustomLocationsClient) ListBySubscriptionComplete ¶
func (c CustomLocationsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
ListBySubscriptionComplete retrieves all of the results into a single object
func (CustomLocationsClient) ListBySubscriptionCompleteMatchingPredicate ¶
func (c CustomLocationsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate CustomLocationOperationPredicate) (resp ListBySubscriptionCompleteResult, err error)
ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (CustomLocationsClient) ListEnabledResourceTypes ¶
func (c CustomLocationsClient) ListEnabledResourceTypes(ctx context.Context, id CustomLocationId) (resp ListEnabledResourceTypesOperationResponse, err error)
ListEnabledResourceTypes ...
func (CustomLocationsClient) ListEnabledResourceTypesComplete ¶
func (c CustomLocationsClient) ListEnabledResourceTypesComplete(ctx context.Context, id CustomLocationId) (ListEnabledResourceTypesCompleteResult, error)
ListEnabledResourceTypesComplete retrieves all of the results into a single object
func (CustomLocationsClient) ListEnabledResourceTypesCompleteMatchingPredicate ¶
func (c CustomLocationsClient) ListEnabledResourceTypesCompleteMatchingPredicate(ctx context.Context, id CustomLocationId, predicate EnabledResourceTypeOperationPredicate) (resp ListEnabledResourceTypesCompleteResult, err error)
ListEnabledResourceTypesCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (CustomLocationsClient) Update ¶
func (c CustomLocationsClient) Update(ctx context.Context, id CustomLocationId, input PatchableCustomLocations) (result UpdateOperationResponse, err error)
Update ...
type DeleteOperationResponse ¶
type DeleteOperationResponse struct { Poller polling.LongRunningPoller HttpResponse *http.Response }
type EnabledResourceType ¶
type EnabledResourceType struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *EnabledResourceTypeProperties `json:"properties,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` }
type EnabledResourceTypeOperationPredicate ¶
func (EnabledResourceTypeOperationPredicate) Matches ¶
func (p EnabledResourceTypeOperationPredicate) Matches(input EnabledResourceType) bool
type EnabledResourceTypeProperties ¶
type EnabledResourceTypeProperties struct { ClusterExtensionId *string `json:"clusterExtensionId,omitempty"` ExtensionType *string `json:"extensionType,omitempty"` TypesMetadata *[]EnabledResourceTypePropertiesTypesMetadataInlined `json:"typesMetadata,omitempty"` }
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response Model *CustomLocation }
type ListByResourceGroupCompleteResult ¶
type ListByResourceGroupCompleteResult struct {
Items []CustomLocation
}
type ListByResourceGroupOperationResponse ¶
type ListByResourceGroupOperationResponse struct { HttpResponse *http.Response Model *[]CustomLocation // 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 []CustomLocation
}
type ListBySubscriptionOperationResponse ¶
type ListBySubscriptionOperationResponse struct { HttpResponse *http.Response Model *[]CustomLocation // 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 ListEnabledResourceTypesCompleteResult ¶
type ListEnabledResourceTypesCompleteResult struct {
Items []EnabledResourceType
}
type ListEnabledResourceTypesOperationResponse ¶
type ListEnabledResourceTypesOperationResponse struct { HttpResponse *http.Response Model *[]EnabledResourceType // contains filtered or unexported fields }
func (ListEnabledResourceTypesOperationResponse) HasMore ¶
func (r ListEnabledResourceTypesOperationResponse) HasMore() bool
func (ListEnabledResourceTypesOperationResponse) LoadMore ¶
func (r ListEnabledResourceTypesOperationResponse) LoadMore(ctx context.Context) (resp ListEnabledResourceTypesOperationResponse, err error)
type PatchableCustomLocations ¶
type PatchableCustomLocations struct { Identity *identity.SystemAssigned `json:"identity,omitempty"` Properties *CustomLocationProperties `json:"properties,omitempty"` Tags *map[string]string `json:"tags,omitempty"` }
type UpdateOperationResponse ¶
type UpdateOperationResponse struct { HttpResponse *http.Response Model *CustomLocation }
Source Files
¶
- client.go
- constants.go
- id_customlocation.go
- method_createorupdate_autorest.go
- method_delete_autorest.go
- method_get_autorest.go
- method_listbyresourcegroup_autorest.go
- method_listbysubscription_autorest.go
- method_listenabledresourcetypes_autorest.go
- method_update_autorest.go
- model_customlocation.go
- model_customlocationproperties.go
- model_customlocationpropertiesauthentication.go
- model_enabledresourcetype.go
- model_enabledresourcetypeproperties.go
- model_enabledresourcetypepropertiestypesmetadatainlined.go
- model_patchablecustomlocations.go
- predicates.go
- version.go