licenseprofiles

package
v0.20241118.1115603 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles Documentation

The licenseprofiles SDK allows for interaction with Azure Resource Manager hybridcompute (API Version 2024-07-10).

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/hybridcompute/2024-07-10/licenseprofiles"

Client Initialization

client := licenseprofiles.NewLicenseProfilesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: LicenseProfilesClient.CreateOrUpdate

ctx := context.TODO()
id := licenseprofiles.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineName")

payload := licenseprofiles.LicenseProfile{
	// ...
}


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

Example Usage: LicenseProfilesClient.Delete

ctx := context.TODO()
id := licenseprofiles.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineName")

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

Example Usage: LicenseProfilesClient.Get

ctx := context.TODO()
id := licenseprofiles.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineName")

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: LicenseProfilesClient.List

ctx := context.TODO()
id := licenseprofiles.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineName")

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

Example Usage: LicenseProfilesClient.Update

ctx := context.TODO()
id := licenseprofiles.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineName")

payload := licenseprofiles.LicenseProfileUpdate{
	// ...
}


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 PossibleValuesForEsuEligibility

func PossibleValuesForEsuEligibility() []string

func PossibleValuesForEsuKeyState

func PossibleValuesForEsuKeyState() []string

func PossibleValuesForEsuServerType

func PossibleValuesForEsuServerType() []string

func PossibleValuesForLicenseProfileProductType

func PossibleValuesForLicenseProfileProductType() []string

func PossibleValuesForLicenseProfileSubscriptionStatus

func PossibleValuesForLicenseProfileSubscriptionStatus() []string

func PossibleValuesForLicenseProfileSubscriptionStatusUpdate

func PossibleValuesForLicenseProfileSubscriptionStatusUpdate() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateMachineID

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

ValidateMachineID checks that 'input' can be parsed as a Machine ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	Info *interface{} `json:"info,omitempty"`
	Type *string      `json:"type,omitempty"`
}

type ErrorDetail

type ErrorDetail struct {
	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
	Code           *string                `json:"code,omitempty"`
	Details        *[]ErrorDetail         `json:"details,omitempty"`
	Message        *string                `json:"message,omitempty"`
	Target         *string                `json:"target,omitempty"`
}

type EsuEligibility

type EsuEligibility string
const (
	EsuEligibilityEligible   EsuEligibility = "Eligible"
	EsuEligibilityIneligible EsuEligibility = "Ineligible"
	EsuEligibilityUnknown    EsuEligibility = "Unknown"
)

func (*EsuEligibility) UnmarshalJSON

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

type EsuKey

type EsuKey struct {
	LicenseStatus *int64  `json:"licenseStatus,omitempty"`
	Sku           *string `json:"sku,omitempty"`
}

type EsuKeyState

type EsuKeyState string
const (
	EsuKeyStateActive   EsuKeyState = "Active"
	EsuKeyStateInactive EsuKeyState = "Inactive"
)

func (*EsuKeyState) UnmarshalJSON

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

type EsuProfileUpdateProperties

type EsuProfileUpdateProperties struct {
	AssignedLicense *string `json:"assignedLicense,omitempty"`
}

type EsuServerType

type EsuServerType string
const (
	EsuServerTypeDatacenter EsuServerType = "Datacenter"
	EsuServerTypeStandard   EsuServerType = "Standard"
)

func (*EsuServerType) UnmarshalJSON

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

type GetOperationResponse

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

type LicenseProfile

