inventoryitems

package
v0.20230807.1063129 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems Documentation

The inventoryitems SDK allows for interaction with the Azure Resource Manager Service connectedvmware (API Version 2022-01-10-preview).

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/2022-01-10-preview/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 PossibleValuesForInventoryType

func PossibleValuesForInventoryType() []string

func PossibleValuesForOsType

func PossibleValuesForOsType() []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 *string `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 *string `json:"provisioningState,omitempty"`
}

func (DatastoreInventoryItem) MarshalJSON

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type HostInventoryItem

type HostInventoryItem 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 *string `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"`
	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) 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 added in v0.20230406.1124617

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

type ListByVCenterCompleteResult

type ListByVCenterCompleteResult struct {
	Items []InventoryItem
}

type ListByVCenterOperationResponse

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

type OsType

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

func (*OsType) UnmarshalJSON added in v0.20230406.1124617

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

type RawInventoryItemPropertiesImpl added in v0.20230807.1063129

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

RawModeOfTransitImpl 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 *string `json:"provisioningState,omitempty"`
}

func (ResourcePoolInventoryItem) MarshalJSON

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

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

type VirtualMachineInventoryItem struct {
	FolderPath         *string               `json:"folderPath,omitempty"`
	Host               *InventoryItemDetails `json:"host,omitempty"`
	IPAddresses        *[]string             `json:"ipAddresses,omitempty"`
	InstanceUuid       *string               `json:"instanceUuid,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"`
	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 *string `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"`

	// Fields inherited from InventoryItemProperties
	ManagedResourceId *string `json:"managedResourceId,omitempty"`
	MoName            *string `json:"moName,omitempty"`
	MoRefId           *string `json:"moRefId,omitempty"`
	ProvisioningState *string `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 *string `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