advisorscore

package
v0.20231108.1152235 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2022-10-01/advisorscore Documentation

The advisorscore SDK allows for interaction with the Azure Resource Manager Service advisor (API Version 2022-10-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/advisor/2022-10-01/advisorscore"

Client Initialization

client := advisorscore.NewAdvisorScoreClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AdvisorScoreClient.Get

ctx := context.TODO()
id := advisorscore.NewAdvisorScoreID("12345678-1234-9876-4563-123456789012", "advisorScoreValue")

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

ctx := context.TODO()
id := advisorscore.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAggregated

func PossibleValuesForAggregated() []string

func ValidateAdvisorScoreID

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

ValidateAdvisorScoreID checks that 'input' can be parsed as a Advisor Score ID

Types

type AdvisorScoreClient

type AdvisorScoreClient struct {
	Client *resourcemanager.Client
}

func NewAdvisorScoreClientWithBaseURI

func NewAdvisorScoreClientWithBaseURI(sdkApi sdkEnv.Api) (*AdvisorScoreClient, error)

func (AdvisorScoreClient) Get

Get ...

func (AdvisorScoreClient) List

List ...

type AdvisorScoreEntity

type AdvisorScoreEntity struct {
	Id         *string                       `json:"id,omitempty"`
	Name       *string                       `json:"name,omitempty"`
	Properties *AdvisorScoreEntityProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData        `json:"systemData,omitempty"`
	Type       *string                       `json:"type,omitempty"`
}

type AdvisorScoreEntityProperties

type AdvisorScoreEntityProperties struct {
	LastRefreshedScore *ScoreEntity                         `json:"lastRefreshedScore,omitempty"`
	TimeSeries         *[]TimeSeriesEntityTimeSeriesInlined `json:"timeSeries,omitempty"`
}

type AdvisorScoreId

type AdvisorScoreId struct {
	SubscriptionId   string
	AdvisorScoreName string
}

AdvisorScoreId is a struct representing the Resource ID for a Advisor Score

func NewAdvisorScoreID

func NewAdvisorScoreID(subscriptionId string, advisorScoreName string) AdvisorScoreId

NewAdvisorScoreID returns a new AdvisorScoreId struct

func ParseAdvisorScoreID

func ParseAdvisorScoreID(input string) (*AdvisorScoreId, error)

ParseAdvisorScoreID parses 'input' into a AdvisorScoreId

func ParseAdvisorScoreIDInsensitively

func ParseAdvisorScoreIDInsensitively(input string) (*AdvisorScoreId, error)

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

func (AdvisorScoreId) ID

func (id AdvisorScoreId) ID() string

ID returns the formatted Advisor Score ID

func (AdvisorScoreId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Advisor Score ID

func (AdvisorScoreId) String

func (id AdvisorScoreId) String() string

String returns a human-readable description of this Advisor Score ID

type AdvisorScoreResponse

type AdvisorScoreResponse struct {
	Value *[]AdvisorScoreEntity `json:"value,omitempty"`
}

type Aggregated

type Aggregated string
const (
	AggregatedDay   Aggregated = "day"
	AggregatedMonth Aggregated = "month"
	AggregatedWeek  Aggregated = "week"
)

func (*Aggregated) UnmarshalJSON added in v0.20230731.1080956

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

type GetOperationResponse

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AdvisorScoreResponse
}

type ScoreEntity

type ScoreEntity struct {
	CategoryCount          *float64 `json:"categoryCount,omitempty"`
	ConsumptionUnits       *float64 `json:"consumptionUnits,omitempty"`
	Date                   *string  `json:"date,omitempty"`
	ImpactedResourceCount  *float64 `json:"impactedResourceCount,omitempty"`
	PotentialScoreIncrease *float64 `json:"potentialScoreIncrease,omitempty"`
	Score                  *float64 `json:"score,omitempty"`
}

type TimeSeriesEntityTimeSeriesInlined

type TimeSeriesEntityTimeSeriesInlined struct {
	AggregationLevel *Aggregated    `json:"aggregationLevel,omitempty"`
	ScoreHistory     *[]ScoreEntity `json:"scoreHistory,omitempty"`
}

Jump to

Keyboard shortcuts

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