recommendations

package
v0.20250110.1074108 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-12-01-preview/recommendations Documentation

The recommendations SDK allows for interaction with Azure Resource Manager securityinsights (API Version 2023-12-01-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/securityinsights/2023-12-01-preview/recommendations"

Client Initialization

client := recommendations.NewRecommendationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RecommendationsClient.GetRecommendationsList

ctx := context.TODO()
id := recommendations.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName")

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

Example Usage: RecommendationsClient.GetSingleRecommendation

ctx := context.TODO()
id := recommendations.NewRecommendationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "recommendationId")

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

Example Usage: RecommendationsClient.UpdateRecommendation

ctx := context.TODO()
id := recommendations.NewRecommendationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "recommendationId")
var payload []RecommendationPatch

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForCategory

func PossibleValuesForCategory() []string

func PossibleValuesForContext

func PossibleValuesForContext() []string

func PossibleValuesForPriority

func PossibleValuesForPriority() []string

func PossibleValuesForState

func PossibleValuesForState() []string

func ValidateRecommendationID

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

ValidateRecommendationID checks that 'input' can be parsed as a Recommendation ID

func ValidateWorkspaceID

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

Types

type Category

type Category string
const (
	CategoryCostOptimization Category = "CostOptimization"
	CategoryDemo             Category = "Demo"
	CategoryNewFeature       Category = "NewFeature"
	CategoryOnboarding       Category = "Onboarding"
	CategorySocEfficiency    Category = "SocEfficiency"
)

func (*Category) UnmarshalJSON

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

type Content

type Content struct {
	Description string `json:"description"`
	Title       string `json:"title"`
}

type Context

type Context string
const (
	ContextAnalytics Context = "Analytics"
	ContextIncidents Context = "Incidents"
	ContextNone      Context = "None"
	ContextOverview  Context = "Overview"
)

func (*Context) UnmarshalJSON

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

type GetRecommendationsListOperationResponse

type GetRecommendationsListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *RecommendationList
}

type GetSingleRecommendationOperationResponse

type GetSingleRecommendationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Recommendation
}

type Instructions

type Instructions struct {
	ActionsToBePerformed      string  `json:"actionsToBePerformed"`
	HowToPerformActionDetails *string `json:"howToPerformActionDetails,omitempty"`
	RecommendationImportance  string  `json:"recommendationImportance"`
}

type Priority

type Priority string
const (
	PriorityActive     Priority = "Active"
	PriorityDone       Priority = "Done"
	PriorityHigh       Priority = "High"
	PriorityInProgress Priority = "InProgress"
	PriorityLow        Priority = "Low"
	PriorityMedium     Priority = "Medium"
)

func (*Priority) UnmarshalJSON

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

type Recommendation

type Recommendation struct {
	Actions                 []RecommendedAction `json:"actions"`
	AdditionalProperties    *map[string]string  `json:"additionalProperties,omitempty"`
	Category                Category            `json:"category"`
	Content                 *Content            `json:"content,omitempty"`
	Context                 Context             `json:"context"`
	Description             string              `json:"description"`
	DisplayUntilTimeUtc     *string             `json:"displayUntilTimeUtc,omitempty"`
	HideUntilTimeUtc        *string             `json:"hideUntilTimeUtc,omitempty"`
	Id                      string              `json:"id"`
	Instructions            Instructions        `json:"instructions"`
	LastEvaluatedTimeUtc    string              `json:"lastEvaluatedTimeUtc"`
	Priority                Priority            `json:"priority"`
	RecommendationTypeId    string              `json:"recommendationTypeId"`
	RecommendationTypeTitle string              `json:"recommendationTypeTitle"`
	ResourceId              *string             `json:"resourceId,omitempty"`
	State                   State               `json:"state"`
	Title                   string              `json:"title"`
	Visible                 *bool               `json:"visible,omitempty"`
	WorkspaceId             string              `json:"workspaceId"`
}

func (*Recommendation) GetDisplayUntilTimeUtcAsTime

func (o *Recommendation) GetDisplayUntilTimeUtcAsTime() (*time.Time, error)

