configurations

package
v0.20231214.1160726 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

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

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

Client Initialization

client := configurations.NewConfigurationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ConfigurationsClient.CreateInResourceGroup

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

payload := configurations.ConfigData{
	// ...
}


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

Example Usage: ConfigurationsClient.CreateInSubscription

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

payload := configurations.ConfigData{
	// ...
}


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

Example Usage: ConfigurationsClient.ListByResourceGroup

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

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

Example Usage: ConfigurationsClient.ListBySubscription

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

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

func PossibleValuesForCPUThreshold() []string

func PossibleValuesForCategory

func PossibleValuesForCategory() []string

func PossibleValuesForDigestConfigState

func PossibleValuesForDigestConfigState() []string

func PossibleValuesForDuration

func PossibleValuesForDuration() []string

Types

type CPUThreshold

type CPUThreshold string
const (
	CPUThresholdFive    CPUThreshold = "5"
	CPUThresholdOneFive CPUThreshold = "15"
	CPUThresholdOneZero CPUThreshold = "10"
	CPUThresholdTwoZero CPUThreshold = "20"
)

func (*CPUThreshold) UnmarshalJSON added in v0.20230731.1080956

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

type Category

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

func (*Category) UnmarshalJSON added in v0.20230731.1080956

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

type ConfigData

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

type ConfigDataOperationPredicate

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

func (ConfigDataOperationPredicate) Matches

func (p ConfigDataOperationPredicate) Matches(input ConfigData) bool

type ConfigDataProperties

type ConfigDataProperties struct {
	Digests         *[]DigestConfig `json:"digests,omitempty"`
	Duration        *Duration       `json:"duration,omitempty"`
	Exclude         *bool           `json:"exclude,omitempty"`
	LowCPUThreshold *CPUThreshold   `json:"lowCpuThreshold,omitempty"`
}

type ConfigurationListResult

type ConfigurationListResult struct {
	NextLink *string       `json:"nextLink,omitempty"`
	Value    *[]ConfigData `json:"value,omitempty"`
}

type ConfigurationsClient

type ConfigurationsClient struct {
	Client *resourcemanager.Client
}

func NewConfigurationsClientWithBaseURI

func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error)

func (ConfigurationsClient) CreateInResourceGroup

CreateInResourceGroup ...

func (ConfigurationsClient) CreateInSubscription

CreateInSubscription ...

func (ConfigurationsClient) ListByResourceGroup

ListByResourceGroup ...

func (ConfigurationsClient) ListBySubscription

ListBySubscription ...

func (ConfigurationsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (ConfigurationsClient) ListBySubscriptionCompleteMatchingPredicate

func (c ConfigurationsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ConfigDataOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

type CreateInResourceGroupOperationResponse

type CreateInResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ConfigData
}

type CreateInSubscriptionOperationResponse

type CreateInSubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ConfigData
}

type DigestConfig

type DigestConfig struct {
	ActionGroupResourceId *string            `json:"actionGroupResourceId,omitempty"`
	Categories            *[]Category        `json:"categories,omitempty"`
	Frequency             *int64             `json:"frequency,omitempty"`
	Language              *string            `json:"language,omitempty"`
	Name                  *string            `json:"name,omitempty"`
	State                 *DigestConfigState `json:"state,omitempty"`
}

type DigestConfigState

type DigestConfigState string
const (
	DigestConfigStateActive   DigestConfigState = "Active"
	DigestConfigStateDisabled DigestConfigState = "Disabled"
)

func (*DigestConfigState) UnmarshalJSON added in v0.20230731.1080956

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

type Duration

type Duration string
const (
	DurationNineZero  Duration = "90"
	DurationOneFour   Duration = "14"
	DurationSeven     Duration = "7"
	DurationSixZero   Duration = "60"
	DurationThreeZero Duration = "30"
	DurationTwoOne    Duration = "21"
)

func (*Duration) UnmarshalJSON added in v0.20230731.1080956

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

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ConfigurationListResult
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []ConfigData
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ConfigData
}

Jump to

Keyboard shortcuts

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