accesstoken

package
v0.20241004.1180715 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/videoindexer/2024-01-01/accesstoken Documentation

The accesstoken SDK allows for interaction with Azure Resource Manager videoindexer (API Version 2024-01-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/videoindexer/2024-01-01/accesstoken"

Client Initialization

client := accesstoken.NewAccessTokenClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AccessTokenClient.GenerateAccessToken

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

payload := accesstoken.GenerateAccessTokenParameters{
	// ...
}


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

Example Usage: AccessTokenClient.GenerateRestrictedViewerAccessToken

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

payload := accesstoken.GenerateRestrictedViewerAccessTokenParameters{
	// ...
}


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

func PossibleValuesForPermissionType() []string

func PossibleValuesForScope

func PossibleValuesForScope() []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 AccessToken

type AccessToken struct {
	AccessToken *string `json:"accessToken,omitempty"`
}

type AccessTokenClient

type AccessTokenClient struct {
	Client *resourcemanager.Client
}

func NewAccessTokenClientWithBaseURI

func NewAccessTokenClientWithBaseURI(sdkApi sdkEnv.Api) (*AccessTokenClient, error)

func (AccessTokenClient) GenerateAccessToken

GenerateAccessToken ...

func (AccessTokenClient) GenerateRestrictedViewerAccessToken

GenerateRestrictedViewerAccessToken ...

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 GenerateAccessTokenOperationResponse

type GenerateAccessTokenOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AccessToken
}

type GenerateAccessTokenParameters

type GenerateAccessTokenParameters struct {
	PermissionType PermissionType `json:"permissionType"`
	ProjectId      *string        `json:"projectId,omitempty"`
	Scope          Scope          `json:"scope"`
	VideoId        *string        `json:"videoId,omitempty"`
}

type GenerateRestrictedViewerAccessTokenOperationResponse

type GenerateRestrictedViewerAccessTokenOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AccessToken
}

type GenerateRestrictedViewerAccessTokenParameters

type GenerateRestrictedViewerAccessTokenParameters struct {
	ProjectId *string `json:"projectId,omitempty"`
	Scope     Scope   `json:"scope"`
	VideoId   *string `json:"videoId,omitempty"`
}

type PermissionType

type PermissionType string
const (
	PermissionTypeContributor PermissionType = "Contributor"
	PermissionTypeReader      PermissionType = "Reader"
)

func (*PermissionType) UnmarshalJSON

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

type Scope

type Scope string
const (
	ScopeAccount Scope = "Account"
	ScopeProject Scope = "Project"
	ScopeVideo   Scope = "Video"
)

func (*Scope) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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