endpoints

package
v0.20240320.1144505 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

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

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

func PossibleValuesForCredentialType() []string

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 AzureKeyVaultSmbCredentials

type AzureKeyVaultSmbCredentials struct {
	PasswordUri *string `json:"passwordUri,omitempty"`
	UsernameUri *string `json:"usernameUri,omitempty"`
}

func (AzureKeyVaultSmbCredentials) MarshalJSON

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

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 AzureStorageBlobContainerEndpointUpdateProperties

type AzureStorageBlobContainerEndpointUpdateProperties struct {

	// Fields inherited from EndpointBaseUpdateProperties
	Description *string `json:"description,omitempty"`
}

func (AzureStorageBlobContainerEndpointUpdateProperties) MarshalJSON

type AzureStorageSmbFileShareEndpointProperties

type AzureStorageSmbFileShareEndpointProperties struct {
	FileShareName            string `json:"fileShareName"`
	StorageAccountResourceId string `json:"storageAccountResourceId"`

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

func (AzureStorageSmbFileShareEndpointProperties) MarshalJSON

type AzureStorageSmbFileShareEndpointUpdateProperties

type AzureStorageSmbFileShareEndpointUpdateProperties struct {

	// Fields inherited from EndpointBaseUpdateProperties
	Description *string `json:"description,omitempty"`
}

func (AzureStorageSmbFileShareEndpointUpdateProperties) MarshalJSON

type CreateOrUpdateOperationResponse

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

type CredentialType

type CredentialType string
const (
	CredentialTypeAzureKeyVaultSmb CredentialType = "AzureKeyVaultSmb"
)

func (*CredentialType) UnmarshalJSON

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

type Credentials

type Credentials interface {
}

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"`
}

func (*EndpointBaseUpdateParameters) UnmarshalJSON

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

type EndpointBaseUpdateProperties

type EndpointBaseUpdateProperties interface {
}

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) FromParseResult

func (id *EndpointId) FromParseResult(input resourceids.ParseResult) error

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"
	EndpointTypeAzureStorageSmbFileShare  EndpointType = "AzureStorageSmbFileShare"
	EndpointTypeNfsMount                  EndpointType = "NfsMount"
	EndpointTypeSmbMount                  EndpointType = "SmbMount"
)

func (*EndpointType) UnmarshalJSON

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 {
	LatestHttpResponse *http.Response
	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 NfsMountEndpointUpdateProperties

type NfsMountEndpointUpdateProperties struct {

	// Fields inherited from EndpointBaseUpdateProperties
	Description *string `json:"description,omitempty"`
}

func (NfsMountEndpointUpdateProperties) MarshalJSON

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

type NfsVersion

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

func (*NfsVersion) UnmarshalJSON

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

type ProvisioningState

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

func (*ProvisioningState) UnmarshalJSON

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

type RawCredentialsImpl

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

RawCredentialsImpl 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 RawEndpointBasePropertiesImpl

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 RawEndpointBaseUpdatePropertiesImpl

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

RawEndpointBaseUpdatePropertiesImpl 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 SmbMountEndpointProperties

type SmbMountEndpointProperties struct {
	Credentials *AzureKeyVaultSmbCredentials `json:"credentials,omitempty"`
	Host        string                       `json:"host"`
	ShareName   string                       `json:"shareName"`

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

func (SmbMountEndpointProperties) MarshalJSON

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

type SmbMountEndpointUpdateProperties

type SmbMountEndpointUpdateProperties struct {
	Credentials *AzureKeyVaultSmbCredentials `json:"credentials,omitempty"`

	// Fields inherited from EndpointBaseUpdateProperties
	Description *string `json:"description,omitempty"`
}

func (SmbMountEndpointUpdateProperties) MarshalJSON

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

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) FromParseResult

func (id *StorageMoverId) FromParseResult(input resourceids.ParseResult) error

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