metadata

package
v0.20240209.1120443 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

README

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

The metadata 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/metadata"

Client Initialization

client := metadata.NewMetadataClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MetadataClient.RecommendationMetadataGet

ctx := context.TODO()
id := metadata.NewMetadataID("metadataValue")

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

Example Usage: MetadataClient.RecommendationMetadataList

ctx := context.TODO()


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

func PossibleValuesForScenario() []string

func ValidateMetadataID

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

ValidateMetadataID checks that 'input' can be parsed as a Metadata ID

Types

type MetadataClient

type MetadataClient struct {
	Client *resourcemanager.Client
}

func NewMetadataClientWithBaseURI

func NewMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*MetadataClient, error)

func (MetadataClient) RecommendationMetadataGet

func (c MetadataClient) RecommendationMetadataGet(ctx context.Context, id MetadataId) (result RecommendationMetadataGetOperationResponse, err error)

RecommendationMetadataGet ...

func (MetadataClient) RecommendationMetadataList

func (c MetadataClient) RecommendationMetadataList(ctx context.Context) (result RecommendationMetadataListOperationResponse, err error)

RecommendationMetadataList ...

func (MetadataClient) RecommendationMetadataListComplete

func (c MetadataClient) RecommendationMetadataListComplete(ctx context.Context) (RecommendationMetadataListCompleteResult, error)

RecommendationMetadataListComplete retrieves all the results into a single object

func (MetadataClient) RecommendationMetadataListCompleteMatchingPredicate

func (c MetadataClient) RecommendationMetadataListCompleteMatchingPredicate(ctx context.Context, predicate MetadataEntityOperationPredicate) (result RecommendationMetadataListCompleteResult, err error)

RecommendationMetadataListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type MetadataEntity

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

type MetadataEntityOperationPredicate

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

func (MetadataEntityOperationPredicate) Matches

type MetadataEntityProperties

type MetadataEntityProperties struct {
	ApplicableScenarios *[]Scenario                     `json:"applicableScenarios,omitempty"`
	DependsOn           *[]string                       `json:"dependsOn,omitempty"`
	DisplayName         *string                         `json:"displayName,omitempty"`
	SupportedValues     *[]MetadataSupportedValueDetail `json:"supportedValues,omitempty"`
}

type MetadataId

type MetadataId struct {
	MetadataName string
}

MetadataId is a struct representing the Resource ID for a Metadata

func NewMetadataID

func NewMetadataID(metadataName string) MetadataId

NewMetadataID returns a new MetadataId struct

func ParseMetadataID

func ParseMetadataID(input string) (*MetadataId, error)

ParseMetadataID parses 'input' into a MetadataId

func ParseMetadataIDInsensitively

func ParseMetadataIDInsensitively(input string) (*MetadataId, error)

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

func (*MetadataId) FromParseResult

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

func (MetadataId) ID

func (id MetadataId) ID() string

ID returns the formatted Metadata ID

func (MetadataId) Segments

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

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

func (MetadataId) String

func (id MetadataId) String() string

String returns a human-readable description of this Metadata ID

type MetadataSupportedValueDetail

type MetadataSupportedValueDetail struct {
	DisplayName *string `json:"displayName,omitempty"`
	Id          *string `json:"id,omitempty"`
}

type RecommendationMetadataGetOperationResponse

type RecommendationMetadataGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MetadataEntity
}

type RecommendationMetadataListCompleteResult

type RecommendationMetadataListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []MetadataEntity
}

type RecommendationMetadataListOperationResponse

type RecommendationMetadataListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]MetadataEntity
}

type Scenario

type Scenario string
const (
	ScenarioAlerts Scenario = "Alerts"
)

func (*Scenario) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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