accounts

package
v0.0.0-...-a81a29a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts Documentation

The accounts SDK allows for interaction with the Azure Resource Manager Service maps (API Version 2021-02-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/maps/2021-02-01/accounts"

Client Initialization

client := accounts.NewAccountsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AccountsClient.CreateOrUpdate

ctx := context.TODO()
id := accounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue")

payload := accounts.MapsAccount{
	// ...
}


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: AccountsClient.Delete

ctx := context.TODO()
id := accounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue")

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

Example Usage: AccountsClient.Get

ctx := context.TODO()
id := accounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue")

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: AccountsClient.ListByResourceGroup

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

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

Example Usage: AccountsClient.ListKeys

ctx := context.TODO()
id := accounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue")

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

Example Usage: AccountsClient.RegenerateKeys

ctx := context.TODO()
id := accounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue")

payload := accounts.MapsKeySpecification{
	// ...
}


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

Example Usage: AccountsClient.Update

ctx := context.TODO()
id := accounts.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue")

payload := accounts.MapsAccountUpdateParameters{
	// ...
}


read, err := client.Update(ctx, id, payload)
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 PossibleValuesForKeyType

func PossibleValuesForKeyType() []string

func PossibleValuesForKind

func PossibleValuesForKind() []string

func PossibleValuesForName

func PossibleValuesForName() []string

func ValidateAccountID

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

ValidateAccountID checks that 'input' can be parsed as a Account ID

Types

type AccountId

type AccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
}

AccountId is a struct representing the Resource ID for a Account

func NewAccountID

func NewAccountID(subscriptionId string, resourceGroupName string, accountName string) AccountId

NewAccountID returns a new AccountId struct

func ParseAccountID

func ParseAccountID(input string) (*AccountId, error)

ParseAccountID parses 'input' into a AccountId

func ParseAccountIDInsensitively

func ParseAccountIDInsensitively(input string) (*AccountId, error)

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

func (AccountId) ID

func (id AccountId) ID() string

ID returns the formatted Account ID

func (AccountId) Segments

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

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

func (AccountId) String

func (id AccountId) String() string

String returns a human-readable description of this Account ID

type AccountsClient

type AccountsClient struct {
	Client *resourcemanager.Client
}

func NewAccountsClientWithBaseURI

func NewAccountsClientWithBaseURI(api environments.Api) (*AccountsClient, error)

func (AccountsClient) CreateOrUpdate

func (c AccountsClient) CreateOrUpdate(ctx context.Context, id AccountId, input MapsAccount) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (AccountsClient) Delete

func (c AccountsClient) Delete(ctx context.Context, id AccountId) (result DeleteOperationResponse, err error)

Delete ...

func (AccountsClient) Get

func (c AccountsClient) Get(ctx context.Context, id AccountId) (result GetOperationResponse, err error)

Get ...

func (AccountsClient) ListByResourceGroup

ListByResourceGroup ...

func (AccountsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (AccountsClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AccountsClient) ListBySubscription

ListBySubscription ...

func (AccountsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (AccountsClient) ListBySubscriptionCompleteMatchingPredicate

func (c AccountsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate MapsAccountOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AccountsClient) ListKeys

func (c AccountsClient) ListKeys(ctx context.Context, id AccountId) (result ListKeysOperationResponse, err error)

ListKeys ...

func (AccountsClient) RegenerateKeys

func (c AccountsClient) RegenerateKeys(ctx context.Context, id AccountId, input MapsKeySpecification) (result RegenerateKeysOperationResponse, err error)

RegenerateKeys ...

func (AccountsClient) Update

Update ...

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type KeyType

type KeyType string
const (
	KeyTypePrimary   KeyType = "primary"
	KeyTypeSecondary KeyType = "secondary"
)

func (*KeyType) UnmarshalJSON

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

type Kind

type Kind string
const (
	KindGenOne Kind = "Gen1"
	KindGenTwo Kind = "Gen2"
)

func (*Kind) UnmarshalJSON

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []MapsAccount
}

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []MapsAccount
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]MapsAccount
}

type ListKeysOperationResponse

type ListKeysOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MapsAccountKeys
}

type MapsAccount

type MapsAccount struct {
	Id         *string                `json:"id,omitempty"`
	Kind       *Kind                  `json:"kind,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *MapsAccountProperties `json:"properties,omitempty"`
	Sku        Sku                    `json:"sku"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type MapsAccountKeys

type MapsAccountKeys struct {
	PrimaryKey              *string `json:"primaryKey,omitempty"`
	PrimaryKeyLastUpdated   *string `json:"primaryKeyLastUpdated,omitempty"`
	SecondaryKey            *string `json:"secondaryKey,omitempty"`
	SecondaryKeyLastUpdated *string `json:"secondaryKeyLastUpdated,omitempty"`
}

type MapsAccountOperationPredicate

type MapsAccountOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (MapsAccountOperationPredicate) Matches

type MapsAccountProperties

type MapsAccountProperties struct {
	DisableLocalAuth  *bool   `json:"disableLocalAuth,omitempty"`
	ProvisioningState *string `json:"provisioningState,omitempty"`
	UniqueId          *string `json:"uniqueId,omitempty"`
}

type MapsAccountUpdateParameters

type MapsAccountUpdateParameters struct {
	Kind       *Kind                  `json:"kind,omitempty"`
	Properties *MapsAccountProperties `json:"properties,omitempty"`
	Sku        *Sku                   `json:"sku,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
}

type MapsKeySpecification

type MapsKeySpecification struct {
	KeyType KeyType `json:"keyType"`
}

type Name

type Name string
const (
	NameGTwo  Name = "G2"
	NameSOne  Name = "S1"
	NameSZero Name = "S0"
)

func (*Name) UnmarshalJSON

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

type RegenerateKeysOperationResponse

type RegenerateKeysOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MapsAccountKeys
}

type Sku

type Sku struct {
	Name Name    `json:"name"`
	Tier *string `json:"tier,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MapsAccount
}

Jump to

Keyboard shortcuts

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