account

package
v0.20230510.1131358 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2021-08-01/account Documentation

The account SDK allows for interaction with the Azure Resource Manager Service datashare (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/datashare/2021-08-01/account"

Client Initialization

client := account.NewAccountClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AccountClient.Create

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

payload := account.Account{
	// ...
}


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

Example Usage: AccountClient.Delete

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

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

Example Usage: AccountClient.Get

ctx := context.TODO()
id := account.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: AccountClient.ListByResourceGroup

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

ctx := context.TODO()
id := account.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: AccountClient.Update

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

payload := account.AccountUpdateParameters{
	// ...
}


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 PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []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 Account

type Account struct {
	Id         *string                 `json:"id,omitempty"`
	Identity   identity.SystemAssigned `json:"identity"`
	Location   *string                 `json:"location,omitempty"`
	Name       *string                 `json:"name,omitempty"`
	Properties *AccountProperties      `json:"properties,omitempty"`
	SystemData *systemdata.SystemData  `json:"systemData,omitempty"`
	Tags       *map[string]string      `json:"tags,omitempty"`
	Type       *string                 `json:"type,omitempty"`
}

type AccountClient

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

func NewAccountClientWithBaseURI

func NewAccountClientWithBaseURI(endpoint string) AccountClient

func (AccountClient) Create

func (c AccountClient) Create(ctx context.Context, id AccountId, input Account) (result CreateOperationResponse, err error)

Create ...

func (AccountClient) CreateThenPoll

func (c AccountClient) CreateThenPoll(ctx context.Context, id AccountId, input Account) error

CreateThenPoll performs Create then polls until it's completed

func (AccountClient) Delete

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

Delete ...

func (AccountClient) DeleteThenPoll

func (c AccountClient) DeleteThenPoll(ctx context.Context, id AccountId) error

DeleteThenPoll performs Delete then polls until it's completed

func (AccountClient) Get

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

Get ...

func (AccountClient) ListByResourceGroup

ListByResourceGroup ...

func (AccountClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (AccountClient) ListByResourceGroupCompleteMatchingPredicate

func (c AccountClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AccountOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (AccountClient) ListBySubscription

ListBySubscription ...

func (AccountClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all of the results into a single object

func (AccountClient) ListBySubscriptionCompleteMatchingPredicate

func (c AccountClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AccountOperationPredicate) (resp ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (AccountClient) Update

Update ...

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 AccountOperationPredicate

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

func (AccountOperationPredicate) Matches

func (p AccountOperationPredicate) Matches(input Account) bool

type AccountProperties

type AccountProperties struct {
	CreatedAt         *string            `json:"createdAt,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	UserEmail         *string            `json:"userEmail,omitempty"`
	UserName          *string            `json:"userName,omitempty"`
}

func (*AccountProperties) GetCreatedAtAsTime

func (o *AccountProperties) GetCreatedAtAsTime() (*time.Time, error)

func (*AccountProperties) SetCreatedAtAsTime

func (o *AccountProperties) SetCreatedAtAsTime(input time.Time)

type AccountUpdateParameters

type AccountUpdateParameters struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type CreateOperationResponse

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

type DataShareErrorInfo

type DataShareErrorInfo struct {
	Code    string                `json:"code"`
	Details *[]DataShareErrorInfo `json:"details,omitempty"`
	Message string                `json:"message"`
	Target  *string               `json:"target,omitempty"`
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []Account
}

type ListByResourceGroupOperationResponse

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

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []Account
}

type ListBySubscriptionOperationResponse

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

func (ListBySubscriptionOperationResponse) HasMore

func (ListBySubscriptionOperationResponse) LoadMore

type OperationResponse

type OperationResponse struct {
	EndTime   *string             `json:"endTime,omitempty"`
	Error     *DataShareErrorInfo `json:"error,omitempty"`
	StartTime *string             `json:"startTime,omitempty"`
	Status    Status              `json:"status"`
}

func (*OperationResponse) GetEndTimeAsTime

func (o *OperationResponse) GetEndTimeAsTime() (*time.Time, error)

func (*OperationResponse) GetStartTimeAsTime

func (o *OperationResponse) GetStartTimeAsTime() (*time.Time, error)

func (*OperationResponse) SetEndTimeAsTime

func (o *OperationResponse) SetEndTimeAsTime(input time.Time)

func (*OperationResponse) SetStartTimeAsTime

func (o *OperationResponse) SetStartTimeAsTime(input time.Time)

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateMoving    ProvisioningState = "Moving"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

type Status

type Status string
const (
	StatusAccepted         Status = "Accepted"
	StatusCanceled         Status = "Canceled"
	StatusFailed           Status = "Failed"
	StatusInProgress       Status = "InProgress"
	StatusSucceeded        Status = "Succeeded"
	StatusTransientFailure Status = "TransientFailure"
)

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Account
}

Jump to

Keyboard shortcuts

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