func (*Recommendation) GetHideUntilTimeUtcAsTime

func (o *Recommendation) GetHideUntilTimeUtcAsTime() (*time.Time, error)

func (*Recommendation) GetLastEvaluatedTimeUtcAsTime

func (o *Recommendation) GetLastEvaluatedTimeUtcAsTime() (*time.Time, error)

func (*Recommendation) SetDisplayUntilTimeUtcAsTime

func (o *Recommendation) SetDisplayUntilTimeUtcAsTime(input time.Time)

func (*Recommendation) SetHideUntilTimeUtcAsTime

func (o *Recommendation) SetHideUntilTimeUtcAsTime(input time.Time)

func (*Recommendation) SetLastEvaluatedTimeUtcAsTime

func (o *Recommendation) SetLastEvaluatedTimeUtcAsTime(input time.Time)

type RecommendationId

type RecommendationId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	RecommendationId  string
}

RecommendationId is a struct representing the Resource ID for a Recommendation

func NewRecommendationID

func NewRecommendationID(subscriptionId string, resourceGroupName string, workspaceName string, recommendationId string) RecommendationId

NewRecommendationID returns a new RecommendationId struct

func ParseRecommendationID

func ParseRecommendationID(input string) (*RecommendationId, error)

ParseRecommendationID parses 'input' into a RecommendationId

func ParseRecommendationIDInsensitively

func ParseRecommendationIDInsensitively(input string) (*RecommendationId, error)

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

func (*RecommendationId) FromParseResult

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

func (RecommendationId) ID

func (id RecommendationId) ID() string

ID returns the formatted Recommendation ID

func (RecommendationId) Segments

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

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

func (RecommendationId) String

func (id RecommendationId) String() string

String returns a human-readable description of this Recommendation ID

type RecommendationList

type RecommendationList struct {
	Value *[]Recommendation `json:"value,omitempty"`
}

type RecommendationPatch

type RecommendationPatch struct {
	HideUntilTimeUtc *string `json:"hideUntilTimeUtc,omitempty"`
	State            *State  `json:"state,omitempty"`
}

func (*RecommendationPatch) GetHideUntilTimeUtcAsTime

func (o *RecommendationPatch) GetHideUntilTimeUtcAsTime() (*time.Time, error)

func (*RecommendationPatch) SetHideUntilTimeUtcAsTime

func (o *RecommendationPatch) SetHideUntilTimeUtcAsTime(input time.Time)

type RecommendationsClient

type RecommendationsClient struct {
	Client *resourcemanager.Client
}

func NewRecommendationsClientWithBaseURI

func NewRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecommendationsClient, error)

func (RecommendationsClient) GetRecommendationsList

func (c RecommendationsClient) GetRecommendationsList(ctx context.Context, id WorkspaceId) (result GetRecommendationsListOperationResponse, err error)

GetRecommendationsList ...

func (RecommendationsClient) GetSingleRecommendation

GetSingleRecommendation ...

func (RecommendationsClient) UpdateRecommendation

UpdateRecommendation ...

func (RecommendationsClient) UpdateRecommendationThenPoll

func (c RecommendationsClient) UpdateRecommendationThenPoll(ctx context.Context, id RecommendationId, input []RecommendationPatch) error

UpdateRecommendationThenPoll performs UpdateRecommendation then polls until it's completed

type RecommendedAction

type RecommendedAction struct {
	LinkText string    `json:"linkText"`
	LinkURL  string    `json:"linkUrl"`
	State    *Priority `json:"state,omitempty"`
}

type State

type State string
const (
	StateActive            State = "Active"
	StateCompletedByAction State = "CompletedByAction"
	StateCompletedByUser   State = "CompletedByUser"
	StateDisabled          State = "Disabled"
	StateHidden            State = "Hidden"
)

func (*State) UnmarshalJSON

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

type UpdateRecommendationOperationResponse

type UpdateRecommendationOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Recommendation
}

type WorkspaceId

type WorkspaceId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
}

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, workspaceName string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (*WorkspaceId) FromParseResult

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

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

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

Jump to

Keyboard shortcuts

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