configurations

package
v0.20230728.1065112 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

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"
)

type Category

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

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 autorest.Client
	// contains filtered or unexported fields
}

func NewConfigurationsClientWithBaseURI

func NewConfigurationsClientWithBaseURI(endpoint string) ConfigurationsClient

func (ConfigurationsClient) CreateInResourceGroup

CreateInResourceGroup ...

func (ConfigurationsClient) CreateInSubscription

CreateInSubscription ...

func (ConfigurationsClient) ListByResourceGroup

ListByResourceGroup ...

func (ConfigurationsClient) ListBySubscription

ListBySubscription ...

func (ConfigurationsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all of the results into a single object

func (ConfigurationsClient) ListBySubscriptionCompleteMatchingPredicate

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

ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type CreateInResourceGroupOperationResponse

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

type CreateInSubscriptionOperationResponse

type CreateInSubscriptionOperationResponse struct {
	HttpResponse *http.Response
	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"
)

type Duration

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

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []ConfigData
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ConfigData
	// contains filtered or unexported fields
}

func (ListBySubscriptionOperationResponse) HasMore

func (ListBySubscriptionOperationResponse) LoadMore

Jump to

Keyboard shortcuts

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