account

package
v0.20240731.1212841 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MPL-2.0 Imports: 17 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-helpers/resourcemanager/commonids"
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 := 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: AccountClient.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: 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 *resourcemanager.Client
}

func NewAccountClientWithBaseURI

func NewAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountClient, error)

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 the results into a single object

func (AccountClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AccountClient) ListBySubscription

ListBySubscription ...

func (AccountClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (AccountClient) ListBySubscriptionCompleteMatchingPredicate

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

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies 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) 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 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       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Account
}

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       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OperationResponse
}

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

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

type ListByResourceGroupCustomPager added in v0.20240628.1153531

type ListByResourceGroupCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Account
}

type ListBySubscriptionCustomPager added in v0.20240628.1153531

type ListBySubscriptionCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link

type ListBySubscriptionOperationResponse

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

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"
)

func (*ProvisioningState) UnmarshalJSON

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

type Status

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

func (*Status) UnmarshalJSON

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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