users

package
v0.20240320.1144505 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/users Documentation

The users SDK allows for interaction with the Azure Resource Manager Service databoxedge (API Version 2022-03-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/databoxedge/2022-03-01/users"

Client Initialization

client := users.NewUsersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: UsersClient.CreateOrUpdate

ctx := context.TODO()
id := users.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "userValue")

payload := users.User{
	// ...
}


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

Example Usage: UsersClient.Delete

ctx := context.TODO()
id := users.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "userValue")

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

Example Usage: UsersClient.Get

ctx := context.TODO()
id := users.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "userValue")

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: UsersClient.ListByDataBoxEdgeDevice

ctx := context.TODO()
id := users.NewDataBoxEdgeDeviceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue")

// alternatively `client.ListByDataBoxEdgeDevice(ctx, id, users.DefaultListByDataBoxEdgeDeviceOperationOptions())` can be used to do batched pagination
items, err := client.ListByDataBoxEdgeDeviceComplete(ctx, id, users.DefaultListByDataBoxEdgeDeviceOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForEncryptionAlgorithm

func PossibleValuesForEncryptionAlgorithm() []string

func PossibleValuesForShareAccessType

func PossibleValuesForShareAccessType() []string

func PossibleValuesForUserType

func PossibleValuesForUserType() []string

func ValidateDataBoxEdgeDeviceID

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

ValidateDataBoxEdgeDeviceID checks that 'input' can be parsed as a Data Box Edge Device ID

func ValidateUserID

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

ValidateUserID checks that 'input' can be parsed as a User ID

Types

type AsymmetricEncryptedSecret

type AsymmetricEncryptedSecret struct {
	EncryptionAlgorithm      EncryptionAlgorithm `json:"encryptionAlgorithm"`
	EncryptionCertThumbprint *string             `json:"encryptionCertThumbprint,omitempty"`
	Value                    string              `json:"value"`
}

type CreateOrUpdateOperationResponse

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

type DataBoxEdgeDeviceId

type DataBoxEdgeDeviceId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
}

DataBoxEdgeDeviceId is a struct representing the Resource ID for a Data Box Edge Device

func NewDataBoxEdgeDeviceID

func NewDataBoxEdgeDeviceID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName string) DataBoxEdgeDeviceId

NewDataBoxEdgeDeviceID returns a new DataBoxEdgeDeviceId struct

func ParseDataBoxEdgeDeviceID

func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error)

ParseDataBoxEdgeDeviceID parses 'input' into a DataBoxEdgeDeviceId

func ParseDataBoxEdgeDeviceIDInsensitively

func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, error)

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

func (*DataBoxEdgeDeviceId) FromParseResult

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

func (DataBoxEdgeDeviceId) ID

func (id DataBoxEdgeDeviceId) ID() string

ID returns the formatted Data Box Edge Device ID

func (DataBoxEdgeDeviceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Data Box Edge Device ID

func (DataBoxEdgeDeviceId) String

func (id DataBoxEdgeDeviceId) String() string

String returns a human-readable description of this Data Box Edge Device ID

type DeleteOperationResponse

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

type EncryptionAlgorithm

type EncryptionAlgorithm string
const (
	EncryptionAlgorithmAESTwoFiveSix        EncryptionAlgorithm = "AES256"
	EncryptionAlgorithmNone                 EncryptionAlgorithm = "None"
	EncryptionAlgorithmRSAESPKCSOneVOneFive EncryptionAlgorithm = "RSAES_PKCS1_v_1_5"
)

func (*EncryptionAlgorithm) UnmarshalJSON

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

type GetOperationResponse

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

type ListByDataBoxEdgeDeviceCompleteResult

type ListByDataBoxEdgeDeviceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []User
}

type ListByDataBoxEdgeDeviceOperationOptions

type ListByDataBoxEdgeDeviceOperationOptions struct {
	Filter *string
}

func DefaultListByDataBoxEdgeDeviceOperationOptions

func DefaultListByDataBoxEdgeDeviceOperationOptions() ListByDataBoxEdgeDeviceOperationOptions

