localusers

package
v0.20240903.1111904 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/localusers Documentation

The localusers SDK allows for interaction with the Azure Resource Manager Service storage (API Version 2023-05-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/storage/2023-05-01/localusers"

Client Initialization

client := localusers.NewLocalUsersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: LocalUsersClient.CreateOrUpdate

ctx := context.TODO()
id := localusers.NewLocalUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue", "localUserValue")

payload := localusers.LocalUser{
	// ...
}


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: LocalUsersClient.Delete

ctx := context.TODO()
id := localusers.NewLocalUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue", "localUserValue")

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: LocalUsersClient.Get

ctx := context.TODO()
id := localusers.NewLocalUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue", "localUserValue")

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: LocalUsersClient.List

ctx := context.TODO()
id := commonids.NewStorageAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue")

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

Example Usage: LocalUsersClient.ListKeys

ctx := context.TODO()
id := localusers.NewLocalUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue", "localUserValue")

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: LocalUsersClient.RegeneratePassword

ctx := context.TODO()
id := localusers.NewLocalUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue", "localUserValue")

read, err := client.RegeneratePassword(ctx, id)
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 PossibleValuesForListLocalUserIncludeParam

func PossibleValuesForListLocalUserIncludeParam() []string

func ValidateLocalUserID

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

ValidateLocalUserID checks that 'input' can be parsed as a Local User ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []LocalUser
}

type ListCustomPager added in v0.20240628.1153531

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

type ListKeysOperationResponse

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

type ListLocalUserIncludeParam

type ListLocalUserIncludeParam string
const (
	ListLocalUserIncludeParamNfsvThree ListLocalUserIncludeParam = "nfsv3"
)

func (*ListLocalUserIncludeParam) UnmarshalJSON

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

type ListOperationOptions

type ListOperationOptions struct {
	Filter      *string
	Include     *ListLocalUserIncludeParam
	Maxpagesize *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LocalUser
}

type LocalUser

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

type LocalUserId

type LocalUserId struct {
	SubscriptionId     string
	ResourceGroupName  string
	StorageAccountName string
	LocalUserName      string
}

LocalUserId is a struct representing the Resource ID for a Local User

func NewLocalUserID

func NewLocalUserID(subscriptionId string, resourceGroupName string, storageAccountName string, localUserName string) LocalUserId

NewLocalUserID returns a new LocalUserId struct

func ParseLocalUserID

func ParseLocalUserID(input string) (*LocalUserId, error)

ParseLocalUserID parses 'input' into a LocalUserId

func ParseLocalUserIDInsensitively

func ParseLocalUserIDInsensitively(input string) (*LocalUserId, error)

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

func (*LocalUserId) FromParseResult

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

func (LocalUserId) ID

func (id LocalUserId) ID() string

ID returns the formatted Local User ID

func (LocalUserId) Segments

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

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

func (LocalUserId) String

func (id LocalUserId) String() string

String returns a human-readable description of this Local User ID

type LocalUserKeys

type LocalUserKeys struct {
	SharedKey         *string         `json:"sharedKey,omitempty"`
	SshAuthorizedKeys *[]SshPublicKey `json:"sshAuthorizedKeys,omitempty"`
}

type LocalUserOperationPredicate

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

func (LocalUserOperationPredicate) Matches

func (p LocalUserOperationPredicate) Matches(input LocalUser) bool

type LocalUserProperties

type LocalUserProperties struct {
	AllowAclAuthorization *bool              `json:"allowAclAuthorization,omitempty"`
	ExtendedGroups        *[]int64           `json:"extendedGroups,omitempty"`
	GroupId               *int64             `json:"groupId,omitempty"`
	HasSharedKey          *bool              `json:"hasSharedKey,omitempty"`
	HasSshKey             *bool              `json:"hasSshKey,omitempty"`
	HasSshPassword        *bool              `json:"hasSshPassword,omitempty"`
	HomeDirectory         *string            `json:"homeDirectory,omitempty"`
	IsNFSv3Enabled        *bool              `json:"isNFSv3Enabled,omitempty"`
	PermissionScopes      *[]PermissionScope `json:"permissionScopes,omitempty"`
	Sid                   *string            `json:"sid,omitempty"`
	SshAuthorizedKeys     *[]SshPublicKey    `json:"sshAuthorizedKeys,omitempty"`
	UserId                *int64             `json:"userId,omitempty"`
}

type LocalUserRegeneratePasswordResult

type LocalUserRegeneratePasswordResult struct {
	SshPassword *string `json:"sshPassword,omitempty"`
}

type LocalUsersClient

type LocalUsersClient struct {
	Client *resourcemanager.Client
}

func NewLocalUsersClientWithBaseURI

func NewLocalUsersClientWithBaseURI(sdkApi sdkEnv.Api) (*LocalUsersClient, error)

func (LocalUsersClient) CreateOrUpdate

func (c LocalUsersClient) CreateOrUpdate(ctx context.Context, id LocalUserId, input LocalUser) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (LocalUsersClient) Delete

func (c LocalUsersClient) Delete(ctx context.Context, id LocalUserId) (result DeleteOperationResponse, err error)

Delete ...

func (LocalUsersClient) Get

Get ...

func (LocalUsersClient) List

List ...

func (LocalUsersClient) ListComplete

ListComplete retrieves all the results into a single object

func (LocalUsersClient) ListCompleteMatchingPredicate

func (c LocalUsersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.StorageAccountId, options ListOperationOptions, predicate LocalUserOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (LocalUsersClient) ListKeys

func (c LocalUsersClient) ListKeys(ctx context.Context, id LocalUserId) (result ListKeysOperationResponse, err error)

ListKeys ...

func (LocalUsersClient) RegeneratePassword

func (c LocalUsersClient) RegeneratePassword(ctx context.Context, id LocalUserId) (result RegeneratePasswordOperationResponse, err error)

RegeneratePassword ...

type PermissionScope

type PermissionScope struct {
	Permissions  string `json:"permissions"`
	ResourceName string `json:"resourceName"`
	Service      string `json:"service"`
}

type RegeneratePasswordOperationResponse

type RegeneratePasswordOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *LocalUserRegeneratePasswordResult
}

type SshPublicKey

type SshPublicKey struct {
	Description *string `json:"description,omitempty"`
	Key         *string `json:"key,omitempty"`
}

Jump to

Keyboard shortcuts

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