keyvalues

package
v0.20241004.1180715 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2024-05-01/keyvalues Documentation

The keyvalues SDK allows for interaction with Azure Resource Manager appconfiguration (API Version 2024-05-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/appconfiguration/2024-05-01/keyvalues"

Client Initialization

client := keyvalues.NewKeyValuesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: KeyValuesClient.CreateOrUpdate

ctx := context.TODO()
id := keyvalues.NewKeyValueID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configStoreName", "keyValueName")

payload := keyvalues.KeyValue{
	// ...
}


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

Example Usage: KeyValuesClient.Delete

ctx := context.TODO()
id := keyvalues.NewKeyValueID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configStoreName", "keyValueName")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: KeyValuesClient.Get

ctx := context.TODO()
id := keyvalues.NewKeyValueID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configStoreName", "keyValueName")

read, err := client.Get(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 ValidateKeyValueID

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

ValidateKeyValueID checks that 'input' can be parsed as a Key Value ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *KeyValue
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *KeyValue
}

type KeyValue

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

type KeyValueId

type KeyValueId struct {
	SubscriptionId         string
	ResourceGroupName      string
	ConfigurationStoreName string
	KeyValueName           string
}

KeyValueId is a struct representing the Resource ID for a Key Value

func NewKeyValueID

func NewKeyValueID(subscriptionId string, resourceGroupName string, configurationStoreName string, keyValueName string) KeyValueId

NewKeyValueID returns a new KeyValueId struct

func ParseKeyValueID

func ParseKeyValueID(input string) (*KeyValueId, error)

ParseKeyValueID parses 'input' into a KeyValueId

func ParseKeyValueIDInsensitively

func ParseKeyValueIDInsensitively(input string) (*KeyValueId, error)

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

func (*KeyValueId) FromParseResult

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

func (KeyValueId) ID

func (id KeyValueId) ID() string

ID returns the formatted Key Value ID

func (KeyValueId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Key Value ID

func (KeyValueId) String

func (id KeyValueId) String() string

String returns a human-readable description of this Key Value ID

type KeyValueProperties

type KeyValueProperties struct {
	ContentType  *string            `json:"contentType,omitempty"`
	ETag         *string            `json:"eTag,omitempty"`
	Key          *string            `json:"key,omitempty"`
	Label        *string            `json:"label,omitempty"`
	LastModified *string            `json:"lastModified,omitempty"`
	Locked       *bool              `json:"locked,omitempty"`
	Tags         *map[string]string `json:"tags,omitempty"`
	Value        *string            `json:"value,omitempty"`
}

func (*KeyValueProperties) GetLastModifiedAsTime

func (o *KeyValueProperties) GetLastModifiedAsTime() (*time.Time, error)

func (*KeyValueProperties) SetLastModifiedAsTime

func (o *KeyValueProperties) SetLastModifiedAsTime(input time.Time)

type KeyValuesClient

type KeyValuesClient struct {
	Client *resourcemanager.Client
}

func NewKeyValuesClientWithBaseURI

func NewKeyValuesClientWithBaseURI(sdkApi sdkEnv.Api) (*KeyValuesClient, error)

func (KeyValuesClient) CreateOrUpdate

func (c KeyValuesClient) CreateOrUpdate(ctx context.Context, id KeyValueId, input KeyValue) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (KeyValuesClient) Delete

func (c KeyValuesClient) Delete(ctx context.Context, id KeyValueId) (result DeleteOperationResponse, err error)

Delete ...

func (KeyValuesClient) DeleteThenPoll

func (c KeyValuesClient) DeleteThenPoll(ctx context.Context, id KeyValueId) error

DeleteThenPoll performs Delete then polls until it's completed

func (KeyValuesClient) Get

func (c KeyValuesClient) Get(ctx context.Context, id KeyValueId) (result GetOperationResponse, err error)

Get ...

Jump to

Keyboard shortcuts

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