configurations

package
v0.20240403.1135041 Latest Latest
Warning

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

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

README

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

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

Client Initialization

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

Example Usage: ConfigurationsClient.CreateInResourceGroup

ctx := context.TODO()
id := commonids.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 := commonids.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 := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ConfigurationsClient.ListBySubscription

ctx := context.TODO()
id := commonids.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

Types

type CPUThreshold

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

func (*CPUThreshold) UnmarshalJSON

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

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"`
	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"`
	Exclude         *bool           `json:"exclude,omitempty"`
	LowCPUThreshold *CPUThreshold   `json:"lowCpuThreshold,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) ListByResourceGroupComplete added in v0.20240226.1173038

ListByResourceGroupComplete retrieves all the results into a single object

func (ConfigurationsClient) ListByResourceGroupCompleteMatchingPredicate added in v0.20240226.1173038

func (c ConfigurationsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ConfigDataOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

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

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

type ListByResourceGroupCompleteResult added in v0.20240226.1173038

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ConfigData
}

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	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