iscsitargets

package
v0.20240903.1111904 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

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

The iscsitargets 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/iscsitargets"

Client Initialization

client := iscsitargets.NewIscsiTargetsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: IscsiTargetsClient.CreateOrUpdate

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

payload := iscsitargets.IscsiTargetCreate{
	// ...
}


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

Example Usage: IscsiTargetsClient.Delete

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

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

Example Usage: IscsiTargetsClient.Get

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

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: IscsiTargetsClient.ListByDiskPool

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

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

Example Usage: IscsiTargetsClient.Update

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

payload := iscsitargets.IscsiTargetUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForIscsiTargetAclMode

func PossibleValuesForIscsiTargetAclMode() []string

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

func ValidateIscsiTargetID

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

ValidateIscsiTargetID checks that 'input' can be parsed as a Iscsi Target ID

Types

type Acl

type Acl struct {
	InitiatorIqn string   `json:"initiatorIqn"`
	MappedLuns   []string `json:"mappedLuns"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *IscsiTarget
}

type DeleteOperationResponse

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

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

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

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 GetOperationResponse

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

type IscsiLun

type IscsiLun struct {
	Lun                        *int64 `json:"lun,omitempty"`
	ManagedDiskAzureResourceId string `json:"managedDiskAzureResourceId"`
	Name                       string `json:"name"`
}

type IscsiTarget

type IscsiTarget struct {
	Id                *string                `json:"id,omitempty"`
	ManagedBy         *string                `json:"managedBy,omitempty"`
	ManagedByExtended *[]string              `json:"managedByExtended,omitempty"`
	Name              *string                `json:"name,omitempty"`
	Properties        IscsiTargetProperties  `json:"properties"`
	SystemData        *systemdata.SystemData `json:"systemData,omitempty"`
	Type              *string                `json:"type,omitempty"`
}

type IscsiTargetAclMode

type IscsiTargetAclMode string
const (
	IscsiTargetAclModeDynamic IscsiTargetAclMode = "Dynamic"
	IscsiTargetAclModeStatic  IscsiTargetAclMode = "Static"
)

func (*IscsiTargetAclMode) UnmarshalJSON

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

type IscsiTargetCreate

type IscsiTargetCreate struct {
	Id                *string                     `json:"id,omitempty"`
	ManagedBy         *string                     `json:"managedBy,omitempty"`
	ManagedByExtended *[]string                   `json:"managedByExtended,omitempty"`
	Name              *string                     `json:"name,omitempty"`
	Properties        IscsiTargetCreateProperties `json:"properties"`
	Type              *string                     `json:"type,omitempty"`
}

type IscsiTargetCreateProperties

type IscsiTargetCreateProperties struct {
	AclMode    IscsiTargetAclMode `json:"aclMode"`
	Luns       *[]IscsiLun        `json:"luns,omitempty"`
	StaticAcls *[]Acl             `json:"staticAcls,omitempty"`
	TargetIqn  *string            `json:"targetIqn,omitempty"`
}

type IscsiTargetId

type IscsiTargetId struct {
	SubscriptionId    string
	ResourceGroupName string
	DiskPoolName      string
	IscsiTargetName   string
}

IscsiTargetId is a struct representing the Resource ID for a Iscsi Target

func NewIscsiTargetID

func NewIscsiTargetID(subscriptionId string, resourceGroupName string, diskPoolName string, iscsiTargetName string) IscsiTargetId

NewIscsiTargetID returns a new IscsiTargetId struct

func ParseIscsiTargetID

func ParseIscsiTargetID(input string) (*IscsiTargetId, error)

ParseIscsiTargetID parses 'input' into a IscsiTargetId

func ParseIscsiTargetIDInsensitively

func ParseIscsiTargetIDInsensitively(input string) (*IscsiTargetId, error)

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

func (*IscsiTargetId) FromParseResult

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

func (IscsiTargetId) ID

func (id IscsiTargetId) ID() string

ID returns the formatted Iscsi Target ID

func (IscsiTargetId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Iscsi Target ID

func (IscsiTargetId) String

func (id IscsiTargetId) String() string

String returns a human-readable description of this Iscsi Target ID

type IscsiTargetOperationPredicate

type IscsiTargetOperationPredicate struct {
	Id        *string
	ManagedBy *string
	Name      *string
	Type      *string
}

func (IscsiTargetOperationPredicate) Matches

type IscsiTargetProperties

type IscsiTargetProperties struct {
	AclMode           IscsiTargetAclMode `json:"aclMode"`
	Endpoints         *[]string          `json:"endpoints,omitempty"`
	Luns              *[]IscsiLun        `json:"luns,omitempty"`
	Port              *int64             `json:"port,omitempty"`
	ProvisioningState ProvisioningStates `json:"provisioningState"`
	Sessions          *[]string          `json:"sessions,omitempty"`
	StaticAcls        *[]Acl             `json:"staticAcls,omitempty"`
	Status            OperationalStatus  `json:"status"`
	TargetIqn         string             `json:"targetIqn"`
}

type IscsiTargetUpdate

type IscsiTargetUpdate struct {
	Id                *string                     `json:"id,omitempty"`
	ManagedBy         *string                     `json:"managedBy,omitempty"`
	ManagedByExtended *[]string                   `json:"managedByExtended,omitempty"`
	Name              *string                     `json:"name,omitempty"`
	Properties        IscsiTargetUpdateProperties `json:"properties"`
	Type              *string                     `json:"type,omitempty"`
}

type IscsiTargetUpdateProperties

type IscsiTargetUpdateProperties struct {
	Luns       *[]IscsiLun `json:"luns,omitempty"`
	StaticAcls *[]Acl      `json:"staticAcls,omitempty"`
}

type IscsiTargetsClient

type IscsiTargetsClient struct {
	Client *resourcemanager.Client
}

func NewIscsiTargetsClientWithBaseURI

func NewIscsiTargetsClientWithBaseURI(sdkApi sdkEnv.Api) (*IscsiTargetsClient, error)

func (IscsiTargetsClient) CreateOrUpdate

CreateOrUpdate ...

func (IscsiTargetsClient) CreateOrUpdateThenPoll

func (c IscsiTargetsClient) CreateOrUpdateThenPoll(ctx context.Context, id IscsiTargetId, input IscsiTargetCreate) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (IscsiTargetsClient) Delete

Delete ...

func (IscsiTargetsClient) DeleteThenPoll

func (c IscsiTargetsClient) DeleteThenPoll(ctx context.Context, id IscsiTargetId) error

DeleteThenPoll performs Delete then polls until it's completed

func (IscsiTargetsClient) Get

Get ...

func (IscsiTargetsClient) ListByDiskPool

func (c IscsiTargetsClient) ListByDiskPool(ctx context.Context, id DiskPoolId) (result ListByDiskPoolOperationResponse, err error)

ListByDiskPool ...

func (IscsiTargetsClient) ListByDiskPoolComplete

func (c IscsiTargetsClient) ListByDiskPoolComplete(ctx context.Context, id DiskPoolId) (ListByDiskPoolCompleteResult, error)

ListByDiskPoolComplete retrieves all the results into a single object

func (IscsiTargetsClient) ListByDiskPoolCompleteMatchingPredicate

func (c IscsiTargetsClient) ListByDiskPoolCompleteMatchingPredicate(ctx context.Context, id DiskPoolId, predicate IscsiTargetOperationPredicate) (result ListByDiskPoolCompleteResult, err error)

ListByDiskPoolCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (IscsiTargetsClient) Update

Update ...

func (IscsiTargetsClient) UpdateThenPoll

func (c IscsiTargetsClient) UpdateThenPoll(ctx context.Context, id IscsiTargetId, input IscsiTargetUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type ListByDiskPoolCompleteResult

type ListByDiskPoolCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []IscsiTarget
}

type ListByDiskPoolCustomPager added in v0.20240628.1153531

type ListByDiskPoolCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByDiskPoolCustomPager) NextPageLink() *odata.Link

type ListByDiskPoolOperationResponse

type ListByDiskPoolOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]IscsiTarget
}

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

func (*OperationalStatus) UnmarshalJSON

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

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

func (*ProvisioningStates) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *IscsiTarget
}

Jump to

Keyboard shortcuts

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