getrecommendations

package
v0.20240516.1091934 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2020-01-01/getrecommendations Documentation

The getrecommendations SDK allows for interaction with the Azure Resource Manager Service advisor (API Version 2020-01-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2020-01-01/getrecommendations"

Client Initialization

client := getrecommendations.NewGetRecommendationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GetRecommendationsClient.RecommendationsGet

ctx := context.TODO()
id := getrecommendations.NewScopedRecommendationID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "recommendationIdValue")

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

Example Usage: GetRecommendationsClient.RecommendationsList

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

// alternatively `client.RecommendationsList(ctx, id, getrecommendations.DefaultRecommendationsListOperationOptions())` can be used to do batched pagination
items, err := client.RecommendationsListComplete(ctx, id, getrecommendations.DefaultRecommendationsListOperationOptions())
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 PossibleValuesForCategory

func PossibleValuesForCategory() []string

func PossibleValuesForImpact

func PossibleValuesForImpact() []string

func ValidateScopedRecommendationID

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

ValidateScopedRecommendationID checks that 'input' can be parsed as a Scoped Recommendation ID

Types

type Category

type Category string
const (
	CategoryCost                  Category = "Cost"
	CategoryHighAvailability      Category = "HighAvailability"
	CategoryOperationalExcellence Category = "OperationalExcellence"
	CategoryPerformance           Category = "Performance"
	CategorySecurity              Category = "Security"
)

func (*Category) UnmarshalJSON

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

type GetRecommendationsClient

type GetRecommendationsClient struct {
	Client *resourcemanager.Client
}

func NewGetRecommendationsClientWithBaseURI

func NewGetRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*GetRecommendationsClient, error)

func (GetRecommendationsClient) RecommendationsGet

RecommendationsGet ...

func (GetRecommendationsClient) RecommendationsList

RecommendationsList ...

func (GetRecommendationsClient) RecommendationsListComplete

RecommendationsListComplete retrieves all the results into a single object

func (GetRecommendationsClient) RecommendationsListCompleteMatchingPredicate

RecommendationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type Impact

type Impact string
const (
	ImpactHigh   Impact = "High"
	ImpactLow    Impact = "Low"
	ImpactMedium Impact = "Medium"
)

func (*Impact) UnmarshalJSON

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

type RecommendationProperties

type RecommendationProperties struct {
	Actions                   *[]map[string]interface{} `json:"actions,omitempty"`
	Category                  *Category                 `json:"category,omitempty"`
	Description               *string                   `json:"description,omitempty"`
	ExposedMetadataProperties *map[string]interface{}   `json:"exposedMetadataProperties,omitempty"`
	ExtendedProperties        *map[string]string        `json:"extendedProperties,omitempty"`
	Impact                    *Impact                   `json:"impact,omitempty"`
	ImpactedField             *string                   `json:"impactedField,omitempty"`
	ImpactedValue             *string                   `json:"impactedValue,omitempty"`
	Label                     *string                   `json:"label,omitempty"`
	LastUpdated               *string                   `json:"lastUpdated,omitempty"`
	LearnMoreLink             *string                   `json:"learnMoreLink,omitempty"`
	Metadata                  *map[string]interface{}   `json:"metadata,omitempty"`
	PotentialBenefits         *string                   `json:"potentialBenefits,omitempty"`
	RecommendationTypeId      *string                   `json:"recommendationTypeId,omitempty"`
	Remediation               *map[string]interface{}   `json:"remediation,omitempty"`
	ResourceMetadata          *ResourceMetadata         `json:"resourceMetadata,omitempty"`
	ShortDescription          *ShortDescription         `json:"shortDescription,omitempty"`
	SuppressionIds            *[]string                 `json:"suppressionIds,omitempty"`
}

func (*RecommendationProperties) GetLastUpdatedAsTime

func (o *RecommendationProperties) GetLastUpdatedAsTime() (*time.Time, error)

func (*RecommendationProperties) SetLastUpdatedAsTime

func (o *RecommendationProperties) SetLastUpdatedAsTime(input time.Time)

type RecommendationsGetOperationResponse

type RecommendationsGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ResourceRecommendationBase
}

type RecommendationsListCompleteResult

type RecommendationsListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ResourceRecommendationBase
}

type RecommendationsListOperationOptions

type RecommendationsListOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultRecommendationsListOperationOptions

func DefaultRecommendationsListOperationOptions() RecommendationsListOperationOptions

func (RecommendationsListOperationOptions) ToHeaders

func (RecommendationsListOperationOptions) ToOData

func (RecommendationsListOperationOptions) ToQuery

type RecommendationsListOperationResponse

type RecommendationsListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ResourceRecommendationBase
}

type ResourceMetadata

type ResourceMetadata struct {
	Action     *map[string]interface{} `json:"action,omitempty"`
	Plural     *string                 `json:"plural,omitempty"`
	ResourceId *string                 `json:"resourceId,omitempty"`
	Singular   *string                 `json:"singular,omitempty"`
	Source     *string                 `json:"source,omitempty"`
}

type ResourceRecommendationBase

type ResourceRecommendationBase struct {
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *RecommendationProperties `json:"properties,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type ResourceRecommendationBaseOperationPredicate

type ResourceRecommendationBaseOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (ResourceRecommendationBaseOperationPredicate) Matches

type ScopedRecommendationId

type ScopedRecommendationId struct {
	ResourceUri      string
	RecommendationId string
}

ScopedRecommendationId is a struct representing the Resource ID for a Scoped Recommendation

func NewScopedRecommendationID

func NewScopedRecommendationID(resourceUri string, recommendationId string) ScopedRecommendationId

NewScopedRecommendationID returns a new ScopedRecommendationId struct

func ParseScopedRecommendationID

func ParseScopedRecommendationID(input string) (*ScopedRecommendationId, error)

ParseScopedRecommendationID parses 'input' into a ScopedRecommendationId

func ParseScopedRecommendationIDInsensitively

func ParseScopedRecommendationIDInsensitively(input string) (*ScopedRecommendationId, error)

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

func (*ScopedRecommendationId) FromParseResult

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

func (ScopedRecommendationId) ID

ID returns the formatted Scoped Recommendation ID

func (ScopedRecommendationId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scoped Recommendation ID

func (ScopedRecommendationId) String

func (id ScopedRecommendationId) String() string

String returns a human-readable description of this Scoped Recommendation ID

type ShortDescription

type ShortDescription struct {
	Problem  *string `json:"problem,omitempty"`
	Solution *string `json:"solution,omitempty"`
}

Jump to

Keyboard shortcuts

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