accounts

package
v0.20240325.1135512 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/maps/2023-06-01/accounts Documentation

The accounts SDK allows for interaction with the Azure Resource Manager Service maps (API Version 2023-06-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/maps/2023-06-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 := commonids.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 := commonids.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.ListSas

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

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


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

func PossibleValuesForIdentityType() []string

func PossibleValuesForInfrastructureEncryption

func PossibleValuesForInfrastructureEncryption() []string

func PossibleValuesForKeyType

func PossibleValuesForKeyType() []string

func PossibleValuesForKind

func PossibleValuesForKind() []string

func PossibleValuesForName

func PossibleValuesForName() []string

func PossibleValuesForSigningKey

func PossibleValuesForSigningKey() []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) FromParseResult

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

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 AccountSasParameters

type AccountSasParameters struct {
	Expiry           string     `json:"expiry"`
	MaxRatePerSecond int64      `json:"maxRatePerSecond"`
	PrincipalId      string     `json:"principalId"`
	Regions          *[]string  `json:"regions,omitempty"`
	SigningKey       SigningKey `json:"signingKey"`
	Start            string     `json:"start"`
}

type AccountsClient

type AccountsClient struct {
	Client *resourcemanager.Client
}

func NewAccountsClientWithBaseURI

func NewAccountsClientWithBaseURI(sdkApi sdkEnv.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) ListSas

ListSas ...

func (AccountsClient) RegenerateKeys

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

RegenerateKeys ...

func (AccountsClient) Update

Update ...

type CorsRule

type CorsRule struct {
	AllowedOrigins []string `json:"allowedOrigins"`
}

type CorsRules

type CorsRules struct {
	CorsRules *[]CorsRule `json:"corsRules,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type CustomerManagedKeyEncryption

type CustomerManagedKeyEncryption struct {
	KeyEncryptionKeyIdentity *CustomerManagedKeyEncryptionKeyEncryptionKeyIdentity `json:"keyEncryptionKeyIdentity,omitempty"`
	KeyEncryptionKeyUrl      *string                                               `json:"keyEncryptionKeyUrl,omitempty"`
}

type CustomerManagedKeyEncryptionKeyEncryptionKeyIdentity

type CustomerManagedKeyEncryptionKeyEncryptionKeyIdentity struct {
	DelegatedIdentityClientId      *string       `json:"delegatedIdentityClientId,omitempty"`
	IdentityType                   *IdentityType `json:"identityType,omitempty"`
	UserAssignedIdentityResourceId *string       `json:"userAssignedIdentityResourceId,omitempty"`
}

type DeleteOperationResponse

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

type Encryption

type Encryption struct {
	CustomerManagedKeyEncryption *CustomerManagedKeyEncryption `json:"customerManagedKeyEncryption,omitempty"`
	InfrastructureEncryption     *InfrastructureEncryption     `json:"infrastructureEncryption,omitempty"`
}

type GetOperationResponse

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

type IdentityType

type IdentityType string
const (
	IdentityTypeDelegatedResourceIdentity IdentityType = "delegatedResourceIdentity"
	IdentityTypeSystemAssignedIdentity    IdentityType = "systemAssignedIdentity"
	IdentityTypeUserAssignedIdentity      IdentityType = "userAssignedIdentity"
)

func (*IdentityType) UnmarshalJSON

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

type InfrastructureEncryption

type InfrastructureEncryption string
const (
	InfrastructureEncryptionDisabled InfrastructureEncryption = "disabled"
	InfrastructureEncryptionEnabled  InfrastructureEncryption = "enabled"
)

func (*InfrastructureEncryption) UnmarshalJSON

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

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 LinkedResource

type LinkedResource struct {
	Id         string `json:"id"`
	UniqueName string `json:"uniqueName"`
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []MapsAccount
}

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	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 ListSasOperationResponse

type ListSasOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MapsAccountSasToken
}

type MapsAccount

type MapsAccount struct {
	Id         *string                            `json:"id,omitempty"`
	Identity   *identity.SystemAndUserAssignedMap `json:"identity,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 {
	Cors              *CorsRules        `json:"cors,omitempty"`
	DisableLocalAuth  *bool             `json:"disableLocalAuth,omitempty"`
	Encryption        *Encryption       `json:"encryption,omitempty"`
	LinkedResources   *[]LinkedResource `json:"linkedResources,omitempty"`
	ProvisioningState *string           `json:"provisioningState,omitempty"`
	UniqueId          *string           `json:"uniqueId,omitempty"`
}

type MapsAccountSasToken

type MapsAccountSasToken struct {
	AccountSasToken *string `json:"accountSasToken,omitempty"`
}

type MapsAccountUpdateParameters

type MapsAccountUpdateParameters struct {
	Identity   *identity.SystemAndUserAssignedMap `json:"identity,omitempty"`
	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 SigningKey

type SigningKey string
const (
	SigningKeyManagedIdentity SigningKey = "managedIdentity"
	SigningKeyPrimaryKey      SigningKey = "primaryKey"
	SigningKeySecondaryKey    SigningKey = "secondaryKey"
)

func (*SigningKey) UnmarshalJSON

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

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