keyvalues

package
v0.20220824.1090858 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MPL-2.0 Imports: 11 Imported by: 0

README

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

The keyvalues SDK allows for interaction with the Azure Resource Manager Service appconfiguration (API Version 2022-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/2022-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", "configStoreValue", "keyValueValue")

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", "configStoreValue", "keyValueValue")

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", "configStoreValue", "keyValueValue")

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
}

Example Usage: KeyValuesClient.ListByConfigurationStore

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

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

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

ValidateConfigurationStoreID checks that 'input' can be parsed as a Configuration Store ID

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 ConfigurationStoreId

type ConfigurationStoreId struct {
	SubscriptionId    string
	ResourceGroupName string
	ConfigStoreName   string
}

ConfigurationStoreId is a struct representing the Resource ID for a Configuration Store

func NewConfigurationStoreID

func NewConfigurationStoreID(subscriptionId string, resourceGroupName string, configStoreName string) ConfigurationStoreId

NewConfigurationStoreID returns a new ConfigurationStoreId struct

func ParseConfigurationStoreID

func ParseConfigurationStoreID(input string) (*ConfigurationStoreId, error)

ParseConfigurationStoreID parses 'input' into a ConfigurationStoreId

func ParseConfigurationStoreIDInsensitively

func ParseConfigurationStoreIDInsensitively(input string) (*ConfigurationStoreId, error)

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

func (ConfigurationStoreId) ID

func (id ConfigurationStoreId) ID() string

ID returns the formatted Configuration Store ID

func (ConfigurationStoreId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Configuration Store ID

func (ConfigurationStoreId) String

func (id ConfigurationStoreId) String() string

String returns a human-readable description of this Configuration Store ID

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	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
	ConfigStoreName   string
	KeyValueName      string
}

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

func NewKeyValueID

func NewKeyValueID(subscriptionId string, resourceGroupName string, configStoreName 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) 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 KeyValueOperationPredicate

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

func (KeyValueOperationPredicate) Matches

func (p KeyValueOperationPredicate) Matches(input KeyValue) bool

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

func NewKeyValuesClientWithBaseURI

func NewKeyValuesClientWithBaseURI(endpoint string) KeyValuesClient

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 ...

func (KeyValuesClient) ListByConfigurationStore

ListByConfigurationStore ...

func (KeyValuesClient) ListByConfigurationStoreComplete

ListByConfigurationStoreComplete retrieves all of the results into a single object

func (KeyValuesClient) ListByConfigurationStoreCompleteMatchingPredicate

func (c KeyValuesClient) ListByConfigurationStoreCompleteMatchingPredicate(ctx context.Context, id ConfigurationStoreId, predicate KeyValueOperationPredicate) (resp ListByConfigurationStoreCompleteResult, err error)

ListByConfigurationStoreCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type ListByConfigurationStoreCompleteResult

type ListByConfigurationStoreCompleteResult struct {
	Items []KeyValue
}

type ListByConfigurationStoreOperationResponse

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

func (ListByConfigurationStoreOperationResponse) HasMore

func (ListByConfigurationStoreOperationResponse) LoadMore

Jump to

Keyboard shortcuts

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