settings

package
v0.20241209.1115630 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/settings Documentation

The settings SDK allows for interaction with Azure Resource Manager costmanagement (API Version 2023-08-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/costmanagement/2023-08-01/settings"

Client Initialization

client := settings.NewSettingsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SettingsClient.CreateOrUpdateByScope

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

payload := settings.Setting{
	// ...
}


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

Example Usage: SettingsClient.DeleteByScope

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: SettingsClient.GetByScope

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: SettingsClient.List

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForSettingsKind

func PossibleValuesForSettingsKind() []string

Types

type BaseSettingImpl added in v0.20240920.1135249

type BaseSettingImpl struct {
	Id   *string      `json:"id,omitempty"`
	Kind SettingsKind `json:"kind"`
	Name *string      `json:"name,omitempty"`
	Type *string      `json:"type,omitempty"`
}

func (BaseSettingImpl) Setting added in v0.20240920.1135249

func (s BaseSettingImpl) Setting() BaseSettingImpl

type CreateOrUpdateByScopeOperationResponse

type CreateOrUpdateByScopeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        Setting
}

type DeleteByScopeOperationResponse

type DeleteByScopeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetByScopeOperationResponse

type GetByScopeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        Setting
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SettingsListResult
}

type RawSettingImpl

type RawSettingImpl struct {
	Type   string
	Values map[string]interface{}
	// contains filtered or unexported fields
}

RawSettingImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

func (RawSettingImpl) Setting added in v0.20240920.1135249

func (s RawSettingImpl) Setting() BaseSettingImpl

type Setting

type Setting interface {
	Setting() BaseSettingImpl
}

func UnmarshalSettingImplementation added in v0.20240920.1135249

func UnmarshalSettingImplementation(input []byte) (Setting, error)

type SettingsClient

type SettingsClient struct {
	Client *resourcemanager.Client
}

func NewSettingsClientWithBaseURI

func NewSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SettingsClient, error)

func (SettingsClient) CreateOrUpdateByScope

func (c SettingsClient) CreateOrUpdateByScope(ctx context.Context, id commonids.ScopeId, input Setting) (result CreateOrUpdateByScopeOperationResponse, err error)

CreateOrUpdateByScope ...

func (SettingsClient) DeleteByScope

func (c SettingsClient) DeleteByScope(ctx context.Context, id commonids.ScopeId) (result DeleteByScopeOperationResponse, err error)

DeleteByScope ...

func (SettingsClient) GetByScope

func (c SettingsClient) GetByScope(ctx context.Context, id commonids.ScopeId) (result GetByScopeOperationResponse, err error)

GetByScope ...

func (SettingsClient) List

List ...

type SettingsKind

type SettingsKind string
const (
	SettingsKindTaginheritance SettingsKind = "taginheritance"
)

func (*SettingsKind) UnmarshalJSON

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

type SettingsListResult

type SettingsListResult struct {
	Value *[]Setting `json:"value,omitempty"`
}

func (*SettingsListResult) UnmarshalJSON

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

type TagInheritanceProperties

type TagInheritanceProperties struct {
	PreferContainerTags bool `json:"preferContainerTags"`
}

type TagInheritanceSetting

type TagInheritanceSetting struct {
	Properties *TagInheritanceProperties `json:"properties,omitempty"`

	Id   *string      `json:"id,omitempty"`
	Kind SettingsKind `json:"kind"`
	Name *string      `json:"name,omitempty"`
	Type *string      `json:"type,omitempty"`
}

func (TagInheritanceSetting) MarshalJSON

func (s TagInheritanceSetting) MarshalJSON() ([]byte, error)

func (TagInheritanceSetting) Setting added in v0.20240920.1135249

Jump to

Keyboard shortcuts

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