namedvalue

package
v0.20230727.1080023 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2021-08-01/namedvalue Documentation

The namedvalue SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2021-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-sdk/resource-manager/apimanagement/2021-08-01/namedvalue"

Client Initialization

client := namedvalue.NewNamedValueClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: NamedValueClient.CreateOrUpdate

ctx := context.TODO()
id := namedvalue.NewNamedValueID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "namedValueIdValue")

payload := namedvalue.NamedValueCreateContract{
	// ...
}


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

Example Usage: NamedValueClient.Delete

ctx := context.TODO()
id := namedvalue.NewNamedValueID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "namedValueIdValue")

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

Example Usage: NamedValueClient.Get

ctx := context.TODO()
id := namedvalue.NewNamedValueID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "namedValueIdValue")

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: NamedValueClient.GetEntityTag

ctx := context.TODO()
id := namedvalue.NewNamedValueID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "namedValueIdValue")

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

Example Usage: NamedValueClient.ListByService

ctx := context.TODO()
id := namedvalue.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue")

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

Example Usage: NamedValueClient.ListValue

ctx := context.TODO()
id := namedvalue.NewNamedValueID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "namedValueIdValue")

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

Example Usage: NamedValueClient.RefreshSecret

ctx := context.TODO()
id := namedvalue.NewNamedValueID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "namedValueIdValue")

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

Example Usage: NamedValueClient.Update

ctx := context.TODO()
id := namedvalue.NewNamedValueID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "namedValueIdValue")

payload := namedvalue.NamedValueUpdateParameters{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateNamedValueID

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

ValidateNamedValueID checks that 'input' can be parsed as a Named Value ID

func ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetEntityTagOperationResponse

type GetEntityTagOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *NamedValueContract
}

type KeyVaultContractCreateProperties

type KeyVaultContractCreateProperties struct {
	IdentityClientId *string `json:"identityClientId,omitempty"`
	SecretIdentifier *string `json:"secretIdentifier,omitempty"`
}

type KeyVaultContractProperties

type KeyVaultContractProperties struct {
	IdentityClientId *string                                     `json:"identityClientId,omitempty"`
	LastStatus       *KeyVaultLastAccessStatusContractProperties `json:"lastStatus,omitempty"`
	SecretIdentifier *string                                     `json:"secretIdentifier,omitempty"`
}

type KeyVaultLastAccessStatusContractProperties

type KeyVaultLastAccessStatusContractProperties struct {
	Code         *string `json:"code,omitempty"`
	Message      *string `json:"message,omitempty"`
	TimeStampUtc *string `json:"timeStampUtc,omitempty"`
}

func (*KeyVaultLastAccessStatusContractProperties) GetTimeStampUtcAsTime

func (o *KeyVaultLastAccessStatusContractProperties) GetTimeStampUtcAsTime() (*time.Time, error)

func (*KeyVaultLastAccessStatusContractProperties) SetTimeStampUtcAsTime

func (o *KeyVaultLastAccessStatusContractProperties) SetTimeStampUtcAsTime(input time.Time)

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	Items []NamedValueContract
}

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	Filter                  *string
	IsKeyVaultRefreshFailed *bool
	Skip                    *int64
	Top                     *int64
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

type ListByServiceOperationResponse

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

func (ListByServiceOperationResponse) HasMore

func (ListByServiceOperationResponse) LoadMore

type ListValueOperationResponse

type ListValueOperationResponse struct {
	HttpResponse *http.Response
	Model        *NamedValueSecretContract
}

type NamedValueClient

type NamedValueClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewNamedValueClientWithBaseURI

func NewNamedValueClientWithBaseURI(endpoint string) NamedValueClient

func (NamedValueClient) CreateOrUpdate

CreateOrUpdate ...

func (NamedValueClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (NamedValueClient) Delete

Delete ...

func (NamedValueClient) Get

Get ...

func (NamedValueClient) GetEntityTag

func (c NamedValueClient) GetEntityTag(ctx context.Context, id NamedValueId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (NamedValueClient) ListByService

ListByService ...

func (NamedValueClient) ListByServiceComplete

ListByServiceComplete retrieves all of the results into a single object

func (NamedValueClient) ListByServiceCompleteMatchingPredicate

func (c NamedValueClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate NamedValueContractOperationPredicate) (resp ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (NamedValueClient) ListValue

func (c NamedValueClient) ListValue(ctx context.Context, id NamedValueId) (result ListValueOperationResponse, err error)

ListValue ...

func (NamedValueClient) RefreshSecret

func (c NamedValueClient) RefreshSecret(ctx context.Context, id NamedValueId) (result RefreshSecretOperationResponse, err error)

RefreshSecret ...

func (NamedValueClient) RefreshSecretThenPoll

func (c NamedValueClient) RefreshSecretThenPoll(ctx context.Context, id NamedValueId) error

RefreshSecretThenPoll performs RefreshSecret then polls until it's completed

func (NamedValueClient) Update

Update ...

func (NamedValueClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type NamedValueContract

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

type NamedValueContractOperationPredicate

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

func (NamedValueContractOperationPredicate) Matches

type NamedValueContractProperties

type NamedValueContractProperties struct {
	DisplayName string                      `json:"displayName"`
	KeyVault    *KeyVaultContractProperties `json:"keyVault,omitempty"`
	Secret      *bool                       `json:"secret,omitempty"`
	Tags        *[]string                   `json:"tags,omitempty"`
	Value       *string                     `json:"value,omitempty"`
}

type NamedValueCreateContract

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

type NamedValueCreateContractProperties

type NamedValueCreateContractProperties struct {
	DisplayName string                            `json:"displayName"`
	KeyVault    *KeyVaultContractCreateProperties `json:"keyVault,omitempty"`
	Secret      *bool                             `json:"secret,omitempty"`
	Tags        *[]string                         `json:"tags,omitempty"`
	Value       *string                           `json:"value,omitempty"`
}

type NamedValueId

type NamedValueId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	NamedValueId      string
}

NamedValueId is a struct representing the Resource ID for a Named Value

func NewNamedValueID

func NewNamedValueID(subscriptionId string, resourceGroupName string, serviceName string, namedValueId string) NamedValueId

NewNamedValueID returns a new NamedValueId struct

func ParseNamedValueID

func ParseNamedValueID(input string) (*NamedValueId, error)

ParseNamedValueID parses 'input' into a NamedValueId

func ParseNamedValueIDInsensitively

func ParseNamedValueIDInsensitively(input string) (*NamedValueId, error)

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

func (NamedValueId) ID

func (id NamedValueId) ID() string

ID returns the formatted Named Value ID

func (NamedValueId) Segments

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

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

func (NamedValueId) String

func (id NamedValueId) String() string

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

type NamedValueSecretContract

type NamedValueSecretContract struct {
	Value *string `json:"value,omitempty"`
}

type NamedValueUpdateParameterProperties

type NamedValueUpdateParameterProperties struct {
	DisplayName *string                           `json:"displayName,omitempty"`
	KeyVault    *KeyVaultContractCreateProperties `json:"keyVault,omitempty"`
	Secret      *bool                             `json:"secret,omitempty"`
	Tags        *[]string                         `json:"tags,omitempty"`
	Value       *string                           `json:"value,omitempty"`
}

type NamedValueUpdateParameters

type NamedValueUpdateParameters struct {
	Properties *NamedValueUpdateParameterProperties `json:"properties,omitempty"`
}

type RefreshSecretOperationResponse

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

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Service ID

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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