inventoryitems

package
v0.20240606.1065251 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/inventoryitems Documentation

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

Client Initialization

client := inventoryitems.NewInventoryItemsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: InventoryItemsClient.Create

ctx := context.TODO()
id := inventoryitems.NewInventoryItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vCenterValue", "inventoryItemValue")

payload := inventoryitems.InventoryItem{
	// ...
}


read, err := client.Create(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: InventoryItemsClient.Delete

ctx := context.TODO()
id := inventoryitems.NewInventoryItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vCenterValue", "inventoryItemValue")

read, err := client.Delete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: InventoryItemsClient.Get

ctx := context.TODO()
id := inventoryitems.NewInventoryItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vCenterValue", "inventoryItemValue")

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: InventoryItemsClient.ListByVCenter

ctx := context.TODO()
id := inventoryitems.NewVCenterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vCenterValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDiskMode

func PossibleValuesForDiskMode() []string

func PossibleValuesForDiskType

func PossibleValuesForDiskType() []string

func PossibleValuesForFirmwareType

func PossibleValuesForFirmwareType() []string

func PossibleValuesForInventoryType

func PossibleValuesForInventoryType() []string

func PossibleValuesForNICType

func PossibleValuesForNICType() []string

func PossibleValuesForOsType

func PossibleValuesForOsType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateInventoryItemID

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

ValidateInventoryItemID checks that 'input' can be parsed as a Inventory Item ID

func ValidateVCenterID

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

ValidateVCenterID checks that 'input' can be parsed as a V Center ID

Types

type ClusterInventoryItem

type ClusterInventoryItem struct {

	// Fields inherited from InventoryItemProperties
	ManagedResourceId *string            `json:"managedResourceId,omitempty"`
	MoName            *string            `json:"moName,omitempty"`
	MoRefId           *string            `json:"moRefId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

func (ClusterInventoryItem) MarshalJSON

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

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *InventoryItem
}

type DatastoreInventoryItem

type DatastoreInventoryItem struct {
	CapacityGB  *int64 `json:"capacityGB,omitempty"`
	FreeSpaceGB *int64 `json:"freeSpaceGB,omitempty"`

	// Fields inherited from InventoryItemProperties
	ManagedResourceId *string            `json:"managedResourceId,omitempty"`
	MoName            *string            `json:"moName,omitempty"`
	MoRefId           *string            `json:"moRefId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

func (DatastoreInventoryItem) MarshalJSON

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

type DeleteOperationResponse

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

type DiskMode

type DiskMode string
const (
	DiskModeIndependentNonpersistent DiskMode = "independent_nonpersistent"
	DiskModeIndependentPersistent    DiskMode = "independent_persistent"
	DiskModePersistent               DiskMode = "persistent"
)

func (*DiskMode) UnmarshalJSON

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

type DiskType

type DiskType string
const (
	DiskTypeFlat        DiskType = "flat"
	DiskTypePmem        DiskType = "pmem"
	DiskTypeRawphysical DiskType = "rawphysical"
	DiskTypeRawvirtual  DiskType = "rawvirtual"
	DiskTypeSesparse    DiskType = "sesparse"
	DiskTypeSparse      DiskType = "sparse"
	DiskTypeUnknown     DiskType = "unknown"
)

func (*DiskType) UnmarshalJSON

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

type FirmwareType

type FirmwareType string
const (
	FirmwareTypeBios FirmwareType = "bios"
	FirmwareTypeEfi  FirmwareType = "efi"
)

func (*FirmwareType) UnmarshalJSON

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

type GetOperationResponse

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

type HostInventoryItem

type HostInventoryItem struct {
	CpuModel          *string               `json:"cpuModel,omitempty"`
	MemorySizeGB      *int64                `json:"memorySizeGB,omitempty"`
	NumCoresPerSocket *int64                `json:"numCoresPerSocket,omitempty"`
	NumSockets        *int64                `json:"numSockets,omitempty"`
	Parent            *InventoryItemDetails `json:"parent,omitempty"`
	PowerState        *string               `json:"powerState,omitempty"`
	Version           *string               `json:"version,omitempty"`

	// Fields inherited from InventoryItemProperties
	ManagedResourceId *string            `json:"managedResourceId,omitempty"`
	MoName            *string            `json:"moName,omitempty"`
	MoRefId           *string            `json:"moRefId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

func (HostInventoryItem) MarshalJSON

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

type InventoryItem

type InventoryItem struct {
	Id         *string                 `json:"id,omitempty"`
	Kind       *string                 `json:"kind,omitempty"`
	Name       *string                 `json:"name,omitempty"`
	Properties InventoryItemProperties `json:"properties"`
	SystemData *systemdata.SystemData  `json:"systemData,omitempty"`
	Type       *string                 `json:"type,omitempty"`
}

func (*InventoryItem) UnmarshalJSON

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

type InventoryItemDetails

type InventoryItemDetails struct {
	InventoryItemId *string        `json:"inventoryItemId,omitempty"`
	InventoryType   *InventoryType `json:"inventoryType,omitempty"`
	MoName          *string        `json:"moName,omitempty"`
}

type InventoryItemId

type InventoryItemId struct {
	SubscriptionId    string
	ResourceGroupName string
	VCenterName       string
	InventoryItemName string
}

InventoryItemId is a struct representing the Resource ID for a Inventory Item

func NewInventoryItemID

func NewInventoryItemID(subscriptionId string, resourceGroupName string, vCenterName string, inventoryItemName string) InventoryItemId

NewInventoryItemID returns a new InventoryItemId struct

func ParseInventoryItemID

func ParseInventoryItemID(input string) (*InventoryItemId, error)

ParseInventoryItemID parses 'input' into a InventoryItemId

func ParseInventoryItemIDInsensitively

func ParseInventoryItemIDInsensitively(input string) (*InventoryItemId, error)

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

func (*InventoryItemId) FromParseResult

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

func (InventoryItemId) ID

func (id InventoryItemId) ID() string

ID returns the formatted Inventory Item ID

func (InventoryItemId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Inventory Item ID

func (InventoryItemId) String

func (id InventoryItemId) String() string

String returns a human-readable description of this Inventory Item ID

type InventoryItemOperationPredicate

type InventoryItemOperationPredicate struct {
	Id   *string
	Kind *string
	Name *string
	Type *string
}

func (InventoryItemOperationPredicate) Matches

type InventoryItemProperties

type InventoryItemProperties interface {
}

type InventoryItemsClient

type InventoryItemsClient struct {
	Client *resourcemanager.Client
}

func NewInventoryItemsClientWithBaseURI

func NewInventoryItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*InventoryItemsClient, error)

func (InventoryItemsClient) Create

Create ...

func (InventoryItemsClient) Delete

Delete ...

func (InventoryItemsClient) Get

Get ...

func (InventoryItemsClient) ListByVCenter

func (c InventoryItemsClient) ListByVCenter(ctx context.Context, id VCenterId) (result ListByVCenterOperationResponse, err error)

ListByVCenter ...

func (InventoryItemsClient) ListByVCenterComplete

func (c InventoryItemsClient) ListByVCenterComplete(ctx context.Context, id VCenterId) (ListByVCenterCompleteResult, error)

ListByVCenterComplete retrieves all the results into a single object

func (InventoryItemsClient) ListByVCenterCompleteMatchingPredicate

func (c InventoryItemsClient) ListByVCenterCompleteMatchingPredicate(ctx context.Context, id VCenterId, predicate InventoryItemOperationPredicate) (result ListByVCenterCompleteResult, err error)

ListByVCenterCompleteMatchingPredicate retrieves all the results and then applies the predicate

type InventoryType

type InventoryType string
const (
	InventoryTypeCluster                InventoryType = "Cluster"
	InventoryTypeDatastore              InventoryType = "Datastore"
	InventoryTypeHost                   InventoryType = "Host"
	InventoryTypeResourcePool           InventoryType = "ResourcePool"
	InventoryTypeVirtualMachine         InventoryType = "VirtualMachine"
	InventoryTypeVirtualMachineTemplate InventoryType = "VirtualMachineTemplate"
	InventoryTypeVirtualNetwork         InventoryType = "VirtualNetwork"
)

func (*InventoryType) UnmarshalJSON

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

type ListByVCenterCompleteResult

type ListByVCenterCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []InventoryItem
}

type ListByVCenterOperationResponse

type ListByVCenterOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]InventoryItem
}

type NICType

type NICType string
const (
	NICTypeEOneThousand  NICType = "e1000"
	NICTypeEOneThousande NICType = "e1000e"
	NICTypePcnetThreeTwo NICType = "pcnet32"
	NICTypeVMxnet        NICType = "vmxnet"
	NICTypeVMxnetThree   NICType = "vmxnet3"
	NICTypeVMxnetTwo     NICType = "vmxnet2"
)

func (*NICType) UnmarshalJSON

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

type NetworkInterfaceInventory

type NetworkInterfaceInventory struct {
	DeviceKey      *int64    `json:"deviceKey,omitempty"`
	IPAddresses    *[]string `json:"ipAddresses,omitempty"`
	Label          *string   `json:"label,omitempty"`
	MacAddress     *string   `json:"macAddress,omitempty"`
	NetworkMoName  *string   `json:"networkMoName,omitempty"`
	NetworkMoRefId *string   `json:"networkMoRefId,omitempty"`
	NicType        *NICType  `json:"nicType,omitempty"`
}

type NetworkProfileInventory

type NetworkProfileInventory struct {
	NetworkInterfaces *[]NetworkInterfaceInventory `json:"networkInterfaces,omitempty"`
}

type OsType

type OsType string
const (
	OsTypeLinux   OsType = "Linux"
	OsTypeOther   OsType = "Other"
	OsTypeWindows OsType = "Windows"
)

func (*OsType) UnmarshalJSON

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreated      ProvisioningState = "Created"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type RawInventoryItemPropertiesImpl

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

RawInventoryItemPropertiesImpl 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 ResourcePoolInventoryItem

type ResourcePoolInventoryItem struct {
	Parent *InventoryItemDetails `json:"parent,omitempty"`

	// Fields inherited from InventoryItemProperties
	ManagedResourceId *string            `json:"managedResourceId,omitempty"`
	MoName            *string            `json:"moName,omitempty"`
	MoRefId           *string            `json:"moRefId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

func (ResourcePoolInventoryItem) MarshalJSON

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

type StorageProfileInventory

type StorageProfileInventory struct {
	Disks *[]VirtualDiskInventory `json:"disks,omitempty"`
}

type VCenterId

type VCenterId struct {
	SubscriptionId    string
	ResourceGroupName string
	VCenterName       string
}

VCenterId is a struct representing the Resource ID for a V Center

func NewVCenterID

func NewVCenterID(subscriptionId string, resourceGroupName string, vCenterName string) VCenterId

NewVCenterID returns a new VCenterId struct

func ParseVCenterID

func ParseVCenterID(input string) (*VCenterId, error)

ParseVCenterID parses 'input' into a VCenterId

func ParseVCenterIDInsensitively

func ParseVCenterIDInsensitively(input string) (*VCenterId, error)

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

func (*VCenterId) FromParseResult

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

func (VCenterId) ID

func (id VCenterId) ID() string

ID returns the formatted V Center ID

func (VCenterId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this V Center ID

func (VCenterId) String

func (id VCenterId) String() string

String returns a human-readable description of this V Center ID

type VirtualDiskInventory

type VirtualDiskInventory struct {
	ControllerKey   *int64    `json:"controllerKey,omitempty"`
	ControllerType  *string   `json:"controllerType,omitempty"`
	DeviceKey       *int64    `json:"deviceKey,omitempty"`
	DeviceName      *string   `json:"deviceName,omitempty"`
	DiskMode        *DiskMode `json:"diskMode,omitempty"`
	DiskName        *string   `json:"diskName,omitempty"`
	DiskSizeGB      *int64    `json:"diskSizeGB,omitempty"`
	DiskType        *DiskType `json:"diskType,omitempty"`
	EagerlyScrub    *bool     `json:"eagerlyScrub,omitempty"`
	FileName        *string   `json:"fileName,omitempty"`
	Label           *string   `json:"label,omitempty"`
	ThinProvisioned *bool     `json:"thinProvisioned,omitempty"`
	UnitNumber      *int64    `json:"unitNumber,omitempty"`
	Uuid            *string   `json:"uuid,omitempty"`
}

type VirtualMachineInventoryItem

type VirtualMachineInventoryItem struct {
	ChangeTrackingEnabled   *bool                    `json:"changeTrackingEnabled,omitempty"`
	ChangeTrackingSupported *bool                    `json:"changeTrackingSupported,omitempty"`
	Cluster                 *InventoryItemDetails    `json:"cluster,omitempty"`
	ComputerName            *string                  `json:"computerName,omitempty"`
	DiskEnabledUuid         *string                  `json:"diskEnabledUuid,omitempty"`
	FirmwareType            *FirmwareType            `json:"firmwareType,omitempty"`
	FolderPath              *string                  `json:"folderPath,omitempty"`
	Host                    *InventoryItemDetails    `json:"host,omitempty"`
	IPAddresses             *[]string                `json:"ipAddresses,omitempty"`
	InstanceUuid            *string                  `json:"instanceUuid,omitempty"`
	MaxSnapshots            *int64                   `json:"maxSnapshots,omitempty"`
	MemorySizeMB            *int64                   `json:"memorySizeMB,omitempty"`
	NetworkProfile          *NetworkProfileInventory `json:"networkProfile,omitempty"`
	NumCPUs                 *int64                   `json:"numCPUs,omitempty"`
	NumberOfSnapshots       *int64                   `json:"numberOfSnapshots,omitempty"`
	OsName                  *string                  `json:"osName,omitempty"`
	OsType                  *OsType                  `json:"osType,omitempty"`
	PowerState              *string                  `json:"powerState,omitempty"`
	ResourcePool            *InventoryItemDetails    `json:"resourcePool,omitempty"`
	SmbiosUuid              *string                  `json:"smbiosUuid,omitempty"`
	StorageProfile          *StorageProfileInventory `json:"storageProfile,omitempty"`
	ToolsRunningStatus      *string                  `json:"toolsRunningStatus,omitempty"`
	ToolsVersion            *string                  `json:"toolsVersion,omitempty"`
	ToolsVersionStatus      *string                  `json:"toolsVersionStatus,omitempty"`

	// Fields inherited from InventoryItemProperties
	ManagedResourceId *string            `json:"managedResourceId,omitempty"`
	MoName            *string            `json:"moName,omitempty"`
	MoRefId           *string            `json:"moRefId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

func (VirtualMachineInventoryItem) MarshalJSON

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

type VirtualMachineTemplateInventoryItem

type VirtualMachineTemplateInventoryItem struct {
	FolderPath         *string `json:"folderPath,omitempty"`
	MemorySizeMB       *int64  `json:"memorySizeMB,omitempty"`
	NumCPUs            *int64  `json:"numCPUs,omitempty"`
	NumCoresPerSocket  *int64  `json:"numCoresPerSocket,omitempty"`
	OsName             *string `json:"osName,omitempty"`
	OsType             *OsType `json:"osType,omitempty"`
	ToolsVersion       *string `json:"toolsVersion,omitempty"`
	ToolsVersionStatus *string `json:"toolsVersionStatus,omitempty"`

	// Fields inherited from InventoryItemProperties
	ManagedResourceId *string            `json:"managedResourceId,omitempty"`
	MoName            *string            `json:"moName,omitempty"`
	MoRefId           *string            `json:"moRefId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

func (VirtualMachineTemplateInventoryItem) MarshalJSON

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

type VirtualNetworkInventoryItem

type VirtualNetworkInventoryItem struct {

	// Fields inherited from InventoryItemProperties
	ManagedResourceId *string            `json:"managedResourceId,omitempty"`
	MoName            *string            `json:"moName,omitempty"`
	MoRefId           *string            `json:"moRefId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

func (VirtualNetworkInventoryItem) MarshalJSON

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

Jump to

Keyboard shortcuts

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