type LicenseProfile struct {
	Id         *string                   `json:"id,omitempty"`
	Location   string                    `json:"location"`
	Name       *string                   `json:"name,omitempty"`
	Properties *LicenseProfileProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData    `json:"systemData,omitempty"`
	Tags       *map[string]string        `json:"tags,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type LicenseProfileArmEsuProperties

type LicenseProfileArmEsuProperties struct {
	AssignedLicense            *string         `json:"assignedLicense,omitempty"`
	AssignedLicenseImmutableId *string         `json:"assignedLicenseImmutableId,omitempty"`
	EsuEligibility             *EsuEligibility `json:"esuEligibility,omitempty"`
	EsuKeyState                *EsuKeyState    `json:"esuKeyState,omitempty"`
	EsuKeys                    *[]EsuKey       `json:"esuKeys,omitempty"`
	ServerType                 *EsuServerType  `json:"serverType,omitempty"`
}

type LicenseProfileArmProductProfileProperties

type LicenseProfileArmProductProfileProperties struct {
	BillingEndDate     *string                           `json:"billingEndDate,omitempty"`
	BillingStartDate   *string                           `json:"billingStartDate,omitempty"`
	DisenrollmentDate  *string                           `json:"disenrollmentDate,omitempty"`
	EnrollmentDate     *string                           `json:"enrollmentDate,omitempty"`
	Error              *ErrorDetail                      `json:"error,omitempty"`
	ProductFeatures    *[]ProductFeature                 `json:"productFeatures,omitempty"`
	ProductType        *LicenseProfileProductType        `json:"productType,omitempty"`
	SubscriptionStatus *LicenseProfileSubscriptionStatus `json:"subscriptionStatus,omitempty"`
}

func (*LicenseProfileArmProductProfileProperties) GetBillingEndDateAsTime

func (o *LicenseProfileArmProductProfileProperties) GetBillingEndDateAsTime() (*time.Time, error)

func (*LicenseProfileArmProductProfileProperties) GetBillingStartDateAsTime

func (o *LicenseProfileArmProductProfileProperties) GetBillingStartDateAsTime() (*time.Time, error)

func (*LicenseProfileArmProductProfileProperties) GetDisenrollmentDateAsTime

func (o *LicenseProfileArmProductProfileProperties) GetDisenrollmentDateAsTime() (*time.Time, error)

func (*LicenseProfileArmProductProfileProperties) GetEnrollmentDateAsTime

func (o *LicenseProfileArmProductProfileProperties) GetEnrollmentDateAsTime() (*time.Time, error)

func (*LicenseProfileArmProductProfileProperties) SetBillingEndDateAsTime

func (o *LicenseProfileArmProductProfileProperties) SetBillingEndDateAsTime(input time.Time)

func (*LicenseProfileArmProductProfileProperties) SetBillingStartDateAsTime

func (o *LicenseProfileArmProductProfileProperties) SetBillingStartDateAsTime(input time.Time)

func (*LicenseProfileArmProductProfileProperties) SetDisenrollmentDateAsTime

func (o *LicenseProfileArmProductProfileProperties) SetDisenrollmentDateAsTime(input time.Time)

func (*LicenseProfileArmProductProfileProperties) SetEnrollmentDateAsTime

func (o *LicenseProfileArmProductProfileProperties) SetEnrollmentDateAsTime(input time.Time)

type LicenseProfileOperationPredicate

type LicenseProfileOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (LicenseProfileOperationPredicate) Matches

type LicenseProfileProductType

type LicenseProfileProductType string
const (
	LicenseProfileProductTypeWindowsIoTEnterprise LicenseProfileProductType = "WindowsIoTEnterprise"
	LicenseProfileProductTypeWindowsServer        LicenseProfileProductType = "WindowsServer"
)

func (*LicenseProfileProductType) UnmarshalJSON

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

type LicenseProfileProperties

type LicenseProfileProperties struct {
	EsuProfile        *LicenseProfileArmEsuProperties            `json:"esuProfile,omitempty"`
	ProductProfile    *LicenseProfileArmProductProfileProperties `json:"productProfile,omitempty"`
	ProvisioningState *ProvisioningState                         `json:"provisioningState,omitempty"`
	SoftwareAssurance *LicenseProfilePropertiesSoftwareAssurance `json:"softwareAssurance,omitempty"`
}

type LicenseProfilePropertiesSoftwareAssurance

type LicenseProfilePropertiesSoftwareAssurance struct {
	SoftwareAssuranceCustomer *bool `json:"softwareAssuranceCustomer,omitempty"`
}

type LicenseProfileSubscriptionStatus

type LicenseProfileSubscriptionStatus string
const (
	LicenseProfileSubscriptionStatusDisabled  LicenseProfileSubscriptionStatus = "Disabled"
	LicenseProfileSubscriptionStatusDisabling LicenseProfileSubscriptionStatus = "Disabling"
	LicenseProfileSubscriptionStatusEnabled   LicenseProfileSubscriptionStatus = "Enabled"
	LicenseProfileSubscriptionStatusEnabling  LicenseProfileSubscriptionStatus = "Enabling"
	LicenseProfileSubscriptionStatusFailed    LicenseProfileSubscriptionStatus = "Failed"
	LicenseProfileSubscriptionStatusUnknown   LicenseProfileSubscriptionStatus = "Unknown"
)

func (*LicenseProfileSubscriptionStatus) UnmarshalJSON

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

type LicenseProfileSubscriptionStatusUpdate

type LicenseProfileSubscriptionStatusUpdate string
const (
	LicenseProfileSubscriptionStatusUpdateDisable LicenseProfileSubscriptionStatusUpdate = "Disable"
	LicenseProfileSubscriptionStatusUpdateEnable  LicenseProfileSubscriptionStatusUpdate = "Enable"
)

func (*LicenseProfileSubscriptionStatusUpdate) UnmarshalJSON

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

type LicenseProfileUpdate

type LicenseProfileUpdate struct {
	Properties *LicenseProfileUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string              `json:"tags,omitempty"`
}

type LicenseProfileUpdateProperties

type LicenseProfileUpdateProperties struct {
	EsuProfile        *EsuProfileUpdateProperties                      `json:"esuProfile,omitempty"`
	ProductProfile    *ProductProfileUpdateProperties                  `json:"productProfile,omitempty"`
	SoftwareAssurance *LicenseProfileUpdatePropertiesSoftwareAssurance `json:"softwareAssurance,omitempty"`
}

type LicenseProfileUpdatePropertiesSoftwareAssurance

type LicenseProfileUpdatePropertiesSoftwareAssurance struct {
	SoftwareAssuranceCustomer *bool `json:"softwareAssuranceCustomer,omitempty"`
}

type LicenseProfilesClient

type LicenseProfilesClient struct {
	Client *resourcemanager.Client
}

func NewLicenseProfilesClientWithBaseURI

func NewLicenseProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LicenseProfilesClient, error)

func (LicenseProfilesClient) CreateOrUpdate

CreateOrUpdate ...

func (LicenseProfilesClient) CreateOrUpdateThenPoll

func (c LicenseProfilesClient) CreateOrUpdateThenPoll(ctx context.Context, id MachineId, input LicenseProfile) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (LicenseProfilesClient) Delete

Delete ...

func (LicenseProfilesClient) DeleteThenPoll

func (c LicenseProfilesClient) DeleteThenPoll(ctx context.Context, id MachineId) error

DeleteThenPoll performs Delete then polls until it's completed

func (LicenseProfilesClient) Get

Get ...

func (LicenseProfilesClient) List

List ...

func (LicenseProfilesClient) ListComplete

ListComplete retrieves all the results into a single object

func (LicenseProfilesClient) ListCompleteMatchingPredicate

func (c LicenseProfilesClient) ListCompleteMatchingPredicate(ctx context.Context, id MachineId, predicate LicenseProfileOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (LicenseProfilesClient) Update

Update ...

func (LicenseProfilesClient) UpdateThenPoll

func (c LicenseProfilesClient) UpdateThenPoll(ctx context.Context, id MachineId, input LicenseProfileUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []LicenseProfile
}

type ListCustomPager

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LicenseProfile
}

type MachineId

type MachineId struct {
	SubscriptionId    string
	ResourceGroupName string
	MachineName       string
}

MachineId is a struct representing the Resource ID for a Machine

func NewMachineID

func NewMachineID(subscriptionId string, resourceGroupName string, machineName string) MachineId

NewMachineID returns a new MachineId struct

func ParseMachineID

func ParseMachineID(input string) (*MachineId, error)

ParseMachineID parses 'input' into a MachineId

func ParseMachineIDInsensitively

func ParseMachineIDInsensitively(input string) (*MachineId, error)

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

func (*MachineId) FromParseResult

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

func (MachineId) ID

func (id MachineId) ID() string

ID returns the formatted Machine ID

func (MachineId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Machine ID

func (MachineId) String

func (id MachineId) String() string

String returns a human-readable description of this Machine ID

type ProductFeature

type ProductFeature struct {
	BillingEndDate     *string                           `json:"billingEndDate,omitempty"`
	BillingStartDate   *string                           `json:"billingStartDate,omitempty"`
	DisenrollmentDate  *string                           `json:"disenrollmentDate,omitempty"`
	EnrollmentDate     *string                           `json:"enrollmentDate,omitempty"`
	Error              *ErrorDetail                      `json:"error,omitempty"`
	Name               *string                           `json:"name,omitempty"`
	SubscriptionStatus *LicenseProfileSubscriptionStatus `json:"subscriptionStatus,omitempty"`
}

func (*ProductFeature) GetBillingEndDateAsTime

func (o *ProductFeature) GetBillingEndDateAsTime() (*time.Time, error)

func (*ProductFeature) GetBillingStartDateAsTime

func (o *ProductFeature) GetBillingStartDateAsTime() (*time.Time, error)

func (*ProductFeature) GetDisenrollmentDateAsTime

func (o *ProductFeature) GetDisenrollmentDateAsTime() (*time.Time, error)

func (*ProductFeature) GetEnrollmentDateAsTime

func (o *ProductFeature) GetEnrollmentDateAsTime() (*time.Time, error)

func (*ProductFeature) SetBillingEndDateAsTime

func (o *ProductFeature) SetBillingEndDateAsTime(input time.Time)

func (*ProductFeature) SetBillingStartDateAsTime

func (o *ProductFeature) SetBillingStartDateAsTime(input time.Time)

func (*ProductFeature) SetDisenrollmentDateAsTime

func (o *ProductFeature) SetDisenrollmentDateAsTime(input time.Time)

func (*ProductFeature) SetEnrollmentDateAsTime

func (o *ProductFeature) SetEnrollmentDateAsTime(input time.Time)

type ProductFeatureUpdate

type ProductFeatureUpdate struct {
	Name               *string                                 `json:"name,omitempty"`
	SubscriptionStatus *LicenseProfileSubscriptionStatusUpdate `json:"subscriptionStatus,omitempty"`
}

type ProductProfileUpdateProperties

type ProductProfileUpdateProperties struct {
	ProductFeatures    *[]ProductFeatureUpdate                 `json:"productFeatures,omitempty"`
	ProductType        *LicenseProfileProductType              `json:"productType,omitempty"`
	SubscriptionStatus *LicenseProfileSubscriptionStatusUpdate `json:"subscriptionStatus,omitempty"`
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleted   ProvisioningState = "Deleted"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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