diskpools

package
v0.0.0-...-a81a29a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools Documentation

The diskpools SDK allows for interaction with the Azure Resource Manager Service storagepool (API Version 2021-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/storagepool/2021-08-01/diskpools"

Client Initialization

client := diskpools.NewDiskPoolsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DiskPoolsClient.CreateOrUpdate

ctx := context.TODO()
id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue")

payload := diskpools.DiskPoolCreate{
	// ...
}


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

Example Usage: DiskPoolsClient.Deallocate

ctx := context.TODO()
id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue")

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

Example Usage: DiskPoolsClient.Delete

ctx := context.TODO()
id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue")

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

Example Usage: DiskPoolsClient.Get

ctx := context.TODO()
id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue")

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: DiskPoolsClient.ListByResourceGroup

ctx := context.TODO()
id := diskpools.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: DiskPoolsClient.ListBySubscription

ctx := context.TODO()
id := diskpools.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: DiskPoolsClient.ListOutboundNetworkDependenciesEndpoints

ctx := context.TODO()
id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue")

// alternatively `client.ListOutboundNetworkDependenciesEndpoints(ctx, id)` can be used to do batched pagination
items, err := client.ListOutboundNetworkDependenciesEndpointsComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: DiskPoolsClient.Start

ctx := context.TODO()
id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue")

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

Example Usage: DiskPoolsClient.Update

ctx := context.TODO()
id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue")

payload := diskpools.DiskPoolUpdate{
	// ...
}


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

Example Usage: DiskPoolsClient.Upgrade

ctx := context.TODO()
id := diskpools.NewDiskPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskPoolValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForOperationalStatus

func PossibleValuesForOperationalStatus() []string

func PossibleValuesForProvisioningStates

func PossibleValuesForProvisioningStates() []string

func ValidateDiskPoolID

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

ValidateDiskPoolID checks that 'input' can be parsed as a Disk Pool ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeallocateOperationResponse

type DeallocateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type Disk

type Disk struct {
	Id string `json:"id"`
}

type DiskPool

type DiskPool struct {
	Id                *string                `json:"id,omitempty"`
	Location          string                 `json:"location"`
	ManagedBy         *string                `json:"managedBy,omitempty"`
	ManagedByExtended *[]string              `json:"managedByExtended,omitempty"`
	Name              *string                `json:"name,omitempty"`
	Properties        DiskPoolProperties     `json:"properties"`
	Sku               *Sku                   `json:"sku,omitempty"`
	SystemData        *systemdata.SystemData `json:"systemData,omitempty"`
	Tags              *map[string]string     `json:"tags,omitempty"`
	Type              *string                `json:"type,omitempty"`
}

type DiskPoolCreate

type DiskPoolCreate struct {
	Id                *string                  `json:"id,omitempty"`
	Location          string                   `json:"location"`
	ManagedBy         *string                  `json:"managedBy,omitempty"`
	ManagedByExtended *[]string                `json:"managedByExtended,omitempty"`
	Name              *string                  `json:"name,omitempty"`
	Properties        DiskPoolCreateProperties `json:"properties"`
	Sku               Sku                      `json:"sku"`
	Tags              *map[string]string       `json:"tags,omitempty"`
	Type              *string                  `json:"type,omitempty"`
}

type DiskPoolCreateProperties

type DiskPoolCreateProperties struct {
	AdditionalCapabilities *[]string     `json:"additionalCapabilities,omitempty"`
	AvailabilityZones      *zones.Schema `json:"availabilityZones,omitempty"`
	Disks                  *[]Disk       `json:"disks,omitempty"`
	SubnetId               string        `json:"subnetId"`
}

type DiskPoolId

type DiskPoolId struct {
	SubscriptionId    string
	ResourceGroupName string
	DiskPoolName      string
}

DiskPoolId is a struct representing the Resource ID for a Disk Pool

func NewDiskPoolID

func NewDiskPoolID(subscriptionId string, resourceGroupName string, diskPoolName string) DiskPoolId

NewDiskPoolID returns a new DiskPoolId struct

func ParseDiskPoolID

func ParseDiskPoolID(input string) (*DiskPoolId, error)

ParseDiskPoolID parses 'input' into a DiskPoolId

func ParseDiskPoolIDInsensitively

func ParseDiskPoolIDInsensitively(input string) (*DiskPoolId, error)

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

func (DiskPoolId) ID

func (id DiskPoolId) ID() string

ID returns the formatted Disk Pool ID

func (DiskPoolId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Disk Pool ID

func (DiskPoolId) String

func (id DiskPoolId) String() string

String returns a human-readable description of this Disk Pool ID

type DiskPoolOperationPredicate

type DiskPoolOperationPredicate struct {
	Id        *string
	Location  *string
	ManagedBy *string
	Name      *string
	Type      *string
}

func (DiskPoolOperationPredicate) Matches

func (p DiskPoolOperationPredicate) Matches(input DiskPool) bool

type DiskPoolProperties

type DiskPoolProperties struct {
	AdditionalCapabilities *[]string          `json:"additionalCapabilities,omitempty"`
	AvailabilityZones      zones.Schema       `json:"availabilityZones"`
	Disks                  *[]Disk            `json:"disks,omitempty"`
	ProvisioningState      ProvisioningStates `json:"provisioningState"`
	Status                 OperationalStatus  `json:"status"`
	SubnetId               string             `json:"subnetId"`
}

type DiskPoolUpdate

type DiskPoolUpdate struct {
	ManagedBy         *string                  `json:"managedBy,omitempty"`
	ManagedByExtended *[]string                `json:"managedByExtended,omitempty"`
	Properties        DiskPoolUpdateProperties `json:"properties"`
	Sku               *Sku                     `json:"sku,omitempty"`
	Tags              *map[string]string       `json:"tags,omitempty"`
}

type DiskPoolUpdateProperties

type DiskPoolUpdateProperties struct {
	Disks *[]Disk `json:"disks,omitempty"`
}

type DiskPoolsClient

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

func NewDiskPoolsClientWithBaseURI

func NewDiskPoolsClientWithBaseURI(endpoint string) DiskPoolsClient

func (DiskPoolsClient) CreateOrUpdate

func (c DiskPoolsClient) CreateOrUpdate(ctx context.Context, id DiskPoolId, input DiskPoolCreate) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (DiskPoolsClient) CreateOrUpdateThenPoll

func (c DiskPoolsClient) CreateOrUpdateThenPoll(ctx context.Context, id DiskPoolId, input DiskPoolCreate) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (DiskPoolsClient) Deallocate

func (c DiskPoolsClient) Deallocate(ctx context.Context, id DiskPoolId) (result DeallocateOperationResponse, err error)

Deallocate ...

func (DiskPoolsClient) DeallocateThenPoll

func (c DiskPoolsClient) DeallocateThenPoll(ctx context.Context, id DiskPoolId) error

DeallocateThenPoll performs Deallocate then polls until it's completed

func (DiskPoolsClient) Delete

func (c DiskPoolsClient) Delete(ctx context.Context, id DiskPoolId) (result DeleteOperationResponse, err error)

Delete ...

func (DiskPoolsClient) DeleteThenPoll

func (c DiskPoolsClient) DeleteThenPoll(ctx context.Context, id DiskPoolId) error

DeleteThenPoll performs Delete then polls until it's completed

func (DiskPoolsClient) Get

func (c DiskPoolsClient) Get(ctx context.Context, id DiskPoolId) (result GetOperationResponse, err error)

Get ...

func (DiskPoolsClient) ListByResourceGroup

ListByResourceGroup ...

func (DiskPoolsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (DiskPoolsClient) ListByResourceGroupCompleteMatchingPredicate

func (c DiskPoolsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DiskPoolOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (DiskPoolsClient) ListBySubscription

ListBySubscription ...

func (DiskPoolsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all of the results into a single object

func (DiskPoolsClient) ListBySubscriptionCompleteMatchingPredicate

func (c DiskPoolsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DiskPoolOperationPredicate) (resp ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (DiskPoolsClient) ListOutboundNetworkDependenciesEndpoints

func (c DiskPoolsClient) ListOutboundNetworkDependenciesEndpoints(ctx context.Context, id DiskPoolId) (resp ListOutboundNetworkDependenciesEndpointsOperationResponse, err error)

ListOutboundNetworkDependenciesEndpoints ...

func (DiskPoolsClient) ListOutboundNetworkDependenciesEndpointsComplete

func (c DiskPoolsClient) ListOutboundNetworkDependenciesEndpointsComplete(ctx context.Context, id DiskPoolId) (ListOutboundNetworkDependenciesEndpointsCompleteResult, error)

ListOutboundNetworkDependenciesEndpointsComplete retrieves all of the results into a single object

func (DiskPoolsClient) ListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate

func (c DiskPoolsClient) ListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate(ctx context.Context, id DiskPoolId, predicate OutboundEnvironmentEndpointOperationPredicate) (resp ListOutboundNetworkDependenciesEndpointsCompleteResult, err error)

ListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (DiskPoolsClient) Start

func (c DiskPoolsClient) Start(ctx context.Context, id DiskPoolId) (result StartOperationResponse, err error)

Start ...

func (DiskPoolsClient) StartThenPoll

func (c DiskPoolsClient) StartThenPoll(ctx context.Context, id DiskPoolId) error

StartThenPoll performs Start then polls until it's completed

func (DiskPoolsClient) Update

func (c DiskPoolsClient) Update(ctx context.Context, id DiskPoolId, input DiskPoolUpdate) (result UpdateOperationResponse, err error)

Update ...

func (DiskPoolsClient) UpdateThenPoll

func (c DiskPoolsClient) UpdateThenPoll(ctx context.Context, id DiskPoolId, input DiskPoolUpdate) error

UpdateThenPoll performs Update then polls until it's completed

func (DiskPoolsClient) Upgrade

func (c DiskPoolsClient) Upgrade(ctx context.Context, id DiskPoolId) (result UpgradeOperationResponse, err error)

Upgrade ...

func (DiskPoolsClient) UpgradeThenPoll

func (c DiskPoolsClient) UpgradeThenPoll(ctx context.Context, id DiskPoolId) error

UpgradeThenPoll performs Upgrade then polls until it's completed

type EndpointDependency

type EndpointDependency struct {
	DomainName      *string           `json:"domainName,omitempty"`
	EndpointDetails *[]EndpointDetail `json:"endpointDetails,omitempty"`
}

type EndpointDetail

type EndpointDetail struct {
	IPAddress    *string  `json:"ipAddress,omitempty"`
	IsAccessible *bool    `json:"isAccessible,omitempty"`
	Latency      *float64 `json:"latency,omitempty"`
	Port         *int64   `json:"port,omitempty"`
}

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []DiskPool
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]DiskPool
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []DiskPool
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]DiskPool
	// contains filtered or unexported fields
}

func (ListBySubscriptionOperationResponse) HasMore

func (ListBySubscriptionOperationResponse) LoadMore

type ListOutboundNetworkDependenciesEndpointsCompleteResult

type ListOutboundNetworkDependenciesEndpointsCompleteResult struct {
	Items []OutboundEnvironmentEndpoint
}

type ListOutboundNetworkDependenciesEndpointsOperationResponse

type ListOutboundNetworkDependenciesEndpointsOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]OutboundEnvironmentEndpoint
	// contains filtered or unexported fields
}

func (ListOutboundNetworkDependenciesEndpointsOperationResponse) HasMore

func (ListOutboundNetworkDependenciesEndpointsOperationResponse) LoadMore

type OperationalStatus

type OperationalStatus string
const (
	OperationalStatusHealthy            OperationalStatus = "Healthy"
	OperationalStatusInvalid            OperationalStatus = "Invalid"
	OperationalStatusRunning            OperationalStatus = "Running"
	OperationalStatusStopped            OperationalStatus = "Stopped"
	OperationalStatusStoppedDeallocated OperationalStatus = "Stopped (deallocated)"
	OperationalStatusUnhealthy          OperationalStatus = "Unhealthy"
	OperationalStatusUnknown            OperationalStatus = "Unknown"
	OperationalStatusUpdating           OperationalStatus = "Updating"
)

type OutboundEnvironmentEndpoint

type OutboundEnvironmentEndpoint struct {
	Category  *string               `json:"category,omitempty"`
	Endpoints *[]EndpointDependency `json:"endpoints,omitempty"`
}

type OutboundEnvironmentEndpointOperationPredicate

type OutboundEnvironmentEndpointOperationPredicate struct {
	Category *string
}

func (OutboundEnvironmentEndpointOperationPredicate) Matches

type ProvisioningStates

type ProvisioningStates string
const (
	ProvisioningStatesCanceled  ProvisioningStates = "Canceled"
	ProvisioningStatesCreating  ProvisioningStates = "Creating"
	ProvisioningStatesDeleting  ProvisioningStates = "Deleting"
	ProvisioningStatesFailed    ProvisioningStates = "Failed"
	ProvisioningStatesInvalid   ProvisioningStates = "Invalid"
	ProvisioningStatesPending   ProvisioningStates = "Pending"
	ProvisioningStatesSucceeded ProvisioningStates = "Succeeded"
	ProvisioningStatesUpdating  ProvisioningStates = "Updating"
)

type Sku

type Sku struct {
	Name string  `json:"name"`
	Tier *string `json:"tier,omitempty"`
}

type StartOperationResponse

type StartOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type UpgradeOperationResponse

type UpgradeOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

Jump to

Keyboard shortcuts

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