usertoken

package
v0.20240527.1094340 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/usertoken Documentation

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

Client Initialization

client := usertoken.NewUserTokenClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: UserTokenClient.UserGetSharedAccessToken

ctx := context.TODO()
id := usertoken.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "userIdValue")

payload := usertoken.UserTokenParameters{
	// ...
}


read, err := client.UserGetSharedAccessToken(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 PossibleValuesForKeyType

func PossibleValuesForKeyType() []string

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 KeyType

type KeyType string
const (
	KeyTypePrimary   KeyType = "primary"
	KeyTypeSecondary KeyType = "secondary"
)

func (*KeyType) UnmarshalJSON

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

type UserGetSharedAccessTokenOperationResponse

type UserGetSharedAccessTokenOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *UserTokenResult
}

type UserId

type UserId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	UserId            string
}

UserId is a struct representing the Resource ID for a User

func NewUserID

func NewUserID(subscriptionId string, resourceGroupName string, serviceName string, userId 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 UserTokenClient

type UserTokenClient struct {
	Client *resourcemanager.Client
}

func NewUserTokenClientWithBaseURI

func NewUserTokenClientWithBaseURI(sdkApi sdkEnv.Api) (*UserTokenClient, error)

func (UserTokenClient) UserGetSharedAccessToken

func (c UserTokenClient) UserGetSharedAccessToken(ctx context.Context, id UserId, input UserTokenParameters) (result UserGetSharedAccessTokenOperationResponse, err error)

UserGetSharedAccessToken ...

type UserTokenParameterProperties

type UserTokenParameterProperties struct {
	Expiry  string  `json:"expiry"`
	KeyType KeyType `json:"keyType"`
}

func (*UserTokenParameterProperties) GetExpiryAsTime

func (o *UserTokenParameterProperties) GetExpiryAsTime() (*time.Time, error)

func (*UserTokenParameterProperties) SetExpiryAsTime

func (o *UserTokenParameterProperties) SetExpiryAsTime(input time.Time)

type UserTokenParameters

type UserTokenParameters struct {
	Properties *UserTokenParameterProperties `json:"properties,omitempty"`
}

type UserTokenResult

type UserTokenResult struct {
	Value *string `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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