customlocations

package
v0.20230508.1101604 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForHostType

func PossibleValuesForHostType() []string

func ValidateCustomLocationID

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

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

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 CustomLocationPropertiesAuthentication

type CustomLocationPropertiesAuthentication struct {
	Type  *string `json:"type,omitempty"`
	Value *string `json:"value,omitempty"`
}

type CustomLocationsClient

type CustomLocationsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewCustomLocationsClientWithBaseURI

func NewCustomLocationsClientWithBaseURI(endpoint string) CustomLocationsClient

func (CustomLocationsClient) CreateOrUpdate

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

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

Get ...

func (CustomLocationsClient) ListByResourceGroup

ListByResourceGroup ...

func (CustomLocationsClient) ListByResourceGroupComplete

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

ListBySubscription ...

func (CustomLocationsClient) ListBySubscriptionComplete

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

ListEnabledResourceTypes ...

func (CustomLocationsClient) ListEnabledResourceTypesComplete

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

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

type EnabledResourceTypeOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (EnabledResourceTypeOperationPredicate) Matches

type EnabledResourceTypeProperties

type EnabledResourceTypeProperties struct {
	ClusterExtensionId *string                                              `json:"clusterExtensionId,omitempty"`
	ExtensionType      *string                                              `json:"extensionType,omitempty"`
	TypesMetadata      *[]EnabledResourceTypePropertiesTypesMetadataInlined `json:"typesMetadata,omitempty"`
}

type EnabledResourceTypePropertiesTypesMetadataInlined

type EnabledResourceTypePropertiesTypesMetadataInlined struct {
	ApiVersion                *string `json:"apiVersion,omitempty"`
	ResourceProviderNamespace *string `json:"resourceProviderNamespace,omitempty"`
	ResourceType              *string `json:"resourceType,omitempty"`
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *CustomLocation
}

type HostType

type HostType string
const (
	HostTypeKubernetes HostType = "Kubernetes"
)

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 (ListByResourceGroupOperationResponse) LoadMore

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 (ListBySubscriptionOperationResponse) LoadMore

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 (ListEnabledResourceTypesOperationResponse) LoadMore

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
}

Jump to

Keyboard shortcuts

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