inventoryitems

package
v0.20241209.1115630 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems Documentation

The inventoryitems SDK allows for interaction with Azure Resource Manager systemcentervirtualmachinemanager (API Version 2023-10-07).

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/systemcentervirtualmachinemanager/2023-10-07/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", "vmmServerName", "inventoryItemName")

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", "vmmServerName", "inventoryItemName")

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", "vmmServerName", "inventoryItemName")

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.ListByVMmServer

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

// alternatively `client.ListByVMmServer(ctx, id)` can be used to do batched pagination
items, err := client.ListByVMmServerComplete(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 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 ValidateVMmServerID

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

ValidateVMmServerID checks that 'input' can be parsed as a V Mm Server ID

Types

type BaseInventoryItemPropertiesImpl added in v0.20240920.1135249

type BaseInventoryItemPropertiesImpl struct {
	InventoryItemName *string            `json:"inventoryItemName,omitempty"`
	InventoryType     InventoryType      `json:"inventoryType"`
	ManagedResourceId *string            `json:"managedResourceId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	Uuid              *string            `json:"uuid,omitempty"`
}

func (BaseInventoryItemPropertiesImpl) InventoryItemProperties added in v0.20240920.1135249

type CloudInventoryItem

type CloudInventoryItem struct {
	InventoryItemName *string            `json:"inventoryItemName,omitempty"`
	InventoryType     InventoryType      `json:"inventoryType"`
	ManagedResourceId *string            `json:"managedResourceId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	Uuid              *string            `json:"uuid,omitempty"`
}

func (CloudInventoryItem) InventoryItemProperties added in v0.20240920.1135249

func (s CloudInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl

func (CloudInventoryItem) MarshalJSON

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

type CreateOperationResponse

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

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

type InventoryItemId

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

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

func NewInventoryItemID

func NewInventoryItemID(subscriptionId string, resourceGroupName string, vmmServerName 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 {
	InventoryItemProperties() BaseInventoryItemPropertiesImpl
}

func UnmarshalInventoryItemPropertiesImplementation added in v0.20240920.1135249

func UnmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItemProperties, error)

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) ListByVMmServer added in v0.20240604.1114748

func (c InventoryItemsClient) ListByVMmServer(ctx context.Context, id VMmServerId) (result ListByVMmServerOperationResponse, err error)

ListByVMmServer ...

func (InventoryItemsClient) ListByVMmServerComplete added in v0.20240604.1114748

ListByVMmServerComplete retrieves all the results into a single object

func (InventoryItemsClient) ListByVMmServerCompleteMatchingPredicate added in v0.20240604.1114748

func (c InventoryItemsClient) ListByVMmServerCompleteMatchingPredicate(ctx context.Context, id VMmServerId, predicate InventoryItemOperationPredicate) (result ListByVMmServerCompleteResult, err error)

ListByVMmServerCompleteMatchingPredicate retrieves all the results and then applies the predicate

type InventoryType

type InventoryType string
const (
	InventoryTypeCloud                  InventoryType = "Cloud"
	InventoryTypeVirtualMachine         InventoryType = "VirtualMachine"
	InventoryTypeVirtualMachineTemplate InventoryType = "VirtualMachineTemplate"
	InventoryTypeVirtualNetwork         InventoryType = "VirtualNetwork"
)

func (*InventoryType) UnmarshalJSON

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

type ListByVMmServerCompleteResult added in v0.20240604.1114748

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

type ListByVMmServerCustomPager added in v0.20240628.1153531

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

type ListByVMmServerOperationResponse added in v0.20240604.1114748

type ListByVMmServerOperationResponse 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

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{}
	// contains filtered or unexported fields
}

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

func (RawInventoryItemPropertiesImpl) InventoryItemProperties added in v0.20240920.1135249

type VMmServerId

type VMmServerId struct {
	SubscriptionId    string
	ResourceGroupName string
	VmmServerName     string
}

VMmServerId is a struct representing the Resource ID for a V Mm Server

func NewVMmServerID

func NewVMmServerID(subscriptionId string, resourceGroupName string, vmmServerName string) VMmServerId

NewVMmServerID returns a new VMmServerId struct

func ParseVMmServerID

func ParseVMmServerID(input string) (*VMmServerId, error)

ParseVMmServerID parses 'input' into a VMmServerId

func ParseVMmServerIDInsensitively

func ParseVMmServerIDInsensitively(input string) (*VMmServerId, error)

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

func (*VMmServerId) FromParseResult

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

func (VMmServerId) ID

func (id VMmServerId) ID() string

ID returns the formatted V Mm Server ID

func (VMmServerId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this V Mm Server ID

func (VMmServerId) String

func (id VMmServerId) String() string

String returns a human-readable description of this V Mm Server ID

type VirtualMachineInventoryItem

type VirtualMachineInventoryItem struct {
	BiosGuid                 *string               `json:"biosGuid,omitempty"`
	Cloud                    *InventoryItemDetails `json:"cloud,omitempty"`
	IPAddresses              *[]string             `json:"ipAddresses,omitempty"`
	ManagedMachineResourceId *string               `json:"managedMachineResourceId,omitempty"`
	OsName                   *string               `json:"osName,omitempty"`
	OsType                   *OsType               `json:"osType,omitempty"`
	OsVersion                *string               `json:"osVersion,omitempty"`
	PowerState               *string               `json:"powerState,omitempty"`

	InventoryItemName *string            `json:"inventoryItemName,omitempty"`
	InventoryType     InventoryType      `json:"inventoryType"`
	ManagedResourceId *string            `json:"managedResourceId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	Uuid              *string            `json:"uuid,omitempty"`
}

func (VirtualMachineInventoryItem) InventoryItemProperties added in v0.20240920.1135249

func (VirtualMachineInventoryItem) MarshalJSON

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

type VirtualMachineTemplateInventoryItem

type VirtualMachineTemplateInventoryItem struct {
	CpuCount *int64  `json:"cpuCount,omitempty"`
	MemoryMB *int64  `json:"memoryMB,omitempty"`
	OsName   *string `json:"osName,omitempty"`
	OsType   *OsType `json:"osType,omitempty"`

	InventoryItemName *string            `json:"inventoryItemName,omitempty"`
	InventoryType     InventoryType      `json:"inventoryType"`
	ManagedResourceId *string            `json:"managedResourceId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	Uuid              *string            `json:"uuid,omitempty"`
}

func (VirtualMachineTemplateInventoryItem) InventoryItemProperties added in v0.20240920.1135249

func (VirtualMachineTemplateInventoryItem) MarshalJSON

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

type VirtualNetworkInventoryItem

type VirtualNetworkInventoryItem struct {
	InventoryItemName *string            `json:"inventoryItemName,omitempty"`
	InventoryType     InventoryType      `json:"inventoryType"`
	ManagedResourceId *string            `json:"managedResourceId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	Uuid              *string            `json:"uuid,omitempty"`
}

func (VirtualNetworkInventoryItem) InventoryItemProperties added in v0.20240920.1135249

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