endpoints

package
v0.20231120.1140121 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/endpoints Documentation

The endpoints SDK allows for interaction with the Azure Resource Manager Service storagemover (API Version 2023-03-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/storagemover/2023-03-01/endpoints"

Client Initialization

client := endpoints.NewEndpointsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: EndpointsClient.CreateOrUpdate

ctx := context.TODO()
id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageMoverValue", "endpointValue")

payload := endpoints.Endpoint{
	// ...
}


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: EndpointsClient.Delete

ctx := context.TODO()
id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageMoverValue", "endpointValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: EndpointsClient.Get

ctx := context.TODO()
id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageMoverValue", "endpointValue")

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: EndpointsClient.List

ctx := context.TODO()
id := endpoints.NewStorageMoverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageMoverValue")

// 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: EndpointsClient.Update

ctx := context.TODO()
id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageMoverValue", "endpointValue")

payload := endpoints.EndpointBaseUpdateParameters{
	// ...
}


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 PossibleValuesForEndpointType

func PossibleValuesForEndpointType() []string

func PossibleValuesForNfsVersion

func PossibleValuesForNfsVersion() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateEndpointID

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

ValidateEndpointID checks that 'input' can be parsed as a Endpoint ID

func ValidateStorageMoverID

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

ValidateStorageMoverID checks that 'input' can be parsed as a Storage Mover ID

Types

type AzureStorageBlobContainerEndpointProperties

type AzureStorageBlobContainerEndpointProperties struct {
	BlobContainerName        string `json:"blobContainerName"`
	StorageAccountResourceId string `json:"storageAccountResourceId"`

	// Fields inherited from EndpointBaseProperties
	Description       *string            `json:"description,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

func (AzureStorageBlobContainerEndpointProperties) MarshalJSON

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Endpoint
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type Endpoint

type Endpoint struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties EndpointBaseProperties `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

func (*Endpoint) UnmarshalJSON

func (s *Endpoint) UnmarshalJSON(bytes []byte) error

type EndpointBaseProperties

type EndpointBaseProperties interface {
}

type EndpointBaseUpdateParameters

type EndpointBaseUpdateParameters struct {
	Properties *EndpointBaseUpdateProperties `json:"properties,omitempty"`
}

type EndpointBaseUpdateProperties

type EndpointBaseUpdateProperties struct {
	Description *string `json:"description,omitempty"`
}

type EndpointId

type EndpointId struct {
	SubscriptionId    string
	ResourceGroupName string
	StorageMoverName  string
	EndpointName      string
}

EndpointId is a struct representing the Resource ID for a Endpoint

func NewEndpointID

func NewEndpointID(subscriptionId string, resourceGroupName string, storageMoverName string, endpointName string) EndpointId

NewEndpointID returns a new EndpointId struct

func ParseEndpointID

func ParseEndpointID(input string) (*EndpointId, error)

ParseEndpointID parses 'input' into a EndpointId

func ParseEndpointIDInsensitively

func ParseEndpointIDInsensitively(input string) (*EndpointId, error)

ParseEndpointIDInsensitively parses 'input' case-insensitively into a EndpointId note: this method should only be used for API response data and not user input

func (EndpointId) ID

func (id EndpointId) ID() string

ID returns the formatted Endpoint ID

func (EndpointId) Segments

func (id EndpointId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Endpoint ID

func (EndpointId) String

func (id EndpointId) String() string

String returns a human-readable description of this Endpoint ID

type EndpointOperationPredicate

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

func (EndpointOperationPredicate) Matches

func (p EndpointOperationPredicate) Matches(input Endpoint) bool

type EndpointType

type EndpointType string
const (
	EndpointTypeAzureStorageBlobContainer EndpointType = "AzureStorageBlobContainer"
	EndpointTypeNfsMount                  EndpointType = "NfsMount"
)

func (*EndpointType) UnmarshalJSON added in v0.20230406.1124617

func (s *EndpointType) UnmarshalJSON(bytes []byte) error

type EndpointsClient

type EndpointsClient struct {
	Client *resourcemanager.Client
}

func NewEndpointsClientWithBaseURI

func NewEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointsClient, error)

func (EndpointsClient) CreateOrUpdate

func (c EndpointsClient) CreateOrUpdate(ctx context.Context, id EndpointId, input Endpoint) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (EndpointsClient) Delete

func (c EndpointsClient) Delete(ctx context.Context, id EndpointId) (result DeleteOperationResponse, err error)

Delete ...

func (EndpointsClient) DeleteThenPoll

func (c EndpointsClient) DeleteThenPoll(ctx context.Context, id EndpointId) error

DeleteThenPoll performs Delete then polls until it's completed

func (EndpointsClient) Get

func (c EndpointsClient) Get(ctx context.Context, id EndpointId) (result GetOperationResponse, err error)

Get ...

func (EndpointsClient) List

List ...

func (EndpointsClient) ListComplete

ListComplete retrieves all the results into a single object

func (EndpointsClient) ListCompleteMatchingPredicate

func (c EndpointsClient) ListCompleteMatchingPredicate(ctx context.Context, id StorageMoverId, predicate EndpointOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (EndpointsClient) Update

Update ...

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Endpoint
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []Endpoint
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Endpoint
}

type NfsMountEndpointProperties

type NfsMountEndpointProperties struct {
	Export     string      `json:"export"`
	Host       string      `json:"host"`
	NfsVersion *NfsVersion `json:"nfsVersion,omitempty"`

	// Fields inherited from EndpointBaseProperties
	Description       *string            `json:"description,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

func (NfsMountEndpointProperties) MarshalJSON

func (s NfsMountEndpointProperties) MarshalJSON() ([]byte, error)

type NfsVersion

type NfsVersion string
const (
	NfsVersionNFSauto   NfsVersion = "NFSauto"
	NfsVersionNFSvFour  NfsVersion = "NFSv4"
	NfsVersionNFSvThree NfsVersion = "NFSv3"
)

func (*NfsVersion) UnmarshalJSON added in v0.20230406.1124617

func (s *NfsVersion) UnmarshalJSON(bytes []byte) error

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON added in v0.20230406.1124617

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type RawEndpointBasePropertiesImpl added in v0.20230807.1063129

type RawEndpointBasePropertiesImpl struct {
	Type   string
	Values map[string]interface{}
}

RawEndpointBasePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

type StorageMoverId

type StorageMoverId struct {
	SubscriptionId    string
	ResourceGroupName string
	StorageMoverName  string
}

StorageMoverId is a struct representing the Resource ID for a Storage Mover

func NewStorageMoverID

func NewStorageMoverID(subscriptionId string, resourceGroupName string, storageMoverName string) StorageMoverId

NewStorageMoverID returns a new StorageMoverId struct

func ParseStorageMoverID

func ParseStorageMoverID(input string) (*StorageMoverId, error)

ParseStorageMoverID parses 'input' into a StorageMoverId

func ParseStorageMoverIDInsensitively

func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error)

ParseStorageMoverIDInsensitively parses 'input' case-insensitively into a StorageMoverId note: this method should only be used for API response data and not user input

func (StorageMoverId) ID

func (id StorageMoverId) ID() string

ID returns the formatted Storage Mover ID

func (StorageMoverId) Segments

func (id StorageMoverId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Storage Mover ID

func (StorageMoverId) String

func (id StorageMoverId) String() string

String returns a human-readable description of this Storage Mover ID

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Endpoint
}

Jump to

Keyboard shortcuts

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