func (ListByDataBoxEdgeDeviceOperationOptions) ToHeaders

func (ListByDataBoxEdgeDeviceOperationOptions) ToOData

func (ListByDataBoxEdgeDeviceOperationOptions) ToQuery

type ListByDataBoxEdgeDeviceOperationResponse

type ListByDataBoxEdgeDeviceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]User
}

type ShareAccessRight

type ShareAccessRight struct {
	AccessType ShareAccessType `json:"accessType"`
	ShareId    string          `json:"shareId"`
}

type ShareAccessType

type ShareAccessType string
const (
	ShareAccessTypeChange ShareAccessType = "Change"
	ShareAccessTypeCustom ShareAccessType = "Custom"
	ShareAccessTypeRead   ShareAccessType = "Read"
)

func (*ShareAccessType) UnmarshalJSON

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

type User

type User struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties UserProperties         `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type UserId

type UserId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
	UserName              string
}

UserId is a struct representing the Resource ID for a User

func NewUserID

func NewUserID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName string, userName string) UserId

NewUserID returns a new UserId struct

func ParseUserID

func ParseUserID(input string) (*UserId, error)

ParseUserID parses 'input' into a UserId

func ParseUserIDInsensitively

func ParseUserIDInsensitively(input string) (*UserId, error)

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

func (*UserId) FromParseResult

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

func (UserId) ID

func (id UserId) ID() string

ID returns the formatted User ID

func (UserId) Segments

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

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

func (UserId) String

func (id UserId) String() string

String returns a human-readable description of this User ID

type UserOperationPredicate

type UserOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (UserOperationPredicate) Matches

func (p UserOperationPredicate) Matches(input User) bool

type UserProperties

type UserProperties struct {
	EncryptedPassword *AsymmetricEncryptedSecret `json:"encryptedPassword,omitempty"`
	ShareAccessRights *[]ShareAccessRight        `json:"shareAccessRights,omitempty"`
	UserType          UserType                   `json:"userType"`
}

type UserType

type UserType string
const (
	UserTypeARM             UserType = "ARM"
	UserTypeLocalManagement UserType = "LocalManagement"
	UserTypeShare           UserType = "Share"
)

func (*UserType) UnmarshalJSON

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

type UsersClient

type UsersClient struct {
	Client *resourcemanager.Client
}

func NewUsersClientWithBaseURI

func NewUsersClientWithBaseURI(sdkApi sdkEnv.Api) (*UsersClient, error)

func (UsersClient) CreateOrUpdate

func (c UsersClient) CreateOrUpdate(ctx context.Context, id UserId, input User) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (UsersClient) CreateOrUpdateThenPoll

func (c UsersClient) CreateOrUpdateThenPoll(ctx context.Context, id UserId, input User) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (UsersClient) Delete

func (c UsersClient) Delete(ctx context.Context, id UserId) (result DeleteOperationResponse, err error)

Delete ...

func (UsersClient) DeleteThenPoll

func (c UsersClient) DeleteThenPoll(ctx context.Context, id UserId) error

DeleteThenPoll performs Delete then polls until it's completed

func (UsersClient) Get

func (c UsersClient) Get(ctx context.Context, id UserId) (result GetOperationResponse, err error)

Get ...

func (UsersClient) ListByDataBoxEdgeDevice

ListByDataBoxEdgeDevice ...

func (UsersClient) ListByDataBoxEdgeDeviceComplete

ListByDataBoxEdgeDeviceComplete retrieves all the results into a single object

func (UsersClient) ListByDataBoxEdgeDeviceCompleteMatchingPredicate

func (c UsersClient) ListByDataBoxEdgeDeviceCompleteMatchingPredicate(ctx context.Context, id DataBoxEdgeDeviceId, options ListByDataBoxEdgeDeviceOperationOptions, predicate UserOperationPredicate) (result ListByDataBoxEdgeDeviceCompleteResult, err error)

ListByDataBoxEdgeDeviceCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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