account

package
v0.20240522.1080424 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MPL-2.0 Imports: 17 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account Documentation

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

Client Initialization

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

Example Usage: AccountClient.AddRootCollectionAdmin

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

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


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

Example Usage: AccountClient.CreateOrUpdate

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

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


if err := client.CreateOrUpdateThenPoll(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.ListKeys

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

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

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForName

func PossibleValuesForName() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForPublicNetworkAccess

func PossibleValuesForPublicNetworkAccess() []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 AccessKeys

type AccessKeys struct {
	AtlasKafkaPrimaryEndpoint   *string `json:"atlasKafkaPrimaryEndpoint,omitempty"`
	AtlasKafkaSecondaryEndpoint *string `json:"atlasKafkaSecondaryEndpoint,omitempty"`
}

type Account

type Account struct {
	Id         *string                           `json:"id,omitempty"`
	Identity   *identity.SystemOrUserAssignedMap `json:"identity,omitempty"`
	Location   *string                           `json:"location,omitempty"`
	Name       *string                           `json:"name,omitempty"`
	Properties *AccountProperties                `json:"properties,omitempty"`
	Sku        *AccountSku                       `json:"sku,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) AddRootCollectionAdmin

func (c AccountClient) AddRootCollectionAdmin(ctx context.Context, id AccountId, input CollectionAdminUpdate) (result AddRootCollectionAdminOperationResponse, err error)

AddRootCollectionAdmin ...

func (AccountClient) CreateOrUpdate

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

CreateOrUpdate ...

func (AccountClient) CreateOrUpdateThenPoll

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

CreateOrUpdateThenPoll performs CreateOrUpdate 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) ListKeys

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

ListKeys ...

func (AccountClient) Update

Update ...

func (AccountClient) UpdateThenPoll

func (c AccountClient) UpdateThenPoll(ctx context.Context, id AccountId, input AccountUpdateParameters) error

UpdateThenPoll performs Update then polls until it's completed

type AccountEndpoints

type AccountEndpoints struct {
	Catalog  *string `json:"catalog,omitempty"`
	Guardian *string `json:"guardian,omitempty"`
	Scan     *string `json:"scan,omitempty"`
}

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 {
	CloudConnectors            *CloudConnectors             `json:"cloudConnectors,omitempty"`
	CreatedAt                  *string                      `json:"createdAt,omitempty"`
	CreatedBy                  *string                      `json:"createdBy,omitempty"`
	CreatedByObjectId          *string                      `json:"createdByObjectId,omitempty"`
	Endpoints                  *AccountEndpoints            `json:"endpoints,omitempty"`
	FriendlyName               *string                      `json:"friendlyName,omitempty"`
	ManagedResourceGroupName   *string                      `json:"managedResourceGroupName,omitempty"`
	ManagedResources           *ManagedResources            `json:"managedResources,omitempty"`
	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
	ProvisioningState          *ProvisioningState           `json:"provisioningState,omitempty"`
	PublicNetworkAccess        *PublicNetworkAccess         `json:"publicNetworkAccess,omitempty"`
}

func (*AccountProperties) GetCreatedAtAsTime

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

func (*AccountProperties) SetCreatedAtAsTime

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

type AccountSku

type AccountSku struct {
	Capacity *int64 `json:"capacity,omitempty"`
	Name     *Name  `json:"name,omitempty"`
}

type AccountUpdateParameters

type AccountUpdateParameters struct {
	Identity   *identity.SystemOrUserAssignedMap `json:"identity,omitempty"`
	Properties *AccountProperties                `json:"properties,omitempty"`
	Tags       *map[string]string                `json:"tags,omitempty"`
}

type AddRootCollectionAdminOperationResponse

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

type CloudConnectors

type CloudConnectors struct {
	AwsExternalId *string `json:"awsExternalId,omitempty"`
}

type CollectionAdminUpdate

type CollectionAdminUpdate struct {
	ObjectId *string `json:"objectId,omitempty"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Account
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

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

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

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

type ListBySubscriptionOperationResponse

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

type ListKeysOperationResponse

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

type ManagedResources

type ManagedResources struct {
	EventHubNamespace *string `json:"eventHubNamespace,omitempty"`
	ResourceGroup     *string `json:"resourceGroup,omitempty"`
	StorageAccount    *string `json:"storageAccount,omitempty"`
}

type Name

type Name string
const (
	NameStandard Name = "Standard"
)

func (*Name) UnmarshalJSON

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

type PrivateEndpoint

type PrivateEndpoint struct {
	Id *string `json:"id,omitempty"`
}

type PrivateEndpointConnection

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

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	PrivateEndpoint                   *PrivateEndpoint                   `json:"privateEndpoint,omitempty"`
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
	ProvisioningState                 *string                            `json:"provisioningState,omitempty"`
}

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	ActionsRequired *string `json:"actionsRequired,omitempty"`
	Description     *string `json:"description,omitempty"`
	Status          *Status `json:"status,omitempty"`
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreating     ProvisioningState = "Creating"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateMoving       ProvisioningState = "Moving"
	ProvisioningStateSoftDeleted  ProvisioningState = "SoftDeleted"
	ProvisioningStateSoftDeleting ProvisioningState = "SoftDeleting"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUnknown      ProvisioningState = "Unknown"
)

func (*ProvisioningState) UnmarshalJSON

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

type PublicNetworkAccess

type PublicNetworkAccess string
const (
	PublicNetworkAccessDisabled     PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled      PublicNetworkAccess = "Enabled"
	PublicNetworkAccessNotSpecified PublicNetworkAccess = "NotSpecified"
)

func (*PublicNetworkAccess) UnmarshalJSON

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

type Status

type Status string
const (
	StatusApproved     Status = "Approved"
	StatusDisconnected Status = "Disconnected"
	StatusPending      Status = "Pending"
	StatusRejected     Status = "Rejected"
	StatusUnknown      Status = "Unknown"
)

func (*Status) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	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